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: 27888 35254 79.1 %
Date: 2025-08-01 10:10:57 Functions: 999 1087 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       67597 : SWIG_TypeCheck(const char *c, swig_type_info *ty) {
     449       67597 :   if (ty) {
     450       67597 :     swig_cast_info *iter = ty->cast;
     451       71561 :     while (iter) {
     452       71560 :       if (strcmp(iter->type->name, c) == 0) {
     453       67596 :         if (iter == ty->cast)
     454             :           return iter;
     455             :         /* Move iter to the top of the linked list */
     456        2849 :         iter->prev->next = iter->next;
     457        2849 :         if (iter->next)
     458        2736 :           iter->next->prev = iter->prev;
     459        2849 :         iter->next = ty->cast;
     460        2849 :         iter->prev = 0;
     461        2849 :         if (ty->cast) ty->cast->prev = iter;
     462        2849 :         ty->cast = iter;
     463        2849 :         return iter;
     464             :       }
     465        3964 :       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       67596 : SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
     503       67596 :   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      375442 : 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      375442 :   if (!type) return NULL;
     539      375442 :   if (type->str != NULL) {
     540             :     const char *last_name = type->str;
     541             :     const char *s;
     542     8636510 :     for (s = type->str; *s; s++)
     543     8261070 :       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        2367 : SWIG_Python_ErrorType(int code) {
     868        2367 :   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        2174 :   case SWIG_RuntimeError:
     877        2174 :     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         167 :   case SWIG_ValueError:
     895         167 :     type = PyExc_ValueError;
     896           0 :     break;
     897           0 :   case SWIG_SystemError:
     898           0 :     type = PyExc_SystemError;
     899           0 :     break;
     900           0 :   case SWIG_AttributeError:
     901           0 :     type = PyExc_AttributeError;
     902           0 :     break;
     903           0 :   default:
     904           0 :     type = PyExc_RuntimeError;
     905             :   }
     906        2174 :   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      841168 :          SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
     987       31312 :          ~SWIG_Python_Thread_Block() { end(); }
     988             :        };
     989             :        class SWIG_Python_Thread_Allow {
     990             :          bool status;
     991             :          PyThreadState *save;
     992             :        public:
     993     7925810 :          void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
     994     7925810 :          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        2370 : SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
    1143        2370 :   SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    1144        2370 :   PyErr_SetString(errtype, msg);
    1145        2370 :   SWIG_PYTHON_THREAD_END_BLOCK;
    1146        2370 : }
    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      430273 : SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
    1183      430273 :   if (!result) {
    1184             :     result = obj;
    1185      429960 :   } else if (result == Py_None) {
    1186      417363 :     Py_DECREF(result);
    1187             :     result = obj;
    1188             :   } else {
    1189       12597 :     if (!PyList_Check(result)) {
    1190       11843 :       PyObject *o2 = result;
    1191       11843 :       result = PyList_New(1);
    1192       11843 :       PyList_SetItem(result, 0, o2);
    1193             :     }
    1194       12597 :     PyList_Append(result,obj);
    1195       12597 :     Py_DECREF(obj);
    1196             :   }
    1197      430273 :   return result;
    1198             : }
    1199             : 
    1200             : /* Unpack the argument tuple */
    1201             : 
    1202             : SWIGINTERN Py_ssize_t
    1203     1468310 : SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
    1204             : {
    1205     1468310 :   if (!args) {
    1206      115518 :     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     1352790 :   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     1340600 :     Py_ssize_t l = PyTuple_GET_SIZE(args);
    1227     1340600 :     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     1340600 :     } 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     4767320 :       for (i = 0; i < l; ++i) {
    1238     3426710 :   objs[i] = PyTuple_GET_ITEM(args, i);
    1239             :       }
    1240     1733610 :       for (; l < max; ++l) {
    1241      393010 :   objs[l] = 0;
    1242             :       }
    1243     1340600 :       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      691085 : SWIG_Py_Void(void)
    1282             : {
    1283      691085 :   PyObject *none = Py_None;
    1284           0 :   Py_INCREF(none);
    1285       97895 :   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      375442 : SwigPyObject_repr(SwigPyObject *v)
    1443             : {
    1444      375442 :   const char *name = SWIG_TypePrettyName(v->ty);
    1445      375442 :   PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
    1446      375442 :   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      375442 :   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     8504750 : SwigPyObject_type(void) {
    1506     8504750 :   static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
    1507     8504750 :   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      597306 : SwigPyObject_dealloc(PyObject *v)
    1529             : {
    1530      597306 :   SwigPyObject *sobj = (SwigPyObject *) v;
    1531      597306 :   PyObject *next = sobj->next;
    1532      597306 :   if (sobj->own == SWIG_POINTER_OWN) {
    1533       91659 :     swig_type_info *ty = sobj->ty;
    1534       91659 :     SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
    1535       91659 :     PyObject *destroy = data ? data->destroy : 0;
    1536       91659 :     if (destroy) {
    1537             :       /* destroy is always a VARARGS method */
    1538       91659 :       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       91659 :       PyObject *type = NULL, *value = NULL, *traceback = NULL;
    1548       91659 :       PyErr_Fetch(&type, &value, &traceback);
    1549             : 
    1550       91659 :       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       91659 :         PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
    1557       91659 :         PyObject *mself = PyCFunction_GET_SELF(destroy);
    1558       91659 :         res = ((*meth)(mself, v));
    1559             :       }
    1560       91659 :       if (!res)
    1561           0 :         PyErr_WriteUnraisable(destroy);
    1562             : 
    1563       91659 :       PyErr_Restore(type, value, traceback);
    1564             : 
    1565      183318 :       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      597306 :   Py_XDECREF(next);
    1575      597306 :   PyObject_DEL(v);
    1576      597306 : }
    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        6098 : SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
    1605             : {
    1606        6098 :   SwigPyObject *sobj = (SwigPyObject *)v;
    1607        6098 :   sobj->own = 0;
    1608        6098 :   return SWIG_Py_Void();
    1609             : }
    1610             : 
    1611             : SWIGINTERN PyObject*
    1612         260 : SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
    1613             : {
    1614         260 :   SwigPyObject *sobj = (SwigPyObject *)v;
    1615         260 :   sobj->own = SWIG_POINTER_OWN;
    1616         260 :   return SWIG_Py_Void();
    1617             : }
    1618             : 
    1619             : SWIGINTERN PyObject*
    1620        6358 : SwigPyObject_own(PyObject *v, PyObject *args)
    1621             : {
    1622        6358 :   PyObject *val = 0;
    1623        6358 :   if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) {
    1624             :     return NULL;
    1625             :   } else {
    1626        6358 :     SwigPyObject *sobj = (SwigPyObject *)v;
    1627        6358 :     PyObject *obj = PyBool_FromLong(sobj->own);
    1628        6358 :     if (val) {
    1629        6358 :       if (PyObject_IsTrue(val)) {
    1630         260 :         SwigPyObject_acquire(v,args);
    1631             :       } else {
    1632        6098 :         SwigPyObject_disown(v,args);
    1633             :       }
    1634             :     } 
    1635        6358 :     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      597379 : SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
    1779             : {
    1780      597379 :   SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
    1781      597379 :   if (sobj) {
    1782      597379 :     sobj->ptr  = ptr;
    1783      597379 :     sobj->ty   = ty;
    1784      597379 :     sobj->own  = own;
    1785      597379 :     sobj->next = 0;
    1786             :   }
    1787      597379 :   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     3615150 : SWIG_This(void)
    1978             : {
    1979     3615150 :   if (Swig_This_global == NULL)
    1980         277 :     Swig_This_global = SWIG_Python_str_FromChar("this");
    1981     3615150 :   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     3705680 : SWIG_Python_GetSwigThis(PyObject *pyobj) 
    1993             : {
    1994     3705700 :   PyObject *obj;
    1995             : 
    1996     3705700 :   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     3610320 :   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     3610320 :   obj = PyObject_GetAttr(pyobj,SWIG_This());
    2039     3610320 :   if (obj) {
    2040     3604020 :     Py_DECREF(obj);
    2041             :   } else {
    2042        6310 :     if (PyErr_Occurred()) PyErr_Clear();
    2043        6310 :     return 0;
    2044             :   }
    2045             : #endif
    2046     3604020 :   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     3721340 : SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
    2074     3721340 :   int res;
    2075     3721340 :   SwigPyObject *sobj;
    2076     3721340 :   int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
    2077             : 
    2078     3721340 :   if (!obj)
    2079             :     return SWIG_ERROR;
    2080     3721340 :   if (obj == Py_None && !implicit_conv) {
    2081       19927 :     if (ptr)
    2082       19927 :       *ptr = 0;
    2083       39854 :     return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
    2084             :   }
    2085             : 
    2086     3701410 :   res = SWIG_ERROR;
    2087             : 
    2088     3701410 :   sobj = SWIG_Python_GetSwigThis(obj);
    2089     3701410 :   if (own)
    2090           0 :     *own = 0;
    2091     3701420 :   while (sobj) {
    2092     3699370 :     void *vptr = sobj->ptr;
    2093     3699370 :     if (ty) {
    2094     3699370 :       swig_type_info *to = sobj->ty;
    2095     3699370 :       if (to == ty) {
    2096             :         /* no type cast needed */
    2097     3631770 :         if (ptr) *ptr = vptr;
    2098             :         break;
    2099             :       } else {
    2100       67597 :         swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
    2101       67597 :         if (!tc) {
    2102           1 :           sobj = (SwigPyObject *)sobj->next;
    2103             :         } else {
    2104       67596 :           if (ptr) {
    2105       67596 :             int newmemory = 0;
    2106       67596 :             *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
    2107       67596 :             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     3701410 :   if (sobj) {
    2122     3699370 :     if (own)
    2123           0 :       *own = *own | sobj->own;
    2124     3699370 :     if (flags & SWIG_POINTER_DISOWN) {
    2125       97995 :       sobj->own = 0;
    2126             :     }
    2127             :     res = SWIG_OK;
    2128             :   } else {
    2129        2044 :     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        4267 : SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
    2281             : {
    2282        4267 :  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        4267 :  dict = PyObject_GetAttrString(inst, "__dict__");
    2296        4267 :  PyDict_SetItem(dict, SWIG_This(), swig_this);
    2297        4267 :  Py_DECREF(dict);
    2298        4267 : } 
    2299             : 
    2300             : 
    2301             : SWIGINTERN PyObject *
    2302        4267 : SWIG_Python_InitShadowInstance(PyObject *args) {
    2303        4267 :   PyObject *obj[2];
    2304        4267 :   if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
    2305             :     return NULL;
    2306             :   } else {
    2307        4267 :     SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
    2308        4267 :     if (sthis) {
    2309           0 :       SwigPyObject_append((PyObject*) sthis, obj[1]);
    2310             :     } else {
    2311        4267 :       SWIG_Python_SetSwigThis(obj[0], obj[1]);
    2312             :     }
    2313        4267 :     return SWIG_Py_Void();
    2314             :   }
    2315             : }
    2316             : 
    2317             : /* Create a new pointer object */
    2318             : 
    2319             : SWIGRUNTIME PyObject *
    2320      615336 : SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
    2321      615336 :   SwigPyClientData *clientdata;
    2322      615336 :   PyObject * robj;
    2323      615336 :   int own;
    2324             : 
    2325      615336 :   if (!ptr)
    2326       17957 :     return SWIG_Py_Void();
    2327             : 
    2328      597379 :   clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
    2329      597379 :   own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
    2330      597379 :   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      597379 :   assert(!(flags & SWIG_BUILTIN_TP_INIT));
    2361             : 
    2362      597379 :   robj = SwigPyObject_New(ptr, type, own);
    2363      597379 :   if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
    2364      592802 :     PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
    2365      592802 :     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     2541660 :   SWIG_From_int  (int value)
    2932             : {
    2933     2541660 :   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      186558 : 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      373116 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    2983             : 
    2984      186558 :     if( inputOutputBuf == Py_None )
    2985      186418 :         inputOutputBuf = NULL;
    2986             : 
    2987      186558 :     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      186483 :         *buf = (void *)PyByteArray_FromStringAndSize( NULL, buf_size );
    3025      186483 :         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      186483 :         data = PyByteArray_AsString( (PyObject *)*buf );
    3037             :     }
    3038      186519 :     SWIG_PYTHON_THREAD_END_BLOCK;
    3039             :     return true;
    3040             : }
    3041             : 
    3042      186519 : static void readraster_releasebuffer(CPLErr eErr,
    3043             :                                      void** buf,
    3044             :                                      void* inputOutputBuf,
    3045             :                                      Py_buffer& view)
    3046             : {
    3047      186519 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    3048             : 
    3049      186519 :     if( inputOutputBuf )
    3050          36 :         PyBuffer_Release(&view);
    3051             : 
    3052      186519 :     if (eErr == CE_Failure)
    3053             :     {
    3054        1333 :         if( inputOutputBuf == NULL )
    3055        1333 :             Py_DECREF((PyObject*)*buf);
    3056        1333 :         *buf = NULL;
    3057             :     }
    3058      185186 :     else if( inputOutputBuf )
    3059             :     {
    3060          36 :         *buf = inputOutputBuf;
    3061          36 :         Py_INCREF((PyObject*)*buf);
    3062             :     }
    3063             : 
    3064      186519 :     SWIG_PYTHON_THREAD_END_BLOCK;
    3065      186519 : }
    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     2984540 : 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       21879 : PythonBindingErrorHandler(CPLErr eclass, CPLErrorNum err_no, const char *msg )
    3089             : {
    3090       21879 :   PythonBindingErrorHandlerContext* ctxt = static_cast<
    3091       21879 :       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       21879 :   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       21879 :   else if (eclass != CE_Failure ) {
    3111       19367 :     CPLCallPreviousHandler(eclass, err_no, msg );
    3112             :   }
    3113             :   else {
    3114        2512 :     ctxt->nLastCode = err_no;
    3115        2512 :     try
    3116             :     {
    3117        2512 :         if( ctxt->osFailureMsg.empty() ) {
    3118        2225 :           ctxt->osFailureMsg = msg;
    3119        2225 :           ctxt->osInitialMsg = ctxt->osFailureMsg;
    3120             :         } else {
    3121         287 :           if( ctxt->osFailureMsg.size() < 10000 ) {
    3122         574 :             std::string osTmp(msg);
    3123         287 :             osTmp += "\nMay be caused by: ";
    3124         287 :             osTmp += ctxt->osFailureMsg;
    3125         287 :             ctxt->osFailureMsg = std::move(osTmp);
    3126         287 :             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       21879 : }
    3143             : 
    3144             : 
    3145             : 
    3146             : 
    3147             : static
    3148     8179720 : int GetUseExceptions() {
    3149     5875690 :   return bUseExceptionsLocal >= 0 ? bUseExceptionsLocal : bUseExceptions;
    3150             : }
    3151             : 
    3152       11390 : static int _GetExceptionsLocal()
    3153             : {
    3154       11390 :   return bUseExceptionsLocal;
    3155             : }
    3156             : 
    3157       22780 : static void _SetExceptionsLocal(int bVal)
    3158             : {
    3159       22780 :   bUseExceptionsLocal = bVal;
    3160             : }
    3161             : 
    3162             : static
    3163          29 : void _UseExceptions() {
    3164          29 :   CPLErrorReset();
    3165          29 :   bUserHasSpecifiedIfUsingExceptions = TRUE;
    3166          29 :   if( !bUseExceptions )
    3167             :   {
    3168          26 :     bUseExceptions = 1;
    3169             :   }
    3170             : }
    3171             : 
    3172             : static
    3173           5 : void _DontUseExceptions() {
    3174           5 :   CPLErrorReset();
    3175           5 :   bUserHasSpecifiedIfUsingExceptions = TRUE;
    3176           5 :   if( bUseExceptions )
    3177             :   {
    3178           0 :     bUseExceptions = 0;
    3179             :   }
    3180             : }
    3181             : 
    3182       57343 : 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     1056240 : SWIG_AsVal_double (PyObject *obj, double *val)
    3201             : {
    3202     1056240 :   int res = SWIG_TypeError;
    3203     1056240 :   if (PyFloat_Check(obj)) {
    3204       40378 :     if (val) *val = PyFloat_AsDouble(obj);
    3205       40378 :     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     1015860 :   } else if (PyLong_Check(obj)) {
    3212     1015860 :     double v = PyLong_AsDouble(obj);
    3213     1015860 :     if (!PyErr_Occurred()) {
    3214     1015860 :       if (val) *val = v;
    3215     1015860 :       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     2621200 : 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     2621200 :   if (PyLong_Check(obj)) {
    3291     2621190 :     long v = PyLong_AsLong(obj);
    3292     2621190 :     if (!PyErr_Occurred()) {
    3293     2621190 :       if (val) *val = v;
    3294     2621190 :       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     2612520 : SWIG_AsVal_int (PyObject * obj, int *val)
    3326             : {
    3327     2612520 :   long v;
    3328     5225040 :   int res = SWIG_AsVal_long (obj, &v);
    3329     2612520 :   if (SWIG_IsOK(res)) {
    3330     2612510 :     if ((v < INT_MIN || v > INT_MAX)) {
    3331             :       return SWIG_OverflowError;
    3332             :     } else {
    3333     2603820 :       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     4490090 : template<class T> static T ReturnSame(T x)
    3350             : {
    3351     4490090 :     if( bReturnSame )
    3352             :         return x;
    3353             :     return 0;
    3354             : }
    3355             : 
    3356     2984540 : static void pushErrorHandler()
    3357             : {
    3358     2984540 :     CPLErrorReset();
    3359     2984540 :     PythonBindingErrorHandlerContext* ctxt = new PythonBindingErrorHandlerContext();
    3360     2984540 :     CPLPushErrorHandlerEx(PythonBindingErrorHandler, ctxt);
    3361     2984540 : }
    3362             : 
    3363     2984540 : static void popErrorHandler()
    3364             : {
    3365     2984540 :     PythonBindingErrorHandlerContext* ctxt = static_cast<
    3366     2984540 :       PythonBindingErrorHandlerContext*>(CPLGetErrorHandlerUserData());
    3367     2984540 :     CPLPopErrorHandler();
    3368     2984540 :     if( ctxt->bMemoryError )
    3369             :     {
    3370           0 :         CPLErrorSetState(
    3371             :           CE_Failure, CPLE_OutOfMemory, "Out of memory");
    3372             :     }
    3373     2984540 :     else if( !ctxt->osFailureMsg.empty() )
    3374             :     {
    3375        2240 :       CPLErrorSetState(
    3376        2225 :           CPLGetLastErrorType() == CE_Failure ? CE_Failure: CE_Warning,
    3377             :           ctxt->nLastCode, ctxt->osFailureMsg.c_str());
    3378             :     }
    3379     2984540 :     delete ctxt;
    3380     2984540 : }
    3381             : 
    3382             : 
    3383             : 
    3384             : 
    3385             : /* Return a PyObject* from a NULL terminated C String */
    3386             : static PyObject* GDALPythonObjectFromCStr(const char *pszStr) CPL_UNUSED;
    3387      113878 : static PyObject* GDALPythonObjectFromCStr(const char *pszStr)
    3388             : {
    3389      113878 :   const unsigned char* pszIter = (const unsigned char*) pszStr;
    3390    15355000 :   while(*pszIter != 0)
    3391             :   {
    3392    15241200 :     if (*pszIter > 127)
    3393             :     {
    3394         113 :         PyObject* pyObj = PyUnicode_DecodeUTF8(pszStr, strlen(pszStr), "strict");
    3395         113 :         if (pyObj != NULL && !PyErr_Occurred())
    3396             :             return pyObj;
    3397           1 :         PyErr_Clear();
    3398           1 :         return PyBytes_FromString(pszStr);
    3399             :     }
    3400    15241100 :     pszIter ++;
    3401             :   }
    3402      113765 :   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      102424 : static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree)
    3409             : {
    3410      102424 :   *pbToFree = 0;
    3411      102424 :   if (PyUnicode_Check(pyObject))
    3412             :   {
    3413      102422 :       char *pszStr;
    3414      102422 :       char *pszNewStr;
    3415      102422 :       Py_ssize_t nLen;
    3416      102422 :       PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObject);
    3417      102422 :       if( pyUTF8Str == NULL )
    3418             :         return NULL;
    3419      102422 :       PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    3420      102422 :       pszNewStr = (char *) malloc(nLen+1);
    3421      102422 :       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      102422 :       memcpy(pszNewStr, pszStr, nLen+1);
    3429      102422 :       Py_XDECREF(pyUTF8Str);
    3430      102422 :       *pbToFree = 1;
    3431      102422 :       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       10652 : static char * GDALPythonPathToCStr(PyObject* pyObject, int* pbToFree)
    3461             : {
    3462       10652 :     PyObject* os = PyImport_ImportModule("os");
    3463       10652 :     if (os == NULL)
    3464             :     {
    3465             :         return NULL;
    3466             :     }
    3467             : 
    3468       10652 :     PyObject* pathLike = PyObject_GetAttrString(os, "PathLike");
    3469       10652 :     if (pathLike == NULL)
    3470             :     {
    3471           0 :         Py_DECREF(os);
    3472           0 :         return NULL;
    3473             :     }
    3474             : 
    3475       10652 :     if (!PyObject_IsInstance(pyObject, pathLike))
    3476             :     {
    3477           4 :         Py_DECREF(pathLike);
    3478           4 :         Py_DECREF(os);
    3479           4 :         return NULL;
    3480             :     }
    3481             : 
    3482       10648 :     PyObject* str = PyObject_Str(pyObject);
    3483       10648 :     char* ret = NULL;
    3484       10648 :     if (str != NULL)
    3485             :     {
    3486       10648 :         ret = GDALPythonObjectToCStr(str, pbToFree);
    3487       10648 :         Py_DECREF(str);
    3488             :     }
    3489             : 
    3490       10648 :     Py_DECREF(pathLike);
    3491       10648 :     Py_DECREF(os);
    3492             : 
    3493             :     return ret;
    3494             : }
    3495             : 
    3496             : 
    3497             : static void GDALPythonFreeCStr(void* ptr, int bToFree) CPL_UNUSED;
    3498      102428 : static void GDALPythonFreeCStr(void* ptr, int bToFree)
    3499             : {
    3500      102428 :    if (bToFree)
    3501      102422 :        free(ptr);
    3502             : }
    3503             : 
    3504             : 
    3505             : 
    3506       27508 : unsigned int wrapper_VSIFReadL( void **buf, unsigned int nMembSize, unsigned int nMembCount, VSILFILE *fp)
    3507             : {
    3508       27508 :     size_t buf_size = static_cast<size_t>(nMembSize) * nMembCount;
    3509       27508 :     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       27508 :     if (buf_size == 0)
    3517             :     {
    3518          12 :         *buf = NULL;
    3519          12 :         return 0;
    3520             :     }
    3521             : 
    3522       55004 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    3523       27496 :     *buf = (void *)PyByteArray_FromStringAndSize( NULL, buf_size );
    3524       27496 :     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       27496 :     PyObject* o = (PyObject*) *buf;
    3536       27496 :     char *data = PyByteArray_AsString(o);
    3537       27496 :     SWIG_PYTHON_THREAD_END_BLOCK;
    3538       27496 :     size_t nRet = (size_t)VSIFReadL( data, nMembSize, nMembCount, fp );
    3539       27496 :     if (nRet * (size_t)nMembSize < buf_size)
    3540             :     {
    3541       11147 :         SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    3542       11147 :         PyByteArray_Resize(o, nRet * nMembSize);
    3543       11147 :         SWIG_PYTHON_THREAD_END_BLOCK;
    3544       11147 :         *buf = o;
    3545             :     }
    3546       27496 :     return static_cast<unsigned int>(nRet);
    3547             : }
    3548             : 
    3549             : 
    3550             : SWIGINTERN int
    3551       59143 : 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       59143 :   if (PyLong_Check(obj)) {
    3565       59143 :     unsigned long v = PyLong_AsUnsignedLong(obj);
    3566       59143 :     if (!PyErr_Occurred()) {
    3567       59143 :       if (val) *val = v;
    3568       59143 :       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       58895 : SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val)
    3600             : {
    3601       58895 :   unsigned long v;
    3602      117790 :   int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
    3603       58895 :   if (SWIG_IsOK(res)) {
    3604       58895 :     if ((v > UINT_MAX)) {
    3605             :       return SWIG_OverflowError;
    3606             :     } else {
    3607       58895 :       if (val) *val = static_cast< unsigned int >(v);
    3608             :     }
    3609             :   }  
    3610             :   return res;
    3611             : }
    3612             : 
    3613             : 
    3614             : SWIGINTERNINLINE PyObject*
    3615       27508 :   SWIG_From_unsigned_SS_int  (unsigned int value)
    3616             : {
    3617       27508 :   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        9932 : SWIG_pchar_descriptor(void)
    3629             : {
    3630        9932 :   static int init = 0;
    3631        9932 :   static swig_type_info* info = 0;
    3632        9932 :   if (!init) {
    3633          53 :     info = SWIG_TypeQuery("_p_char");
    3634          53 :     init = 1;
    3635             :   }
    3636        9932 :   return info;
    3637             : }
    3638             : 
    3639             : 
    3640             : SWIGINTERN int
    3641      576606 : 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      576606 :   if (PyUnicode_Check(obj))
    3648             : #endif
    3649             : #else  
    3650             :   if (PyString_Check(obj))
    3651             : #endif
    3652             :   {
    3653      566674 :     char *cstr; Py_ssize_t len;
    3654      566674 :     int ret = SWIG_OK;
    3655             : #if PY_VERSION_HEX>=0x03000000
    3656             : #if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
    3657      566674 :     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      566674 :     obj = PyUnicode_AsUTF8String(obj); if (!obj) return SWIG_TypeError;
    3665      566674 :     if (!obj)
    3666             :       return SWIG_TypeError;
    3667      566674 :     if (alloc)
    3668      566541 :       *alloc = SWIG_NEWOBJ;
    3669             : #endif
    3670      566674 :     PyBytes_AsStringAndSize(obj, &cstr, &len);
    3671             : #else
    3672             :     PyString_AsStringAndSize(obj, &cstr, &len);
    3673             : #endif
    3674      566674 :     if (cptr) {
    3675      566541 :       if (alloc) {
    3676      566541 :   if (*alloc == SWIG_NEWOBJ) {
    3677      566541 :     *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
    3678      566541 :     *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      566674 :     if (psize) *psize = len + 1;
    3698             : #if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
    3699      566674 :     Py_XDECREF(obj);
    3700             : #endif
    3701      566674 :     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        9932 :     swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
    3733        9932 :     if (pchar_descriptor) {
    3734        9932 :       void* vptr = 0;
    3735        9932 :       if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
    3736        8152 :   if (cptr) *cptr = (char *) vptr;
    3737        8152 :   if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
    3738        8152 :   if (alloc) *alloc = SWIG_OLDOBJ;
    3739        8152 :   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        7763 : PyProgressProxy( double dfComplete, const char *pszMessage, void *pData )
    3767             : 
    3768             : {
    3769        7763 :     PyProgressData *psInfo = (PyProgressData *) pData;
    3770        7763 :     PyObject *psArgs, *psResult;
    3771        7763 :     int      bContinue = TRUE;
    3772             : 
    3773        7763 :     if( dfComplete > 0 && psInfo->nLastReported == (int) (100.0 * dfComplete) )
    3774             :         return TRUE;
    3775             : 
    3776        3774 :     if( psInfo->psPyCallback == NULL || psInfo->psPyCallback == Py_None )
    3777             :         return TRUE;
    3778             : 
    3779        3774 :     psInfo->nLastReported = (int) (100.0 * dfComplete);
    3780             : 
    3781        3774 :     if( pszMessage == NULL )
    3782         801 :         pszMessage = "";
    3783             : 
    3784       11537 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    3785             : 
    3786        3774 :     if( psInfo->psPyCallbackData == NULL )
    3787        2586 :         psArgs = Py_BuildValue("(dsO)", dfComplete, pszMessage, Py_None );
    3788             :     else
    3789        1188 :         psArgs = Py_BuildValue("(dsO)", dfComplete, pszMessage,
    3790             :                          psInfo->psPyCallbackData );
    3791             : 
    3792        3774 :     psResult = PyObject_CallObject( psInfo->psPyCallback, psArgs);
    3793        3774 :     Py_XDECREF(psArgs);
    3794             : 
    3795        3774 :     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        3773 :     if( psResult == NULL )
    3804             :     {
    3805           0 :         SWIG_PYTHON_THREAD_END_BLOCK;
    3806             :         return TRUE;
    3807             :     }
    3808             : 
    3809        3773 :     if( psResult == Py_None )
    3810             :     {
    3811          14 :         SWIG_PYTHON_THREAD_END_BLOCK;
    3812             :         return TRUE;
    3813             :     }
    3814             : 
    3815        3759 :     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        3758 :     Py_XDECREF(psResult);
    3825        3758 :     SWIG_PYTHON_THREAD_END_BLOCK;
    3826             : 
    3827        3758 :     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         779 : void CPL_STDCALL PyCPLErrorHandler(CPLErr eErrClass, CPLErrorNum err_no, const char* pszErrorMsg)
    3855             : {
    3856         779 :     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         779 :     void* user_data = CPLGetErrorHandlerUserData();
    3864         779 :     PyObject *psArgs;
    3865             : 
    3866        1558 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    3867             : 
    3868         779 :     psArgs = Py_BuildValue("(iis)", eErrClass, err_no, pszErrorMsg );
    3869         779 :     PyObject_CallObject( (PyObject*)user_data, psArgs);
    3870         779 :     Py_XDECREF(psArgs);
    3871             : 
    3872         779 :     SWIG_PYTHON_THREAD_END_BLOCK;
    3873             : }
    3874             : 
    3875             : 
    3876       30124 :   CPLErr PushErrorHandler( CPLErrorHandler pfnErrorHandler = NULL, void* user_data = NULL )
    3877             :   {
    3878       30124 :     if( pfnErrorHandler == NULL )
    3879          76 :         CPLPushErrorHandler(CPLQuietErrorHandler);
    3880             :     else
    3881       30048 :         CPLPushErrorHandlerEx(pfnErrorHandler, user_data);
    3882       30124 :     return CE_None;
    3883             :   }
    3884             : 
    3885             : 
    3886       30119 :   void PopErrorHandler()
    3887             :   {
    3888       30119 :      void* user_data = CPLGetErrorHandlerUserData();
    3889       30119 :      if( user_data != NULL )
    3890             :      {
    3891        1521 :          Py_XDECREF((PyObject*)user_data);
    3892             :      }
    3893       30119 :      CPLPopErrorHandler();
    3894       30119 :   }
    3895             : 
    3896             : 
    3897          28 :   void Error( CPLErr msg_class = CE_Failure, int err_code = 0, const char* msg = "error" ) {
    3898          28 :     CPLError( msg_class, err_code, "%s", msg );
    3899          28 :   }
    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      347067 : GetBufferAsCharPtrIntSize( PyObject* input, int *nLen, char **pBuf, int *alloc, bool *viewIsValid, Py_buffer *view ) {
    3909      347067 :   {
    3910      347067 :     if (PyObject_GetBuffer(input, view, PyBUF_SIMPLE) == 0)
    3911             :     {
    3912        6611 :       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        6611 :       *viewIsValid = true;
    3918        6611 :       *nLen = (int) view->len;
    3919        6611 :       *pBuf = (char*) view->buf;
    3920        6611 :       return true;
    3921             :     }
    3922             :     else
    3923             :     {
    3924      340456 :       PyErr_Clear();
    3925             :     }
    3926             :   }
    3927      340456 :   if (PyUnicode_Check(input))
    3928             :   {
    3929      340456 :     size_t safeLen = 0;
    3930      340456 :     int ret;
    3931      340456 :     try {
    3932      340456 :       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      340456 :     if (!SWIG_IsOK(ret)) {
    3940           0 :       PyErr_SetString(PyExc_RuntimeError, "invalid Unicode string" );
    3941           0 :       return false;
    3942             :     }
    3943             : 
    3944      340456 :     if (safeLen) safeLen--;
    3945      340456 :     if( safeLen > INT_MAX ) {
    3946           0 :       PyErr_SetString(PyExc_RuntimeError, "too large buffer (>2GB)" );
    3947           0 :       return false;
    3948             :     }
    3949      340456 :     *nLen = (int) safeLen;
    3950      340456 :     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      196745 : SWIG_FromCharPtrAndSize(const char* carray, size_t size)
    3968             : {
    3969      196745 :   if (carray) {
    3970      139620 :     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      139620 :       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       57125 :     return SWIG_Py_Void();
    3987             :   }
    3988             : }
    3989             : 
    3990             : 
    3991             : SWIGINTERNINLINE PyObject * 
    3992      196745 : SWIG_FromCharPtr(const char *cptr)
    3993             : { 
    3994      196745 :   return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
    3995             : }
    3996             : 
    3997             : 
    3998        3244 : char **wrapper_VSIReadDirEx( const char * utf8_path, int nMaxFiles = 0 )
    3999             : {
    4000        3244 :     return VSIReadDirEx(utf8_path, nMaxFiles);
    4001             : }
    4002             : 
    4003             : 
    4004        7231 : static PyObject* CSLToList( char** stringarray, bool *pbErr )
    4005             : {
    4006        7231 :   PyObject* res;
    4007        7231 :   if ( stringarray == NULL ) {
    4008        3627 :     res = Py_None;
    4009        3627 :     Py_INCREF( res );
    4010             :   }
    4011             :   else {
    4012        3604 :     int len = CSLCount( stringarray );
    4013        3604 :     res = PyList_New( len );
    4014        3604 :     if( !res ) {
    4015           0 :       *pbErr = true;
    4016           0 :       return res;
    4017             :     }
    4018       26895 :     for ( int i = 0; i < len; ++i ) {
    4019       23291 :       PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
    4020       23291 :       PyList_SetItem(res, i, o );
    4021             :     }
    4022             :   }
    4023        7231 :   *pbErr = false;
    4024        7231 :   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       17913 : static char **CSLFromPySequence( PyObject *pySeq, int *pbErr )
    4040             : 
    4041             : {
    4042       17913 :   *pbErr = FALSE;
    4043             :   /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
    4044       17913 :   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       17913 :   Py_ssize_t size = PySequence_Size(pySeq);
    4051       17913 :   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       17913 :   if( size == 0 ) {
    4057             :     return NULL;
    4058             :   }
    4059       12477 :   char** papszRet = (char**) VSICalloc((int)size + 1, sizeof(char*));
    4060       12477 :   if( !papszRet ) {
    4061           0 :     PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    4062           0 :     *pbErr = TRUE;
    4063           0 :     return NULL;
    4064             :   }
    4065      109059 :   for (int i = 0; i < (int)size; i++) {
    4066       96583 :     PyObject* pyObj = PySequence_GetItem(pySeq,i);
    4067       96583 :     if (PyUnicode_Check(pyObj))
    4068             :     {
    4069       96579 :       char *pszStr;
    4070       96579 :       Py_ssize_t nLen;
    4071       96579 :       PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
    4072       96579 :       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       96579 :       PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    4081       96579 :       papszRet[i] = VSIStrdup(pszStr);
    4082      190301 :       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       96582 :     Py_DECREF(pyObj);
    4095       96582 :     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         456 : static char **CSLFromPyMapping( PyObject *pyObj, int *pbErr )
    4108             : 
    4109             : {
    4110         456 :     char** retCSL = NULL;
    4111         456 :     Py_ssize_t size = PyMapping_Length( pyObj );
    4112         456 :     if ( size > 0 && size == (int)size) {
    4113         269 :       PyObject *item_list = PyMapping_Items( pyObj );
    4114        1217 :       for( int i=0; i<(int)size; i++ ) {
    4115         951 :         PyObject *it = PySequence_GetItem( item_list, i );
    4116             : 
    4117         951 :         PyObject *k, *v;
    4118         951 :         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         951 :         PyObject* kStr = PyObject_Str(k);
    4128         951 :         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         950 :         PyObject* vStr;
    4138         950 :         if( PyBytes_Check(v) )
    4139             :         {
    4140           2 :             vStr = v;
    4141           2 :             Py_INCREF(vStr);
    4142             :         }
    4143             :         else
    4144             :         {
    4145         948 :             vStr = PyObject_Str(v);
    4146         948 :             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         949 :         int bFreeK, bFreeV;
    4158         949 :         char* pszK = GDALPythonObjectToCStr(kStr, &bFreeK);
    4159         949 :         char* pszV = GDALPythonObjectToCStr(vStr, &bFreeV);
    4160         949 :         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         948 :         retCSL = CSLAddNameValue( retCSL, pszK, pszV );
    4174             : 
    4175         948 :         GDALPythonFreeCStr(pszK, bFreeK);
    4176         948 :         GDALPythonFreeCStr(pszV, bFreeV);
    4177         948 :         Py_DECREF(kStr);
    4178         948 :         Py_DECREF(vStr);
    4179         948 :         Py_DECREF(it);
    4180             :       }
    4181         266 :       Py_DECREF(item_list);
    4182             :     }
    4183         453 :     *pbErr = FALSE;
    4184         453 :     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        9898 :   SWIG_From_bool  (bool value)
    4203             : {
    4204        9898 :   return PyBool_FromLong(value ? 1 : 0);
    4205             : }
    4206             : 
    4207             : 
    4208             : /* Return a PyObject* from a C String */
    4209       90009 : static PyObject* GDALPythonObjectFromCStrAndSize(const char *pszStr, size_t nLen)
    4210             : {
    4211       90009 :   const unsigned char* pszIter = (const unsigned char*) pszStr;
    4212     1591290 :   for( size_t i = 0; i < nLen; ++i)
    4213             :   {
    4214     1501280 :     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       90006 :   return PyUnicode_FromStringAndSize(pszStr, nLen);
    4224             : }
    4225             : 
    4226             : 
    4227             : static PyObject*
    4228        7049 : GetCSLStringAsPyDict( char **stringarray, bool bFreeCSL ) {
    4229        7049 :   PyObject* dict = PyDict_New();
    4230        7049 :   if ( stringarray != NULL ) {
    4231       96792 :     for (char** iter = stringarray; *iter; ++iter ) {
    4232       90285 :       const char* pszSep = strchr( *iter, '=' );
    4233       90285 :       if ( pszSep != NULL) {
    4234       90009 :         const char* keyptr = *iter;
    4235       90009 :         const char* valptr = pszSep + 1;
    4236       90009 :         PyObject *nm = GDALPythonObjectFromCStrAndSize( keyptr, (size_t)(pszSep - keyptr) );
    4237       90009 :         PyObject *val = GDALPythonObjectFromCStr( valptr );
    4238       90009 :         PyDict_SetItem(dict, nm, val );
    4239       90009 :         Py_DECREF(nm);
    4240       90285 :         Py_DECREF(val);
    4241             :       }
    4242             :     }
    4243             :   }
    4244        7049 :   if( bFreeCSL )
    4245          41 :     CSLDestroy(stringarray);
    4246        7049 :   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       21300 : const char *wrapper_CPLGetConfigOption( const char * pszKey, const char * pszDefault = NULL )
    4291             : {
    4292       21300 :     return CPLGetConfigOption( pszKey, pszDefault );
    4293             : }
    4294        1904 : const char *wrapper_CPLGetGlobalConfigOption( const char * pszKey, const char * pszDefault = NULL )
    4295             : {
    4296        1904 :     return CPLGetGlobalConfigOption( pszKey, pszDefault );
    4297             : }
    4298        3036 : const char *wrapper_CPLGetThreadLocalConfigOption( const char * pszKey, const char * pszDefault = NULL )
    4299             : {
    4300        3036 :     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        3581 : VSI_RETVAL wrapper_VSIFileFromMemBuffer( const char* utf8_path, GIntBig nBytes, const char *pabyData)
    4343             : {
    4344        3581 :     const size_t nSize = static_cast<size_t>(nBytes);
    4345        3581 :     void* pabyDataDup = VSIMalloc(nSize);
    4346        3581 :     if (pabyDataDup == NULL)
    4347             :             return -1;
    4348        3581 :     memcpy(pabyDataDup, pabyData, nSize);
    4349        3581 :     VSILFILE *fp = VSIFileFromMemBuffer(utf8_path, (GByte*) pabyDataDup, nSize, TRUE);
    4350             : 
    4351        3581 :     if (fp == NULL) {
    4352           1 :         VSIFree(pabyDataDup);
    4353           1 :         return -1;
    4354             :     } else {
    4355        3580 :         VSIFCloseL(fp);
    4356        3580 :         return 0;
    4357             :     }
    4358             : }
    4359             : 
    4360             : 
    4361             : static bool
    4362      189117 : GetBufferAsCharPtrGIntBigSize( PyObject* input, GIntBig *nLen, char **pBuf, int *alloc, bool *viewIsValid, Py_buffer *view ) {
    4363      189117 :   {
    4364      189117 :     if (PyObject_GetBuffer(input, view, PyBUF_SIMPLE) == 0)
    4365             :     {
    4366      179711 :       *viewIsValid = true;
    4367      179711 :       *nLen = view->len;
    4368      179711 :       *pBuf = (char*) view->buf;
    4369      179711 :       return true;
    4370             :     }
    4371             :     else
    4372             :     {
    4373        9406 :       PyErr_Clear();
    4374             :     }
    4375             :   }
    4376        9406 :   if (PyUnicode_Check(input))
    4377             :   {
    4378        9404 :     size_t safeLen = 0;
    4379        9404 :     int ret;
    4380        9404 :     try {
    4381        9404 :       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        9404 :     if (!SWIG_IsOK(ret)) {
    4389           0 :       PyErr_SetString(PyExc_RuntimeError, "invalid Unicode string" );
    4390           0 :       return false;
    4391             :     }
    4392             : 
    4393        9404 :     if (safeLen) safeLen--;
    4394        9404 :     *nLen = (GIntBig)safeLen;
    4395        9404 :     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        4818 : SWIGINTERN StatBuf *new_StatBuf(StatBuf *psStatBuf){
    4499        9636 :     StatBuf *self = (StatBuf*) CPLMalloc( sizeof( StatBuf ) );
    4500        4818 :     self->mode = psStatBuf->mode;
    4501        4818 :     self->size = psStatBuf->size;
    4502        4818 :     self->mtime = psStatBuf->mtime;
    4503        4818 :     return self;
    4504             :   }
    4505        4818 : SWIGINTERN void delete_StatBuf(StatBuf *self){
    4506        4818 :     CPLFree(self);
    4507        4818 :   }
    4508        2502 : SWIGINTERN int StatBuf_IsDirectory(StatBuf *self){
    4509        2502 :      return (self->mode & S_IFDIR) != 0;
    4510             :   }
    4511             : 
    4512        6300 : int wrapper_VSIStatL( const char * utf8_path, StatBuf *psStatBufOut, int nFlags = 0 )
    4513             : {
    4514        6300 :     VSIStatBufL sStat;
    4515        6300 :     memset(&sStat, 0, sizeof(sStat));
    4516        6300 :     memset(psStatBufOut, 0, sizeof(StatBuf));
    4517        6300 :     int nRet = VSIStatExL(utf8_path, &sStat, nFlags);
    4518        6300 :     psStatBufOut->mode = sStat.st_mode;
    4519        6300 :     psStatBufOut->size = (GIntBig)sStat.st_size;
    4520        6300 :     psStatBufOut->mtime = (GIntBig)sStat.st_mtime;
    4521        6300 :     return nRet;
    4522             : }
    4523             : 
    4524             : 
    4525        4597 : VSILFILE   *wrapper_VSIFOpenL( const char *utf8_path, const char *pszMode )
    4526             : {
    4527        4597 :     if (!pszMode) /* would lead to segfault */
    4528           0 :         pszMode = "r";
    4529        4597 :     return VSIFOpenL( utf8_path, pszMode );
    4530             : }
    4531             : 
    4532             : 
    4533         361 : VSILFILE   *wrapper_VSIFOpenExL( const char *utf8_path, const char *pszMode, int bSetError = FALSE, char** options = NULL )
    4534             : {
    4535         361 :     if (!pszMode) /* would lead to segfault */
    4536           0 :         pszMode = "r";
    4537         361 :     return VSIFOpenEx2L( utf8_path, pszMode, bSetError, options );
    4538             : }
    4539             : 
    4540             : 
    4541             : 
    4542       65890 : int wrapper_VSIFSeekL( VSILFILE* fp, GIntBig offset, int whence) {
    4543             : 
    4544             : 
    4545             : 
    4546       65890 : 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       65889 : return VSIFSeekL(fp, offset, whence);
    4560             : }
    4561             : 
    4562             : 
    4563      346816 : int wrapper_VSIFWriteL( int nLen, char *pBuf, int size, int memb, VSILFILE* fp)
    4564             : {
    4565      346816 :     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      346816 :     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         248 : SWIG_AsVal_size_t (PyObject * obj, size_t *val)
    4701             : {
    4702         248 :   int res = SWIG_TypeError;
    4703             : #ifdef SWIG_LONG_LONG_AVAILABLE
    4704         248 :   if (sizeof(size_t) <= sizeof(unsigned long)) {
    4705             : #endif
    4706         248 :     unsigned long v;
    4707         496 :     res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
    4708         248 :     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         248 :   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        2482 : SWIGINTERN char const *GDALMajorObjectShadow_GetDescription(GDALMajorObjectShadow *self){
    4742        2482 :     return GDALGetDescription( self );
    4743             :   }
    4744          42 : SWIGINTERN void GDALMajorObjectShadow_SetDescription(GDALMajorObjectShadow *self,char const *pszNewDesc){
    4745          42 :     GDALSetDescription( self, pszNewDesc );
    4746          42 :   }
    4747          72 : SWIGINTERN char **GDALMajorObjectShadow_GetMetadataDomainList(GDALMajorObjectShadow *self){
    4748          72 :     return GDALGetMetadataDomainList( self );
    4749             :   }
    4750        6987 : SWIGINTERN char **GDALMajorObjectShadow_GetMetadata_Dict(GDALMajorObjectShadow *self,char const *pszDomain=""){
    4751        6987 :     return GDALGetMetadata( self, pszDomain );
    4752             :   }
    4753         408 : SWIGINTERN char **GDALMajorObjectShadow_GetMetadata_List(GDALMajorObjectShadow *self,char const *pszDomain=""){
    4754         408 :     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       56360 : SWIGINTERN char const *GDALMajorObjectShadow_GetMetadataItem(GDALMajorObjectShadow *self,char const *pszName,char const *pszDomain=""){
    4766       56360 :     return GDALGetMetadataItem( self, pszName, pszDomain);
    4767             :   }
    4768         480 : SWIGINTERN CPLErr GDALMajorObjectShadow_SetMetadataItem(GDALMajorObjectShadow *self,char const *pszName,char const *pszValue,char const *pszDomain=""){
    4769         480 :     return GDALSetMetadataItem( self, pszName, pszValue, pszDomain);
    4770             :   }
    4771       16668 : 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       33336 :     GDALDatasetShadow* ds = (GDALDatasetShadow*) GDALCreate(    self,
    4774             :                                                                 utf8_path,
    4775             :                                                                 xsize,
    4776             :                                                                 ysize,
    4777             :                                                                 bands,
    4778             :                                                                 eType,
    4779             :                                                                 options );
    4780       16668 :     return ds;
    4781             :   }
    4782          67 : SWIGINTERN GDALDatasetShadow *GDALDriverShadow_CreateVector(GDALDriverShadow *self,char const *utf8_path,char **options=0){
    4783         134 :     GDALDatasetShadow* ds = (GDALDatasetShadow*) GDALCreate(self, utf8_path, 0, 0, 0, GDT_Unknown, options);
    4784          67 :     return ds;
    4785             :   }
    4786         424 : SWIGINTERN GDALDatasetShadow *GDALDriverShadow_CreateMultiDimensional(GDALDriverShadow *self,char const *utf8_path,char **root_group_options=0,char **options=0){
    4787             : 
    4788         848 :     GDALDatasetShadow* ds = (GDALDatasetShadow*) GDALCreateMultiDimensional(    self,
    4789             :                                                                 utf8_path,
    4790             :                                                                 root_group_options,
    4791             :                                                                 options );
    4792         424 :     return ds;
    4793             :   }
    4794        3877 : 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        7754 :     GDALDatasetShadow *ds = (GDALDatasetShadow*) GDALCreateCopy(    self,
    4797             :                                                                     utf8_path,
    4798             :                                                                     src,
    4799             :                                                                     strict,
    4800             :                                                                     options,
    4801             :                                                                     callback,
    4802             :                                                                     callback_data );
    4803        3877 :     return ds;
    4804             :   }
    4805        2451 : SWIGINTERN CPLErr GDALDriverShadow_Delete(GDALDriverShadow *self,char const *utf8_path){
    4806        2451 :     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          92 : SWIGINTERN int GDALDriverShadow_Register(GDALDriverShadow *self){
    4822          92 :     return GDALRegisterDriver( self );
    4823             :   }
    4824          92 : SWIGINTERN void GDALDriverShadow_Deregister(GDALDriverShadow *self){
    4825          92 :     GDALDeregisterDriver( self );
    4826          92 :   }
    4827             : 
    4828       97387 : char const *GDALDriverShadow_ShortName_get( GDALDriverShadow *h ) {
    4829       97387 :   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        3432 : SWIGINTERN GDAL_GCP *new_GDAL_GCP(double x=0.0,double y=0.0,double z=0.0,double pixel=0.0,double line=0.0,char const *info="",char const *id=""){
    4868             : 
    4869        3432 :     GDAL_GCP *self = (GDAL_GCP*) CPLMalloc( sizeof( GDAL_GCP ) );
    4870        3432 :     self->dfGCPX = x;
    4871        3432 :     self->dfGCPY = y;
    4872        3432 :     self->dfGCPZ = z;
    4873        3432 :     self->dfGCPPixel = pixel;
    4874        3432 :     self->dfGCPLine = line;
    4875        3432 :     self->pszInfo =  CPLStrdup( (info == 0) ? "" : info );
    4876        3432 :     self->pszId = CPLStrdup( (id==0)? "" : id );
    4877        3432 :     return self;
    4878             :   }
    4879        3432 : SWIGINTERN void delete_GDAL_GCP(GDAL_GCP *self){
    4880        3432 :     if ( self->pszInfo )
    4881        3432 :       CPLFree( self->pszInfo );
    4882        3432 :     if ( self->pszId )
    4883        3432 :       CPLFree( self->pszId );
    4884        3432 :     CPLFree( self );
    4885        3432 :   }
    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       14068 : CreateTupleFromDoubleArray( const double *first, size_t size ) {
    4938       14068 :   PyObject *out = PyTuple_New( size );
    4939       66335 :   for( unsigned int i=0; i<size; i++ ) {
    4940       52267 :     PyObject *val = PyFloat_FromDouble( *first );
    4941       52267 :     ++first;
    4942       52267 :     PyTuple_SetItem( out, i, val );
    4943             :   }
    4944       14068 :   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      352710 : 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      352710 :     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      352708 :     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      352708 :     if (nPixelSize == 0)
    5005             :     {
    5006           1 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal value for data type");
    5007           1 :         return 0;
    5008             :     }
    5009             : 
    5010      352707 :     if( nPixelSpace == 0 )
    5011      351584 :         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      352707 :     if( nLineSpace == 0 )
    5019             :     {
    5020      352668 :         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      352707 :     if( nBandSpace == 0 )
    5029             :     {
    5030      351606 :         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      352707 :     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      352707 :     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      352707 :     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       54940 : SWIGINTERN void delete_GDALDatasetShadow(GDALDatasetShadow *self){
    5160       54940 :     if ( GDALDereferenceDataset( self ) <= 0 ) {
    5161       48164 :       if( GDALClose(self) != CE_None )
    5162             :       {
    5163           5 :           if( CPLGetLastErrorType() == CE_None )
    5164           1 :               CPLError(CE_Failure, CPLE_AppDefined, "Error occurred in GDALClose()");
    5165             :       }
    5166             :     }
    5167       54940 :   }
    5168           4 : SWIGINTERN void GDALDatasetShadow_MarkSuppressOnClose(GDALDatasetShadow *self){
    5169           4 :     GDALDatasetMarkSuppressOnClose(self);
    5170           4 :   }
    5171        3684 : SWIGINTERN CPLErr GDALDatasetShadow_Close(GDALDatasetShadow *self){
    5172        3684 :      return GDALClose(self);
    5173             :   }
    5174        1327 : SWIGINTERN GDALDriverShadow *GDALDatasetShadow_GetDriver(GDALDatasetShadow *self){
    5175        1327 :     return (GDALDriverShadow*) GDALGetDatasetDriver( self );
    5176             :   }
    5177      358938 : SWIGINTERN GDALRasterBandShadow *GDALDatasetShadow_GetRasterBand(GDALDatasetShadow *self,int nBand){
    5178      358938 :     return (GDALRasterBandShadow*) GDALGetRasterBand( self, nBand );
    5179             :   }
    5180           5 : SWIGINTERN bool GDALDatasetShadow_IsThreadSafe(GDALDatasetShadow *self,int nScopeFlags){
    5181           5 :       return GDALDatasetIsThreadSafe(self, nScopeFlags, nullptr);
    5182             :   }
    5183           8 : SWIGINTERN GDALDatasetShadow *GDALDatasetShadow_GetThreadSafeDataset(GDALDatasetShadow *self,int nScopeFlags){
    5184           8 :       return GDALGetThreadSafeDataset(self, nScopeFlags, nullptr);
    5185             :   }
    5186        1177 : SWIGINTERN GDALGroupHS *GDALDatasetShadow_GetRootGroup(GDALDatasetShadow *self){
    5187        1177 :     return GDALDatasetGetRootGroup(self);
    5188             :   }
    5189         447 : SWIGINTERN char const *GDALDatasetShadow_GetProjection(GDALDatasetShadow *self){
    5190         447 :     return GDALGetProjectionRef( self );
    5191             :   }
    5192         863 : SWIGINTERN char const *GDALDatasetShadow_GetProjectionRef(GDALDatasetShadow *self){
    5193         863 :     return GDALGetProjectionRef( self );
    5194             :   }
    5195          14 : SWIGINTERN int GDALDatasetShadow_GetRefCount(GDALDatasetShadow *self){
    5196          14 :     return OGR_DS_GetRefCount(self);
    5197             :   }
    5198           0 : SWIGINTERN int GDALDatasetShadow_GetSummaryRefCount(GDALDatasetShadow *self){
    5199           0 :     return OGR_DS_GetSummaryRefCount(self);
    5200             :   }
    5201        1209 : SWIGINTERN OSRSpatialReferenceShadow *GDALDatasetShadow_GetSpatialRef(GDALDatasetShadow *self){
    5202        1209 :     OGRSpatialReferenceH ref = GDALGetSpatialRef(self);
    5203        1209 :     if( ref )
    5204         794 :        ref = OSRClone( ref );
    5205        1209 :     return (OSRSpatialReferenceShadow*) ref;
    5206             :   }
    5207        1624 : SWIGINTERN CPLErr GDALDatasetShadow_SetProjection(GDALDatasetShadow *self,char const *prj){
    5208        1624 :     return GDALSetProjection( self, prj );
    5209             :   }
    5210         281 : SWIGINTERN CPLErr GDALDatasetShadow_SetSpatialRef(GDALDatasetShadow *self,OSRSpatialReferenceShadow *srs){
    5211         281 :      return GDALSetSpatialRef( self, (OGRSpatialReferenceH)srs );
    5212             :   }
    5213        3922 : SWIGINTERN void GDALDatasetShadow_GetGeoTransform(GDALDatasetShadow *self,double argout[6],int *isvalid,int *can_return_null=0){
    5214        3922 :     if (can_return_null && *can_return_null)
    5215             :     {
    5216         403 :         *isvalid = (GDALGetGeoTransform( self, argout ) == CE_None );
    5217             :     }
    5218             :     else
    5219             :     {
    5220        3519 :         *isvalid = TRUE;
    5221        3519 :         if ( GDALGetGeoTransform( self, argout ) != CE_None ) {
    5222          82 :             argout[0] = 0.0;
    5223          82 :             argout[1] = 1.0;
    5224          82 :             argout[2] = 0.0;
    5225          82 :             argout[3] = 0.0;
    5226          82 :             argout[4] = 0.0;
    5227          82 :             argout[5] = 1.0;
    5228             :         }
    5229             :     }
    5230        3922 :   }
    5231        2858 : SWIGINTERN CPLErr GDALDatasetShadow_SetGeoTransform(GDALDatasetShadow *self,double argin[6]){
    5232        2858 :     return GDALSetGeoTransform( self, argin );
    5233             :   }
    5234          10 : SWIGINTERN void GDALDatasetShadow_GetExtent(GDALDatasetShadow *self,double argout[4],int *isvalid,OSRSpatialReferenceShadow *srs=NULL){
    5235          20 :     CPLErr eErr = GDALGetExtent(self, (OGREnvelope*)argout, srs);
    5236          10 :     *isvalid = (eErr == CE_None);
    5237          10 :     return;
    5238             :   }
    5239           4 : SWIGINTERN void GDALDatasetShadow_GetExtentWGS84LongLat(GDALDatasetShadow *self,double argout[4],int *isvalid){
    5240           8 :     CPLErr eErr = GDALGetExtentWGS84LongLat(self, (OGREnvelope*)argout);
    5241           4 :     *isvalid = (eErr == CE_None);
    5242           4 :     return;
    5243             :   }
    5244             : 
    5245             : static int*
    5246      353547 : CreateCIntListFromSequence( PyObject* pySeq, int* pnSize ) {
    5247             :   /* check if is List */
    5248      353547 :   if ( !PySequence_Check(pySeq) ) {
    5249           1 :     PyErr_SetString(PyExc_TypeError, "not a sequence");
    5250           1 :     *pnSize = -1;
    5251           1 :     return NULL;
    5252             :   }
    5253      353546 :   Py_ssize_t size = PySequence_Size(pySeq);
    5254      353546 :   if( size > (Py_ssize_t)INT_MAX ) {
    5255           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    5256           0 :     *pnSize = -1;
    5257           0 :     return NULL;
    5258             :   }
    5259      353546 :   if( (size_t)size > SIZE_MAX / sizeof(int) ) {
    5260           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    5261           0 :     *pnSize = -1;
    5262           0 :     return NULL;
    5263             :   }
    5264      353546 :   *pnSize = (int)size;
    5265      353546 :   int* ret = (int*) malloc((*pnSize)*sizeof(int));
    5266      353546 :   if( !ret ) {
    5267           0 :     PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    5268           0 :     *pnSize = -1;
    5269           0 :     return NULL;
    5270             :   }
    5271      797230 :   for( int i = 0; i<*pnSize; i++ ) {
    5272      443685 :     PyObject *o = PySequence_GetItem(pySeq,i);
    5273      443685 :     if ( !PyArg_Parse(o,"i",&ret[i]) ) {
    5274           1 :         PyErr_SetString(PyExc_TypeError, "not an integer");
    5275           1 :         Py_DECREF(o);
    5276           1 :         free(ret);
    5277           1 :         *pnSize = -1;
    5278           1 :         return NULL;
    5279             :     }
    5280      443684 :     Py_DECREF(o);
    5281             :   }
    5282             :   return ret;
    5283             : }
    5284             : 
    5285         670 : SWIGINTERN int GDALDatasetShadow_BuildOverviews(GDALDatasetShadow *self,char const *resampling="NEAREST",int overviewlist=0,int *pOverviews=0,GDALProgressFunc callback=NULL,void *callback_data=NULL,char **options=NULL){
    5286             : 
    5287         670 :     return GDALBuildOverviewsEx(  self,
    5288             :                                 resampling ? resampling : "NEAREST",
    5289             :                                 overviewlist,
    5290             :                                 pOverviews,
    5291             :                                 0,
    5292             :                                 0,
    5293             :                                 callback,
    5294             :                                 callback_data,
    5295         670 :                                 options);
    5296             :   }
    5297         118 : SWIGINTERN int GDALDatasetShadow_GetGCPCount(GDALDatasetShadow *self){
    5298         118 :     return GDALGetGCPCount( self );
    5299             :   }
    5300         455 : SWIGINTERN char const *GDALDatasetShadow_GetGCPProjection(GDALDatasetShadow *self){
    5301         455 :     return GDALGetGCPProjection( self );
    5302             :   }
    5303         426 : SWIGINTERN OSRSpatialReferenceShadow *GDALDatasetShadow_GetGCPSpatialRef(GDALDatasetShadow *self){
    5304         426 :     OGRSpatialReferenceH ref = GDALGetGCPSpatialRef(self);
    5305         426 :     if( ref )
    5306         217 :        ref = OSRClone( ref );
    5307         426 :     return (OSRSpatialReferenceShadow*) ref;
    5308             :   }
    5309         530 : SWIGINTERN void GDALDatasetShadow_GetGCPs(GDALDatasetShadow *self,int *nGCPs,GDAL_GCP const **pGCPs){
    5310        1060 :     *nGCPs = GDALGetGCPCount( self );
    5311         530 :     *pGCPs = GDALGetGCPs( self );
    5312             :   }
    5313          29 : SWIGINTERN CPLErr GDALDatasetShadow_SetGCPs(GDALDatasetShadow *self,int nGCPs,GDAL_GCP const *pGCPs,char const *pszGCPProjection){
    5314          29 :     return GDALSetGCPs( self, nGCPs, pGCPs, pszGCPProjection );
    5315             :   }
    5316           9 : SWIGINTERN CPLErr GDALDatasetShadow_SetGCPs2(GDALDatasetShadow *self,int nGCPs,GDAL_GCP const *pGCPs,OSRSpatialReferenceShadow *hSRS){
    5317           9 :     return GDALSetGCPs2( self, nGCPs, pGCPs, (OGRSpatialReferenceH)hSRS );
    5318             :   }
    5319        1622 : SWIGINTERN CPLErr GDALDatasetShadow_FlushCache(GDALDatasetShadow *self){
    5320        1622 :     return GDALFlushCache( self );
    5321             :   }
    5322          30 : SWIGINTERN CPLErr GDALDatasetShadow_AddBand(GDALDatasetShadow *self,GDALDataType datatype=GDT_Byte,char **options=0){
    5323          30 :     return GDALAddBand( self, datatype, options );
    5324             :   }
    5325          54 : SWIGINTERN CPLErr GDALDatasetShadow_CreateMaskBand(GDALDatasetShadow *self,int nFlags){
    5326          54 :       return GDALCreateDatasetMaskBand( self, nFlags );
    5327             :   }
    5328         458 : SWIGINTERN char **GDALDatasetShadow_GetFileList(GDALDatasetShadow *self){
    5329         458 :     return GDALGetFileList( self );
    5330             :   }
    5331      176160 : 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){
    5332      176160 :     CPLErr eErr;
    5333      176160 :     int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    5334      176160 :     int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    5335      176160 :     GDALDataType ntype;
    5336      176160 :     if ( buf_type != 0 ) {
    5337      176160 :       ntype = (GDALDataType) *buf_type;
    5338             :     } else {
    5339           0 :       int lastband = GDALGetRasterCount( self );
    5340           0 :       if (lastband <= 0)
    5341             :         return CE_Failure;
    5342           0 :       ntype = GDALGetRasterDataType( GDALGetRasterBand( self, lastband ) );
    5343             :     }
    5344             : 
    5345      176160 :     GIntBig pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    5346      176160 :     GIntBig line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    5347      176160 :     GIntBig band_space = (buf_band_space == 0) ? 0 : *buf_band_space;
    5348             : 
    5349      176160 :     GIntBig min_buffer_size =
    5350      176160 :       ComputeDatasetRasterIOSize (nxsize, nysize, GDALGetDataTypeSizeBytes( ntype ),
    5351           0 :                                   band_list ? band_list : GDALGetRasterCount(self), pband_list, band_list,
    5352             :                                   pixel_space, line_space, band_space, FALSE);
    5353      176160 :     if (min_buffer_size == 0)
    5354             :         return CE_Failure;
    5355             : 
    5356      176159 :     if ( buf_len < min_buffer_size )
    5357             :     {
    5358           1 :         CPLError(CE_Failure, CPLE_AppDefined, "Buffer too small");
    5359           1 :         return CE_Failure;
    5360             :     }
    5361             : 
    5362      176158 :     GDALRasterIOExtraArg* psExtraArg = NULL;
    5363             : 
    5364      176158 :     eErr = GDALDatasetRasterIOEx( self, GF_Write, xoff, yoff, xsize, ysize,
    5365             :                                   (void*) buf_string, nxsize, nysize, ntype,
    5366             :                                   band_list, pband_list, pixel_space, line_space, band_space, psExtraArg );
    5367             : 
    5368      176158 :     return eErr;
    5369             :   }
    5370           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){
    5371           1 :     int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    5372           1 :     int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    5373           1 :     GDALDataType ntype;
    5374           1 :     if ( buf_type != 0 ) {
    5375           0 :       ntype = (GDALDataType) *buf_type;
    5376             :     } else {
    5377           1 :       int lastband = GDALGetRasterCount( self );
    5378           1 :       if (lastband <= 0)
    5379             :         return CE_Failure;
    5380           1 :       ntype = GDALGetRasterDataType( GDALGetRasterBand( self, lastband ) );
    5381             :     }
    5382           1 :     return GDALDatasetAdviseRead(self, xoff, yoff, xsize, ysize,
    5383             :                                  nxsize, nysize, ntype,
    5384           1 :                                  band_list, pband_list, options);
    5385             : }
    5386           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){
    5387             : 
    5388           2 :     if ((options != NULL) && (buf_xsize ==0) && (buf_ysize == 0))
    5389             :     {
    5390             :         // calculate an appropriate buffer size
    5391           0 :         const char* pszLevel = CSLFetchNameValue(options, "LEVEL");
    5392           0 :         if (pszLevel)
    5393             :         {
    5394             :             // round up
    5395           0 :             int nLevel = atoi(pszLevel);
    5396           0 :             if( nLevel < 0 || nLevel > 30 )
    5397             :             {
    5398           0 :                 CPLError(CE_Failure, CPLE_AppDefined, "Invalid LEVEL: %d", nLevel);
    5399             :             }
    5400             :             else
    5401             :             {
    5402           0 :                 int nRes = 1 << nLevel;
    5403           0 :                 buf_xsize = static_cast<int>(ceil(xSize / (1.0 * nRes)));
    5404           0 :                 buf_ysize = static_cast<int>(ceil(ySize / (1.0 * nRes)));
    5405             :             }
    5406             :         }
    5407             :     }
    5408             : 
    5409           2 :     int nxsize = (buf_xsize == 0) ? xSize : buf_xsize;
    5410           2 :     int nysize = (buf_ysize == 0) ? ySize : buf_ysize;
    5411             : 
    5412           2 :     GDALDataType ntype;
    5413           2 :     if (bufType != 0) {
    5414             :         ntype = (GDALDataType) bufType;
    5415             :     }
    5416             :     else {
    5417             :         ntype = GDT_Byte;
    5418             :     }
    5419             : 
    5420           2 :     int nBCount = (band_list) != 0 ? band_list : GDALGetRasterCount(self);
    5421           2 :     uint64_t nMinSize = (uint64_t)nxsize * nysize * nBCount * GDALGetDataTypeSizeBytes(ntype);
    5422           2 :     if (buf_string == NULL || buf_len < nMinSize)
    5423             :     {
    5424           0 :         CPLError(CE_Failure, CPLE_AppDefined, "Buffer is too small");
    5425           0 :         return NULL;
    5426             :     }
    5427             : 
    5428           2 :     bool myBandList = false;
    5429           2 :     int* pBandList;
    5430             : 
    5431           2 :     if (band_list != 0){
    5432             :         myBandList = false;
    5433             :         pBandList = pband_list;
    5434             :     }
    5435             :     else
    5436             :     {
    5437           0 :         myBandList = true;
    5438           0 :         pBandList = (int*)CPLMalloc(sizeof(int) * nBCount);
    5439           0 :         for (int i = 0; i < nBCount; ++i) {
    5440           0 :             pBandList[i] = i + 1;
    5441             :         }
    5442             :     }
    5443             : 
    5444           2 :     GDALAsyncReaderH hAsyncReader =
    5445           2 :             GDALBeginAsyncReader(self, xOff, yOff, xSize, ySize, (void*) buf_string, nxsize, nysize, ntype, nBCount, pBandList, nPixelSpace, nLineSpace,
    5446             :     nBandSpace, options);
    5447             : 
    5448           2 :     if ( myBandList ) {
    5449           0 :        CPLFree( pBandList );
    5450             :     }
    5451             : 
    5452           2 :     if (hAsyncReader)
    5453             :     {
    5454           1 :         return (GDALAsyncReaderShadow*) CreateAsyncReaderWrapper(hAsyncReader, pyObject);
    5455             :     }
    5456             :     else
    5457             :     {
    5458             :         return NULL;
    5459             :     }
    5460             : 
    5461             :   }
    5462           1 : SWIGINTERN void GDALDatasetShadow_EndAsyncReader(GDALDatasetShadow *self,GDALAsyncReaderShadow *ario){
    5463           1 :     if( ario == NULL ) return;
    5464           1 :     GDALAsyncReaderH hReader = AsyncReaderWrapperGetReader(ario);
    5465           1 :     if (hReader == NULL)
    5466             :     {
    5467             :         return;
    5468             :     }
    5469           1 :     GDALEndAsyncReader(self, hReader);
    5470           1 :     DisableAsyncReaderWrapper(ario);
    5471             :   }
    5472           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){
    5473           3 :         int nPixelSpace;
    5474           3 :         int nBandSpace;
    5475           3 :         if( bIsBandSequential != 0 && bIsBandSequential != 1 )
    5476             :             return NULL;
    5477           3 :         if( band_list == 0 )
    5478             :             return NULL;
    5479           3 :         if( bIsBandSequential || band_list == 1 )
    5480             :         {
    5481             :             nPixelSpace = 0;
    5482             :             nBandSpace = 0;
    5483             :         }
    5484             :         else
    5485             :         {
    5486           1 :             nBandSpace = GDALGetDataTypeSizeBytes(eBufType);
    5487           1 :             nPixelSpace = nBandSpace * band_list;
    5488             :         }
    5489           3 :         CPLVirtualMem* vmem = GDALDatasetGetVirtualMem( self,
    5490             :                                          eRWFlag,
    5491             :                                          nXOff, nYOff,
    5492             :                                          nXSize, nYSize,
    5493             :                                          nBufXSize, nBufYSize,
    5494             :                                          eBufType,
    5495             :                                          band_list, pband_list,
    5496             :                                          nPixelSpace,
    5497             :                                          0,
    5498             :                                          nBandSpace,
    5499             :                                          nCacheSize,
    5500             :                                          nPageSizeHint,
    5501             :                                          FALSE,
    5502             :                                          options );
    5503           3 :         if( vmem == NULL )
    5504             :             return NULL;
    5505           3 :         CPLVirtualMemShadow* vmemshadow = (CPLVirtualMemShadow*)calloc(1, sizeof(CPLVirtualMemShadow));
    5506           3 :         vmemshadow->vmem = vmem;
    5507           3 :         vmemshadow->eBufType = eBufType;
    5508           3 :         vmemshadow->bIsBandSequential = bIsBandSequential;
    5509           3 :         vmemshadow->bReadOnly = (eRWFlag == GF_Read);
    5510           3 :         vmemshadow->nBufXSize = nBufXSize;
    5511           3 :         vmemshadow->nBufYSize = nBufYSize;
    5512           3 :         vmemshadow->nBandCount = band_list;
    5513           3 :         return vmemshadow;
    5514             :     }
    5515           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){
    5516           3 :         if( band_list == 0 )
    5517             :             return NULL;
    5518           3 :         CPLVirtualMem* vmem = GDALDatasetGetTiledVirtualMem( self,
    5519             :                                          eRWFlag,
    5520             :                                          nXOff, nYOff,
    5521             :                                          nXSize, nYSize,
    5522             :                                          nTileXSize, nTileYSize,
    5523             :                                          eBufType,
    5524             :                                          band_list, pband_list,
    5525             :                                          eTileOrganization,
    5526             :                                          nCacheSize,
    5527             :                                          FALSE,
    5528             :                                          options );
    5529           3 :         if( vmem == NULL )
    5530             :             return NULL;
    5531           3 :         CPLVirtualMemShadow* vmemshadow = (CPLVirtualMemShadow*)calloc(1, sizeof(CPLVirtualMemShadow));
    5532           3 :         vmemshadow->vmem = vmem;
    5533           3 :         vmemshadow->eBufType = eBufType;
    5534           3 :         vmemshadow->bIsBandSequential = -1;
    5535           3 :         vmemshadow->bReadOnly = (eRWFlag == GF_Read);
    5536           3 :         vmemshadow->nBufXSize = nXSize;
    5537           3 :         vmemshadow->nBufYSize = nYSize;
    5538           3 :         vmemshadow->eTileOrganization = eTileOrganization;
    5539           3 :         vmemshadow->nTileXSize = nTileXSize;
    5540           3 :         vmemshadow->nTileYSize = nTileYSize;
    5541           3 :         vmemshadow->nBandCount = band_list;
    5542           3 :         return vmemshadow;
    5543             :     }
    5544        5893 : SWIGINTERN OGRLayerShadow *GDALDatasetShadow_CreateLayer(GDALDatasetShadow *self,char const *name,OSRSpatialReferenceShadow *srs=NULL,OGRwkbGeometryType geom_type=wkbUnknown,char **options=0){
    5545       11786 :     OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetCreateLayer( self,
    5546             :                                   name,
    5547             :                                   srs,
    5548             :                                   geom_type,
    5549             :                                   options);
    5550        5893 :     return layer;
    5551             :   }
    5552          14 : SWIGINTERN OGRLayerShadow *GDALDatasetShadow_CreateLayerFromGeomFieldDefn(GDALDatasetShadow *self,char const *name,OGRGeomFieldDefnShadow *geom_field,char **options=0){
    5553          28 :     OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetCreateLayerFromGeomFieldDefn( self,
    5554             :                                   name,
    5555             :                                   geom_field,
    5556             :                                   options);
    5557          14 :     return layer;
    5558             :   }
    5559          14 : SWIGINTERN OGRLayerShadow *GDALDatasetShadow_CopyLayer(GDALDatasetShadow *self,OGRLayerShadow *src_layer,char const *new_name,char **options=0){
    5560          28 :     OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetCopyLayer( self,
    5561             :                                                       src_layer,
    5562             :                                                       new_name,
    5563             :                                                       options);
    5564          14 :     return layer;
    5565             :   }
    5566          40 : SWIGINTERN OGRErr GDALDatasetShadow_DeleteLayer(GDALDatasetShadow *self,int index){
    5567          40 :     return GDALDatasetDeleteLayer(self, index);
    5568             :   }
    5569             : 
    5570             : 
    5571             : #include "ogr_core.h"
    5572             : static char const *
    5573           0 : OGRErrMessages( int rc ) {
    5574           0 :   switch( rc ) {
    5575             :   case OGRERR_NONE:
    5576             :     return "OGR Error: None";
    5577           0 :   case OGRERR_NOT_ENOUGH_DATA:
    5578           0 :     return "OGR Error: Not enough data to deserialize";
    5579           0 :   case OGRERR_NOT_ENOUGH_MEMORY:
    5580           0 :     return "OGR Error: Not enough memory";
    5581           0 :   case OGRERR_UNSUPPORTED_GEOMETRY_TYPE:
    5582           0 :     return "OGR Error: Unsupported geometry type";
    5583           0 :   case OGRERR_UNSUPPORTED_OPERATION:
    5584           0 :     return "OGR Error: Unsupported operation";
    5585           0 :   case OGRERR_CORRUPT_DATA:
    5586           0 :     return "OGR Error: Corrupt data";
    5587           0 :   case OGRERR_FAILURE:
    5588           0 :     return "OGR Error: General Error";
    5589           0 :   case OGRERR_UNSUPPORTED_SRS:
    5590           0 :     return "OGR Error: Unsupported SRS";
    5591           0 :   case OGRERR_INVALID_HANDLE:
    5592           0 :     return "OGR Error: Invalid handle";
    5593           0 :   case OGRERR_NON_EXISTING_FEATURE:
    5594           0 :     return "OGR Error: Non existing feature";
    5595           0 :   default:
    5596           0 :     return "OGR Error: Unknown";
    5597             :   }
    5598             : }
    5599             : 
    5600          91 : SWIGINTERN bool GDALDatasetShadow_IsLayerPrivate(GDALDatasetShadow *self,int index){
    5601         182 :     return GDALDatasetIsLayerPrivate(self, index);
    5602             :   }
    5603             : 
    5604             : SWIGINTERN int
    5605        5668 : SWIG_AsVal_bool (PyObject *obj, bool *val)
    5606             : {
    5607        5668 :   int r;
    5608        5668 :   if (!PyBool_Check(obj))
    5609             :     return SWIG_ERROR;
    5610        5667 :   r = PyObject_IsTrue(obj);
    5611        5667 :   if (r == -1)
    5612             :     return SWIG_ERROR;
    5613        5667 :   if (val) *val = r ? true : false;
    5614             :   return SWIG_OK;
    5615             : }
    5616             : 
    5617        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){
    5618        1917 :     OGRLayerH hLayer = NULL;
    5619        3834 :     OGRFeatureShadow* feat = (OGRFeatureShadow*)GDALDatasetGetNextFeature( self, &hLayer, pdfProgressPct,
    5620             :                                       callback, callback_data );
    5621        1917 :     *ppoBelongingLayer = (OGRLayerShadow*)hLayer;
    5622        1917 :     return feat;
    5623             :   }
    5624         122 : SWIGINTERN bool GDALDatasetShadow_TestCapability(GDALDatasetShadow *self,char const *cap){
    5625         244 :     return (GDALDatasetTestCapability(self, cap) > 0);
    5626             :   }
    5627        9862 : SWIGINTERN OGRLayerShadow *GDALDatasetShadow_ExecuteSQL(GDALDatasetShadow *self,char const *statement,OGRGeometryShadow *spatialFilter=NULL,char const *dialect=""){
    5628       19724 :     OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetExecuteSQL(self,
    5629             :                                                       statement,
    5630             :                                                       spatialFilter,
    5631             :                                                       dialect);
    5632        9862 :     return layer;
    5633             :   }
    5634        2816 : SWIGINTERN void GDALDatasetShadow_ReleaseResultSet(GDALDatasetShadow *self,OGRLayerShadow *layer){
    5635        2816 :     GDALDatasetReleaseResultSet(self, layer);
    5636        2816 :   }
    5637           6 : SWIGINTERN OGRStyleTableShadow *GDALDatasetShadow_GetStyleTable(GDALDatasetShadow *self){
    5638           6 :     return (OGRStyleTableShadow*) GDALDatasetGetStyleTable(self);
    5639             :   }
    5640           7 : SWIGINTERN void GDALDatasetShadow_SetStyleTable(GDALDatasetShadow *self,OGRStyleTableShadow *table){
    5641           7 :     if( table != NULL )
    5642           5 :         GDALDatasetSetStyleTable(self, (OGRStyleTableH) table);
    5643             :   }
    5644        9152 : SWIGINTERN OGRLayerShadow *GDALDatasetShadow_GetLayerByIndex(GDALDatasetShadow *self,int index=0){
    5645             : 
    5646             : 
    5647             : 
    5648       18304 :     OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetGetLayer(self, index);
    5649        9152 :     return layer;
    5650             :   }
    5651        2729 : SWIGINTERN OGRLayerShadow *GDALDatasetShadow_GetLayerByName(GDALDatasetShadow *self,char const *layer_name){
    5652        5458 :     OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetGetLayerByName(self, layer_name);
    5653        2729 :     return layer;
    5654             :   }
    5655          14 : SWIGINTERN void GDALDatasetShadow_ResetReading(GDALDatasetShadow *self){
    5656          14 :     GDALDatasetResetReading(self);
    5657          14 :   }
    5658        1431 : SWIGINTERN int GDALDatasetShadow_GetLayerCount(GDALDatasetShadow *self){
    5659        1431 :     return GDALDatasetGetLayerCount(self);
    5660             :   }
    5661           6 : SWIGINTERN OGRErr GDALDatasetShadow_AbortSQL(GDALDatasetShadow *self){
    5662           6 :     return GDALDatasetAbortSQL(self);
    5663             : }
    5664         105 : SWIGINTERN OGRErr GDALDatasetShadow_StartTransaction(GDALDatasetShadow *self,int force=FALSE){
    5665         105 :     return GDALDatasetStartTransaction(self, force);
    5666             :   }
    5667          76 : SWIGINTERN OGRErr GDALDatasetShadow_CommitTransaction(GDALDatasetShadow *self){
    5668          76 :     return GDALDatasetCommitTransaction(self);
    5669             :   }
    5670          44 : SWIGINTERN OGRErr GDALDatasetShadow_RollbackTransaction(GDALDatasetShadow *self){
    5671          44 :     return GDALDatasetRollbackTransaction(self);
    5672             :   }
    5673           2 : SWIGINTERN void GDALDatasetShadow_ClearStatistics(GDALDatasetShadow *self){
    5674           2 :       GDALDatasetClearStatistics(self);
    5675           2 :   }
    5676          32 : SWIGINTERN char **GDALDatasetShadow_GetFieldDomainNames(GDALDatasetShadow *self,char **options=0){
    5677          32 :     return GDALDatasetGetFieldDomainNames(self, options);
    5678             :   }
    5679         114 : SWIGINTERN OGRFieldDomainShadow *GDALDatasetShadow_GetFieldDomain(GDALDatasetShadow *self,char const *name){
    5680         114 :     return (OGRFieldDomainShadow*) GDALDatasetGetFieldDomain(self, name);
    5681             :   }
    5682          37 : SWIGINTERN bool GDALDatasetShadow_AddFieldDomain(GDALDatasetShadow *self,OGRFieldDomainShadow *fieldDomain){
    5683          37 :       char* pszReason = NULL;
    5684          37 :       if( !GDALDatasetAddFieldDomain(self, (OGRFieldDomainH)fieldDomain, &pszReason) )
    5685             :       {
    5686           4 :           CPLError(CE_Failure, CPLE_AppDefined, "%s", pszReason);
    5687           4 :           CPLFree(pszReason);
    5688           4 :           return false;
    5689             :       }
    5690             :       return true;
    5691             :   }
    5692           8 : SWIGINTERN bool GDALDatasetShadow_DeleteFieldDomain(GDALDatasetShadow *self,char const *name){
    5693           8 :       return GDALDatasetDeleteFieldDomain(self, name, NULL);
    5694             :   }
    5695           4 : SWIGINTERN bool GDALDatasetShadow_UpdateFieldDomain(GDALDatasetShadow *self,OGRFieldDomainShadow *fieldDomain){
    5696           4 :       return GDALDatasetUpdateFieldDomain(self, (OGRFieldDomainH)fieldDomain, NULL);
    5697             :   }
    5698          46 : SWIGINTERN char **GDALDatasetShadow_GetRelationshipNames(GDALDatasetShadow *self,char **options=0){
    5699          46 :     return GDALDatasetGetRelationshipNames(self, options);
    5700             :   }
    5701          52 : SWIGINTERN GDALRelationshipShadow *GDALDatasetShadow_GetRelationship(GDALDatasetShadow *self,char const *name){
    5702          52 :     return (GDALRelationshipShadow*) GDALDatasetGetRelationship(self, name);
    5703             :   }
    5704          42 : SWIGINTERN bool GDALDatasetShadow_AddRelationship(GDALDatasetShadow *self,GDALRelationshipShadow *relationship){
    5705          42 :       return GDALDatasetAddRelationship(self, (GDALRelationshipH)relationship, NULL);
    5706             :   }
    5707           6 : SWIGINTERN bool GDALDatasetShadow_DeleteRelationship(GDALDatasetShadow *self,char const *name){
    5708           6 :       return GDALDatasetDeleteRelationship(self, name, NULL);
    5709             :   }
    5710           9 : SWIGINTERN bool GDALDatasetShadow_UpdateRelationship(GDALDatasetShadow *self,GDALRelationshipShadow *relationship){
    5711           9 :       return GDALDatasetUpdateRelationship(self, (GDALRelationshipH)relationship, NULL);
    5712             :   }
    5713      176550 : 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){
    5714      176550 :     *buf = NULL;
    5715             : 
    5716      176550 :     int nxsize = (buf_xsize==0) ? static_cast<int>(xsize) : *buf_xsize;
    5717      176550 :     int nysize = (buf_ysize==0) ? static_cast<int>(ysize) : *buf_ysize;
    5718      176550 :     GDALDataType ntype;
    5719      176550 :     if ( buf_type != 0 ) {
    5720      176550 :       ntype = *buf_type;
    5721             :     } else {
    5722           0 :       int lastband = GDALGetRasterCount( self ) - 1;
    5723           0 :       if (lastband < 0)
    5724             :       {
    5725             :           return CE_Failure;
    5726             :       }
    5727           0 :       ntype = GDALGetRasterDataType( GDALGetRasterBand( self, lastband ) );
    5728             :     }
    5729             : 
    5730      176550 :     GIntBig pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    5731      176550 :     GIntBig line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    5732      176550 :     GIntBig band_space = (buf_band_space == 0) ? 0 : *buf_band_space;
    5733             : 
    5734      176550 :     int ntypesize = GDALGetDataTypeSizeBytes( ntype );
    5735      176550 :     size_t buf_size = static_cast<size_t>(
    5736      176550 :         ComputeDatasetRasterIOSize (nxsize, nysize, ntypesize,
    5737             :                                     band_list ? band_list :
    5738           0 :                                         GDALGetRasterCount(self),
    5739             :                                     pband_list, band_list,
    5740             :                                     pixel_space, line_space, band_space,
    5741      176550 :                                     FALSE));
    5742      176550 :     if (buf_size == 0)
    5743             :     {
    5744             :         return CE_Failure;
    5745             :     }
    5746             : 
    5747      176548 :     char *data;
    5748      176548 :     Py_buffer view;
    5749             : 
    5750      345974 :     if( !readraster_acquirebuffer(buf, inputOutputBuf, buf_size, ntype,
    5751             :                                   GetUseExceptions(), data, view) )
    5752             :     {
    5753             :         return CE_Failure;
    5754             :     }
    5755             : 
    5756      176535 :     if( inputOutputBuf == NULL )
    5757             :     {
    5758             :         /* Should we clear the buffer in case there are hole in it ? */
    5759      176523 :         if( line_space != 0 && pixel_space != 0 && line_space > pixel_space * nxsize )
    5760             :         {
    5761           4 :             memset(data, 0, buf_size);
    5762             :         }
    5763      176519 :         else if( band_list > 1 && band_space != 0 )
    5764             :         {
    5765        1069 :             if( line_space != 0 && band_space > line_space * nysize )
    5766           0 :                 memset(data, 0, buf_size);
    5767        1069 :             else if( pixel_space != 0 && band_space < pixel_space &&
    5768        1063 :                      pixel_space != (GIntBig)GDALGetRasterCount(self) * ntypesize )
    5769         160 :                 memset(data, 0, buf_size);
    5770             :         }
    5771             :     }
    5772             : 
    5773      176535 :     GDALRasterIOExtraArg sExtraArg;
    5774      176535 :     INIT_RASTERIO_EXTRA_ARG(sExtraArg);
    5775      176535 :     sExtraArg.eResampleAlg = resample_alg;
    5776      176535 :     sExtraArg.pfnProgress = callback;
    5777      176535 :     sExtraArg.pProgressData = callback_data;
    5778             : 
    5779      176535 :     int nXOff = (int)(xoff + 0.5);
    5780      176535 :     int nYOff = (int)(yoff + 0.5);
    5781      176535 :     int nXSize = (int)(xsize + 0.5);
    5782      176535 :     int nYSize = (int)(ysize + 0.5);
    5783      176535 :     if( fabs(xoff-nXOff) > 1e-8 || fabs(yoff-nYOff) > 1e-8 ||
    5784      176526 :         fabs(xsize-nXSize) > 1e-8 || fabs(ysize-nYSize) > 1e-8 )
    5785             :     {
    5786          11 :         sExtraArg.bFloatingPointWindowValidity = TRUE;
    5787          11 :         sExtraArg.dfXOff = xoff;
    5788          11 :         sExtraArg.dfYOff = yoff;
    5789          11 :         sExtraArg.dfXSize = xsize;
    5790          11 :         sExtraArg.dfYSize = ysize;
    5791             :     }
    5792             : 
    5793      176535 :     CPLErr eErr = GDALDatasetRasterIOEx(self, GF_Read, nXOff, nYOff, nXSize, nYSize,
    5794             :                                data, nxsize, nysize, ntype,
    5795             :                                band_list, pband_list, pixel_space, line_space, band_space,
    5796             :                                &sExtraArg );
    5797             : 
    5798      176535 :     readraster_releasebuffer(eErr, buf, inputOutputBuf, view);
    5799             : 
    5800             :     return eErr;
    5801             : }
    5802             : 
    5803       19826 : int GDALDatasetShadow_RasterXSize_get( GDALDatasetShadow *h ) {
    5804       19826 :   return GDALGetRasterXSize( h );
    5805             : }
    5806       20085 : int GDALDatasetShadow_RasterYSize_get( GDALDatasetShadow *h ) {
    5807       20085 :   return GDALGetRasterYSize( h );
    5808             : }
    5809      354862 : int GDALDatasetShadow_RasterCount_get( GDALDatasetShadow *h ) {
    5810      354862 :   return GDALGetRasterCount( h );
    5811             : }
    5812             : 
    5813          10 : SWIGINTERN GDALRasterAttributeTableShadow *new_GDALRasterAttributeTableShadow(){
    5814          10 :         return (GDALRasterAttributeTableShadow*)
    5815          10 :     GDALCreateRasterAttributeTable();
    5816             :     }
    5817          17 : SWIGINTERN void delete_GDALRasterAttributeTableShadow(GDALRasterAttributeTableShadow *self){
    5818          17 :         GDALDestroyRasterAttributeTable(self);
    5819          17 :     }
    5820           5 : SWIGINTERN GDALRasterAttributeTableShadow *GDALRasterAttributeTableShadow_Clone(GDALRasterAttributeTableShadow *self){
    5821           5 :         return (GDALRasterAttributeTableShadow*) GDALRATClone(self);
    5822             :     }
    5823          37 : SWIGINTERN int GDALRasterAttributeTableShadow_GetColumnCount(GDALRasterAttributeTableShadow *self){
    5824          37 :         return GDALRATGetColumnCount( self );
    5825             :     }
    5826          60 : SWIGINTERN char const *GDALRasterAttributeTableShadow_GetNameOfCol(GDALRasterAttributeTableShadow *self,int iCol){
    5827          60 :         return GDALRATGetNameOfCol( self, iCol );
    5828             :     }
    5829          61 : SWIGINTERN GDALRATFieldUsage GDALRasterAttributeTableShadow_GetUsageOfCol(GDALRasterAttributeTableShadow *self,int iCol){
    5830          61 :         return GDALRATGetUsageOfCol( self, iCol );
    5831             :     }
    5832          66 : SWIGINTERN GDALRATFieldType GDALRasterAttributeTableShadow_GetTypeOfCol(GDALRasterAttributeTableShadow *self,int iCol){
    5833          66 :         return GDALRATGetTypeOfCol( self, iCol );
    5834             :     }
    5835          13 : SWIGINTERN int GDALRasterAttributeTableShadow_GetColOfUsage(GDALRasterAttributeTableShadow *self,GDALRATFieldUsage eUsage){
    5836          13 :         return GDALRATGetColOfUsage( self, eUsage );
    5837             :     }
    5838          45 : SWIGINTERN int GDALRasterAttributeTableShadow_GetRowCount(GDALRasterAttributeTableShadow *self){
    5839          45 :         return GDALRATGetRowCount( self );
    5840             :     }
    5841          50 : SWIGINTERN char const *GDALRasterAttributeTableShadow_GetValueAsString(GDALRasterAttributeTableShadow *self,int iRow,int iCol){
    5842          50 :         return GDALRATGetValueAsString( self, iRow, iCol );
    5843             :     }
    5844          72 : SWIGINTERN int GDALRasterAttributeTableShadow_GetValueAsInt(GDALRasterAttributeTableShadow *self,int iRow,int iCol){
    5845          72 :         return GDALRATGetValueAsInt( self, iRow, iCol );
    5846             :     }
    5847          38 : SWIGINTERN double GDALRasterAttributeTableShadow_GetValueAsDouble(GDALRasterAttributeTableShadow *self,int iRow,int iCol){
    5848          38 :         return GDALRATGetValueAsDouble( self, iRow, iCol );
    5849             :     }
    5850           5 : SWIGINTERN CPLErr GDALRasterAttributeTableShadow_ReadValuesIOAsString(GDALRasterAttributeTableShadow *self,int iField,int iStartRow,int iLength,char **ppszData){
    5851           5 :         return GDALRATValuesIOAsString(self, GF_Read, iField, iStartRow, iLength, ppszData);
    5852             :     }
    5853           5 : SWIGINTERN CPLErr GDALRasterAttributeTableShadow_ReadValuesIOAsInteger(GDALRasterAttributeTableShadow *self,int iField,int iStartRow,int iLength,int *pnData){
    5854           5 :         return GDALRATValuesIOAsInteger(self, GF_Read, iField, iStartRow, iLength, pnData);
    5855             :     }
    5856           5 : SWIGINTERN CPLErr GDALRasterAttributeTableShadow_ReadValuesIOAsDouble(GDALRasterAttributeTableShadow *self,int iField,int iStartRow,int iLength,double *pdfData){
    5857           5 :         return GDALRATValuesIOAsDouble(self, GF_Read, iField, iStartRow, iLength, pdfData);
    5858             :     }
    5859          27 : SWIGINTERN void GDALRasterAttributeTableShadow_SetValueAsString(GDALRasterAttributeTableShadow *self,int iRow,int iCol,char const *pszValue){
    5860          27 :         GDALRATSetValueAsString( self, iRow, iCol, pszValue );
    5861          27 :     }
    5862          39 : SWIGINTERN void GDALRasterAttributeTableShadow_SetValueAsInt(GDALRasterAttributeTableShadow *self,int iRow,int iCol,int nValue){
    5863          39 :         GDALRATSetValueAsInt( self, iRow, iCol, nValue );
    5864          39 :     }
    5865          25 : SWIGINTERN void GDALRasterAttributeTableShadow_SetValueAsDouble(GDALRasterAttributeTableShadow *self,int iRow,int iCol,double dfValue){
    5866          25 :         GDALRATSetValueAsDouble( self, iRow, iCol, dfValue );
    5867          25 :     }
    5868           5 : SWIGINTERN void GDALRasterAttributeTableShadow_SetRowCount(GDALRasterAttributeTableShadow *self,int nCount){
    5869           5 :         GDALRATSetRowCount( self, nCount );
    5870           5 :     }
    5871          25 : SWIGINTERN int GDALRasterAttributeTableShadow_CreateColumn(GDALRasterAttributeTableShadow *self,char const *pszName,GDALRATFieldType eType,GDALRATFieldUsage eUsage){
    5872          50 :         return GDALRATCreateColumn( self, pszName, eType, eUsage );
    5873             :     }
    5874           1 : SWIGINTERN bool GDALRasterAttributeTableShadow_GetLinearBinning(GDALRasterAttributeTableShadow *self,double *pdfRow0Min,double *pdfBinSize){
    5875           2 :         return (GDALRATGetLinearBinning(self, pdfRow0Min, pdfBinSize) != 0) ? true : false;
    5876             :     }
    5877           1 : SWIGINTERN int GDALRasterAttributeTableShadow_SetLinearBinning(GDALRasterAttributeTableShadow *self,double dfRow0Min,double dfBinSize){
    5878           2 :         return GDALRATSetLinearBinning(self, dfRow0Min, dfBinSize);
    5879             :     }
    5880           3 : SWIGINTERN int GDALRasterAttributeTableShadow_GetRowOfValue(GDALRasterAttributeTableShadow *self,double dfValue){
    5881           3 :         return GDALRATGetRowOfValue( self, dfValue );
    5882             :     }
    5883           2 : SWIGINTERN int GDALRasterAttributeTableShadow_ChangesAreWrittenToFile(GDALRasterAttributeTableShadow *self){
    5884           2 :         return GDALRATChangesAreWrittenToFile( self );
    5885             :     }
    5886           0 : SWIGINTERN void GDALRasterAttributeTableShadow_DumpReadable(GDALRasterAttributeTableShadow *self){
    5887           0 :         GDALRATDumpReadable( self, NULL );
    5888           0 :     }
    5889           3 : SWIGINTERN void GDALRasterAttributeTableShadow_SetTableType(GDALRasterAttributeTableShadow *self,GDALRATTableType eTableType){
    5890           3 :         GDALRATSetTableType( self, eTableType );
    5891           3 :     }
    5892          10 : SWIGINTERN GDALRATTableType GDALRasterAttributeTableShadow_GetTableType(GDALRasterAttributeTableShadow *self){
    5893          10 :         return GDALRATGetTableType( self );
    5894             :     }
    5895           1 : SWIGINTERN void GDALRasterAttributeTableShadow_RemoveStatistics(GDALRasterAttributeTableShadow *self){
    5896           1 :         GDALRATRemoveStatistics(self);
    5897           1 :     }
    5898        1447 : SWIGINTERN void delete_GDALGroupHS(GDALGroupHS *self){
    5899        1447 :     GDALGroupRelease(self);
    5900        1447 :   }
    5901          95 : SWIGINTERN char const *GDALGroupHS_GetName(GDALGroupHS *self){
    5902          95 :     return GDALGroupGetName(self);
    5903             :   }
    5904          47 : SWIGINTERN char const *GDALGroupHS_GetFullName(GDALGroupHS *self){
    5905          47 :     return GDALGroupGetFullName(self);
    5906             :   }
    5907         329 : SWIGINTERN char **GDALGroupHS_GetMDArrayNames(GDALGroupHS *self,char **options=0){
    5908         329 :     return GDALGroupGetMDArrayNames( self, options );
    5909             :   }
    5910           1 : SWIGINTERN char **GDALGroupHS_GetMDArrayFullNamesRecursive(GDALGroupHS *self,char **groupOptions=0,char **arrayOptions=0){
    5911           1 :     return GDALGroupGetMDArrayFullNamesRecursive( self, groupOptions, arrayOptions );
    5912             :   }
    5913         806 : SWIGINTERN GDALMDArrayHS *GDALGroupHS_OpenMDArray(GDALGroupHS *self,char const *name,char **options=0){
    5914             : 
    5915         806 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    5916             : 
    5917         806 :     GDALMDArrayH hRet = GDALGroupOpenMDArray(self, name, options);
    5918             : 
    5919         927 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    5920          17 :         CPLError(CE_Failure, CPLE_AppDefined, "Array %s does not exist", name);
    5921             : 
    5922         806 :     return hRet;
    5923             :   }
    5924          16 : SWIGINTERN GDALMDArrayHS *GDALGroupHS_OpenMDArrayFromFullname(GDALGroupHS *self,char const *name,char **options=0){
    5925             : 
    5926          16 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    5927             : 
    5928          16 :     GDALMDArrayH hRet = GDALGroupOpenMDArrayFromFullname(self, name, options);
    5929             : 
    5930          23 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    5931           1 :         CPLError(CE_Failure, CPLE_AppDefined, "Array %s does not exist", name);
    5932             : 
    5933          16 :     return hRet;
    5934             :   }
    5935          19 : SWIGINTERN GDALMDArrayHS *GDALGroupHS_ResolveMDArray(GDALGroupHS *self,char const *name,char const *starting_point,char **options=0){
    5936             : 
    5937          19 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    5938             : 
    5939          19 :     GDALMDArrayH hRet = GDALGroupResolveMDArray(self, name, starting_point, options);
    5940             : 
    5941          19 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    5942           1 :         CPLError(CE_Failure, CPLE_AppDefined, "Array %s does not exist", name);
    5943             : 
    5944          19 :     return hRet;
    5945             :   }
    5946          97 : SWIGINTERN char **GDALGroupHS_GetGroupNames(GDALGroupHS *self,char **options=0){
    5947          97 :     return GDALGroupGetGroupNames( self, options );
    5948             :   }
    5949         163 : SWIGINTERN GDALGroupHS *GDALGroupHS_OpenGroup(GDALGroupHS *self,char const *name,char **options=0){
    5950             : 
    5951         163 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    5952             : 
    5953         163 :     GDALGroupH hRet = GDALGroupOpenGroup(self, name, options);
    5954             : 
    5955         171 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    5956          12 :         CPLError(CE_Failure, CPLE_AppDefined, "Group %s does not exist", name);
    5957             : 
    5958         163 :     return hRet;
    5959             :   }
    5960           3 : SWIGINTERN GDALGroupHS *GDALGroupHS_OpenGroupFromFullname(GDALGroupHS *self,char const *name,char **options=0){
    5961             : 
    5962           3 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    5963             : 
    5964           3 :     GDALGroupH hRet = GDALGroupOpenGroupFromFullname(self, name, options);
    5965             : 
    5966           3 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    5967           1 :         CPLError(CE_Failure, CPLE_AppDefined, "Group %s does not exist", name);
    5968             : 
    5969           3 :     return hRet;
    5970             :   }
    5971           8 : SWIGINTERN char **GDALGroupHS_GetVectorLayerNames(GDALGroupHS *self,char **options=0){
    5972           8 :     return GDALGroupGetVectorLayerNames( self, options );
    5973             :   }
    5974          12 : SWIGINTERN OGRLayerShadow *GDALGroupHS_OpenVectorLayer(GDALGroupHS *self,char const *name,char **options=0){
    5975             : 
    5976          12 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    5977             : 
    5978          12 :     OGRLayerH hRet = GDALGroupOpenVectorLayer(self, name, options);
    5979             : 
    5980          12 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    5981           1 :         CPLError(CE_Failure, CPLE_AppDefined, "Vector layer %s does not exist", name);
    5982             : 
    5983          12 :     return (OGRLayerShadow*) hRet;
    5984             :   }
    5985          73 : SWIGINTERN void GDALGroupHS_GetDimensions(GDALGroupHS *self,GDALDimensionHS ***pdims,size_t *pnCount,char **options=0){
    5986         146 :     *pdims = GDALGroupGetDimensions(self, pnCount, options);
    5987             :   }
    5988          80 : SWIGINTERN GDALAttributeHS *GDALGroupHS_GetAttribute(GDALGroupHS *self,char const *name){
    5989             : 
    5990          80 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    5991             : 
    5992          80 :     GDALAttributeH hRet = GDALGroupGetAttribute(self, name);
    5993             : 
    5994          85 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    5995           2 :         CPLError(CE_Failure, CPLE_AppDefined, "Attribute %s does not exist", name);
    5996             : 
    5997          80 :     return hRet;
    5998             :   }
    5999          71 : SWIGINTERN void GDALGroupHS_GetAttributes(GDALGroupHS *self,GDALAttributeHS ***pattrs,size_t *pnCount,char **options=0){
    6000         142 :     *pattrs = GDALGroupGetAttributes(self, pnCount, options);
    6001             :   }
    6002           4 : SWIGINTERN char **GDALGroupHS_GetStructuralInfo(GDALGroupHS *self){
    6003           4 :     return GDALGroupGetStructuralInfo( self );
    6004             :   }
    6005         179 : SWIGINTERN GDALGroupHS *GDALGroupHS_CreateGroup(GDALGroupHS *self,char const *name,char **options=0){
    6006         179 :     return GDALGroupCreateGroup(self, name, options);
    6007             :   }
    6008          20 : SWIGINTERN CPLErr GDALGroupHS_DeleteGroup(GDALGroupHS *self,char const *name,char **options=0){
    6009          20 :     return GDALGroupDeleteGroup(self, name, options) ? CE_None : CE_Failure;
    6010             :   }
    6011         658 : SWIGINTERN GDALDimensionHS *GDALGroupHS_CreateDimension(GDALGroupHS *self,char const *name,char const *dim_type,char const *direction,GUIntBig size,char **options=0){
    6012         658 :     return GDALGroupCreateDimension(self, name, dim_type, direction, size, options);
    6013             :   }
    6014         607 : SWIGINTERN GDALMDArrayHS *GDALGroupHS_CreateMDArray(GDALGroupHS *self,char const *name,int dimensions,GDALDimensionHS **dimensionsValues,GDALExtendedDataTypeHS *data_type,char **options=0){
    6015         607 :     return GDALGroupCreateMDArray(self, name, dimensions, dimensionsValues,
    6016             :                                   data_type, options);
    6017             :   }
    6018          20 : SWIGINTERN CPLErr GDALGroupHS_DeleteMDArray(GDALGroupHS *self,char const *name,char **options=0){
    6019          20 :     return GDALGroupDeleteMDArray(self, name, options) ? CE_None : CE_Failure;
    6020             :   }
    6021             : 
    6022             : static GUIntBig*
    6023        5216 : CreateCGUIntBigListFromSequence( PyObject* pySeq, int* pnSize ) {
    6024             :   /* check if is List */
    6025        5216 :   if ( !PySequence_Check(pySeq) ) {
    6026           0 :     PyErr_SetString(PyExc_TypeError, "not a sequence");
    6027           0 :     *pnSize = -1;
    6028           0 :     return NULL;
    6029             :   }
    6030        5216 :   Py_ssize_t size = PySequence_Size(pySeq);
    6031        5216 :   if( size > (Py_ssize_t)INT_MAX ) {
    6032           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    6033           0 :     *pnSize = -1;
    6034           0 :     return NULL;
    6035             :   }
    6036        5216 :   if( (size_t)size > SIZE_MAX / sizeof(GUIntBig) ) {
    6037           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    6038           0 :     *pnSize = -1;
    6039           0 :     return NULL;
    6040             :   }
    6041        5216 :   *pnSize = (int)size;
    6042        5216 :   GUIntBig* ret = (GUIntBig*) malloc((*pnSize)*sizeof(GUIntBig));
    6043        5216 :   if( !ret ) {
    6044           0 :     PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    6045           0 :     *pnSize = -1;
    6046           0 :     return NULL;
    6047             :   }
    6048       14633 :   for( int i = 0; i<*pnSize; i++ ) {
    6049        9417 :     PyObject *o = PySequence_GetItem(pySeq,i);
    6050        9417 :     if ( !PyArg_Parse(o,"K",&ret[i]) ) {
    6051           0 :         PyErr_SetString(PyExc_TypeError, "not an integer");
    6052           0 :         Py_DECREF(o);
    6053           0 :         free(ret);
    6054           0 :         *pnSize = -1;
    6055           0 :         return NULL;
    6056             :     }
    6057        9417 :     Py_DECREF(o);
    6058             :   }
    6059             :   return ret;
    6060             : }
    6061             : 
    6062         125 : SWIGINTERN GDALAttributeHS *GDALGroupHS_CreateAttribute(GDALGroupHS *self,char const *name,int dimensions,GUIntBig *sizes,GDALExtendedDataTypeHS *data_type,char **options=0){
    6063         125 :     return GDALGroupCreateAttribute(self, name, dimensions,
    6064             :                                     (const GUInt64*) sizes,
    6065             :                                     data_type, options);
    6066             :   }
    6067          25 : SWIGINTERN CPLErr GDALGroupHS_DeleteAttribute(GDALGroupHS *self,char const *name,char **options=0){
    6068          25 :     return GDALGroupDeleteAttribute(self, name, options) ? CE_None : CE_Failure;
    6069             :   }
    6070          45 : SWIGINTERN CPLErr GDALGroupHS_Rename(GDALGroupHS *self,char const *newName){
    6071          45 :     return GDALGroupRename( self, newName ) ? CE_None : CE_Failure;
    6072             :   }
    6073          14 : SWIGINTERN GDALGroupHS *GDALGroupHS_SubsetDimensionFromSelection(GDALGroupHS *self,char const *selection,char **options=0){
    6074          14 :     return GDALGroupSubsetDimensionFromSelection(self, selection, options);
    6075             :   }
    6076           2 : SWIGINTERN size_t GDALGroupHS_GetDataTypeCount(GDALGroupHS *self){
    6077           2 :     return GDALGroupGetDataTypeCount(self);
    6078             :   }
    6079             : 
    6080             : SWIGINTERNINLINE PyObject* 
    6081        3604 : SWIG_From_unsigned_SS_long  (unsigned long value)
    6082             : {
    6083        3604 :   return (value > LONG_MAX) ?
    6084        3604 :     PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value));
    6085             : }
    6086             : 
    6087             : 
    6088             : #ifdef SWIG_LONG_LONG_AVAILABLE
    6089             : SWIGINTERNINLINE PyObject* 
    6090             : SWIG_From_unsigned_SS_long_SS_long  (unsigned long long value)
    6091             : {
    6092             :   return (value > LONG_MAX) ?
    6093             :     PyLong_FromUnsignedLongLong(value) : PyInt_FromLong(static_cast< long >(value));
    6094             : }
    6095             : #endif
    6096             : 
    6097             : 
    6098             : SWIGINTERNINLINE PyObject *
    6099        3604 : SWIG_From_size_t  (size_t value)
    6100             : {    
    6101             : #ifdef SWIG_LONG_LONG_AVAILABLE
    6102        3604 :   if (sizeof(size_t) <= sizeof(unsigned long)) {
    6103             : #endif
    6104        3604 :     return SWIG_From_unsigned_SS_long  (static_cast< unsigned long >(value));
    6105             : #ifdef SWIG_LONG_LONG_AVAILABLE
    6106             :   } else {
    6107             :     /* assume sizeof(size_t) <= sizeof(unsigned long long) */
    6108             :     return SWIG_From_unsigned_SS_long_SS_long  (static_cast< unsigned long long >(value));
    6109             :   }
    6110             : #endif
    6111             : }
    6112             : 
    6113           2 : SWIGINTERN GDALExtendedDataTypeHS *GDALGroupHS_GetDataType(GDALGroupHS *self,size_t idx){
    6114           2 :     if (idx >= GDALGroupGetDataTypeCount(self))
    6115             :     {
    6116           1 :         CPLError(CE_Failure, CPLE_AppDefined, "GetDataType(): invalid index");
    6117           1 :         return NULL;
    6118             :     }
    6119           1 :     return GDALGroupGetDataType(self, idx);
    6120             :   }
    6121             : 
    6122             : typedef struct
    6123             : {
    6124             :   double min;
    6125             :   double max;
    6126             :   double mean;
    6127             :   double std_dev;
    6128             :   GIntBig valid_count;
    6129             : } Statistics;
    6130             : 
    6131           0 : SWIGINTERN void delete_Statistics(Statistics *self){
    6132           0 :     CPLFree(self);
    6133           0 :   }
    6134             : 
    6135             : #include <limits>
    6136             : 
    6137        2428 : static bool CheckNumericDataType(GDALExtendedDataTypeHS* dt)
    6138             : {
    6139        2428 :     GDALExtendedDataTypeClass klass = GDALExtendedDataTypeGetClass(dt);
    6140        2428 :     if( klass == GEDTC_NUMERIC )
    6141             :         return true;
    6142          32 :     if( klass == GEDTC_STRING )
    6143             :         return false;
    6144          20 :     CPLAssert( klass == GEDTC_COMPOUND );
    6145          20 :     size_t nCount = 0;
    6146          20 :     GDALEDTComponentH* comps = GDALExtendedDataTypeGetComponents(dt, &nCount);
    6147             :     bool ret = true;
    6148          56 :     for( size_t i = 0; i < nCount; i++ )
    6149             :     {
    6150          38 :         GDALExtendedDataTypeH tmpType = GDALEDTComponentGetType(comps[i]);
    6151          38 :         ret = CheckNumericDataType(tmpType);
    6152          38 :         GDALExtendedDataTypeRelease(tmpType);
    6153          38 :         if( !ret )
    6154             :             break;
    6155             :     }
    6156          20 :     GDALExtendedDataTypeFreeComponents(comps, nCount);
    6157             :     return ret;
    6158             : }
    6159             : 
    6160        4264 : static CPLErr MDArrayReadWriteCheckArguments(GDALMDArrayHS* array,
    6161             :                                              bool bCheckOnlyDims,
    6162             :                                              int nDims1, GUIntBig* array_start_idx,
    6163             :                                              int nDims2, GUIntBig* count,
    6164             :                                              int nDims3, GIntBig* array_step,
    6165             :                                              int nDims4, GIntBig* buffer_stride,
    6166             :                                              GDALExtendedDataTypeHS* buffer_datatype,
    6167             :                                              size_t* pnBufferSize)
    6168             : {
    6169        4264 :     const int nExpectedDims = (int)GDALMDArrayGetDimensionCount(array);
    6170        4264 :     if( nDims1 != nExpectedDims )
    6171             :     {
    6172           1 :         CPLError(CE_Failure, CPLE_AppDefined,
    6173             :             "Wrong number of values in array_start_idx");
    6174           1 :         return CE_Failure;
    6175             :     }
    6176        4263 :     if( nDims2 != nExpectedDims )
    6177             :     {
    6178           1 :         CPLError(CE_Failure, CPLE_AppDefined,
    6179             :             "Wrong number of values in count");
    6180           1 :         return CE_Failure;
    6181             :     }
    6182        4262 :     if( nDims3 != nExpectedDims )
    6183             :     {
    6184           1 :         CPLError(CE_Failure, CPLE_AppDefined,
    6185             :             "Wrong number of values in array_step");
    6186           1 :         return CE_Failure;
    6187             :     }
    6188        4261 :     if( nDims4!= nExpectedDims )
    6189             :     {
    6190           1 :         CPLError(CE_Failure, CPLE_AppDefined,
    6191             :             "Wrong number of values in buffer_stride");
    6192           1 :         return CE_Failure;
    6193             :     }
    6194        4260 :     if( bCheckOnlyDims )
    6195             :         return CE_None;
    6196        2375 :     if( !CheckNumericDataType(buffer_datatype) )
    6197             :     {
    6198           8 :         CPLError(CE_Failure, CPLE_NotSupported,
    6199             :             "non-numeric buffer data type not supported in SWIG bindings");
    6200           8 :         return CE_Failure;
    6201             :     }
    6202             :     GIntBig nBufferSize = 0;
    6203        6742 :     for( int i = 0; i < nExpectedDims; i++ )
    6204             :     {
    6205        4377 :         if( count[i] == 0 )
    6206             :         {
    6207           1 :             CPLError(CE_Failure, CPLE_AppDefined,
    6208             :                      "count[%d] = 0 is invalid", i);
    6209           1 :             return CE_Failure;
    6210             :         }
    6211        4376 :         if( buffer_stride[i] < 0 )
    6212             :         {
    6213           1 :             CPLError(CE_Failure, CPLE_NotSupported,
    6214             :                 "Negative value in buffer_stride not supported in SWIG bindings");
    6215           1 :             return CE_Failure;
    6216             :         }
    6217        4375 :         if( count[i] > 1 && buffer_stride[i] != 0 )
    6218             :         {
    6219        3677 :             if( (GUIntBig)buffer_stride[i] > std::numeric_limits<GIntBig>::max() / (count[i] - 1) )
    6220             :             {
    6221           0 :                 CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6222           0 :                 return CE_Failure;
    6223             :             }
    6224        3677 :             GIntBig nDelta = buffer_stride[i] * (count[i] - 1);
    6225        3677 :             if( nBufferSize > std::numeric_limits<GIntBig>::max() - nDelta )
    6226             :             {
    6227           0 :                 CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6228           0 :                 return CE_Failure;
    6229             :             }
    6230        3677 :             nBufferSize += nDelta;
    6231             :         }
    6232             :     }
    6233        2365 :     const size_t nDTSize = GDALExtendedDataTypeGetSize(buffer_datatype);
    6234        2365 :     if( nDTSize == 0 )
    6235             :     {
    6236           0 :         CPLError(CE_Failure, CPLE_AppDefined, "nDTSize == 0");
    6237           0 :         return CE_Failure;
    6238             :     }
    6239        2365 :     if( (GUIntBig)nBufferSize > (GUIntBig)std::numeric_limits<GIntBig>::max() / nDTSize )
    6240             :     {
    6241           0 :         CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6242           0 :         return CE_Failure;
    6243             :     }
    6244        2365 :     nBufferSize *= nDTSize;
    6245        2365 :     if( (GUIntBig)nBufferSize > (GUIntBig)std::numeric_limits<GIntBig>::max() - nDTSize )
    6246             :     {
    6247           1 :         CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6248           1 :         return CE_Failure;
    6249             :     }
    6250        2364 :     nBufferSize += nDTSize;
    6251             : 
    6252             : #if SIZEOF_VOIDP == 4
    6253             :     if( nBufferSize > INT_MAX )
    6254             :     {
    6255             :         CPLError(CE_Failure, CPLE_IllegalArg, "Integer overflow");
    6256             :         return CE_Failure;
    6257             :     }
    6258             : #endif
    6259        2364 :     *pnBufferSize = (size_t)nBufferSize;
    6260        2364 :     return CE_None;
    6261             : }
    6262             : 
    6263        2019 : SWIGINTERN void delete_GDALMDArrayHS(GDALMDArrayHS *self){
    6264        2019 :     GDALMDArrayRelease(self);
    6265        2019 :   }
    6266          83 : SWIGINTERN char const *GDALMDArrayHS_GetName(GDALMDArrayHS *self){
    6267          83 :     return GDALMDArrayGetName(self);
    6268             :   }
    6269          50 : SWIGINTERN char const *GDALMDArrayHS_GetFullName(GDALMDArrayHS *self){
    6270          50 :     return GDALMDArrayGetFullName(self);
    6271             :   }
    6272           6 : SWIGINTERN GUIntBig GDALMDArrayHS_GetTotalElementsCount(GDALMDArrayHS *self){
    6273           6 :     return GDALMDArrayGetTotalElementsCount(self);
    6274             :   }
    6275        3505 : SWIGINTERN size_t GDALMDArrayHS_GetDimensionCount(GDALMDArrayHS *self){
    6276        3505 :     return GDALMDArrayGetDimensionCount(self);
    6277             :   }
    6278        2279 : SWIGINTERN void GDALMDArrayHS_GetDimensions(GDALMDArrayHS *self,GDALDimensionHS ***pdims,size_t *pnCount){
    6279        4558 :     *pdims = GDALMDArrayGetDimensions(self, pnCount);
    6280             :   }
    6281          13 : SWIGINTERN void GDALMDArrayHS_GetCoordinateVariables(GDALMDArrayHS *self,GDALMDArrayHS ***parrays,size_t *pnCount){
    6282          26 :     *parrays = GDALMDArrayGetCoordinateVariables(self, pnCount);
    6283             :   }
    6284          93 : SWIGINTERN void GDALMDArrayHS_GetBlockSize(GDALMDArrayHS *self,GUIntBig **psizes,size_t *pnCount){
    6285         186 :     *psizes = GDALMDArrayGetBlockSize(self, pnCount);
    6286             :   }
    6287           1 : SWIGINTERN void GDALMDArrayHS_GetProcessingChunkSize(GDALMDArrayHS *self,size_t nMaxChunkMemory,GUIntBig **psizes,size_t *pnCount){
    6288           1 :      size_t* panTmp = GDALMDArrayGetProcessingChunkSize(self, pnCount, nMaxChunkMemory);
    6289           1 :      *psizes = NULL;
    6290           1 :      if( panTmp )
    6291             :      {
    6292           1 :         *psizes = (GUIntBig*) CPLMalloc(sizeof(GUIntBig) * (*pnCount));
    6293           3 :         for( size_t i = 0; i < *pnCount; ++i )
    6294             :         {
    6295           2 :             (*psizes)[i] = panTmp[i];
    6296             :         }
    6297           1 :         CPLFree(panTmp);
    6298             :      }
    6299           1 :   }
    6300        1972 : SWIGINTERN GDALExtendedDataTypeHS *GDALMDArrayHS_GetDataType(GDALMDArrayHS *self){
    6301        1972 :     return GDALMDArrayGetDataType(self);
    6302             :   }
    6303          15 : SWIGINTERN char **GDALMDArrayHS_GetStructuralInfo(GDALMDArrayHS *self){
    6304          15 :     return GDALMDArrayGetStructuralInfo( self );
    6305             :   }
    6306          44 : SWIGINTERN CPLErr GDALMDArrayHS_Resize(GDALMDArrayHS *self,int newDimensions,GUIntBig *newSizes,char **options=NULL){
    6307          44 :     if( static_cast<size_t>(newDimensions) != GDALMDArrayGetDimensionCount(self) )
    6308             :     {
    6309           2 :         CPLError(CE_Failure, CPLE_IllegalArg,
    6310             :                  "newSizes array not of expected size");
    6311           2 :         return CE_Failure;
    6312             :     }
    6313          42 :     return GDALMDArrayResize( self, newSizes, options ) ? CE_None : CE_Failure;
    6314             :   }
    6315             : 
    6316             : static GIntBig*
    6317        4821 : CreateCGIntBigListFromSequence( PyObject* pySeq, int* pnSize ) {
    6318             :   /* check if is List */
    6319        4821 :   if ( !PySequence_Check(pySeq) ) {
    6320           0 :     PyErr_SetString(PyExc_TypeError, "not a sequence");
    6321           0 :     *pnSize = -1;
    6322           0 :     return NULL;
    6323             :   }
    6324        4821 :   Py_ssize_t size = PySequence_Size(pySeq);
    6325        4821 :   if( size > (Py_ssize_t)INT_MAX ) {
    6326           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    6327           0 :     *pnSize = -1;
    6328           0 :     return NULL;
    6329             :   }
    6330        4821 :   if( (size_t)size > SIZE_MAX / sizeof(GIntBig) ) {
    6331           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    6332           0 :     *pnSize = -1;
    6333           0 :     return NULL;
    6334             :   }
    6335        4821 :   *pnSize = (int)size;
    6336        4821 :   GIntBig* ret = (GIntBig*) malloc((*pnSize)*sizeof(GIntBig));
    6337        4821 :   if( !ret ) {
    6338           0 :     PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    6339           0 :     *pnSize = -1;
    6340           0 :     return NULL;
    6341             :   }
    6342       13719 :   for( int i = 0; i<*pnSize; i++ ) {
    6343        8898 :     PyObject *o = PySequence_GetItem(pySeq,i);
    6344        8898 :     if ( !PyArg_Parse(o,"L",&ret[i]) ) {
    6345           0 :         PyErr_SetString(PyExc_TypeError, "not an integer");
    6346           0 :         Py_DECREF(o);
    6347           0 :         free(ret);
    6348           0 :         *pnSize = -1;
    6349           0 :         return NULL;
    6350             :     }
    6351        8898 :     Py_DECREF(o);
    6352             :   }
    6353             :   return ret;
    6354             : }
    6355             : 
    6356        1889 : SWIGINTERN CPLErr GDALMDArrayHS_Read(GDALMDArrayHS *self,int nDims1,GUIntBig *array_start_idx,int nDims2,GUIntBig *count,int nDims3,GIntBig *array_step,int nDims4,GIntBig *buffer_stride,GDALExtendedDataTypeHS *buffer_datatype,void **buf){
    6357        1889 :     *buf = NULL;
    6358             : 
    6359        1889 :     size_t buf_size = 0;
    6360        1889 :     if( MDArrayReadWriteCheckArguments(self, true,
    6361             :                                         nDims1, array_start_idx,
    6362             :                                         nDims2, count,
    6363             :                                         nDims3, array_step,
    6364             :                                         nDims4, buffer_stride,
    6365             :                                         buffer_datatype,
    6366             :                                         &buf_size) != CE_None )
    6367             :     {
    6368             :       return CE_Failure;
    6369             :     }
    6370             : 
    6371        1885 :     const int nExpectedDims = (int)GDALMDArrayGetDimensionCount(self);
    6372        3774 :     std::vector<size_t> count_internal(nExpectedDims + 1);
    6373        3770 :     std::vector<GPtrDiff_t> buffer_stride_internal(nExpectedDims + 1);
    6374        1885 :     size_t nProductCount = 1;
    6375        5414 :     for( int i = 0; i < nExpectedDims; i++ )
    6376             :     {
    6377        3529 :         count_internal[i] = (size_t)count[i];
    6378        3529 :         if( count_internal[i] != count[i] )
    6379             :         {
    6380             :             CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6381             :             return CE_Failure;
    6382             :         }
    6383        3529 :         nProductCount *= count_internal[i];
    6384        3529 :         buffer_stride_internal[i] = (GPtrDiff_t)buffer_stride[i];
    6385        3529 :         if( buffer_stride_internal[i] != buffer_stride[i] )
    6386             :         {
    6387           0 :             CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6388             :             return CE_Failure;
    6389             :         }
    6390             :     }
    6391             : 
    6392        1885 :     GDALExtendedDataTypeHS* selfType = GDALMDArrayGetDataType(self);
    6393        1885 :     bool isSelfString = GDALExtendedDataTypeGetClass(selfType) == GEDTC_STRING;
    6394        1885 :     GDALExtendedDataTypeRelease(selfType);
    6395             : 
    6396        1885 :     if( GDALExtendedDataTypeGetClass(buffer_datatype) == GEDTC_STRING &&
    6397             :         isSelfString )
    6398             :     {
    6399             :         size_t nExpectedStride = 1;
    6400          60 :         for( int i = nExpectedDims; i > 0; )
    6401             :         {
    6402          35 :             --i;
    6403          35 :             if( (size_t)buffer_stride_internal[i] != nExpectedStride )
    6404             :             {
    6405           0 :                 CPLError(CE_Failure, CPLE_AppDefined, "Unhandled stride");
    6406             :                 return CE_Failure;
    6407             :             }
    6408          35 :             nExpectedStride *= count_internal[i];
    6409             :         }
    6410          25 :         char** ppszBuffer = (char**)VSI_CALLOC_VERBOSE(nProductCount, sizeof(char*));
    6411          25 :         if( !ppszBuffer )
    6412             :             return CE_Failure;
    6413          25 :         GByte* pabyBuffer = (GByte*)ppszBuffer;
    6414          25 :         if( !(GDALMDArrayRead( self,
    6415             :                             array_start_idx,
    6416          25 :                             &count_internal[0],
    6417             :                             array_step,
    6418             :                             NULL,
    6419             :                             buffer_datatype,
    6420             :                             pabyBuffer,
    6421             :                             pabyBuffer,
    6422             :                             nProductCount * sizeof(char*) )) )
    6423             :         {
    6424           0 :             for( size_t i = 0; i < nProductCount; i++ )
    6425           0 :                 VSIFree(ppszBuffer[i]);
    6426           0 :             VSIFree(pabyBuffer);
    6427             :             return CE_Failure;
    6428             :         }
    6429             : 
    6430          25 :         SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    6431          25 :         PyObject* obj = PyList_New( nProductCount );
    6432         176 :         for( size_t i = 0; i < nProductCount; i++ )
    6433             :         {
    6434         151 :             if( !ppszBuffer[i] )
    6435             :             {
    6436           3 :                 Py_INCREF(Py_None);
    6437           3 :                 PyList_SetItem(obj, i, Py_None);
    6438             :             }
    6439             :             else
    6440             :             {
    6441         148 :                 PyList_SetItem(obj, i, GDALPythonObjectFromCStr( ppszBuffer[i] ) );
    6442             :             }
    6443         151 :             VSIFree(ppszBuffer[i]);
    6444             :         }
    6445          25 :         SWIG_PYTHON_THREAD_END_BLOCK;
    6446          25 :         *buf = obj;
    6447          25 :         VSIFree(pabyBuffer);
    6448          25 :         return CE_None;
    6449             :     }
    6450             : 
    6451        1860 :     if( MDArrayReadWriteCheckArguments(self, false,
    6452             :                                         nDims1, array_start_idx,
    6453             :                                         nDims2, count,
    6454             :                                         nDims3, array_step,
    6455             :                                         nDims4, buffer_stride,
    6456             :                                         buffer_datatype,
    6457             :                                         &buf_size) != CE_None )
    6458             :     {
    6459             :       return CE_Failure;
    6460             :     }
    6461        1849 :     if( buf_size == 0 )
    6462             :     {
    6463             :         return CE_None;
    6464             :     }
    6465             : 
    6466             : 
    6467        3734 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    6468        1849 :     *buf = (void *)PyByteArray_FromStringAndSize( NULL, buf_size );
    6469        1849 :     if (*buf == NULL)
    6470             :     {
    6471           0 :         *buf = Py_None;
    6472           0 :         if( !GetUseExceptions() )
    6473             :         {
    6474           0 :             PyErr_Clear();
    6475             :         }
    6476           0 :         SWIG_PYTHON_THREAD_END_BLOCK;
    6477           0 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    6478             :         return CE_Failure;
    6479             :     }
    6480        1849 :     char *data = PyByteArray_AsString( (PyObject *)*buf );
    6481        1849 :     SWIG_PYTHON_THREAD_END_BLOCK;
    6482             : 
    6483        1849 :     memset(data, 0, buf_size);
    6484             : 
    6485        1849 :     CPLErr eErr = GDALMDArrayRead( self,
    6486             :                                    array_start_idx,
    6487        1849 :                                    &count_internal[0],
    6488             :                                    array_step,
    6489        1849 :                                    &buffer_stride_internal[0],
    6490             :                                    buffer_datatype,
    6491             :                                    data,
    6492             :                                    data,
    6493        1874 :                                    buf_size ) ? CE_None : CE_Failure;
    6494          25 :     if (eErr == CE_Failure)
    6495             :     {
    6496          25 :         SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    6497          25 :         Py_DECREF((PyObject*)*buf);
    6498          25 :         SWIG_PYTHON_THREAD_END_BLOCK;
    6499          25 :         *buf = NULL;
    6500             :     }
    6501             : 
    6502             :     return eErr;
    6503             :   }
    6504          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){
    6505             : 
    6506          13 :     const int nExpectedDims = (int)GDALMDArrayGetDimensionCount(self);
    6507          26 :     std::vector<size_t> count_internal(nExpectedDims + 1);
    6508          13 :     if( nExpectedDims > 1 )
    6509             :     {
    6510           0 :         CPLError(CE_Failure, CPLE_AppDefined,
    6511             :             "Unsupported number of dimensions");
    6512             :         return CE_Failure;
    6513             :     }
    6514          25 :     for( int i = 0; i < nExpectedDims; i++ )
    6515             :     {
    6516          12 :         count_internal[i] = (size_t)count[i];
    6517          12 :         if( count_internal[i] != count[i] )
    6518             :         {
    6519             :             CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6520             :             return CE_Failure;
    6521             :         }
    6522             :     }
    6523          13 :     if( nExpectedDims == 1 )
    6524             :     {
    6525          12 :         if( nDims1 != 1 )
    6526             :         {
    6527           0 :             CPLError(CE_Failure, CPLE_AppDefined,
    6528             :                 "Wrong number of values in array_start_idx");
    6529             :             return CE_Failure;
    6530             :         }
    6531          12 :         if( nDims2 != 1 )
    6532             :         {
    6533           0 :             CPLError(CE_Failure, CPLE_AppDefined,
    6534             :                 "Wrong number of values in count");
    6535             :             return CE_Failure;
    6536             :         }
    6537          12 :         if( nDims3 != 1 )
    6538             :         {
    6539           0 :             CPLError(CE_Failure, CPLE_AppDefined,
    6540             :                 "Wrong number of values in array_step");
    6541             :             return CE_Failure;
    6542             :         }
    6543             :     }
    6544             : 
    6545          26 :     CPLErr eErr = GDALMDArrayWrite(self,
    6546             :                                    array_start_idx,
    6547          13 :                                    &count_internal[0],
    6548             :                                    array_step,
    6549             :                                    NULL,
    6550             :                                    buffer_datatype,
    6551             :                                    options,
    6552             :                                    options,
    6553          13 :                                    CSLCount(options) * sizeof(char*) ) ? CE_None : CE_Failure;
    6554             :     return eErr;
    6555             :   }
    6556         515 : SWIGINTERN CPLErr GDALMDArrayHS_Write(GDALMDArrayHS *self,int nDims1,GUIntBig *array_start_idx,int nDims2,GUIntBig *count,int nDims3,GIntBig *array_step,int nDims4,GIntBig *buffer_stride,GDALExtendedDataTypeHS *buffer_datatype,GIntBig buf_len,char *buf_string){
    6557             : 
    6558         515 :     size_t buf_size = 0;
    6559         515 :     if( MDArrayReadWriteCheckArguments(self, false,
    6560             :                                         nDims1, array_start_idx,
    6561             :                                         nDims2, count,
    6562             :                                         nDims3, array_step,
    6563             :                                         nDims4, buffer_stride,
    6564             :                                         buffer_datatype,
    6565             :                                         &buf_size) != CE_None )
    6566             :     {
    6567             :       return CE_Failure;
    6568             :     }
    6569             : 
    6570         515 :     if ( (GUIntBig)buf_len < buf_size )
    6571             :     {
    6572           2 :         CPLError(CE_Failure, CPLE_AppDefined, "Buffer too small");
    6573           2 :         return CE_Failure;
    6574             :     }
    6575             : 
    6576         513 :     const int nExpectedDims = (int)GDALMDArrayGetDimensionCount(self);
    6577        1028 :     std::vector<size_t> count_internal(nExpectedDims+1);
    6578        1026 :     std::vector<GPtrDiff_t> buffer_stride_internal(nExpectedDims+1);
    6579        1410 :     for( int i = 0; i < nExpectedDims; i++ )
    6580             :     {
    6581         897 :         count_internal[i] = (size_t)count[i];
    6582         897 :         if( count_internal[i] != count[i] )
    6583             :         {
    6584             :             CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6585             :             return CE_Failure;
    6586             :         }
    6587         897 :         buffer_stride_internal[i] = (GPtrDiff_t)buffer_stride[i];
    6588         897 :         if( buffer_stride_internal[i] != buffer_stride[i] )
    6589             :         {
    6590           0 :             CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6591             :             return CE_Failure;
    6592             :         }
    6593             :     }
    6594             : 
    6595         513 :     CPLErr eErr = GDALMDArrayWrite( self,
    6596             :                                    array_start_idx,
    6597         513 :                                    &count_internal[0],
    6598             :                                    array_step,
    6599         513 :                                    &buffer_stride_internal[0],
    6600             :                                    buffer_datatype,
    6601             :                                    buf_string,
    6602             :                                    buf_string,
    6603         516 :                                    (size_t)buf_len ) ? CE_None : CE_Failure;
    6604             :     return eErr;
    6605             :   }
    6606          22 : SWIGINTERN CPLErr GDALMDArrayHS_AdviseRead(GDALMDArrayHS *self,int nDims1,GUIntBig *array_start_idx,int nDims2,GUIntBig *count,char **options=0){
    6607             : 
    6608          22 :     const int nExpectedDims = (int)GDALMDArrayGetDimensionCount(self);
    6609          22 :     if( nDims1 != nExpectedDims )
    6610             :     {
    6611           0 :         CPLError(CE_Failure, CPLE_AppDefined,
    6612             :             "Wrong number of values in array_start_idx");
    6613           0 :         return CE_Failure;
    6614             :     }
    6615          22 :     if( nDims2 != nExpectedDims )
    6616             :     {
    6617           0 :         CPLError(CE_Failure, CPLE_AppDefined,
    6618             :             "Wrong number of values in count");
    6619           0 :         return CE_Failure;
    6620             :     }
    6621             : 
    6622          44 :     std::vector<size_t> count_internal(nExpectedDims+1);
    6623          58 :     for( int i = 0; i < nExpectedDims; i++ )
    6624             :     {
    6625          36 :         count_internal[i] = (size_t)count[i];
    6626          36 :         if( count_internal[i] != count[i] )
    6627             :         {
    6628             :             CPLError(CE_Failure, CPLE_AppDefined, "Integer overflow");
    6629             :             return CE_Failure;
    6630             :         }
    6631             :     }
    6632             : 
    6633          22 :     if( !(GDALMDArrayAdviseReadEx( self, array_start_idx, count_internal.data(), options )) )
    6634             :     {
    6635           5 :         return CE_Failure;
    6636             :     }
    6637             :     return CE_None;
    6638             :   }
    6639         119 : SWIGINTERN GDALAttributeHS *GDALMDArrayHS_GetAttribute(GDALMDArrayHS *self,char const *name){
    6640             : 
    6641         119 :     CPLErr eLastErrorType = CPLGetLastErrorType();
    6642             : 
    6643         119 :     GDALAttributeH hRet = GDALMDArrayGetAttribute(self, name);
    6644             : 
    6645         137 :     if( GetUseExceptions() && hRet == NULL && eLastErrorType == CE_None && CPLGetLastErrorType() == CE_None )
    6646           2 :         CPLError(CE_Failure, CPLE_AppDefined, "Attribute %s does not exist", name);
    6647             : 
    6648         119 :     return hRet;
    6649             :   }
    6650          58 : SWIGINTERN void GDALMDArrayHS_GetAttributes(GDALMDArrayHS *self,GDALAttributeHS ***pattrs,size_t *pnCount,char **options=0){
    6651         116 :     *pattrs = GDALMDArrayGetAttributes(self, pnCount, options);
    6652             :   }
    6653         162 : SWIGINTERN GDALAttributeHS *GDALMDArrayHS_CreateAttribute(GDALMDArrayHS *self,char const *name,int dimensions,GUIntBig *sizes,GDALExtendedDataTypeHS *data_type,char **options=0){
    6654         162 :     return GDALMDArrayCreateAttribute(self, name, dimensions,
    6655             :                                     (const GUInt64*) sizes,
    6656             :                                     data_type, options);
    6657             :   }
    6658          24 : SWIGINTERN CPLErr GDALMDArrayHS_DeleteAttribute(GDALMDArrayHS *self,char const *name,char **options=0){
    6659          24 :     return GDALMDArrayDeleteAttribute(self, name, options) ? CE_None : CE_Failure;
    6660             :   }
    6661          72 : SWIGINTERN CPLErr GDALMDArrayHS_GetNoDataValueAsRaw(GDALMDArrayHS *self,void **buf){
    6662          72 :     *buf = NULL;
    6663          72 :     const void* pabyBuf = GDALMDArrayGetRawNoDataValue(self);
    6664          72 :     if( pabyBuf == NULL )
    6665             :     {
    6666             :       return CE_Failure;
    6667             :     }
    6668          36 :     GDALExtendedDataTypeHS* selfType = GDALMDArrayGetDataType(self);
    6669          36 :     const size_t buf_size = GDALExtendedDataTypeGetSize(selfType);
    6670          36 :     GDALExtendedDataTypeRelease(selfType);
    6671             : 
    6672         108 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    6673          36 :     *buf = (void *)PyByteArray_FromStringAndSize( NULL, buf_size );
    6674          36 :     if (*buf == NULL)
    6675             :     {
    6676           0 :         *buf = Py_None;
    6677           0 :         if( !GetUseExceptions() )
    6678             :         {
    6679           0 :             PyErr_Clear();
    6680             :         }
    6681           0 :         SWIG_PYTHON_THREAD_END_BLOCK;
    6682           0 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    6683             :         return CE_Failure;
    6684             :     }
    6685          36 :     char *data = PyByteArray_AsString( (PyObject *)*buf );
    6686          36 :     SWIG_PYTHON_THREAD_END_BLOCK;
    6687             : 
    6688          36 :     memcpy(data, pabyBuf, buf_size);
    6689             : 
    6690          36 :     return CE_None;
    6691             :   }
    6692         120 : SWIGINTERN void GDALMDArrayHS_GetNoDataValueAsDouble(GDALMDArrayHS *self,double *val,int *hasval){
    6693         240 :     *val = GDALMDArrayGetNoDataValueAsDouble( self, hasval );
    6694             :   }
    6695          11 : SWIGINTERN void GDALMDArrayHS_GetNoDataValueAsInt64(GDALMDArrayHS *self,GIntBig *val,int *hasval){
    6696          22 :     *val = GDALMDArrayGetNoDataValueAsInt64( self, hasval );
    6697             :   }
    6698           7 : SWIGINTERN void GDALMDArrayHS_GetNoDataValueAsUInt64(GDALMDArrayHS *self,GUIntBig *val,int *hasval){
    6699          14 :     *val = GDALMDArrayGetNoDataValueAsUInt64( self, hasval );
    6700             :   }
    6701           5 : SWIGINTERN retStringAndCPLFree *GDALMDArrayHS_GetNoDataValueAsString(GDALMDArrayHS *self){
    6702           5 :     GDALExtendedDataTypeHS* selfType = GDALMDArrayGetDataType(self);
    6703           5 :     const size_t typeClass = GDALExtendedDataTypeGetClass(selfType);
    6704           5 :     GDALExtendedDataTypeRelease(selfType);
    6705             : 
    6706           5 :     if( typeClass != GEDTC_STRING )
    6707             :     {
    6708           1 :         CPLError(CE_Failure, CPLE_IllegalArg, "Data type is not string");
    6709           1 :         return NULL;
    6710             :     }
    6711           4 :     const void* pabyBuf = GDALMDArrayGetRawNoDataValue(self);
    6712           4 :     if( pabyBuf == NULL )
    6713             :     {
    6714             :       return NULL;
    6715             :     }
    6716           3 :     const char* ret = *reinterpret_cast<const char* const*>(pabyBuf);
    6717           3 :     if( ret )
    6718           2 :         return CPLStrdup(ret);
    6719             :     return NULL;
    6720             :   }
    6721          51 : SWIGINTERN CPLErr GDALMDArrayHS_SetNoDataValueDouble(GDALMDArrayHS *self,double d){
    6722          51 :     return GDALMDArraySetNoDataValueAsDouble( self, d ) ? CE_None : CE_Failure;
    6723             :   }
    6724           1 : SWIGINTERN CPLErr GDALMDArrayHS_SetNoDataValueInt64(GDALMDArrayHS *self,GIntBig v){
    6725           1 :     return GDALMDArraySetNoDataValueAsInt64( self, v ) ? CE_None : CE_Failure;
    6726             :   }
    6727           1 : SWIGINTERN CPLErr GDALMDArrayHS_SetNoDataValueUInt64(GDALMDArrayHS *self,GUIntBig v){
    6728           1 :     return GDALMDArraySetNoDataValueAsUInt64( self, v ) ? CE_None : CE_Failure;
    6729             :   }
    6730           3 : SWIGINTERN CPLErr GDALMDArrayHS_SetNoDataValueString(GDALMDArrayHS *self,char const *nodata){
    6731           3 :     GDALExtendedDataTypeHS* selfType = GDALMDArrayGetDataType(self);
    6732           3 :     const size_t typeClass = GDALExtendedDataTypeGetClass(selfType);
    6733           3 :     GDALExtendedDataTypeRelease(selfType);
    6734             : 
    6735           3 :     if( typeClass != GEDTC_STRING )
    6736             :     {
    6737           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "Data type is not string");
    6738           0 :         return CE_Failure;
    6739             :     }
    6740           3 :     return GDALMDArraySetRawNoDataValue(self, &nodata) ? CE_None : CE_Failure;
    6741             :   }
    6742           8 : SWIGINTERN CPLErr GDALMDArrayHS_SetNoDataValueRaw(GDALMDArrayHS *self,GIntBig nLen,char *pBuf){
    6743           8 :     GDALExtendedDataTypeHS* selfType = GDALMDArrayGetDataType(self);
    6744           8 :     const size_t selfTypeSize = GDALExtendedDataTypeGetSize(selfType);
    6745           8 :     GDALExtendedDataTypeRelease(selfType);
    6746             : 
    6747           8 :     if( static_cast<size_t>(nLen) != selfTypeSize )
    6748             :     {
    6749           1 :         CPLError(CE_Failure, CPLE_IllegalArg, "Argument of wrong size");
    6750           1 :         return CE_Failure;
    6751             :     }
    6752           7 :     return GDALMDArraySetRawNoDataValue(self, pBuf) ? CE_None : CE_Failure;
    6753             :   }
    6754           4 : SWIGINTERN CPLErr GDALMDArrayHS_DeleteNoDataValue(GDALMDArrayHS *self){
    6755           4 :     return GDALMDArraySetRawNoDataValue( self, NULL ) ? CE_None : CE_Failure;
    6756             :   }
    6757         100 : SWIGINTERN void GDALMDArrayHS_GetOffset(GDALMDArrayHS *self,double *val,int *hasval){
    6758         200 :     *val = GDALMDArrayGetOffset( self, hasval );
    6759             :   }
    6760           5 : SWIGINTERN GDALDataType GDALMDArrayHS_GetOffsetStorageType(GDALMDArrayHS *self){
    6761           5 :     GDALDataType eDT = GDT_Unknown;
    6762           5 :     int hasval = FALSE;
    6763           5 :     GDALMDArrayGetOffsetEx( self, &hasval, &eDT );
    6764           5 :     return hasval ? eDT : GDT_Unknown;
    6765             :   }
    6766         103 : SWIGINTERN void GDALMDArrayHS_GetScale(GDALMDArrayHS *self,double *val,int *hasval){
    6767         206 :     *val = GDALMDArrayGetScale( self, hasval );
    6768             :   }
    6769           5 : SWIGINTERN GDALDataType GDALMDArrayHS_GetScaleStorageType(GDALMDArrayHS *self){
    6770           5 :     GDALDataType eDT = GDT_Unknown;
    6771           5 :     int hasval = FALSE;
    6772           5 :     GDALMDArrayGetScaleEx( self, &hasval, &eDT );
    6773           5 :     return hasval ? eDT : GDT_Unknown;
    6774             :   }
    6775          21 : SWIGINTERN CPLErr GDALMDArrayHS_SetOffset(GDALMDArrayHS *self,double val,GDALDataType storageType=GDT_Unknown){
    6776          21 :     return GDALMDArraySetOffsetEx( self, val, storageType ) ? CE_None : CE_Failure;
    6777             :   }
    6778          21 : SWIGINTERN CPLErr GDALMDArrayHS_SetScale(GDALMDArrayHS *self,double val,GDALDataType storageType=GDT_Unknown){
    6779          21 :     return GDALMDArraySetScaleEx( self, val, storageType ) ? CE_None : CE_Failure;
    6780             :   }
    6781          15 : SWIGINTERN CPLErr GDALMDArrayHS_SetUnit(GDALMDArrayHS *self,char const *unit){
    6782          15 :     return GDALMDArraySetUnit(self, unit) ? CE_None : CE_Failure;
    6783             :   }
    6784         111 : SWIGINTERN char const *GDALMDArrayHS_GetUnit(GDALMDArrayHS *self){
    6785         111 :     return GDALMDArrayGetUnit(self);
    6786             :   }
    6787          30 : SWIGINTERN OGRErr GDALMDArrayHS_SetSpatialRef(GDALMDArrayHS *self,OSRSpatialReferenceShadow *srs){
    6788          30 :      return GDALMDArraySetSpatialRef( self, (OGRSpatialReferenceH)srs ) ? CE_None : CE_Failure;
    6789             :   }
    6790          77 : SWIGINTERN OSRSpatialReferenceShadow *GDALMDArrayHS_GetSpatialRef(GDALMDArrayHS *self){
    6791          77 :     return (OSRSpatialReferenceShadow*) GDALMDArrayGetSpatialRef(self);
    6792             :   }
    6793         430 : SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_GetView(GDALMDArrayHS *self,char const *viewExpr){
    6794         430 :     return GDALMDArrayGetView(self, viewExpr);
    6795             :   }
    6796          44 : SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_Transpose(GDALMDArrayHS *self,int axisMap,int *mapInts){
    6797          44 :     return GDALMDArrayTranspose(self, axisMap, mapInts);
    6798             :   }
    6799          13 : SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_GetUnscaled(GDALMDArrayHS *self){
    6800          13 :     return GDALMDArrayGetUnscaled(self);
    6801             :   }
    6802          35 : SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_GetMask(GDALMDArrayHS *self,char **options=0){
    6803          35 :     return GDALMDArrayGetMask(self, options);
    6804             :   }
    6805          22 : SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_GetGridded(GDALMDArrayHS *self,char const *pszGridOptions,GDALMDArrayHS *xArray=NULL,GDALMDArrayHS *yArray=NULL,char **options=0){
    6806          22 :     return GDALMDArrayGetGridded(self, pszGridOptions, xArray, yArray, options);
    6807             :   }
    6808          90 : SWIGINTERN GDALDatasetShadow *GDALMDArrayHS_AsClassicDataset(GDALMDArrayHS *self,size_t iXDim,size_t iYDim,GDALGroupHS *hRootGroup=NULL,char **options=0){
    6809          90 :     return (GDALDatasetShadow*)GDALMDArrayAsClassicDatasetEx(self, iXDim, iYDim, hRootGroup, options);
    6810             :   }
    6811          15 : SWIGINTERN Statistics *GDALMDArrayHS_GetStatistics(GDALMDArrayHS *self,bool approx_ok=FALSE,bool force=TRUE,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    6812          15 :         GUInt64 nValidCount = 0;
    6813          15 :         Statistics* psStatisticsOut = (Statistics*)CPLMalloc(sizeof(Statistics));
    6814          15 :         CPLErr eErr = GDALMDArrayGetStatistics(self, NULL, approx_ok, force,
    6815             :                                  &(psStatisticsOut->min),
    6816             :                                  &(psStatisticsOut->max),
    6817             :                                  &(psStatisticsOut->mean),
    6818             :                                  &(psStatisticsOut->std_dev),
    6819             :                                  &nValidCount,
    6820             :                                  callback, callback_data);
    6821          15 :         psStatisticsOut->valid_count = static_cast<GIntBig>(nValidCount);
    6822          15 :         if( eErr == CE_None )
    6823             :             return psStatisticsOut;
    6824           5 :         CPLFree(psStatisticsOut);
    6825             :         return NULL;
    6826             :   }
    6827           4 : SWIGINTERN Statistics *GDALMDArrayHS_ComputeStatistics(GDALMDArrayHS *self,bool approx_ok=FALSE,GDALProgressFunc callback=NULL,void *callback_data=NULL,char **options=0){
    6828           4 :         GUInt64 nValidCount = 0;
    6829           4 :         Statistics* psStatisticsOut = (Statistics*)CPLMalloc(sizeof(Statistics));
    6830           4 :         int nSuccess = GDALMDArrayComputeStatisticsEx(self, NULL, approx_ok,
    6831             :                                  &(psStatisticsOut->min),
    6832             :                                  &(psStatisticsOut->max),
    6833             :                                  &(psStatisticsOut->mean),
    6834             :                                  &(psStatisticsOut->std_dev),
    6835             :                                  &nValidCount,
    6836             :                                  callback, callback_data, options);
    6837           4 :         psStatisticsOut->valid_count = static_cast<GIntBig>(nValidCount);
    6838           4 :         if( nSuccess )
    6839             :             return psStatisticsOut;
    6840           0 :         CPLFree(psStatisticsOut);
    6841             :         return NULL;
    6842             :   }
    6843          34 : SWIGINTERN GDALMDArrayHS *GDALMDArrayHS_GetResampled(GDALMDArrayHS *self,int nDimensions,GDALDimensionHS **dimensions,GDALRIOResampleAlg resample_alg,OSRSpatialReferenceShadow **srs,char **options=0){
    6844          34 :     return GDALMDArrayGetResampled(self, nDimensions, dimensions,
    6845             :                                   resample_alg, srs ? *srs : NULL, options);
    6846             :   }
    6847           7 : SWIGINTERN void GDALMDArrayHS_GetMeshGrid(int nInputArrays,GDALMDArrayHS **ahInputArrays,GDALMDArrayHS ***outputArrays,size_t *pnCountOutputArrays,char **options=0){
    6848          14 :     *outputArrays = GDALMDArrayGetMeshGrid(ahInputArrays, nInputArrays, pnCountOutputArrays, options);
    6849             :   }
    6850           7 : SWIGINTERN bool GDALMDArrayHS_Cache(GDALMDArrayHS *self,char **options=NULL){
    6851          14 :       return GDALMDArrayCache(self, options);
    6852             :   }
    6853          28 : SWIGINTERN CPLErr GDALMDArrayHS_Rename(GDALMDArrayHS *self,char const *newName){
    6854          28 :     return GDALMDArrayRename( self, newName ) ? CE_None : CE_Failure;
    6855             :   }
    6856         737 : SWIGINTERN void delete_GDALAttributeHS(GDALAttributeHS *self){
    6857         737 :     GDALAttributeRelease(self);
    6858         737 :   }
    6859         361 : SWIGINTERN char const *GDALAttributeHS_GetName(GDALAttributeHS *self){
    6860         361 :     return GDALAttributeGetName(self);
    6861             :   }
    6862          49 : SWIGINTERN char const *GDALAttributeHS_GetFullName(GDALAttributeHS *self){
    6863          49 :     return GDALAttributeGetFullName(self);
    6864             :   }
    6865         176 : SWIGINTERN GUIntBig GDALAttributeHS_GetTotalElementsCount(GDALAttributeHS *self){
    6866         176 :     return GDALAttributeGetTotalElementsCount(self);
    6867             :   }
    6868          12 : SWIGINTERN size_t GDALAttributeHS_GetDimensionCount(GDALAttributeHS *self){
    6869          12 :     return GDALAttributeGetDimensionCount(self);
    6870             :   }
    6871          11 : SWIGINTERN void GDALAttributeHS_GetDimensionsSize(GDALAttributeHS *self,GUIntBig **pdims,size_t *pnCount){
    6872          22 :     *pdims = GDALAttributeGetDimensionsSize(self, pnCount);
    6873             :   }
    6874         418 : SWIGINTERN GDALExtendedDataTypeHS *GDALAttributeHS_GetDataType(GDALAttributeHS *self){
    6875         418 :     return GDALAttributeGetDataType(self);
    6876             :   }
    6877          10 : SWIGINTERN CPLErr GDALAttributeHS_ReadAsRaw(GDALAttributeHS *self,void **buf){
    6878          10 :     *buf = NULL;
    6879          10 :     GDALExtendedDataTypeHS* dt = GDALAttributeGetDataType(self);
    6880          10 :     bool bIsNumeric = CheckNumericDataType(dt);
    6881          10 :     GDALExtendedDataTypeRelease(dt);
    6882          10 :     if( !bIsNumeric )
    6883             :     {
    6884           4 :         CPLError(CE_Failure, CPLE_NotSupported,
    6885             :             "non-numeric buffer data type not supported in SWIG bindings");
    6886           4 :         return CE_Failure;
    6887             :     }
    6888           6 :     size_t buf_size = 0;
    6889           6 :     GByte* pabyBuf = GDALAttributeReadAsRaw(self, &buf_size);
    6890           6 :     if( pabyBuf == NULL )
    6891             :     {
    6892             :       return CE_Failure;
    6893             :     }
    6894             : 
    6895          16 :     SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    6896           6 :     *buf = (void *)PyBytes_FromStringAndSize( NULL, buf_size );
    6897           6 :     if (*buf == NULL)
    6898             :     {
    6899           0 :         *buf = Py_None;
    6900           0 :         if( !GetUseExceptions() )
    6901             :         {
    6902           0 :             PyErr_Clear();
    6903             :         }
    6904           0 :         SWIG_PYTHON_THREAD_END_BLOCK;
    6905           0 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    6906           0 :         GDALAttributeFreeRawResult(self, pabyBuf, buf_size);
    6907             :         return CE_Failure;
    6908             :     }
    6909           6 :     char *data = PyBytes_AsString( (PyObject *)*buf );
    6910           6 :     SWIG_PYTHON_THREAD_END_BLOCK;
    6911             : 
    6912           6 :     memcpy(data, pabyBuf, buf_size);
    6913           6 :     GDALAttributeFreeRawResult(self, pabyBuf, buf_size);
    6914             : 
    6915             :     return CE_None;
    6916             :   }
    6917         107 : SWIGINTERN char const *GDALAttributeHS_ReadAsString(GDALAttributeHS *self){
    6918         107 :     return GDALAttributeReadAsString(self);
    6919             :   }
    6920          22 : SWIGINTERN int GDALAttributeHS_ReadAsInt(GDALAttributeHS *self){
    6921          22 :     return GDALAttributeReadAsInt(self);
    6922             :   }
    6923          15 : SWIGINTERN long long GDALAttributeHS_ReadAsInt64(GDALAttributeHS *self){
    6924          15 :     return GDALAttributeReadAsInt64(self);
    6925             :   }
    6926             : 
    6927             : #ifdef SWIG_LONG_LONG_AVAILABLE
    6928             : SWIGINTERNINLINE PyObject* 
    6929          15 : SWIG_From_long_SS_long  (long long value)
    6930             : {
    6931          15 :   return ((value < LONG_MIN) || (value > LONG_MAX)) ?
    6932             :     PyLong_FromLongLong(value) : PyInt_FromLong(static_cast< long >(value));
    6933             : }
    6934             : #endif
    6935             : 
    6936          40 : SWIGINTERN double GDALAttributeHS_ReadAsDouble(GDALAttributeHS *self){
    6937          40 :     return GDALAttributeReadAsDouble(self);
    6938             :   }
    6939          19 : SWIGINTERN char **GDALAttributeHS_ReadAsStringArray(GDALAttributeHS *self){
    6940          19 :     return GDALAttributeReadAsStringArray(self);
    6941             :   }
    6942             : 
    6943             : static PyObject *
    6944          15 : CreateTupleFromIntArray( const int *first, size_t size ) {
    6945          15 :   PyObject *out = PyTuple_New( size );
    6946         819 :   for( unsigned int i=0; i<size; i++ ) {
    6947         804 :     PyObject *val = PyInt_FromLong( *first );
    6948         804 :     ++first;
    6949         804 :     PyTuple_SetItem( out, i, val );
    6950             :   }
    6951          15 :   return out;
    6952             : }
    6953             : 
    6954          15 : SWIGINTERN void GDALAttributeHS_ReadAsIntArray(GDALAttributeHS *self,int **pvals,size_t *pnCount){
    6955          30 :     *pvals = GDALAttributeReadAsIntArray(self, pnCount);
    6956             :   }
    6957             : 
    6958             : static PyObject *
    6959          14 : CreateTupleFromInt64Array( const long long *first, size_t size ) {
    6960          14 :   PyObject *out = PyTuple_New( size );
    6961          69 :   for( unsigned int i=0; i<size; i++ ) {
    6962          55 :     PyObject *val = PyLong_FromLongLong( *first );
    6963          55 :     ++first;
    6964          55 :     PyTuple_SetItem( out, i, val );
    6965             :   }
    6966          14 :   return out;
    6967             : }
    6968             : 
    6969          14 : SWIGINTERN void GDALAttributeHS_ReadAsInt64Array(GDALAttributeHS *self,long long **pvals,size_t *pnCount){
    6970          28 :     *pvals = (long long*)GDALAttributeReadAsInt64Array(self, pnCount);
    6971             :   }
    6972          29 : SWIGINTERN void GDALAttributeHS_ReadAsDoubleArray(GDALAttributeHS *self,double **pvals,size_t *pnCount){
    6973          58 :     *pvals = GDALAttributeReadAsDoubleArray(self, pnCount);
    6974             :   }
    6975           5 : SWIGINTERN CPLErr GDALAttributeHS_WriteRaw(GDALAttributeHS *self,GIntBig nLen,char *pBuf){
    6976           5 :     GDALExtendedDataTypeHS* dt = GDALAttributeGetDataType(self);
    6977           5 :     bool bIsNumeric = CheckNumericDataType(dt);
    6978           5 :     GDALExtendedDataTypeRelease(dt);
    6979           5 :     if( !bIsNumeric )
    6980             :     {
    6981           0 :         CPLError(CE_Failure, CPLE_NotSupported,
    6982             :             "non-numeric buffer data type not supported in SWIG bindings");
    6983           0 :         return CE_Failure;
    6984             :     }
    6985           5 :     return GDALAttributeWriteRaw(self, pBuf, nLen) ? CE_None : CE_Failure;
    6986             :   }
    6987         181 : SWIGINTERN CPLErr GDALAttributeHS_WriteString(GDALAttributeHS *self,char const *val){
    6988         181 :     return GDALAttributeWriteString(self, val) ? CE_None : CE_Failure;
    6989             :   }
    6990           8 : SWIGINTERN CPLErr GDALAttributeHS_WriteStringArray(GDALAttributeHS *self,char **vals){
    6991           8 :     return GDALAttributeWriteStringArray(self, vals) ? CE_None : CE_Failure;
    6992             :   }
    6993          22 : SWIGINTERN CPLErr GDALAttributeHS_WriteInt(GDALAttributeHS *self,int val){
    6994          22 :     return GDALAttributeWriteInt(self, val) ? CE_None : CE_Failure;
    6995             :   }
    6996             : 
    6997             : #ifdef SWIG_LONG_LONG_AVAILABLE
    6998             : SWIGINTERN int
    6999          11 : SWIG_AsVal_long_SS_long (PyObject *obj, long long *val)
    7000             : {
    7001          11 :   int res = SWIG_TypeError;
    7002          11 :   if (PyLong_Check(obj)) {
    7003          11 :     long long v = PyLong_AsLongLong(obj);
    7004          11 :     if (!PyErr_Occurred()) {
    7005          11 :       if (val) *val = v;
    7006          11 :       return SWIG_OK;
    7007             :     } else {
    7008           0 :       PyErr_Clear();
    7009           0 :       res = SWIG_OverflowError;
    7010             :     }
    7011             :   } else {
    7012           0 :     long v;
    7013           0 :     res = SWIG_AsVal_long (obj,&v);
    7014           0 :     if (SWIG_IsOK(res)) {
    7015           0 :       if (val) *val = v;
    7016           0 :       return res;
    7017             :     }
    7018             :   }
    7019             : #ifdef SWIG_PYTHON_CAST_MODE
    7020             :   {
    7021             :     const double mant_max = 1LL << DBL_MANT_DIG;
    7022             :     const double mant_min = -mant_max;
    7023             :     double d;
    7024             :     res = SWIG_AsVal_double (obj,&d);
    7025             :     if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, mant_min, mant_max))
    7026             :       return SWIG_OverflowError;
    7027             :     if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, mant_min, mant_max)) {
    7028             :       if (val) *val = (long long)(d);
    7029             :       return SWIG_AddCast(res);
    7030             :     }
    7031             :     res = SWIG_TypeError;
    7032             :   }
    7033             : #endif
    7034             :   return res;
    7035             : }
    7036             : #endif
    7037             : 
    7038          11 : SWIGINTERN CPLErr GDALAttributeHS_WriteInt64(GDALAttributeHS *self,long long val){
    7039          11 :     return GDALAttributeWriteInt64(self, val) ? CE_None : CE_Failure;
    7040             :   }
    7041          11 : SWIGINTERN CPLErr GDALAttributeHS_WriteDouble(GDALAttributeHS *self,double val){
    7042          11 :     return GDALAttributeWriteDouble(self, val) ? CE_None : CE_Failure;
    7043             :   }
    7044          11 : SWIGINTERN CPLErr GDALAttributeHS_WriteIntArray(GDALAttributeHS *self,int nList,int *pList){
    7045          11 :     return GDALAttributeWriteIntArray(self, pList, nList) ? CE_None : CE_Failure;
    7046             :   }
    7047             : 
    7048             : static long long*
    7049          10 : CreateCInt64ListFromSequence( PyObject* pySeq, int* pnSize ) {
    7050             :   /* check if is List */
    7051          10 :   if ( !PySequence_Check(pySeq) ) {
    7052           0 :     PyErr_SetString(PyExc_TypeError, "not a sequence");
    7053           0 :     *pnSize = -1;
    7054           0 :     return NULL;
    7055             :   }
    7056          10 :   Py_ssize_t size = PySequence_Size(pySeq);
    7057          10 :   if( size > (Py_ssize_t)INT_MAX ) {
    7058           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    7059           0 :     *pnSize = -1;
    7060           0 :     return NULL;
    7061             :   }
    7062          10 :   if( (size_t)size > SIZE_MAX / sizeof(long long) ) {
    7063           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    7064           0 :     *pnSize = -1;
    7065           0 :     return NULL;
    7066             :   }
    7067          10 :   *pnSize = (int)size;
    7068          10 :   long long* ret = (long long*) malloc((*pnSize)*sizeof(long long));
    7069          10 :   if( !ret ) {
    7070           0 :     PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    7071           0 :     *pnSize = -1;
    7072           0 :     return NULL;
    7073             :   }
    7074          30 :   for( int i = 0; i<*pnSize; i++ ) {
    7075          20 :     PyObject *o = PySequence_GetItem(pySeq,i);
    7076          20 :     if ( !PyArg_Parse(o,"L",&ret[i]) ) {
    7077           0 :         PyErr_SetString(PyExc_TypeError, "not an integer");
    7078           0 :         Py_DECREF(o);
    7079           0 :         free(ret);
    7080           0 :         *pnSize = -1;
    7081           0 :         return NULL;
    7082             :     }
    7083          20 :     Py_DECREF(o);
    7084             :   }
    7085             :   return ret;
    7086             : }
    7087             : 
    7088          10 : SWIGINTERN CPLErr GDALAttributeHS_WriteInt64Array(GDALAttributeHS *self,int nList,long long *pList){
    7089          10 :     return GDALAttributeWriteInt64Array(self, (int64_t*)pList, nList) ? CE_None : CE_Failure;
    7090             :   }
    7091             : 
    7092             : static double*
    7093         177 : CreateCDoubleListFromSequence( PyObject* pySeq, int* pnSize ) {
    7094             :   /* check if is List */
    7095         177 :   if ( !PySequence_Check(pySeq) ) {
    7096           1 :     PyErr_SetString(PyExc_TypeError, "not a sequence");
    7097           1 :     *pnSize = -1;
    7098           1 :     return NULL;
    7099             :   }
    7100         176 :   Py_ssize_t size = PySequence_Size(pySeq);
    7101         176 :   if( size > (Py_ssize_t)INT_MAX ) {
    7102           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    7103           0 :     *pnSize = -1;
    7104           0 :     return NULL;
    7105             :   }
    7106         176 :   if( (size_t)size > SIZE_MAX / sizeof(double) ) {
    7107           0 :     PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    7108           0 :     *pnSize = -1;
    7109           0 :     return NULL;
    7110             :   }
    7111         176 :   *pnSize = (int)size;
    7112         176 :   double* ret = (double*) malloc((*pnSize)*sizeof(double));
    7113         176 :   if( !ret ) {
    7114           0 :     PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    7115           0 :     *pnSize = -1;
    7116           0 :     return NULL;
    7117             :   }
    7118         569 :   for( int i = 0; i<*pnSize; i++ ) {
    7119         394 :     PyObject *o = PySequence_GetItem(pySeq,i);
    7120         394 :     if ( !PyArg_Parse(o,"d",&ret[i]) ) {
    7121           1 :         PyErr_SetString(PyExc_TypeError, "not an number");
    7122           1 :         Py_DECREF(o);
    7123           1 :         free(ret);
    7124           1 :         *pnSize = -1;
    7125           1 :         return NULL;
    7126             :     }
    7127         393 :     Py_DECREF(o);
    7128             :   }
    7129             :   return ret;
    7130             : }
    7131             : 
    7132           7 : SWIGINTERN CPLErr GDALAttributeHS_WriteDoubleArray(GDALAttributeHS *self,int nList,double *pList){
    7133           7 :     return GDALAttributeWriteDoubleArray(self, pList, nList) ? CE_None : CE_Failure;
    7134             :   }
    7135          27 : SWIGINTERN CPLErr GDALAttributeHS_Rename(GDALAttributeHS *self,char const *newName){
    7136          27 :     return GDALAttributeRename( self, newName ) ? CE_None : CE_Failure;
    7137             :   }
    7138        4912 : SWIGINTERN void delete_GDALDimensionHS(GDALDimensionHS *self){
    7139        4912 :     GDALDimensionRelease(self);
    7140        4912 :   }
    7141         274 : SWIGINTERN char const *GDALDimensionHS_GetName(GDALDimensionHS *self){
    7142         274 :     return GDALDimensionGetName(self);
    7143             :   }
    7144          80 : SWIGINTERN char const *GDALDimensionHS_GetFullName(GDALDimensionHS *self){
    7145          80 :     return GDALDimensionGetFullName(self);
    7146             :   }
    7147          52 : SWIGINTERN char const *GDALDimensionHS_GetType(GDALDimensionHS *self){
    7148          52 :     return GDALDimensionGetType(self);
    7149             :   }
    7150          22 : SWIGINTERN char const *GDALDimensionHS_GetDirection(GDALDimensionHS *self){
    7151          22 :     return GDALDimensionGetDirection(self);
    7152             :   }
    7153        3675 : SWIGINTERN GUIntBig GDALDimensionHS_GetSize(GDALDimensionHS *self){
    7154        3675 :     return GDALDimensionGetSize(self);
    7155             :   }
    7156         118 : SWIGINTERN GDALMDArrayHS *GDALDimensionHS_GetIndexingVariable(GDALDimensionHS *self){
    7157         118 :     return GDALDimensionGetIndexingVariable(self);
    7158             :   }
    7159          23 : SWIGINTERN bool GDALDimensionHS_SetIndexingVariable(GDALDimensionHS *self,GDALMDArrayHS *array){
    7160          46 :     return GDALDimensionSetIndexingVariable(self, array);
    7161             :   }
    7162          31 : SWIGINTERN CPLErr GDALDimensionHS_Rename(GDALDimensionHS *self,char const *newName){
    7163          31 :     return GDALDimensionRename( self, newName ) ? CE_None : CE_Failure;
    7164             :   }
    7165        4600 : SWIGINTERN void delete_GDALExtendedDataTypeHS(GDALExtendedDataTypeHS *self){
    7166        4600 :     GDALExtendedDataTypeRelease(self);
    7167        4600 :   }
    7168        1970 : SWIGINTERN GDALExtendedDataTypeHS *GDALExtendedDataTypeHS_Create(GDALDataType dt){
    7169        1970 :     return GDALExtendedDataTypeCreate(dt);
    7170             :   }
    7171         195 : SWIGINTERN GDALExtendedDataTypeHS *GDALExtendedDataTypeHS_CreateString(size_t nMaxStringLength=0,GDALExtendedDataTypeSubType eSubType=GEDTST_NONE){
    7172         195 :     return GDALExtendedDataTypeCreateStringEx(nMaxStringLength, eSubType);
    7173             :   }
    7174          22 : SWIGINTERN GDALExtendedDataTypeHS *GDALExtendedDataTypeHS_CreateCompound(char const *name,size_t nTotalSize,int nComps,GDALEDTComponentHS **comps){
    7175          22 :     return GDALExtendedDataTypeCreateCompound(name, nTotalSize, nComps, comps);
    7176             :   }
    7177           8 : SWIGINTERN char const *GDALExtendedDataTypeHS_GetName(GDALExtendedDataTypeHS *self){
    7178           8 :     return GDALExtendedDataTypeGetName(self);
    7179             :   }
    7180        2891 : SWIGINTERN GDALExtendedDataTypeClass GDALExtendedDataTypeHS_GetClass(GDALExtendedDataTypeHS *self){
    7181        2891 :     return GDALExtendedDataTypeGetClass(self);
    7182             :   }
    7183        2069 : SWIGINTERN GDALDataType GDALExtendedDataTypeHS_GetNumericDataType(GDALExtendedDataTypeHS *self){
    7184        2069 :     return GDALExtendedDataTypeGetNumericDataType(self);
    7185             :   }
    7186          51 : SWIGINTERN size_t GDALExtendedDataTypeHS_GetSize(GDALExtendedDataTypeHS *self){
    7187          51 :     return GDALExtendedDataTypeGetSize(self);
    7188             :   }
    7189           3 : SWIGINTERN size_t GDALExtendedDataTypeHS_GetMaxStringLength(GDALExtendedDataTypeHS *self){
    7190           3 :     return GDALExtendedDataTypeGetMaxStringLength(self);
    7191             :   }
    7192         104 : SWIGINTERN GDALExtendedDataTypeSubType GDALExtendedDataTypeHS_GetSubType(GDALExtendedDataTypeHS *self){
    7193         104 :     return GDALExtendedDataTypeGetSubType(self);
    7194             :   }
    7195           1 : SWIGINTERN GDALRasterAttributeTableShadow *GDALExtendedDataTypeHS_GetRAT(GDALExtendedDataTypeHS *self){
    7196           1 :     return GDALExtendedDataTypeGetRAT(self);
    7197             :   }
    7198          21 : SWIGINTERN void GDALExtendedDataTypeHS_GetComponents(GDALExtendedDataTypeHS *self,GDALEDTComponentHS ***pcomps,size_t *pnCount){
    7199          42 :     *pcomps = GDALExtendedDataTypeGetComponents(self, pnCount);
    7200             :   }
    7201           7 : SWIGINTERN bool GDALExtendedDataTypeHS_CanConvertTo(GDALExtendedDataTypeHS *self,GDALExtendedDataTypeHS *other){
    7202          14 :     return GDALExtendedDataTypeCanConvertTo(self, other);
    7203             :   }
    7204         100 : SWIGINTERN bool GDALExtendedDataTypeHS_Equals(GDALExtendedDataTypeHS *self,GDALExtendedDataTypeHS *other){
    7205         200 :     return GDALExtendedDataTypeEquals(self, other);
    7206             :   }
    7207          61 : SWIGINTERN void delete_GDALEDTComponentHS(GDALEDTComponentHS *self){
    7208          61 :     GDALEDTComponentRelease(self);
    7209          61 :   }
    7210          20 : SWIGINTERN GDALEDTComponentHS *GDALEDTComponentHS_Create(char const *name,size_t offset,GDALExtendedDataTypeHS *type){
    7211          20 :     return GDALEDTComponentCreate(name, offset, type);
    7212             :   }
    7213          33 : SWIGINTERN char const *GDALEDTComponentHS_GetName(GDALEDTComponentHS *self){
    7214          33 :     return GDALEDTComponentGetName(self);
    7215             :   }
    7216          31 : SWIGINTERN size_t GDALEDTComponentHS_GetOffset(GDALEDTComponentHS *self){
    7217          31 :     return GDALEDTComponentGetOffset(self);
    7218             :   }
    7219          49 : SWIGINTERN GDALExtendedDataTypeHS *GDALEDTComponentHS_GetType(GDALEDTComponentHS *self){
    7220          49 :     return GDALEDTComponentGetType(self);
    7221             :   }
    7222             : 
    7223           6 : GDALRasterAttributeTableShadow* CreateRasterAttributeTableFromMDArrays(
    7224             :     GDALRATTableType eTableType, int nArrays, GDALMDArrayHS **ahArrays,
    7225             :     int nUsages = 0, GDALRATFieldUsage *paeUsages = NULL )
    7226             : {
    7227           6 :   if( nUsages != 0 && nUsages != nArrays )
    7228             :   {
    7229           1 :       CPLError(CE_Failure, CPLE_AppDefined, "nUsages != nArrays");
    7230           1 :       return NULL;
    7231             :   }
    7232           5 :   return GDALCreateRasterAttributeTableFromMDArrays( eTableType, nArrays, (const GDALMDArrayH *)ahArrays, paeUsages );
    7233             : }
    7234             : 
    7235             : 
    7236             : /* Returned size is in bytes or 0 if an error occurred. */
    7237             : static
    7238       18768 : GIntBig ComputeBandRasterIOSize (int buf_xsize, int buf_ysize, int nPixelSize,
    7239             :                                  GIntBig nPixelSpace, GIntBig nLineSpace,
    7240             :                                  int bSpacingShouldBeMultipleOfPixelSize )
    7241             : {
    7242       18768 :     if (buf_xsize <= 0 || buf_ysize <= 0)
    7243             :     {
    7244           2 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal values for buffer size");
    7245           2 :         return 0;
    7246             :     }
    7247             : 
    7248       18766 :     if (nPixelSpace < 0 || nLineSpace < 0)
    7249             :     {
    7250           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal values for space arguments");
    7251           0 :         return 0;
    7252             :     }
    7253             : 
    7254       18766 :     if (nPixelSize == 0)
    7255             :     {
    7256           1 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal value for data type");
    7257           1 :         return 0;
    7258             :     }
    7259             : 
    7260       18765 :     if( nPixelSpace == 0 )
    7261       18568 :         nPixelSpace = nPixelSize;
    7262         197 :     else if ( bSpacingShouldBeMultipleOfPixelSize && (nPixelSpace % nPixelSize) != 0 )
    7263             :     {
    7264           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "nPixelSpace should be a multiple of nPixelSize");
    7265           0 :         return 0;
    7266             :     }
    7267             : 
    7268       18765 :     if( nLineSpace == 0 )
    7269             :     {
    7270       18717 :         nLineSpace = nPixelSpace * buf_xsize;
    7271             :     }
    7272          48 :     else if ( bSpacingShouldBeMultipleOfPixelSize && (nLineSpace % nPixelSize) != 0 )
    7273             :     {
    7274           0 :         CPLError(CE_Failure, CPLE_IllegalArg, "nLineSpace should be a multiple of nPixelSize");
    7275           0 :         return 0;
    7276             :     }
    7277             : 
    7278       18765 :     GIntBig nRet = (GIntBig)(buf_ysize - 1) * nLineSpace + (GIntBig)(buf_xsize - 1) * nPixelSpace + nPixelSize;
    7279             : #if SIZEOF_VOIDP == 4
    7280             :     if (nRet > INT_MAX)
    7281             :     {
    7282             :         CPLError(CE_Failure, CPLE_IllegalArg, "Integer overflow");
    7283             :         return 0;
    7284             :     }
    7285             : #endif
    7286             : 
    7287       18765 :     return nRet;
    7288             : }
    7289             : 
    7290             : 
    7291             : static
    7292        8846 : CPLErr WriteRaster_internal( GDALRasterBandShadow *obj,
    7293             :                              int xoff, int yoff, int xsize, int ysize,
    7294             :                              int buf_xsize, int buf_ysize,
    7295             :                              GDALDataType buf_type,
    7296             :                              GIntBig buf_size, char *buffer,
    7297             :                              GIntBig pixel_space, GIntBig line_space,
    7298             :                              GDALRasterIOExtraArg* psExtraArg )
    7299             : {
    7300        8846 :     GIntBig min_buffer_size = ComputeBandRasterIOSize (buf_xsize, buf_ysize, GDALGetDataTypeSizeBytes( buf_type ),
    7301             :                                                    pixel_space, line_space, FALSE );
    7302        8846 :     if ( min_buffer_size == 0 )
    7303             :       return CE_Failure;
    7304             : 
    7305        8845 :     if ( buf_size < min_buffer_size ) {
    7306           1 :       CPLError(CE_Failure, CPLE_AppDefined, "Buffer too small");
    7307           1 :       return CE_Failure;
    7308             :     }
    7309             : 
    7310        8844 :     return GDALRasterIOEx( obj, GF_Write, xoff, yoff, xsize, ysize,
    7311        8844 :                            (void *) buffer, buf_xsize, buf_ysize, buf_type, pixel_space, line_space, psExtraArg );
    7312             : }
    7313             : 
    7314          68 : SWIGINTERN GDALDatasetShadow *GDALRasterBandShadow_GetDataset(GDALRasterBandShadow *self){
    7315          68 :     return (GDALDatasetShadow*) GDALGetBandDataset(self);
    7316             :   }
    7317           8 : SWIGINTERN int GDALRasterBandShadow_GetBand(GDALRasterBandShadow *self){
    7318           8 :     return GDALGetBandNumber(self);
    7319             :   }
    7320         493 : SWIGINTERN void GDALRasterBandShadow_GetBlockSize(GDALRasterBandShadow *self,int *pnBlockXSize,int *pnBlockYSize){
    7321         493 :       GDALGetBlockSize(self, pnBlockXSize, pnBlockYSize);
    7322         493 :   }
    7323           6 : SWIGINTERN void GDALRasterBandShadow_GetActualBlockSize(GDALRasterBandShadow *self,int nXBlockOff,int nYBlockOff,int *pnxvalid,int *pnyvalid,int *pisvalid){
    7324          12 :     *pisvalid = (GDALGetActualBlockSize(self, nXBlockOff, nYBlockOff, pnxvalid, pnyvalid) == CE_None);
    7325             :   }
    7326         796 : SWIGINTERN GDALColorInterp GDALRasterBandShadow_GetColorInterpretation(GDALRasterBandShadow *self){
    7327         796 :     return GDALGetRasterColorInterpretation(self);
    7328             :   }
    7329         182 : SWIGINTERN GDALColorInterp GDALRasterBandShadow_GetRasterColorInterpretation(GDALRasterBandShadow *self){
    7330         182 :     return GDALGetRasterColorInterpretation(self);
    7331             :   }
    7332         673 : SWIGINTERN CPLErr GDALRasterBandShadow_SetColorInterpretation(GDALRasterBandShadow *self,GDALColorInterp val){
    7333         673 :     return GDALSetRasterColorInterpretation( self, val );
    7334             :   }
    7335         409 : SWIGINTERN CPLErr GDALRasterBandShadow_SetRasterColorInterpretation(GDALRasterBandShadow *self,GDALColorInterp val){
    7336         409 :     return GDALSetRasterColorInterpretation( self, val );
    7337             :   }
    7338      410179 : SWIGINTERN void GDALRasterBandShadow_GetNoDataValue(GDALRasterBandShadow *self,double *val,int *hasval){
    7339      820358 :     *val = GDALGetRasterNoDataValue( self, hasval );
    7340             :   }
    7341          27 : SWIGINTERN void GDALRasterBandShadow_GetNoDataValueAsInt64(GDALRasterBandShadow *self,GIntBig *val,int *hasval){
    7342          54 :     *val = GDALGetRasterNoDataValueAsInt64( self, hasval );
    7343             :   }
    7344          18 : SWIGINTERN void GDALRasterBandShadow_GetNoDataValueAsUInt64(GDALRasterBandShadow *self,GUIntBig *val,int *hasval){
    7345          36 :     *val = GDALGetRasterNoDataValueAsUInt64( self, hasval );
    7346             :   }
    7347         594 : SWIGINTERN CPLErr GDALRasterBandShadow_SetNoDataValue(GDALRasterBandShadow *self,double d){
    7348         594 :     return GDALSetRasterNoDataValue( self, d );
    7349             :   }
    7350          19 : SWIGINTERN CPLErr GDALRasterBandShadow_SetNoDataValueAsInt64(GDALRasterBandShadow *self,GIntBig v){
    7351          19 :     return GDALSetRasterNoDataValueAsInt64( self, v );
    7352             :   }
    7353          18 : SWIGINTERN CPLErr GDALRasterBandShadow_SetNoDataValueAsUInt64(GDALRasterBandShadow *self,GUIntBig v){
    7354          18 :     return GDALSetRasterNoDataValueAsUInt64( self, v );
    7355             :   }
    7356          53 : SWIGINTERN CPLErr GDALRasterBandShadow_DeleteNoDataValue(GDALRasterBandShadow *self){
    7357          53 :     return GDALDeleteRasterNoDataValue(self);
    7358             :   }
    7359          69 : SWIGINTERN char const *GDALRasterBandShadow_GetUnitType(GDALRasterBandShadow *self){
    7360          69 :       return GDALGetRasterUnitType(self);
    7361             :   }
    7362          27 : SWIGINTERN CPLErr GDALRasterBandShadow_SetUnitType(GDALRasterBandShadow *self,char const *val){
    7363          27 :     return GDALSetRasterUnitType( self, val );
    7364             :   }
    7365          17 : SWIGINTERN char **GDALRasterBandShadow_GetRasterCategoryNames(GDALRasterBandShadow *self){
    7366          17 :     return GDALGetRasterCategoryNames(self);
    7367             :   }
    7368           0 : SWIGINTERN CPLErr GDALRasterBandShadow_SetRasterCategoryNames(GDALRasterBandShadow *self,char **names){
    7369           0 :     return GDALSetRasterCategoryNames( self, names );
    7370             :   }
    7371          62 : SWIGINTERN void GDALRasterBandShadow_GetMinimum(GDALRasterBandShadow *self,double *val,int *hasval){
    7372         124 :     *val = GDALGetRasterMinimum( self, hasval );
    7373             :   }
    7374          52 : SWIGINTERN void GDALRasterBandShadow_GetMaximum(GDALRasterBandShadow *self,double *val,int *hasval){
    7375         104 :     *val = GDALGetRasterMaximum( self, hasval );
    7376             :   }
    7377         151 : SWIGINTERN void GDALRasterBandShadow_GetOffset(GDALRasterBandShadow *self,double *val,int *hasval){
    7378         302 :     *val = GDALGetRasterOffset( self, hasval );
    7379             :   }
    7380         149 : SWIGINTERN void GDALRasterBandShadow_GetScale(GDALRasterBandShadow *self,double *val,int *hasval){
    7381         298 :     *val = GDALGetRasterScale( self, hasval );
    7382             :   }
    7383          75 : SWIGINTERN CPLErr GDALRasterBandShadow_SetOffset(GDALRasterBandShadow *self,double val){
    7384          75 :     return GDALSetRasterOffset( self, val );
    7385             :   }
    7386          76 : SWIGINTERN CPLErr GDALRasterBandShadow_SetScale(GDALRasterBandShadow *self,double val){
    7387          76 :     return GDALSetRasterScale( self, val );
    7388             :   }
    7389         112 : SWIGINTERN CPLErr GDALRasterBandShadow_GetStatistics(GDALRasterBandShadow *self,int approx_ok,int force,double *min,double *max,double *mean,double *stddev){
    7390         112 :     if (min) *min = 0;
    7391         112 :     if (max) *max = 0;
    7392         112 :     if (mean) *mean = 0;
    7393         112 :     if (stddev) *stddev = -1; /* This is the only way to recognize from Python if GetRasterStatistics() has updated the values */
    7394         112 :     return GDALGetRasterStatistics( self, approx_ok, force,
    7395         112 :             min, max, mean, stddev );
    7396             :   }
    7397         157 : SWIGINTERN CPLErr GDALRasterBandShadow_ComputeStatistics(GDALRasterBandShadow *self,bool approx_ok,double *min,double *max,double *mean,double *stddev,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    7398         157 :     return GDALComputeRasterStatistics( self, approx_ok, min, max, mean, stddev, callback, callback_data );
    7399             :   }
    7400           2 : SWIGINTERN CPLErr GDALRasterBandShadow_SetStatistics(GDALRasterBandShadow *self,double min,double max,double mean,double stddev){
    7401           2 :     return GDALSetRasterStatistics( self, min, max, mean, stddev );
    7402             :   }
    7403         532 : SWIGINTERN int GDALRasterBandShadow_GetOverviewCount(GDALRasterBandShadow *self){
    7404         532 :     return GDALGetOverviewCount(self);
    7405             :   }
    7406        5608 : SWIGINTERN GDALRasterBandShadow *GDALRasterBandShadow_GetOverview(GDALRasterBandShadow *self,int i){
    7407        5608 :     return (GDALRasterBandShadow*) GDALGetOverview( self, i );
    7408             :   }
    7409        2000 : SWIGINTERN GDALRasterBandShadow *GDALRasterBandShadow_GetSampleOverview(GDALRasterBandShadow *self,GUIntBig nDesiredSamples){
    7410        2000 :     return (GDALRasterBandShadow*) GDALGetRasterSampleOverviewEx( self, nDesiredSamples );
    7411             :   }
    7412       38649 : SWIGINTERN int GDALRasterBandShadow_Checksum(GDALRasterBandShadow *self,int xoff=0,int yoff=0,int *xsize=0,int *ysize=0){
    7413       38649 :     int nxsize = (xsize!=0) ? *xsize : GDALGetRasterBandXSize( self );
    7414       38649 :     int nysize = (ysize!=0) ? *ysize : GDALGetRasterBandYSize( self );
    7415       38649 :     return GDALChecksumImage( self, xoff, yoff, nxsize, nysize );
    7416             :   }
    7417        1498 : SWIGINTERN void GDALRasterBandShadow_ComputeRasterMinMax(GDALRasterBandShadow *self,double argout[2],int *isvalid,bool approx_ok=false,bool can_return_none=false){
    7418        1498 :     *isvalid = GDALComputeRasterMinMax( self, approx_ok, argout ) == CE_None;
    7419        1498 :     if( !can_return_none && !*isvalid )
    7420             :     {
    7421           4 :         *isvalid = true;
    7422           4 :         argout[0] = CPLAtof("nan");
    7423           4 :         argout[1] = CPLAtof("nan");
    7424             :     }
    7425        1498 :   }
    7426          18 : SWIGINTERN void GDALRasterBandShadow_ComputeBandStats(GDALRasterBandShadow *self,double argout[2],int samplestep=1){
    7427          18 :     GDALComputeBandStats( self, samplestep, argout+0, argout+1,
    7428             :                           NULL, NULL );
    7429          18 :   }
    7430      268555 : SWIGINTERN CPLErr GDALRasterBandShadow_Fill(GDALRasterBandShadow *self,double real_fill,double imag_fill=0.0){
    7431      268555 :     return GDALFillRaster( self, real_fill, imag_fill );
    7432             :   }
    7433        8846 : 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){
    7434        8846 :     int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    7435        8846 :     int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    7436        8846 :     GDALDataType ntype  = (buf_type==0) ? GDALGetRasterDataType(self)
    7437        8846 :                                         : *buf_type;
    7438        8846 :     GIntBig pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    7439        8846 :     GIntBig line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    7440        8846 :     GDALRasterIOExtraArg* psExtraArg = NULL;
    7441        8846 :     return WriteRaster_internal( self, xoff, yoff, xsize, ysize,
    7442        8846 :                                  nxsize, nysize, ntype, buf_len, buf_string, pixel_space, line_space, psExtraArg );
    7443             :   }
    7444         391 : SWIGINTERN void GDALRasterBandShadow_FlushCache(GDALRasterBandShadow *self){
    7445         391 :     GDALFlushRasterCache( self );
    7446         391 :   }
    7447         130 : SWIGINTERN GDALColorTableShadow *GDALRasterBandShadow_GetRasterColorTable(GDALRasterBandShadow *self){
    7448         130 :     return (GDALColorTableShadow*) GDALGetRasterColorTable( self );
    7449             :   }
    7450          80 : SWIGINTERN GDALColorTableShadow *GDALRasterBandShadow_GetColorTable(GDALRasterBandShadow *self){
    7451          80 :     return (GDALColorTableShadow*) GDALGetRasterColorTable( self );
    7452             :   }
    7453          46 : SWIGINTERN int GDALRasterBandShadow_SetRasterColorTable(GDALRasterBandShadow *self,GDALColorTableShadow *arg){
    7454          92 :     return GDALSetRasterColorTable( self, arg );
    7455             :   }
    7456          30 : SWIGINTERN int GDALRasterBandShadow_SetColorTable(GDALRasterBandShadow *self,GDALColorTableShadow *arg){
    7457          60 :     return GDALSetRasterColorTable( self, arg );
    7458             :   }
    7459          58 : SWIGINTERN GDALRasterAttributeTableShadow *GDALRasterBandShadow_GetDefaultRAT(GDALRasterBandShadow *self){
    7460          58 :       return (GDALRasterAttributeTableShadow*) GDALGetDefaultRAT(self);
    7461             :   }
    7462          18 : SWIGINTERN int GDALRasterBandShadow_SetDefaultRAT(GDALRasterBandShadow *self,GDALRasterAttributeTableShadow *table){
    7463          36 :       return GDALSetDefaultRAT(self, table);
    7464             :   }
    7465       10825 : SWIGINTERN GDALRasterBandShadow *GDALRasterBandShadow_GetMaskBand(GDALRasterBandShadow *self){
    7466       10825 :       return (GDALRasterBandShadow *) GDALGetMaskBand( self );
    7467             :   }
    7468         459 : SWIGINTERN int GDALRasterBandShadow_GetMaskFlags(GDALRasterBandShadow *self){
    7469         459 :       return GDALGetMaskFlags( self );
    7470             :   }
    7471          33 : SWIGINTERN CPLErr GDALRasterBandShadow_CreateMaskBand(GDALRasterBandShadow *self,int nFlags){
    7472          33 :       return GDALCreateMaskBand( self, nFlags );
    7473             :   }
    7474          37 : SWIGINTERN bool GDALRasterBandShadow_IsMaskBand(GDALRasterBandShadow *self){
    7475          37 :       return GDALIsMaskBand( self );
    7476             :   }
    7477          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){
    7478          26 :     CPLErrorReset();
    7479          26 :     CPLErr err = GDALGetRasterHistogramEx( self, min, max, buckets, panHistogram,
    7480             :                                          include_out_of_range, approx_ok,
    7481             :                                          callback, callback_data );
    7482          26 :     return err;
    7483             :   }
    7484          11 : SWIGINTERN CPLErr GDALRasterBandShadow_GetDefaultHistogram(GDALRasterBandShadow *self,double *min_ret=NULL,double *max_ret=NULL,int *buckets_ret=NULL,GUIntBig **ppanHistogram=NULL,int force=1,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    7485          11 :     return GDALGetDefaultHistogramEx( self, min_ret, max_ret, buckets_ret,
    7486             :                                     ppanHistogram, force,
    7487             :                                     callback, callback_data );
    7488             : }
    7489           5 : SWIGINTERN CPLErr GDALRasterBandShadow_SetDefaultHistogram(GDALRasterBandShadow *self,double min,double max,int buckets_in,GUIntBig *panHistogram_in){
    7490           5 :     return GDALSetDefaultHistogramEx( self, min, max,
    7491             :                                     buckets_in, panHistogram_in );
    7492             : }
    7493          17 : SWIGINTERN bool GDALRasterBandShadow_HasArbitraryOverviews(GDALRasterBandShadow *self){
    7494          34 :       return (GDALHasArbitraryOverviews( self ) != 0) ? true : false;
    7495             :   }
    7496          10 : SWIGINTERN char **GDALRasterBandShadow_GetCategoryNames(GDALRasterBandShadow *self){
    7497          10 :     return GDALGetRasterCategoryNames( self );
    7498             :   }
    7499           2 : SWIGINTERN CPLErr GDALRasterBandShadow_SetCategoryNames(GDALRasterBandShadow *self,char **papszCategoryNames){
    7500           2 :     return GDALSetRasterCategoryNames( self, papszCategoryNames );
    7501             :   }
    7502           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){
    7503           1 :         CPLVirtualMem* vmem = GDALRasterBandGetVirtualMem( self,
    7504             :                                          eRWFlag,
    7505             :                                          nXOff, nYOff,
    7506             :                                          nXSize, nYSize,
    7507             :                                          nBufXSize, nBufYSize,
    7508             :                                          eBufType,
    7509             :                                          0,
    7510             :                                          0,
    7511             :                                          nCacheSize,
    7512             :                                          nPageSizeHint,
    7513             :                                          FALSE,
    7514             :                                          options );
    7515           1 :         if( vmem == NULL )
    7516             :             return NULL;
    7517           1 :         CPLVirtualMemShadow* vmemshadow = (CPLVirtualMemShadow*)calloc(1, sizeof(CPLVirtualMemShadow));
    7518           1 :         vmemshadow->vmem = vmem;
    7519           1 :         vmemshadow->eBufType = eBufType;
    7520           1 :         vmemshadow->bIsBandSequential = TRUE;
    7521           1 :         vmemshadow->bReadOnly = (eRWFlag == GF_Read);
    7522           1 :         vmemshadow->nBufXSize = nBufXSize;
    7523           1 :         vmemshadow->nBufYSize = nBufYSize;
    7524           1 :         vmemshadow->nBandCount = 1;
    7525           1 :         return vmemshadow;
    7526             :     }
    7527          21 : SWIGINTERN CPLVirtualMemShadow *GDALRasterBandShadow_GetVirtualMemAuto(GDALRasterBandShadow *self,GDALRWFlag eRWFlag,char **options=NULL){
    7528          21 :         int            nPixelSpace;
    7529          21 :         GIntBig        nLineSpace;
    7530          21 :         CPLVirtualMem* vmem = GDALGetVirtualMemAuto( self,
    7531             :                                          eRWFlag,
    7532             :                                          &nPixelSpace,
    7533             :                                          &nLineSpace,
    7534             :                                          options );
    7535          21 :         if( vmem == NULL )
    7536             :             return NULL;
    7537          20 :         CPLVirtualMemShadow* vmemshadow = (CPLVirtualMemShadow*)calloc(1, sizeof(CPLVirtualMemShadow));
    7538          20 :         vmemshadow->vmem = vmem;
    7539          20 :         vmemshadow->eBufType = GDALGetRasterDataType( self );
    7540          20 :         vmemshadow->bAuto = TRUE;
    7541          20 :         vmemshadow->bReadOnly = (eRWFlag == GF_Read);
    7542          20 :         vmemshadow->nBandCount = 1;
    7543          20 :         vmemshadow->nPixelSpace = nPixelSpace;
    7544          20 :         vmemshadow->nLineSpace = nLineSpace;
    7545          20 :         vmemshadow->nBufXSize = GDALGetRasterBandXSize(self);
    7546          20 :         vmemshadow->nBufYSize = GDALGetRasterBandYSize(self);
    7547          20 :         return vmemshadow;
    7548             :     }
    7549           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){
    7550           1 :         CPLVirtualMem* vmem = GDALRasterBandGetTiledVirtualMem( self,
    7551             :                                          eRWFlag,
    7552             :                                          nXOff, nYOff,
    7553             :                                          nXSize, nYSize,
    7554             :                                          nTileXSize, nTileYSize,
    7555             :                                          eBufType,
    7556             :                                          nCacheSize,
    7557             :                                          FALSE,
    7558             :                                          options );
    7559           1 :         if( vmem == NULL )
    7560             :             return NULL;
    7561           1 :         CPLVirtualMemShadow* vmemshadow = (CPLVirtualMemShadow*)calloc(1, sizeof(CPLVirtualMemShadow));
    7562           1 :         vmemshadow->vmem = vmem;
    7563           1 :         vmemshadow->eBufType = eBufType;
    7564           1 :         vmemshadow->bIsBandSequential = -1;
    7565           1 :         vmemshadow->bReadOnly = (eRWFlag == GF_Read);
    7566           1 :         vmemshadow->nBufXSize = nXSize;
    7567           1 :         vmemshadow->nBufYSize = nYSize;
    7568           1 :         vmemshadow->eTileOrganization = GTO_BSQ;
    7569           1 :         vmemshadow->nTileXSize = nTileXSize;
    7570           1 :         vmemshadow->nTileYSize = nTileYSize;
    7571           1 :         vmemshadow->nBandCount = 1;
    7572           1 :         return vmemshadow;
    7573             :     }
    7574          26 : SWIGINTERN int GDALRasterBandShadow_GetDataCoverageStatus(GDALRasterBandShadow *self,int nXOff,int nYOff,int nXSize,int nYSize,int nMaskFlagStop=0,double *pdfDataPct=NULL){
    7575          26 :         return GDALGetDataCoverageStatus(self, nXOff, nYOff,
    7576             :                                          nXSize, nYSize,
    7577             :                                          nMaskFlagStop,
    7578             :                                          pdfDataPct);
    7579             :     }
    7580           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){
    7581           2 :     int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    7582           2 :     int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    7583           2 :     GDALDataType ntype;
    7584           2 :     if ( buf_type != 0 ) {
    7585           0 :       ntype = (GDALDataType) *buf_type;
    7586             :     } else {
    7587           2 :       ntype = GDALGetRasterDataType( self );
    7588             :     }
    7589           2 :     return GDALRasterAdviseRead(self, xoff, yoff, xsize, ysize,
    7590           2 :                                 nxsize, nysize, ntype, options);
    7591             : }
    7592          69 : SWIGINTERN CPLErr GDALRasterBandShadow_InterpolateAtPoint(GDALRasterBandShadow *self,double pixel,double line,GDALRIOResampleAlg interpolation,double *pdfRealValue,double *pdfImagValue){
    7593          69 :     if (pdfRealValue) *pdfRealValue = 0;
    7594          69 :     if (pdfImagValue) *pdfImagValue = 0;
    7595          69 :     return GDALRasterInterpolateAtPoint( self, pixel, line, interpolation, pdfRealValue, pdfImagValue );
    7596             :   }
    7597          15 : SWIGINTERN CPLErr GDALRasterBandShadow_InterpolateAtGeolocation(GDALRasterBandShadow *self,double geolocX,double geolocY,OSRSpatialReferenceShadow *srs,GDALRIOResampleAlg interpolation,double *pdfRealValue,double *pdfImagValue,char **transformerOptions=NULL){
    7598          15 :     if (pdfRealValue) *pdfRealValue = 0;
    7599          15 :     if (pdfImagValue) *pdfImagValue = 0;
    7600          15 :     return GDALRasterInterpolateAtGeolocation( self, geolocX, geolocY,
    7601             :                 (OGRSpatialReferenceH)srs, interpolation,
    7602             :                 pdfRealValue, pdfImagValue, transformerOptions );
    7603             :   }
    7604           2 : SWIGINTERN CPLErr GDALRasterBandShadow_ComputeMinMaxLocation(GDALRasterBandShadow *self,double *pdfMin,double *pdfMax,int *pnMinX,int *pnMinY,int *pnMaxX,int *pnMaxY){
    7605           2 :     return GDALComputeRasterMinMaxLocation( self, pdfMin, pdfMax,
    7606             :                                             pnMinX, pnMinY,
    7607             :                                             pnMaxX, pnMaxY );
    7608             :   }
    7609          21 : SWIGINTERN GDALMDArrayHS *GDALRasterBandShadow_AsMDArray(GDALRasterBandShadow *self){
    7610          21 :     return GDALRasterBandAsMDArray(self);
    7611             :   }
    7612        4878 : SWIGINTERN void GDALRasterBandShadow__EnablePixelTypeSignedByteWarning(GDALRasterBandShadow *self,bool b){
    7613        4878 :       GDALEnablePixelTypeSignedByteWarning(self, b);
    7614        4878 :   }
    7615           6 : SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_UnaryOp(GDALRasterBandShadow *self,GDALRasterAlgebraUnaryOperation op){
    7616           6 :       return GDALRasterBandUnaryOp(self, op);
    7617             :   }
    7618          57 : SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_BinaryOpBand(GDALRasterBandShadow *self,GDALRasterAlgebraBinaryOperation op,GDALRasterBandShadow *other){
    7619          57 :       return GDALRasterBandBinaryOpBand(self, op, other);
    7620             :   }
    7621          59 : SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_BinaryOpDouble(GDALRasterBandShadow *self,GDALRasterAlgebraBinaryOperation op,double constant){
    7622          59 :       return GDALRasterBandBinaryOpDouble(self, op, constant);
    7623             :   }
    7624          18 : SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_BinaryOpDoubleToBand(double constant,GDALRasterAlgebraBinaryOperation op,GDALRasterBandShadow *band){
    7625          18 :       return GDALRasterBandBinaryOpDoubleToBand(constant, op, band);
    7626             :   }
    7627          12 : SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_IfThenElse(GDALRasterBandShadow *condBand,GDALRasterBandShadow *thenBand,GDALRasterBandShadow *elseBand){
    7628          12 :       return GDALRasterBandIfThenElse(condBand, thenBand, elseBand);
    7629             :   }
    7630          16 : SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_AsType(GDALRasterBandShadow *self,GDALDataType dt){
    7631          16 :       return GDALRasterBandAsDataType(self, dt);
    7632             :   }
    7633           4 : SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_MaximumOfNBands(int band_count,GDALRasterBandShadow **bands){
    7634           4 :      return GDALMaximumOfNBands(band_count, bands);
    7635             :   }
    7636           2 : SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_MaxConstant(GDALRasterBandShadow *self,double constant){
    7637           2 :       return GDALRasterBandMaxConstant(self, constant);
    7638             :   }
    7639           4 : SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_MinimumOfNBands(int band_count,GDALRasterBandShadow **bands){
    7640           4 :      return GDALMinimumOfNBands(band_count, bands);
    7641             :   }
    7642           2 : SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_MinConstant(GDALRasterBandShadow *self,double constant){
    7643           2 :       return GDALRasterBandMinConstant(self, constant);
    7644             :   }
    7645           3 : SWIGINTERN GDALComputedRasterBandShadow *GDALRasterBandShadow_MeanOfNBands(int band_count,GDALRasterBandShadow **bands){
    7646           3 :      return GDALMeanOfNBands(band_count, bands);
    7647             :   }
    7648        9922 : 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){
    7649             : 
    7650        9922 :     *buf = NULL;
    7651             : 
    7652        9922 :     int nxsize = (buf_xsize==0) ? static_cast<int>(xsize) : *buf_xsize;
    7653        9922 :     int nysize = (buf_ysize==0) ? static_cast<int>(ysize) : *buf_ysize;
    7654        9922 :     GDALDataType ntype  = (buf_type==0) ? GDALGetRasterDataType(self)
    7655        9922 :                                         : *buf_type;
    7656        9922 :     GIntBig pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    7657        9922 :     GIntBig line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    7658             : 
    7659        9922 :     size_t buf_size = static_cast<size_t>(
    7660        9922 :         ComputeBandRasterIOSize( nxsize, nysize,
    7661             :                                  GDALGetDataTypeSizeBytes( ntype ),
    7662        9922 :                                  pixel_space, line_space, FALSE ) );
    7663        9922 :     if (buf_size == 0)
    7664             :     {
    7665             :         return CE_Failure;
    7666             :     }
    7667             : 
    7668        9920 :     char *data;
    7669        9920 :     Py_buffer view;
    7670       13882 :     if( !readraster_acquirebuffer(buf, inputOutputBuf, buf_size, ntype,
    7671             :                                   GetUseExceptions(), data, view) )
    7672             :     {
    7673             :         return CE_Failure;
    7674             :     }
    7675             : 
    7676             :     /* Should we clear the buffer in case there are hole in it ? */
    7677        9907 :     if( inputOutputBuf == NULL &&
    7678        9895 :         line_space != 0 && pixel_space != 0 && line_space > pixel_space * nxsize )
    7679             :     {
    7680           4 :         memset(data, 0, buf_size);
    7681             :     }
    7682             : 
    7683        9907 :     GDALRasterIOExtraArg sExtraArg;
    7684        9907 :     INIT_RASTERIO_EXTRA_ARG(sExtraArg);
    7685        9907 :     sExtraArg.eResampleAlg = resample_alg;
    7686        9907 :     sExtraArg.pfnProgress = callback;
    7687        9907 :     sExtraArg.pProgressData = callback_data;
    7688        9907 :     int nXOff = (int)(xoff + 0.5);
    7689        9907 :     int nYOff = (int)(yoff + 0.5);
    7690        9907 :     int nXSize = (int)(xsize + 0.5);
    7691        9907 :     int nYSize = (int)(ysize + 0.5);
    7692        9907 :     if( fabs(xoff-nXOff) > 1e-8 || fabs(yoff-nYOff) > 1e-8 ||
    7693        9901 :         fabs(xsize-nXSize) > 1e-8 || fabs(ysize-nYSize) > 1e-8 )
    7694             :     {
    7695           8 :         sExtraArg.bFloatingPointWindowValidity = TRUE;
    7696           8 :         sExtraArg.dfXOff = xoff;
    7697           8 :         sExtraArg.dfYOff = yoff;
    7698           8 :         sExtraArg.dfXSize = xsize;
    7699           8 :         sExtraArg.dfYSize = ysize;
    7700             :     }
    7701             : 
    7702        9907 :     CPLErr eErr = GDALRasterIOEx( self, GF_Read, nXOff, nYOff, nXSize, nYSize,
    7703             :                          data, nxsize, nysize, ntype,
    7704             :                          pixel_space, line_space, &sExtraArg );
    7705             : 
    7706        9907 :     readraster_releasebuffer(eErr, buf, inputOutputBuf, view);
    7707             : 
    7708             :     return eErr;
    7709             :   }
    7710          90 : SWIGINTERN CPLErr GDALRasterBandShadow_ReadBlock(GDALRasterBandShadow *self,int xoff,int yoff,void **buf,void *buf_obj=NULL){
    7711             : 
    7712          90 :     int nBlockXSize, nBlockYSize;
    7713          90 :     GDALGetBlockSize(self, &nBlockXSize, &nBlockYSize);
    7714          90 :     GDALDataType ntype = GDALGetRasterDataType(self);
    7715          90 :     int nDataTypeSize = GDALGetDataTypeSizeBytes(ntype);
    7716          90 :     size_t buf_size = static_cast<size_t>(nBlockXSize) *
    7717          90 :                                                 nBlockYSize * nDataTypeSize;
    7718             : 
    7719          90 :     *buf = NULL;
    7720             : 
    7721          90 :     char *data;
    7722          90 :     Py_buffer view;
    7723             : 
    7724         124 :     if( !readraster_acquirebuffer(buf, buf_obj, buf_size, ntype,
    7725             :                                   GetUseExceptions(), data, view) )
    7726             :     {
    7727             :         return CE_Failure;
    7728             :     }
    7729             : 
    7730          77 :     CPLErr eErr = GDALReadBlock( self, xoff, yoff, data);
    7731             : 
    7732          77 :     readraster_releasebuffer(eErr, buf, buf_obj, view);
    7733             : 
    7734             :     return eErr;
    7735             :   }
    7736             : 
    7737      849087 : GDALDataType GDALRasterBandShadow_DataType_get( GDALRasterBandShadow *h ) {
    7738      849087 :   return GDALGetRasterDataType( h );
    7739             : }
    7740       17910 : int GDALRasterBandShadow_XSize_get( GDALRasterBandShadow *h ) {
    7741       17910 :   return GDALGetRasterBandXSize( h );
    7742             : }
    7743       16771 : int GDALRasterBandShadow_YSize_get( GDALRasterBandShadow *h ) {
    7744       16771 :   return GDALGetRasterBandYSize( h );
    7745             : }
    7746             : 
    7747         163 : SWIGINTERN void delete_GDALComputedRasterBandShadow(GDALComputedRasterBandShadow *self){
    7748         163 :       GDALComputedRasterBandRelease(self);
    7749         163 :   }
    7750          56 : SWIGINTERN GDALColorTableShadow *new_GDALColorTableShadow(GDALPaletteInterp palette=GPI_RGB){
    7751          56 :         return (GDALColorTableShadow*) GDALCreateColorTable(palette);
    7752             :     }
    7753          68 : SWIGINTERN void delete_GDALColorTableShadow(GDALColorTableShadow *self){
    7754          68 :         GDALDestroyColorTable(self);
    7755          68 :     }
    7756          12 : SWIGINTERN GDALColorTableShadow *GDALColorTableShadow_Clone(GDALColorTableShadow *self){
    7757          12 :         return (GDALColorTableShadow*) GDALCloneColorTable (self);
    7758             :     }
    7759           2 : SWIGINTERN GDALPaletteInterp GDALColorTableShadow_GetPaletteInterpretation(GDALColorTableShadow *self){
    7760           2 :         return GDALGetPaletteInterpretation(self);
    7761             :     }
    7762          73 : SWIGINTERN int GDALColorTableShadow_GetColorEntryCount(GDALColorTableShadow *self){
    7763          73 :         return GDALGetColorEntryCount(self);
    7764             :     }
    7765        4669 : SWIGINTERN GDALColorEntry *GDALColorTableShadow_GetColorEntry(GDALColorTableShadow *self,int entry){
    7766        4669 :         return (GDALColorEntry*) GDALGetColorEntry(self, entry);
    7767             :     }
    7768           0 : SWIGINTERN int GDALColorTableShadow_GetColorEntryAsRGB(GDALColorTableShadow *self,int entry,GDALColorEntry *centry){
    7769           0 :         return GDALGetColorEntryAsRGB(self, entry, centry);
    7770             :     }
    7771        1379 : SWIGINTERN void GDALColorTableShadow_SetColorEntry(GDALColorTableShadow *self,int entry,GDALColorEntry const *centry){
    7772        1379 :         GDALSetColorEntry(self, entry, centry);
    7773        1379 :     }
    7774           1 : SWIGINTERN void GDALColorTableShadow_CreateColorRamp(GDALColorTableShadow *self,int nStartIndex,GDALColorEntry const *startcolor,int nEndIndex,GDALColorEntry const *endcolor){
    7775           1 :         GDALCreateColorRamp(self, nStartIndex, startcolor, nEndIndex, endcolor);
    7776           1 :     }
    7777             : 
    7778             : #include "gdalsubdatasetinfo.h"
    7779             : 
    7780          60 : SWIGINTERN void delete_GDALSubdatasetInfoShadow(GDALSubdatasetInfoShadow *self){
    7781          60 :             GDALDestroySubdatasetInfo(reinterpret_cast<GDALSubdatasetInfoH>(self));
    7782          60 :         }
    7783          35 : SWIGINTERN retStringAndCPLFree *GDALSubdatasetInfoShadow_GetPathComponent(GDALSubdatasetInfoShadow *self){
    7784          35 :             return GDALSubdatasetInfoGetPathComponent(reinterpret_cast<GDALSubdatasetInfoH>(self) );
    7785             :         }
    7786          39 : SWIGINTERN retStringAndCPLFree *GDALSubdatasetInfoShadow_GetSubdatasetComponent(GDALSubdatasetInfoShadow *self){
    7787          39 :         return GDALSubdatasetInfoGetSubdatasetComponent(reinterpret_cast<GDALSubdatasetInfoH>(self) );
    7788             :         }
    7789          21 : SWIGINTERN retStringAndCPLFree *GDALSubdatasetInfoShadow_ModifyPathComponent(GDALSubdatasetInfoShadow *self,char const *pszNewFileName){
    7790          21 :         return GDALSubdatasetInfoModifyPathComponent(reinterpret_cast<GDALSubdatasetInfoH>(self), pszNewFileName );
    7791             :         }
    7792             : 
    7793          83 : GDALSubdatasetInfoShadow* GetSubdatasetInfo(const char *pszFileName)
    7794             : {
    7795          83 :     GDALSubdatasetInfoH info { GDALGetSubdatasetInfo(pszFileName) };
    7796             : 
    7797          83 :     if( ! info )
    7798             :     {
    7799          23 :       return nullptr;
    7800             :     }
    7801             : 
    7802             :     return (GDALSubdatasetInfoShadow*)( info );
    7803             : };
    7804             : 
    7805          29 : SWIGINTERN GDALRelationshipShadow *new_GDALRelationshipShadow(char const *name,char const *leftTableName,char const *rightTableName,GDALRelationshipCardinality cardinality){
    7806          29 :         return (GDALRelationshipShadow*)
    7807          29 :         GDALRelationshipCreate(name,
    7808             :                                leftTableName,
    7809             :                                rightTableName,
    7810             :                                cardinality);
    7811             :     }
    7812          29 : SWIGINTERN void delete_GDALRelationshipShadow(GDALRelationshipShadow *self){
    7813          29 :         GDALDestroyRelationship(self);
    7814          29 :     }
    7815          31 : SWIGINTERN char const *GDALRelationshipShadow_GetName(GDALRelationshipShadow *self){
    7816          31 :         return GDALRelationshipGetName( self );
    7817             :     }
    7818          47 : SWIGINTERN GDALRelationshipCardinality GDALRelationshipShadow_GetCardinality(GDALRelationshipShadow *self){
    7819          47 :         return GDALRelationshipGetCardinality( self );
    7820             :     }
    7821          49 : SWIGINTERN char const *GDALRelationshipShadow_GetLeftTableName(GDALRelationshipShadow *self){
    7822          49 :         return GDALRelationshipGetLeftTableName( self );
    7823             :     }
    7824          49 : SWIGINTERN char const *GDALRelationshipShadow_GetRightTableName(GDALRelationshipShadow *self){
    7825          49 :         return GDALRelationshipGetRightTableName( self );
    7826             :     }
    7827          34 : SWIGINTERN char const *GDALRelationshipShadow_GetMappingTableName(GDALRelationshipShadow *self){
    7828          34 :         return GDALRelationshipGetMappingTableName( self );
    7829             :     }
    7830          14 : SWIGINTERN void GDALRelationshipShadow_SetMappingTableName(GDALRelationshipShadow *self,char const *pszName){
    7831          14 :         GDALRelationshipSetMappingTableName( self, pszName );
    7832          14 :     }
    7833          48 : SWIGINTERN char **GDALRelationshipShadow_GetLeftTableFields(GDALRelationshipShadow *self){
    7834          48 :            return GDALRelationshipGetLeftTableFields(self);
    7835             :         }
    7836          48 : SWIGINTERN char **GDALRelationshipShadow_GetRightTableFields(GDALRelationshipShadow *self){
    7837          48 :             return GDALRelationshipGetRightTableFields(self);
    7838             :         }
    7839          37 : SWIGINTERN void GDALRelationshipShadow_SetLeftTableFields(GDALRelationshipShadow *self,char **pFields){
    7840          37 :             GDALRelationshipSetLeftTableFields(self, pFields);
    7841          37 :         }
    7842          38 : SWIGINTERN void GDALRelationshipShadow_SetRightTableFields(GDALRelationshipShadow *self,char **pFields){
    7843          38 :             GDALRelationshipSetRightTableFields(self, pFields);
    7844          38 :         }
    7845          23 : SWIGINTERN char **GDALRelationshipShadow_GetLeftMappingTableFields(GDALRelationshipShadow *self){
    7846          23 :             return GDALRelationshipGetLeftMappingTableFields(self);
    7847             :         }
    7848          23 : SWIGINTERN char **GDALRelationshipShadow_GetRightMappingTableFields(GDALRelationshipShadow *self){
    7849          23 :             return GDALRelationshipGetRightMappingTableFields(self);
    7850             :         }
    7851           9 : SWIGINTERN void GDALRelationshipShadow_SetLeftMappingTableFields(GDALRelationshipShadow *self,char **pFields){
    7852           9 :           GDALRelationshipSetLeftMappingTableFields(self, pFields);
    7853           9 :       }
    7854           9 : SWIGINTERN void GDALRelationshipShadow_SetRightMappingTableFields(GDALRelationshipShadow *self,char **pFields){
    7855           9 :           GDALRelationshipSetRightMappingTableFields(self, pFields);
    7856           9 :       }
    7857          47 : SWIGINTERN GDALRelationshipType GDALRelationshipShadow_GetType(GDALRelationshipShadow *self){
    7858          47 :         return GDALRelationshipGetType( self );
    7859             :     }
    7860          10 : SWIGINTERN void GDALRelationshipShadow_SetType(GDALRelationshipShadow *self,GDALRelationshipType type){
    7861          10 :       return GDALRelationshipSetType( self, type );
    7862             :     }
    7863          14 : SWIGINTERN char const *GDALRelationshipShadow_GetForwardPathLabel(GDALRelationshipShadow *self){
    7864          14 :         return GDALRelationshipGetForwardPathLabel( self );
    7865             :     }
    7866           9 : SWIGINTERN void GDALRelationshipShadow_SetForwardPathLabel(GDALRelationshipShadow *self,char const *pszLabel){
    7867           9 :         GDALRelationshipSetForwardPathLabel( self, pszLabel );
    7868           9 :     }
    7869          14 : SWIGINTERN char const *GDALRelationshipShadow_GetBackwardPathLabel(GDALRelationshipShadow *self){
    7870          14 :         return GDALRelationshipGetBackwardPathLabel( self );
    7871             :     }
    7872           9 : SWIGINTERN void GDALRelationshipShadow_SetBackwardPathLabel(GDALRelationshipShadow *self,char const *pszLabel){
    7873           9 :         GDALRelationshipSetBackwardPathLabel( self, pszLabel );
    7874           9 :     }
    7875          44 : SWIGINTERN char const *GDALRelationshipShadow_GetRelatedTableType(GDALRelationshipShadow *self){
    7876          44 :         return GDALRelationshipGetRelatedTableType( self );
    7877             :     }
    7878          20 : SWIGINTERN void GDALRelationshipShadow_SetRelatedTableType(GDALRelationshipShadow *self,char const *pszType){
    7879          20 :         GDALRelationshipSetRelatedTableType( self, pszType );
    7880          20 :     }
    7881             : 
    7882             : #include "gdalgrid.h"
    7883             : 
    7884             : #ifdef DEBUG
    7885             : typedef struct OGRLayerHS OGRLayerShadow;
    7886             : typedef struct OGRGeometryHS OGRGeometryShadow;
    7887             : #else
    7888             : typedef void OGRLayerShadow;
    7889             : typedef void OGRGeometryShadow;
    7890             : #endif
    7891             : 
    7892             : 
    7893             : static int
    7894        3713 : GDALTermProgress_nocb( double dfProgress, const char * pszMessage=NULL, void *pData=NULL ) {
    7895        3713 :   return GDALTermProgress( dfProgress, pszMessage, pData);
    7896             : }
    7897             : 
    7898             : 
    7899           4 : int  ComputeMedianCutPCT ( GDALRasterBandShadow *red,
    7900             :                               GDALRasterBandShadow *green,
    7901             :                               GDALRasterBandShadow *blue,
    7902             :                               int num_colors,
    7903             :                               GDALColorTableShadow* colors,
    7904             :                               GDALProgressFunc callback = NULL,
    7905             :                               void* callback_data=NULL) {
    7906             : 
    7907           4 :     CPLErrorReset();
    7908             : 
    7909           4 :     int err = GDALComputeMedianCutPCT( red,
    7910             :                                           green,
    7911             :                                           blue,
    7912             :                                           NULL,
    7913             :                                           num_colors,
    7914             :                                           colors,
    7915             :                                           callback,
    7916             :                                           callback_data);
    7917             : 
    7918           4 :     return err;
    7919             : }
    7920             : 
    7921             : 
    7922           7 : int  DitherRGB2PCT ( GDALRasterBandShadow *red,
    7923             :                      GDALRasterBandShadow *green,
    7924             :                      GDALRasterBandShadow *blue,
    7925             :                      GDALRasterBandShadow *target,
    7926             :                      GDALColorTableShadow *colors,
    7927             :                      GDALProgressFunc callback = NULL,
    7928             :                      void* callback_data=NULL) {
    7929             : 
    7930           7 :     CPLErrorReset();
    7931           7 :     int err;
    7932           7 :     err = GDALDitherRGB2PCT(  red,
    7933             :                                   green,
    7934             :                                   blue,
    7935             :                                   target,
    7936             :                                   colors,
    7937             :                                   callback,
    7938             :                                   callback_data);
    7939             : 
    7940           7 :     return err;
    7941             : }
    7942             : 
    7943             : 
    7944          62 : CPLErr  ReprojectImage ( GDALDatasetShadow *src_ds,
    7945             :                          GDALDatasetShadow *dst_ds,
    7946             :                          const char *src_wkt=NULL,
    7947             :                          const char *dst_wkt=NULL,
    7948             :                          GDALResampleAlg eResampleAlg=GRA_NearestNeighbour,
    7949             :                          double WarpMemoryLimit=0.0,
    7950             :                          double maxerror = 0.0,
    7951             :        GDALProgressFunc callback = NULL,
    7952             :                        void* callback_data=NULL,
    7953             :                          char** options = NULL ) {
    7954             : 
    7955          62 :     CPLErrorReset();
    7956             : 
    7957          62 :     GDALWarpOptions* psOptions = NULL;
    7958          62 :     if( options != NULL )
    7959             :     {
    7960           1 :         psOptions = GDALCreateWarpOptions();
    7961           1 :         psOptions->papszWarpOptions = CSLDuplicate(options);
    7962             :     }
    7963             : 
    7964          62 :     CPLErr err = GDALReprojectImage( src_ds,
    7965             :                                      src_wkt,
    7966             :                                      dst_ds,
    7967             :                                      dst_wkt,
    7968             :                                      eResampleAlg,
    7969             :                                      WarpMemoryLimit,
    7970             :                                      maxerror,
    7971             :                                      callback,
    7972             :                                      callback_data,
    7973             :                                      psOptions);
    7974             : 
    7975          62 :     if( psOptions != NULL )
    7976           1 :         GDALDestroyWarpOptions(psOptions);
    7977             : 
    7978          62 :     return err;
    7979             : }
    7980             : 
    7981             : 
    7982           6 : int  ComputeProximity( GDALRasterBandShadow *srcBand,
    7983             :                        GDALRasterBandShadow *proximityBand,
    7984             :                        char **options = NULL,
    7985             :                        GDALProgressFunc callback=NULL,
    7986             :                        void* callback_data=NULL) {
    7987             : 
    7988           6 :     CPLErrorReset();
    7989             : 
    7990           6 :     return GDALComputeProximity( srcBand, proximityBand, options,
    7991           6 :                                  callback, callback_data );
    7992             : }
    7993             : 
    7994             : 
    7995          42 : int  RasterizeLayer( GDALDatasetShadow *dataset,
    7996             :                  int bands, int *band_list,
    7997             :                  OGRLayerShadow *layer,
    7998             :                  void *pfnTransformer = NULL,
    7999             :                  void *pTransformArg = NULL,
    8000             :      int burn_values = 0, double *burn_values_list = NULL,
    8001             :                  char **options = NULL,
    8002             :                  GDALProgressFunc callback=NULL,
    8003             :                  void* callback_data=NULL) {
    8004             : 
    8005          42 :     CPLErr eErr;
    8006             : 
    8007          42 :     CPLErrorReset();
    8008             : 
    8009          42 :     if( burn_values == 0 )
    8010             :     {
    8011           1 :         burn_values_list = (double *) CPLMalloc(sizeof(double)*bands);
    8012           4 :         for( int i = 0; i < bands; i++ )
    8013           3 :             burn_values_list[i] = 255.0;
    8014             :     }
    8015          41 :     else if( burn_values != bands )
    8016             :     {
    8017           0 :         CPLError( CE_Failure, CPLE_AppDefined,
    8018             :                   "Did not get the expected number of burn values in RasterizeLayer()" );
    8019           0 :         return CE_Failure;
    8020             :     }
    8021             : 
    8022          42 :     OGRLayerH hLayer = (OGRLayerH)layer;
    8023          42 :     eErr = GDALRasterizeLayers( dataset, bands, band_list,
    8024             :                                 1, &hLayer,
    8025             :                                 (GDALTransformerFunc) pfnTransformer,
    8026             :                                 pTransformArg,
    8027             :                                 burn_values_list, options,
    8028             :                                 callback, callback_data );
    8029             : 
    8030          42 :     if( burn_values == 0 )
    8031           1 :         CPLFree( burn_values_list );
    8032             : 
    8033          42 :     return eErr;
    8034             : }
    8035             : 
    8036             : 
    8037          21 : int  Polygonize( GDALRasterBandShadow *srcBand,
    8038             :          GDALRasterBandShadow *maskBand,
    8039             :              OGRLayerShadow *outLayer,
    8040             :                  int iPixValField,
    8041             :                  char **options = NULL,
    8042             :                  GDALProgressFunc callback=NULL,
    8043             :                  void* callback_data=NULL) {
    8044             : 
    8045          21 :     CPLErrorReset();
    8046             : 
    8047          21 :     return GDALPolygonize( srcBand, maskBand, outLayer, iPixValField,
    8048          21 :                            options, callback, callback_data );
    8049             : }
    8050             : 
    8051             : 
    8052           1 : int  FPolygonize( GDALRasterBandShadow *srcBand,
    8053             :                  GDALRasterBandShadow *maskBand,
    8054             :                  OGRLayerShadow *outLayer,
    8055             :                  int iPixValField,
    8056             :                  char **options = NULL,
    8057             :                  GDALProgressFunc callback=NULL,
    8058             :                  void* callback_data=NULL) {
    8059             : 
    8060           1 :     CPLErrorReset();
    8061             : 
    8062           1 :     return GDALFPolygonize( srcBand, maskBand, outLayer, iPixValField,
    8063           1 :                            options, callback, callback_data );
    8064             : }
    8065             : 
    8066             : 
    8067          29 : int  FillNodata( GDALRasterBandShadow *targetBand,
    8068             :          GDALRasterBandShadow *maskBand,
    8069             :                  double maxSearchDist,
    8070             :                  int smoothingIterations,
    8071             :                  char **options = NULL,
    8072             :                  GDALProgressFunc callback=NULL,
    8073             :                  void* callback_data=NULL) {
    8074             : 
    8075          29 :     CPLErrorReset();
    8076             : 
    8077          29 :     return GDALFillNodata( targetBand, maskBand, maxSearchDist,
    8078             :                0, smoothingIterations, options,
    8079          29 :          callback, callback_data );
    8080             : }
    8081             : 
    8082             : 
    8083          12 : int  SieveFilter( GDALRasterBandShadow *srcBand,
    8084             :           GDALRasterBandShadow *maskBand,
    8085             :               GDALRasterBandShadow *dstBand,
    8086             :                   int threshold, int connectedness=4,
    8087             :                   char **options = NULL,
    8088             :                   GDALProgressFunc callback=NULL,
    8089             :                   void* callback_data=NULL) {
    8090             : 
    8091          12 :     CPLErrorReset();
    8092             : 
    8093          12 :     return GDALSieveFilter( srcBand, maskBand, dstBand,
    8094             :                             threshold, connectedness,
    8095          12 :                             options, callback, callback_data );
    8096             : }
    8097             : 
    8098             : 
    8099           2 : int  RegenerateOverviews( GDALRasterBandShadow *srcBand,
    8100             :             int overviewBandCount,
    8101             :                           GDALRasterBandShadow **overviewBands,
    8102             :                           const char *resampling = "average",
    8103             :                           GDALProgressFunc callback=NULL,
    8104             :                           void* callback_data=NULL) {
    8105             : 
    8106           2 :     CPLErrorReset();
    8107             : 
    8108           2 :     return GDALRegenerateOverviews( srcBand, overviewBandCount, overviewBands,
    8109           2 :                   resampling ? resampling : "average", callback, callback_data );
    8110             : }
    8111             : 
    8112             : 
    8113         248 : int  RegenerateOverview( GDALRasterBandShadow *srcBand,
    8114             :                           GDALRasterBandShadow *overviewBand,
    8115             :                           const char *resampling = "average",
    8116             :                           GDALProgressFunc callback=NULL,
    8117             :                           void* callback_data=NULL) {
    8118             : 
    8119         248 :     CPLErrorReset();
    8120             : 
    8121         248 :     return GDALRegenerateOverviews( srcBand, 1, &overviewBand,
    8122         248 :                   resampling ? resampling : "average", callback, callback_data );
    8123             : }
    8124             : 
    8125             : 
    8126           3 : int ContourGenerate( GDALRasterBandShadow *srcBand,
    8127             :                      double contourInterval,
    8128             :                      double contourBase,
    8129             :                      int fixedLevelCount,
    8130             :                      double *fixedLevels,
    8131             :                      int useNoData,
    8132             :                      double noDataValue,
    8133             :                      OGRLayerShadow* dstLayer,
    8134             :                      int idField,
    8135             :                      int elevField,
    8136             :                      GDALProgressFunc callback = NULL,
    8137             :                      void* callback_data = NULL)
    8138             : {
    8139           3 :     CPLErr eErr;
    8140             : 
    8141           3 :     CPLErrorReset();
    8142             : 
    8143           3 :     eErr =  GDALContourGenerate( srcBand,
    8144             :                                  contourInterval,
    8145             :                                  contourBase,
    8146             :                                  fixedLevelCount,
    8147             :                                  fixedLevels,
    8148             :                                  useNoData,
    8149             :                                  noDataValue,
    8150             :                                  dstLayer,
    8151             :                                  idField,
    8152             :                                  elevField,
    8153             :                                  callback,
    8154             :                                  callback_data);
    8155             : 
    8156           3 :     return eErr;
    8157             : }
    8158             : 
    8159             : 
    8160          25 : int ContourGenerateEx( GDALRasterBandShadow *srcBand,
    8161             :                        OGRLayerShadow* dstLayer,
    8162             :                        char** options = NULL,
    8163             :                        GDALProgressFunc callback = NULL,
    8164             :                        void* callback_data = NULL )
    8165             : {
    8166          25 :     CPLErr eErr;
    8167             : 
    8168          25 :     CPLErrorReset();
    8169             : 
    8170          25 :     eErr =  GDALContourGenerateEx( srcBand,
    8171             :                                    dstLayer,
    8172             :                                    options,
    8173             :                                    callback,
    8174             :                                    callback_data);
    8175             : 
    8176          25 :     return eErr;
    8177             : }
    8178             : 
    8179             : 
    8180           0 : GDALDatasetShadow *ViewshedGenerate( GDALRasterBandShadow *srcBand,
    8181             :                         const char* driverName,
    8182             :                         const char* targetRasterName,
    8183             :                         char** creationOptions,
    8184             :                         double observerX, double observerY, double observerHeight,
    8185             :                         double targetHeight, double visibleVal, double invisibleVal,
    8186             :                         double outOfRangeVal,  double noDataVal, double dfCurvCoeff,
    8187             :                         GDALViewshedMode mode, double maxDistance,
    8188             :                         GDALProgressFunc callback = NULL, void* callback_data = NULL,
    8189             :                         GDALViewshedOutputType heightMode = GVOT_NORMAL,
    8190             :                         char** options = NULL)
    8191             : {
    8192           0 :     GDALDatasetShadow* ds = GDALViewshedGenerate( srcBand,
    8193             :                                  driverName,
    8194             :                                  targetRasterName,
    8195             :                                  creationOptions,
    8196             :                                  observerX,
    8197             :                                  observerY,
    8198             :                                  observerHeight,
    8199             :                                  targetHeight,
    8200             :                                  visibleVal,
    8201             :                                  invisibleVal,
    8202             :                                  outOfRangeVal,
    8203             :                                  noDataVal,
    8204             :                                  dfCurvCoeff,
    8205             :                                  mode,
    8206             :                                  maxDistance,
    8207             :                                  callback,
    8208             :                                  callback_data,
    8209             :                                  heightMode,
    8210             :                                  options);
    8211           0 :   if (ds == 0) {
    8212             :     /*throw CPLGetLastErrorMsg(); causes a SWIG_exception later*/
    8213             :   }
    8214           0 :   return ds;
    8215             : }
    8216             : 
    8217             : 
    8218           5 : void IsLineOfSightVisible(GDALRasterBandShadow *band,
    8219             :                           int xA, int yA, double zA,
    8220             :                           int xB, int yB, double zB,
    8221             :                           bool *pbVisible, int *pnXIntersection, int *pnYIntersection,
    8222             :                           char** options = NULL)
    8223             : {
    8224           5 :     *pbVisible = GDALIsLineOfSightVisible(band, xA, yA, zA, xB, yB, zB, pnXIntersection, pnYIntersection, options);
    8225           5 : }
    8226             : 
    8227             : 
    8228          24 : GDALDatasetShadow *AutoCreateWarpedVRT( GDALDatasetShadow *src_ds,
    8229             :                                         const char *src_wkt = 0,
    8230             :                                         const char *dst_wkt = 0,
    8231             :                                         GDALResampleAlg eResampleAlg = GRA_NearestNeighbour,
    8232             :                                         double maxerror = 0.0 ) {
    8233          24 :   GDALDatasetShadow *ds = GDALAutoCreateWarpedVRT( src_ds, src_wkt,
    8234             :                                                    dst_wkt,
    8235             :                                                    eResampleAlg,
    8236             :                                                    maxerror,
    8237             :                                                    0 );
    8238          24 :   if (ds == 0) {
    8239             :     /*throw CPLGetLastErrorMsg(); causes a SWIG_exception later*/
    8240             :   }
    8241          24 :   return ds;
    8242             : 
    8243             : }
    8244             : 
    8245             : 
    8246           8 : GDALDatasetShadow*  CreatePansharpenedVRT( const char* pszXML,
    8247             :                             GDALRasterBandShadow* panchroBand,
    8248             :                             int nInputSpectralBands,
    8249             :                             GDALRasterBandShadow** ahInputSpectralBands )
    8250             : {
    8251           8 :     CPLErrorReset();
    8252             : 
    8253           8 :     return (GDALDatasetShadow*)GDALCreatePansharpenedVRT( pszXML, panchroBand,
    8254           8 :                                       nInputSpectralBands, ahInputSpectralBands );
    8255             : }
    8256             : 
    8257          71 : SWIGINTERN void delete_GDALTransformerInfoShadow(GDALTransformerInfoShadow *self){
    8258          71 :     GDALDestroyTransformer( self );
    8259          71 :   }
    8260           0 : SWIGINTERN int GDALTransformerInfoShadow_TransformPoint__SWIG_0(GDALTransformerInfoShadow *self,int bDstToSrc,double inout[3]){
    8261           0 :     int nRet, nSuccess = TRUE;
    8262             : 
    8263           0 :     nRet = GDALUseTransformer( self, bDstToSrc,
    8264             :                                1, &inout[0], &inout[1], &inout[2],
    8265             :                                &nSuccess );
    8266             : 
    8267           0 :     return nRet && nSuccess;
    8268             :   }
    8269        8677 : SWIGINTERN int GDALTransformerInfoShadow_TransformPoint__SWIG_1(GDALTransformerInfoShadow *self,double argout[3],int bDstToSrc,double x,double y,double z=0.0){
    8270        8677 :     int nRet, nSuccess = TRUE;
    8271             : 
    8272        8677 :     argout[0] = x;
    8273        8677 :     argout[1] = y;
    8274        8677 :     argout[2] = z;
    8275        8677 :     nRet = GDALUseTransformer( self, bDstToSrc,
    8276             :                                1, &argout[0], &argout[1], &argout[2],
    8277             :                                &nSuccess );
    8278             : 
    8279        8677 :     return nRet && nSuccess;
    8280             :   }
    8281             : 
    8282             : static int
    8283           4 : DecomposeSequenceOfCoordinates( PyObject *seq, int nCount, double *x, double *y, double *z )
    8284             : {
    8285          35 :   for( int i = 0; i<nCount; ++i )
    8286             :   {
    8287             : 
    8288          31 :     PyObject *o = PySequence_GetItem(seq, i);
    8289          31 :     if ( !PySequence_Check(o) )
    8290             :     {
    8291           0 :         Py_DECREF(o);
    8292           0 :         PyErr_SetString(PyExc_TypeError, "not a sequence");
    8293             : 
    8294           0 :         return FALSE;
    8295             :     }
    8296             : 
    8297          31 :     Py_ssize_t len = PySequence_Size(o);
    8298             : 
    8299          31 :     if (len == 2 || len == 3)
    8300             :     {
    8301          31 :         PyObject *o1 = PySequence_GetItem(o, 0);
    8302          31 :         if (!PyNumber_Check(o1))
    8303             :         {
    8304           0 :             Py_DECREF(o); Py_DECREF(o1);
    8305           0 :             PyErr_SetString(PyExc_TypeError, "not a number");
    8306             : 
    8307           0 :             return FALSE;
    8308             :         }
    8309          31 :         x[i] = PyFloat_AsDouble(o1);
    8310          31 :         Py_DECREF(o1);
    8311             : 
    8312          31 :         o1 = PySequence_GetItem(o, 1);
    8313          31 :         if (!PyNumber_Check(o1))
    8314             :         {
    8315           0 :             Py_DECREF(o); Py_DECREF(o1);
    8316           0 :             PyErr_SetString(PyExc_TypeError, "not a number");
    8317             : 
    8318           0 :             return FALSE;
    8319             :         }
    8320          31 :         y[i] = PyFloat_AsDouble(o1);
    8321          31 :         Py_DECREF(o1);
    8322             : 
    8323             :         /* The 3rd coordinate is optional, default 0.0 */
    8324          31 :         if (len == 3)
    8325             :         {
    8326           0 :             o1 = PySequence_GetItem(o, 2);
    8327           0 :             if (!PyNumber_Check(o1))
    8328             :             {
    8329           0 :                 Py_DECREF(o); Py_DECREF(o1);
    8330           0 :                 PyErr_SetString(PyExc_TypeError, "not a number");
    8331             : 
    8332           0 :                 return FALSE;
    8333             :             }
    8334           0 :             z[i] = PyFloat_AsDouble(o1);
    8335           0 :             Py_DECREF(o1);
    8336             :         }
    8337             :         else
    8338             :         {
    8339          31 :             z[i] = 0.0;
    8340             :         }
    8341             :     }
    8342             :     else
    8343             :     {
    8344           0 :         Py_DECREF(o);
    8345           0 :         PyErr_SetString(PyExc_TypeError, "invalid coordinate");
    8346             : 
    8347           0 :         return FALSE;
    8348             :     }
    8349             : 
    8350          31 :     Py_DECREF(o);
    8351             :   }
    8352             : 
    8353             :   return TRUE;
    8354             : }
    8355             : 
    8356           4 : SWIGINTERN int GDALTransformerInfoShadow_TransformPoints(GDALTransformerInfoShadow *self,int bDstToSrc,int nCount,double *x,double *y,double *z,int *panSuccess){
    8357           4 :     int nRet;
    8358             : 
    8359           8 :     nRet = GDALUseTransformer( self, bDstToSrc, nCount, x, y, z, panSuccess );
    8360             : 
    8361           4 :     return nRet;
    8362             :   }
    8363           1 : SWIGINTERN int GDALTransformerInfoShadow_TransformGeolocations(GDALTransformerInfoShadow *self,GDALRasterBandShadow *xBand,GDALRasterBandShadow *yBand,GDALRasterBandShadow *zBand,GDALProgressFunc callback=NULL,void *callback_data=NULL,char **options=NULL){
    8364             : 
    8365           1 :     CPLErrorReset();
    8366             : 
    8367           1 :     return GDALTransformGeolocations( xBand, yBand, zBand,
    8368             :                                       GDALUseTransformer, self,
    8369           1 :                                     callback, callback_data, options );
    8370             :   }
    8371             : 
    8372          79 :   GDALTransformerInfoShadow* Transformer( GDALDatasetShadow *src, GDALDatasetShadow *dst,
    8373             :                              char **options ) {
    8374          79 :     GDALTransformerInfoShadow *obj = (GDALTransformerInfoShadow*)
    8375          79 :        GDALCreateGenImgProjTransformer2( (GDALDatasetH)src, (GDALDatasetH)dst,
    8376             :                                          options );
    8377          79 :     return obj;
    8378             :   }
    8379             : 
    8380             : 
    8381             : typedef struct
    8382             : {
    8383             :   int     width;
    8384             :   int     height;
    8385             :   double  xmin;
    8386             :   double  ymin;
    8387             :   double  xmax;
    8388             :   double  ymax;
    8389             :   double  geotransform[6];
    8390             : } SuggestedWarpOutputRes;
    8391             : 
    8392           3 : SWIGINTERN void delete_SuggestedWarpOutputRes(SuggestedWarpOutputRes *self){
    8393           3 :     CPLFree(self);
    8394           3 :   }
    8395           2 : SWIGINTERN void SuggestedWarpOutputRes_GetGeotransform(SuggestedWarpOutputRes *self,double geotransform[6]){
    8396           2 :       memcpy(geotransform, self->geotransform, 6 * sizeof(double));
    8397             :   }
    8398             : 
    8399             : #ifdef SWIGPYTHON
    8400           1 :   SuggestedWarpOutputRes* SuggestedWarpOutputFromTransformer(
    8401             :                                                GDALDatasetShadow *src,
    8402             :                                                GDALTransformerInfoShadow* transformer )
    8403             : #else
    8404             :   SuggestedWarpOutputRes* SuggestedWarpOutput( GDALDatasetShadow *src,
    8405             :                                                GDALTransformerInfoShadow* transformer )
    8406             : #endif
    8407             :   {
    8408           1 :     SuggestedWarpOutputRes* res = (SuggestedWarpOutputRes*)CPLMalloc(sizeof(SuggestedWarpOutputRes));
    8409           1 :     double extent[4];
    8410           1 :     if( GDALSuggestedWarpOutput2(src, GDALGenImgProjTransform, transformer,
    8411           1 :                                  res->geotransform,&(res->width), &(res->height),
    8412             :                                  extent, 0) != CE_None )
    8413             :     {
    8414           0 :         CPLFree(res);
    8415           0 :         return NULL;
    8416             :     }
    8417           1 :     res->xmin = extent[0];
    8418           1 :     res->ymin = extent[1];
    8419           1 :     res->xmax = extent[2];
    8420           1 :     res->ymax = extent[3];
    8421           1 :     return res;
    8422             :   }
    8423             : 
    8424             : 
    8425             : #ifdef SWIGPYTHON
    8426           2 :   SuggestedWarpOutputRes* SuggestedWarpOutputFromOptions( GDALDatasetShadow *src,
    8427             :                                                           char** options )
    8428             : #else
    8429             :   SuggestedWarpOutputRes* SuggestedWarpOutput( GDALDatasetShadow *src,
    8430             :                                                char** options )
    8431             : #endif
    8432             :   {
    8433           2 :     SuggestedWarpOutputRes* res = (SuggestedWarpOutputRes*)CPLMalloc(sizeof(SuggestedWarpOutputRes));
    8434           2 :     double extent[4];
    8435           2 :     void* pTransformArg = GDALCreateGenImgProjTransformer2( src, NULL, options );
    8436           2 :     if( GDALSuggestedWarpOutput2(src, GDALGenImgProjTransform, pTransformArg,
    8437           2 :                                  res->geotransform,&(res->width), &(res->height),
    8438             :                                  extent, 0) != CE_None )
    8439             :     {
    8440           0 :         GDALDestroyTransformer(pTransformArg);
    8441           0 :         CPLFree(res);
    8442           0 :         return NULL;
    8443             :     }
    8444           2 :     GDALDestroyTransformer(pTransformArg);
    8445           2 :     res->xmin = extent[0];
    8446           2 :     res->ymin = extent[1];
    8447           2 :     res->xmax = extent[2];
    8448           2 :     res->ymax = extent[3];
    8449           2 :     return res;
    8450             :   }
    8451             : 
    8452             : 
    8453          23 : GDALDatasetShadow* ApplyVerticalShiftGrid( GDALDatasetShadow *src_ds,
    8454             :                                            GDALDatasetShadow *grid_ds,
    8455             :                                            bool inverse = false,
    8456             :                                            double srcUnitToMeter = 1.0,
    8457             :                                            double dstUnitToMeter = 1.0,
    8458             :                                            char** options = NULL ) {
    8459          23 :   GDALDatasetShadow *ds = GDALApplyVerticalShiftGrid( src_ds, grid_ds,
    8460             :                                                       inverse,
    8461             :                                                       srcUnitToMeter,
    8462             :                                                       dstUnitToMeter,
    8463             :                                                       options );
    8464          23 :   return ds;
    8465             : 
    8466             : }
    8467             : 
    8468             : 
    8469             : #include "gdalalgorithm.h"
    8470             : 
    8471             : typedef GDALAlgorithmRegistryHS GDALAlgorithmRegistryHS;
    8472             : typedef GDALAlgorithmHS GDALAlgorithmHS;
    8473             : typedef GDALAlgorithmArgHS GDALAlgorithmArgHS;
    8474             : typedef GDALArgDatasetValueHS GDALArgDatasetValueHS;
    8475             : 
    8476        7087 : SWIGINTERN void delete_GDALAlgorithmArgHS(GDALAlgorithmArgHS *self){
    8477        7087 :     GDALAlgorithmArgRelease( self );
    8478        7087 :   }
    8479         143 : SWIGINTERN char const *GDALAlgorithmArgHS_GetName(GDALAlgorithmArgHS *self){
    8480         143 :     return GDALAlgorithmArgGetName(self);
    8481             :   }
    8482        5173 : SWIGINTERN GDALAlgorithmArgType GDALAlgorithmArgHS_GetType(GDALAlgorithmArgHS *self){
    8483        5173 :     return GDALAlgorithmArgGetType(self);
    8484             :   }
    8485           1 : SWIGINTERN char const *GDALAlgorithmArgHS_GetDescription(GDALAlgorithmArgHS *self){
    8486           1 :     return GDALAlgorithmArgGetDescription(self);
    8487             :   }
    8488           1 : SWIGINTERN char const *GDALAlgorithmArgHS_GetShortName(GDALAlgorithmArgHS *self){
    8489           1 :     return GDALAlgorithmArgGetShortName(self);
    8490             :   }
    8491           1 : SWIGINTERN char **GDALAlgorithmArgHS_GetAliases(GDALAlgorithmArgHS *self){
    8492           1 :     return GDALAlgorithmArgGetAliases( self );
    8493             :   }
    8494           1 : SWIGINTERN char const *GDALAlgorithmArgHS_GetMetaVar(GDALAlgorithmArgHS *self){
    8495           1 :     return GDALAlgorithmArgGetMetaVar(self);
    8496             :   }
    8497           1 : SWIGINTERN char const *GDALAlgorithmArgHS_GetCategory(GDALAlgorithmArgHS *self){
    8498           1 :     return GDALAlgorithmArgGetCategory(self);
    8499             :   }
    8500           1 : SWIGINTERN bool GDALAlgorithmArgHS_IsPositional(GDALAlgorithmArgHS *self){
    8501           1 :     return GDALAlgorithmArgIsPositional(self);
    8502             :   }
    8503           1 : SWIGINTERN bool GDALAlgorithmArgHS_IsRequired(GDALAlgorithmArgHS *self){
    8504           1 :     return GDALAlgorithmArgIsRequired(self);
    8505             :   }
    8506           1 : SWIGINTERN int GDALAlgorithmArgHS_GetMinCount(GDALAlgorithmArgHS *self){
    8507           1 :     return GDALAlgorithmArgGetMinCount(self);
    8508             :   }
    8509           1 : SWIGINTERN int GDALAlgorithmArgHS_GetMaxCount(GDALAlgorithmArgHS *self){
    8510           1 :     return GDALAlgorithmArgGetMaxCount(self);
    8511             :   }
    8512           1 : SWIGINTERN bool GDALAlgorithmArgHS_GetPackedValuesAllowed(GDALAlgorithmArgHS *self){
    8513           1 :     return GDALAlgorithmArgGetPackedValuesAllowed(self);
    8514             :   }
    8515           1 : SWIGINTERN bool GDALAlgorithmArgHS_GetRepeatedArgAllowed(GDALAlgorithmArgHS *self){
    8516           1 :     return GDALAlgorithmArgGetRepeatedArgAllowed(self);
    8517             :   }
    8518           1 : SWIGINTERN char **GDALAlgorithmArgHS_GetChoices(GDALAlgorithmArgHS *self){
    8519           1 :     return GDALAlgorithmArgGetChoices( self );
    8520             :   }
    8521          25 : SWIGINTERN char **GDALAlgorithmArgHS_GetMetadataItem(GDALAlgorithmArgHS *self,char const *item){
    8522          25 :     return GDALAlgorithmArgGetMetadataItem( self, item );
    8523             :   }
    8524         125 : SWIGINTERN bool GDALAlgorithmArgHS_IsExplicitlySet(GDALAlgorithmArgHS *self){
    8525         125 :     return GDALAlgorithmArgIsExplicitlySet(self);
    8526             :   }
    8527           1 : SWIGINTERN bool GDALAlgorithmArgHS_HasDefaultValue(GDALAlgorithmArgHS *self){
    8528           1 :     return GDALAlgorithmArgHasDefaultValue(self);
    8529             :   }
    8530           1 : SWIGINTERN bool GDALAlgorithmArgHS_IsHiddenForCLI(GDALAlgorithmArgHS *self){
    8531           1 :     return GDALAlgorithmArgIsHiddenForCLI(self);
    8532             :   }
    8533           1 : SWIGINTERN bool GDALAlgorithmArgHS_IsOnlyForCLI(GDALAlgorithmArgHS *self){
    8534           1 :     return GDALAlgorithmArgIsOnlyForCLI(self);
    8535             :   }
    8536           1 : SWIGINTERN bool GDALAlgorithmArgHS_IsInput(GDALAlgorithmArgHS *self){
    8537           1 :     return GDALAlgorithmArgIsInput(self);
    8538             :   }
    8539        2234 : SWIGINTERN bool GDALAlgorithmArgHS_IsOutput(GDALAlgorithmArgHS *self){
    8540        2234 :     return GDALAlgorithmArgIsOutput(self);
    8541             :   }
    8542           1 : SWIGINTERN int GDALAlgorithmArgHS_GetDatasetType(GDALAlgorithmArgHS *self){
    8543           1 :     return GDALAlgorithmArgGetDatasetType(self);
    8544             :   }
    8545           1 : SWIGINTERN int GDALAlgorithmArgHS_GetDatasetInputFlags(GDALAlgorithmArgHS *self){
    8546           1 :     return GDALAlgorithmArgGetDatasetInputFlags(self);
    8547             :   }
    8548           1 : SWIGINTERN int GDALAlgorithmArgHS_GetDatasetOutputFlags(GDALAlgorithmArgHS *self){
    8549           1 :     return GDALAlgorithmArgGetDatasetOutputFlags(self);
    8550             :   }
    8551           1 : SWIGINTERN char const *GDALAlgorithmArgHS_GetMutualExclusionGroup(GDALAlgorithmArgHS *self){
    8552           1 :     return GDALAlgorithmArgGetMutualExclusionGroup(self);
    8553             :   }
    8554           7 : SWIGINTERN bool GDALAlgorithmArgHS_GetAsBoolean(GDALAlgorithmArgHS *self){
    8555           7 :     return GDALAlgorithmArgGetAsBoolean(self);
    8556             :   }
    8557         110 : SWIGINTERN char const *GDALAlgorithmArgHS_GetAsString(GDALAlgorithmArgHS *self){
    8558         110 :     return GDALAlgorithmArgGetAsString(self);
    8559             :   }
    8560           7 : SWIGINTERN int GDALAlgorithmArgHS_GetAsInteger(GDALAlgorithmArgHS *self){
    8561           7 :     return GDALAlgorithmArgGetAsInteger(self);
    8562             :   }
    8563           7 : SWIGINTERN double GDALAlgorithmArgHS_GetAsDouble(GDALAlgorithmArgHS *self){
    8564           7 :     return GDALAlgorithmArgGetAsDouble(self);
    8565             :   }
    8566        1549 : SWIGINTERN GDALArgDatasetValueHS *GDALAlgorithmArgHS_GetAsDatasetValue(GDALAlgorithmArgHS *self){
    8567        1549 :     return GDALAlgorithmArgGetAsDatasetValue(self);
    8568             :   }
    8569           1 : SWIGINTERN char **GDALAlgorithmArgHS_GetAsStringList(GDALAlgorithmArgHS *self){
    8570           1 :     return GDALAlgorithmArgGetAsStringList( self );
    8571             :   }
    8572           7 : SWIGINTERN void GDALAlgorithmArgHS_GetAsIntegerList(GDALAlgorithmArgHS *self,int *nLen,int const **pList){
    8573           7 :      size_t nLenSizet = 0;
    8574          14 :     *pList = GDALAlgorithmArgGetAsIntegerList(self, &nLenSizet);
    8575           7 :     *nLen = (int)nLenSizet;
    8576             :   }
    8577           7 : SWIGINTERN void GDALAlgorithmArgHS_GetAsDoubleList(GDALAlgorithmArgHS *self,int *nLen,double const **pList){
    8578           7 :      size_t nLenSizet = 0;
    8579          14 :     *pList = GDALAlgorithmArgGetAsDoubleList(self, &nLenSizet);
    8580           7 :     *nLen = (int)nLenSizet;
    8581             :   }
    8582         299 : SWIGINTERN bool GDALAlgorithmArgHS_SetAsBoolean(GDALAlgorithmArgHS *self,bool value){
    8583         299 :     return GDALAlgorithmArgSetAsBoolean(self, value);
    8584             :   }
    8585        1329 : SWIGINTERN bool GDALAlgorithmArgHS_SetAsString(GDALAlgorithmArgHS *self,char const *value){
    8586        1329 :     return GDALAlgorithmArgSetAsString(self, value);
    8587             :   }
    8588         211 : SWIGINTERN bool GDALAlgorithmArgHS_SetAsInteger(GDALAlgorithmArgHS *self,int value){
    8589         211 :     return GDALAlgorithmArgSetAsInteger(self, value);
    8590             :   }
    8591         215 : SWIGINTERN bool GDALAlgorithmArgHS_SetAsDouble(GDALAlgorithmArgHS *self,double value){
    8592         215 :     return GDALAlgorithmArgSetAsDouble(self, value);
    8593             :   }
    8594           1 : SWIGINTERN bool GDALAlgorithmArgHS_SetAsDatasetValue(GDALAlgorithmArgHS *self,GDALArgDatasetValueHS *value){
    8595           1 :     return GDALAlgorithmArgSetAsDatasetValue(self, value);
    8596             :   }
    8597         257 : SWIGINTERN bool GDALAlgorithmArgHS_SetAsStringList(GDALAlgorithmArgHS *self,char **value){
    8598         257 :     return GDALAlgorithmArgSetAsStringList(self, value);
    8599             :   }
    8600          57 : SWIGINTERN bool GDALAlgorithmArgHS_SetAsIntegerList(GDALAlgorithmArgHS *self,int nList,int *pList){
    8601          57 :     return GDALAlgorithmArgSetAsIntegerList(self, nList, pList);
    8602             :   }
    8603         124 : SWIGINTERN bool GDALAlgorithmArgHS_SetAsDoubleList(GDALAlgorithmArgHS *self,int nList,double *pList){
    8604         124 :     return GDALAlgorithmArgSetAsDoubleList(self, nList, pList);
    8605             :   }
    8606           1 : SWIGINTERN bool GDALAlgorithmArgHS_SetDataset(GDALAlgorithmArgHS *self,GDALDatasetShadow *ds){
    8607           1 :     return GDALAlgorithmArgSetDataset(self, ds);
    8608             :   }
    8609         378 : SWIGINTERN bool GDALAlgorithmArgHS_SetDatasets(GDALAlgorithmArgHS *self,int object_list_count,GDALDatasetShadow **poObjects){
    8610         378 :     return GDALAlgorithmArgSetDatasets(self, object_list_count, poObjects);
    8611             :   }
    8612         378 : SWIGINTERN bool GDALAlgorithmArgHS_SetDatasetNames(GDALAlgorithmArgHS *self,char **names){
    8613         378 :     return GDALAlgorithmArgSetDatasetNames(self, names);
    8614             :   }
    8615        3613 : SWIGINTERN void delete_GDALAlgorithmHS(GDALAlgorithmHS *self){
    8616        3613 :     GDALAlgorithmRelease( self );
    8617        3613 :   }
    8618          32 : SWIGINTERN char const *GDALAlgorithmHS_GetName(GDALAlgorithmHS *self){
    8619          32 :     return GDALAlgorithmGetName(self);
    8620             :   }
    8621           1 : SWIGINTERN char const *GDALAlgorithmHS_GetDescription(GDALAlgorithmHS *self){
    8622           1 :     return GDALAlgorithmGetDescription(self);
    8623             :   }
    8624           1 : SWIGINTERN char const *GDALAlgorithmHS_GetLongDescription(GDALAlgorithmHS *self){
    8625           1 :     return GDALAlgorithmGetLongDescription(self);
    8626             :   }
    8627           1 : SWIGINTERN char const *GDALAlgorithmHS_GetHelpFullURL(GDALAlgorithmHS *self){
    8628           1 :     return GDALAlgorithmGetHelpFullURL(self);
    8629             :   }
    8630        1961 : SWIGINTERN bool GDALAlgorithmHS_HasSubAlgorithms(GDALAlgorithmHS *self){
    8631        1961 :     return GDALAlgorithmHasSubAlgorithms(self);
    8632             :   }
    8633           6 : SWIGINTERN char **GDALAlgorithmHS_GetSubAlgorithmNames(GDALAlgorithmHS *self){
    8634           6 :     return GDALAlgorithmGetSubAlgorithmNames( self );
    8635             :   }
    8636        1612 : SWIGINTERN GDALAlgorithmHS *GDALAlgorithmHS_InstantiateSubAlgorithm(GDALAlgorithmHS *self,char const *algName){
    8637        1612 :     return GDALAlgorithmInstantiateSubAlgorithm(self, algName);
    8638             :   }
    8639          50 : SWIGINTERN bool GDALAlgorithmHS_ParseCommandLineArguments(GDALAlgorithmHS *self,char **args){
    8640          50 :     return GDALAlgorithmParseCommandLineArguments(self, args);
    8641             :   }
    8642         532 : SWIGINTERN GDALAlgorithmHS *GDALAlgorithmHS_GetActualAlgorithm(GDALAlgorithmHS *self){
    8643         532 :     return GDALAlgorithmGetActualAlgorithm(self);
    8644             :   }
    8645        1188 : SWIGINTERN bool GDALAlgorithmHS_Run(GDALAlgorithmHS *self,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    8646        1188 :     return GDALAlgorithmRun(self, callback, callback_data);
    8647             :   }
    8648         218 : SWIGINTERN bool GDALAlgorithmHS_Finalize(GDALAlgorithmHS *self){
    8649         218 :     return GDALAlgorithmFinalize(self);
    8650             :   }
    8651         245 : SWIGINTERN bool GDALAlgorithmHS_ParseRunAndFinalize(GDALAlgorithmHS *self,char **args,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    8652         430 :     return GDALAlgorithmParseCommandLineArguments(self, args) &&
    8653         410 :            GDALAlgorithmRun(self, callback, callback_data) &&
    8654         165 :            GDALAlgorithmFinalize(self);
    8655             :   }
    8656           3 : SWIGINTERN retStringAndCPLFree *GDALAlgorithmHS_GetUsageAsJSON(GDALAlgorithmHS *self){
    8657           3 :     return GDALAlgorithmGetUsageAsJSON(self);
    8658             :   }
    8659         109 : SWIGINTERN char **GDALAlgorithmHS_GetArgNames(GDALAlgorithmHS *self){
    8660         109 :     return GDALAlgorithmGetArgNames( self );
    8661             :   }
    8662        7090 : SWIGINTERN GDALAlgorithmArgHS *GDALAlgorithmHS_GetArg(GDALAlgorithmHS *self,char const *argName){
    8663        7090 :     return GDALAlgorithmGetArg(self, argName);
    8664             :   }
    8665        1485 : SWIGINTERN void delete_GDALAlgorithmRegistryHS(GDALAlgorithmRegistryHS *self){
    8666        1485 :     GDALAlgorithmRegistryRelease( self );
    8667        1485 :   }
    8668           1 : SWIGINTERN char **GDALAlgorithmRegistryHS_GetAlgNames(GDALAlgorithmRegistryHS *self){
    8669           1 :     return GDALAlgorithmRegistryGetAlgNames( self );
    8670             :   }
    8671        1486 : SWIGINTERN GDALAlgorithmHS *GDALAlgorithmRegistryHS_InstantiateAlg(GDALAlgorithmRegistryHS *self,char const *algName){
    8672        1486 :     return GDALAlgorithmRegistryInstantiateAlg(self, algName);
    8673             :   }
    8674        1548 : SWIGINTERN void delete_GDALArgDatasetValueHS(GDALArgDatasetValueHS *self){
    8675        1548 :     GDALArgDatasetValueRelease( self );
    8676        1548 :   }
    8677           2 : SWIGINTERN char const *GDALArgDatasetValueHS_GetName(GDALArgDatasetValueHS *self){
    8678           2 :     return GDALArgDatasetValueGetName(self);
    8679             :   }
    8680         504 : SWIGINTERN GDALDatasetShadow *GDALArgDatasetValueHS_GetDataset(GDALArgDatasetValueHS *self){
    8681         504 :     return GDALArgDatasetValueGetDatasetIncreaseRefCount(self);
    8682             :   }
    8683         831 : SWIGINTERN void GDALArgDatasetValueHS_SetName(GDALArgDatasetValueHS *self,char const *name){
    8684         831 :     GDALArgDatasetValueSetName(self, name);
    8685         831 :   }
    8686         215 : SWIGINTERN void GDALArgDatasetValueHS_SetDataset(GDALArgDatasetValueHS *self,GDALDatasetShadow *ds){
    8687         215 :     GDALArgDatasetValueSetDataset(self, ds);
    8688         215 :   }
    8689             : 
    8690          56 : GIntBig wrapper_GDALGetCacheMax()
    8691             : {
    8692          56 :     return GDALGetCacheMax64();
    8693             : }
    8694             : 
    8695             : 
    8696           2 : GIntBig wrapper_GDALGetCacheUsed()
    8697             : {
    8698           2 :     return GDALGetCacheUsed64();
    8699             : }
    8700             : 
    8701             : 
    8702          76 : void wrapper_GDALSetCacheMax(GIntBig nBytes)
    8703             : {
    8704          76 :     return GDALSetCacheMax64(nBytes);
    8705             : }
    8706             : 
    8707             : 
    8708          43 : int wrapper_GDALGetDataTypeSizeBits( GDALDataType eDataType )
    8709             : {
    8710          43 :     return GDALGetDataTypeSizeBits(eDataType);
    8711             : }
    8712             : 
    8713             : 
    8714             : /************************************************************************/
    8715             : /*                          XMLTreeToPyList()                           */
    8716             : /************************************************************************/
    8717       26996 : static PyObject *XMLTreeToPyList( CPLXMLNode *psTree )
    8718             : {
    8719       26996 :     PyObject *pyList;
    8720       26996 :     int      nChildCount = 0, iChild;
    8721       26996 :     CPLXMLNode *psChild;
    8722             : 
    8723       26996 :     if( psTree == NULL )
    8724             :         return Py_None;
    8725             : 
    8726       26983 :     for( psChild = psTree->psChild;
    8727       53900 :          psChild != NULL;
    8728       26917 :          psChild = psChild->psNext )
    8729       26917 :         nChildCount++;
    8730             : 
    8731       26983 :     pyList = PyList_New(nChildCount+2);
    8732             : 
    8733       26983 :     PyList_SetItem( pyList, 0, Py_BuildValue( "i", (int) psTree->eType ) );
    8734       26983 :     PyList_SetItem( pyList, 1, Py_BuildValue( "s", psTree->pszValue ) );
    8735             : 
    8736       26983 :     for( psChild = psTree->psChild, iChild = 2;
    8737       53900 :          psChild != NULL;
    8738       26917 :          psChild = psChild->psNext, iChild++ )
    8739             :     {
    8740       26917 :         PyList_SetItem( pyList, iChild, XMLTreeToPyList( psChild ) );
    8741             :     }
    8742             : 
    8743             :     return pyList;
    8744             : }
    8745             : 
    8746             : 
    8747             : /************************************************************************/
    8748             : /*                          PyListToXMLTree()                           */
    8749             : /************************************************************************/
    8750         339 : static CPLXMLNode *PyListToXMLTree( PyObject *pyList )
    8751             : 
    8752             : {
    8753         339 :     int      nChildCount = 0, iChild, nType = 0;
    8754         339 :     CPLXMLNode *psThisNode;
    8755         339 :     CPLXMLNode *psChild;
    8756         339 :     char       *pszText = NULL;
    8757             : 
    8758         339 :     if( PyList_Size(pyList) > INT_MAX )
    8759             :     {
    8760           0 :         PyErr_SetString(PyExc_TypeError,"Error in input XMLTree." );
    8761           0 :         return NULL;
    8762             :     }
    8763         339 :     nChildCount = static_cast<int>(PyList_Size(pyList)) - 2;
    8764         339 :     if( nChildCount < 0 )
    8765             :     {
    8766           0 :         PyErr_SetString(PyExc_TypeError,"Error in input XMLTree." );
    8767           0 :         return NULL;
    8768             :     }
    8769             : 
    8770         339 :     CPL_IGNORE_RET_VAL(PyArg_Parse( PyList_GET_ITEM(pyList,0), "i", &nType ));
    8771         339 :     CPL_IGNORE_RET_VAL(PyArg_Parse( PyList_GET_ITEM(pyList,1), "s", &pszText ));
    8772             : 
    8773             :     /* Detect "pseudo" root */
    8774         339 :     if (nType == CXT_Element && pszText != NULL && strlen(pszText) == 0 && nChildCount == 2)
    8775             :     {
    8776           2 :         PyObject *pyFirst = PyList_GET_ITEM(pyList, 2);
    8777           2 :         if (PyList_Size(pyFirst) < 2)
    8778             :         {
    8779           0 :             PyErr_SetString(PyExc_TypeError,"Error in input XMLTree." );
    8780           2 :             return NULL;
    8781             :         }
    8782           2 :         int nTypeFirst = 0;
    8783           2 :         char* pszTextFirst = NULL;
    8784           2 :         CPL_IGNORE_RET_VAL(PyArg_Parse( PyList_GET_ITEM(pyFirst,0), "i", &nTypeFirst ));
    8785           2 :         CPL_IGNORE_RET_VAL(PyArg_Parse( PyList_GET_ITEM(pyFirst,1), "s", &pszTextFirst ));
    8786           2 :         if (nTypeFirst == CXT_Element && pszTextFirst != NULL && pszTextFirst[0] == '?')
    8787             :         {
    8788           2 :             psThisNode = PyListToXMLTree( PyList_GET_ITEM(pyList,2) );
    8789           2 :             psThisNode->psNext = PyListToXMLTree( PyList_GET_ITEM(pyList,3) );
    8790           2 :             return psThisNode;
    8791             :         }
    8792             :     }
    8793             : 
    8794         337 :     psThisNode = CPLCreateXMLNode( NULL, (CPLXMLNodeType) nType, pszText );
    8795             : 
    8796         659 :     for( iChild = 0; iChild < nChildCount; iChild++ )
    8797             :     {
    8798         322 :         psChild = PyListToXMLTree( PyList_GET_ITEM(pyList,iChild+2) );
    8799         322 :         CPLAddXMLChild( psThisNode, psChild );
    8800             :     }
    8801             : 
    8802             :     return psThisNode;
    8803             : }
    8804             : 
    8805             : 
    8806           9 : retStringAndCPLFree *GetJPEG2000StructureAsString( const char* pszFilename, char** options = NULL )
    8807             : {
    8808           9 :     CPLXMLNode* psNode = GDALGetJPEG2000Structure(pszFilename, options);
    8809           9 :     if( psNode == NULL )
    8810             :         return NULL;
    8811           9 :     char* pszXML = CPLSerializeXMLTree(psNode);
    8812           9 :     CPLDestroyXMLNode(psNode);
    8813           9 :     return pszXML;
    8814             : }
    8815             : 
    8816             : 
    8817         373 : int GetDriverCount() {
    8818         373 :   return GDALGetDriverCount();
    8819             : }
    8820             : 
    8821             : 
    8822             : static
    8823       14910 : GDALDriverShadow* GetDriverByName( char const *name ) {
    8824       14910 :   return (GDALDriverShadow*) GDALGetDriverByName( name );
    8825             : }
    8826             : 
    8827             : 
    8828       81493 : GDALDriverShadow* GetDriver( int i ) {
    8829       81493 :   return (GDALDriverShadow*) GDALGetDriver( i );
    8830             : }
    8831             : 
    8832             : 
    8833       23320 : GDALDatasetShadow* Open( char const* utf8_path, GDALAccess eAccess = GA_ReadOnly ) {
    8834       23320 :   CPLErrorReset();
    8835       23320 :   GDALDatasetShadow *ds = GDALOpen( utf8_path, eAccess );
    8836             : #ifndef SWIGPYTHON
    8837             :   if( ds != NULL && CPLGetLastErrorType() == CE_Failure )
    8838             :   {
    8839             :       if ( GDALDereferenceDataset( ds ) <= 0 )
    8840             :           GDALClose(ds);
    8841             :       ds = NULL;
    8842             :   }
    8843             : #endif
    8844       23320 :   return (GDALDatasetShadow*) ds;
    8845             : }
    8846             : 
    8847             : 
    8848        6528 : GDALDatasetShadow* OpenEx( char const* utf8_path, unsigned int nOpenFlags = 0,
    8849             :                            char** allowed_drivers = NULL, char** open_options = NULL,
    8850             :                            char** sibling_files = NULL ) {
    8851        6528 :   CPLErrorReset();
    8852             : #ifdef SWIGPYTHON
    8853        8944 :   if( GetUseExceptions() )
    8854        2879 :       nOpenFlags |= GDAL_OF_VERBOSE_ERROR;
    8855             : #endif
    8856        6528 :   GDALDatasetShadow *ds = GDALOpenEx( utf8_path, nOpenFlags, allowed_drivers,
    8857             :                                       open_options, sibling_files );
    8858             : #ifndef SWIGPYTHON
    8859             :   if( ds != NULL && CPLGetLastErrorType() == CE_Failure )
    8860             :   {
    8861             :       if ( GDALDereferenceDataset( ds ) <= 0 )
    8862             :           GDALClose(ds);
    8863             :       ds = NULL;
    8864             :   }
    8865             : #endif
    8866        6528 :   return (GDALDatasetShadow*) ds;
    8867             : }
    8868             : 
    8869             : 
    8870        5053 : GDALDatasetShadow* OpenShared( char const* utf8_path, GDALAccess eAccess = GA_ReadOnly ) {
    8871        5053 :   CPLErrorReset();
    8872        5053 :   GDALDatasetShadow *ds = GDALOpenShared( utf8_path, eAccess );
    8873             : #ifndef SWIGPYTHON
    8874             :   if( ds != NULL && CPLGetLastErrorType() == CE_Failure )
    8875             :   {
    8876             :       if ( GDALDereferenceDataset( ds ) <= 0 )
    8877             :           GDALClose(ds);
    8878             :       ds = NULL;
    8879             :   }
    8880             : #endif
    8881        5053 :   return (GDALDatasetShadow*) ds;
    8882             : }
    8883             : 
    8884             : 
    8885          11 : GDALDriverShadow *IdentifyDriver( const char *utf8_path,
    8886             :                                   char **papszSiblings = NULL ) {
    8887          11 :     return (GDALDriverShadow *) GDALIdentifyDriver( utf8_path,
    8888          11 :                                                 papszSiblings );
    8889             : }
    8890             : 
    8891             : 
    8892          50 : GDALDriverShadow *IdentifyDriverEx( const char* utf8_path,
    8893             :                                     unsigned int nIdentifyFlags = 0,
    8894             :                                     char** allowed_drivers = NULL,
    8895             :                                     char** sibling_files = NULL )
    8896             : {
    8897          50 :     return  (GDALDriverShadow *) GDALIdentifyDriverEx( utf8_path,
    8898             :                                                 nIdentifyFlags,
    8899             :                                                 allowed_drivers,
    8900          50 :                                                 sibling_files );
    8901             : }
    8902             : 
    8903             : 
    8904         193 :   char **GeneralCmdLineProcessor( char **papszArgv, int nOptions = 0 ) {
    8905         193 :     int nResArgCount;
    8906             : 
    8907         193 :     if( papszArgv == NULL )
    8908             :         return NULL;
    8909             : 
    8910         386 :     bool bReloadDrivers = ( CSLFindString(papszArgv, "GDAL_SKIP") >= 0 ||
    8911         193 :                             CSLFindString(papszArgv, "OGR_SKIP") >= 0 );
    8912             : 
    8913         193 :     nResArgCount =
    8914         193 :       GDALGeneralCmdLineProcessor( CSLCount(papszArgv), &papszArgv, nOptions );
    8915             : 
    8916         193 :     if( bReloadDrivers )
    8917             :     {
    8918           0 :         GDALAllRegister();
    8919             :     }
    8920             : 
    8921         193 :     if( nResArgCount <= 0 )
    8922             :         return NULL;
    8923             :     else
    8924         178 :         return papszArgv;
    8925             :   }
    8926             : 
    8927             : 
    8928             : #include "gdal_utils.h"
    8929             : 
    8930             : 
    8931             : 
    8932             : #include <vector>
    8933             : 
    8934             : class ErrorStruct
    8935             : {
    8936             :   public:
    8937             :     CPLErr type;
    8938             :     CPLErrorNum no;
    8939             :     char* msg;
    8940             : 
    8941             :     ErrorStruct() = delete;
    8942         276 :     ErrorStruct(CPLErr eErrIn, CPLErrorNum noIn, const char* msgIn) :
    8943         276 :         type(eErrIn), no(noIn), msg(msgIn ? CPLStrdup(msgIn) : nullptr) {}
    8944          70 :     ErrorStruct(const ErrorStruct& other):
    8945          70 :         type(other.type), no(other.no),
    8946          70 :         msg(other.msg ? CPLStrdup(other.msg) : nullptr) {}
    8947         346 :     ~ErrorStruct() { CPLFree(msg); }
    8948             : };
    8949             : 
    8950         276 : static void CPL_STDCALL StackingErrorHandler( CPLErr eErr, CPLErrorNum no,
    8951             :                                            const char* msg )
    8952             : {
    8953         276 :     std::vector<ErrorStruct>* paoErrors =
    8954             :         static_cast<std::vector<ErrorStruct> *>(
    8955         276 :             CPLGetErrorHandlerUserData());
    8956         276 :     paoErrors->emplace_back(eErr, no, msg);
    8957         276 : }
    8958             : 
    8959        2501 : static void PushStackingErrorHandler(std::vector<ErrorStruct>* paoErrors)
    8960             : {
    8961        2501 :     CPLPushErrorHandlerEx(StackingErrorHandler, paoErrors);
    8962        2501 :     CPLSetCurrentErrorHandlerCatchDebug(false);
    8963        2501 : }
    8964             : 
    8965        2501 : static void PopStackingErrorHandler(std::vector<ErrorStruct>* paoErrors, bool bSuccess)
    8966             : {
    8967        2501 :     CPLPopErrorHandler();
    8968             : 
    8969             :     // If the operation was successful, do not emit regular CPLError()
    8970             :     // of CE_Failure type that would be caught by the PythonBindingErrorHandler
    8971             :     // and turned into
    8972             :     // Python exceptions. Just emit them with the previous error handler
    8973             : 
    8974        2777 :     for( size_t iError = 0; iError < paoErrors->size(); ++iError )
    8975             :     {
    8976         276 :         CPLErr eErrClass = (*paoErrors)[iError].type;
    8977         276 :         if( bSuccess && eErrClass == CE_Failure )
    8978             :         {
    8979          11 :             CPLCallPreviousHandler( eErrClass,
    8980          11 :                                 (*paoErrors)[iError].no,
    8981          11 :                                 (*paoErrors)[iError].msg );
    8982             :         }
    8983             :         else
    8984             :         {
    8985         265 :             CPLError( eErrClass,
    8986         265 :                     (*paoErrors)[iError].no,
    8987             :                     "%s",
    8988         265 :                     (*paoErrors)[iError].msg );
    8989             :         }
    8990             :     }
    8991             : 
    8992        2501 :     if( bSuccess )
    8993             :     {
    8994        2385 :         CPLErrorReset();
    8995             :     }
    8996        2501 : }
    8997             : 
    8998          55 : SWIGINTERN GDALInfoOptions *new_GDALInfoOptions(char **options){
    8999          55 :         return GDALInfoOptionsNew(options, NULL);
    9000             :     }
    9001          55 : SWIGINTERN void delete_GDALInfoOptions(GDALInfoOptions *self){
    9002          55 :         GDALInfoOptionsFree( self );
    9003          55 :     }
    9004          36 : SWIGINTERN GDALVectorInfoOptions *new_GDALVectorInfoOptions(char **options){
    9005          36 :         return GDALVectorInfoOptionsNew(options, NULL);
    9006             :     }
    9007          36 : SWIGINTERN void delete_GDALVectorInfoOptions(GDALVectorInfoOptions *self){
    9008          36 :         GDALVectorInfoOptionsFree( self );
    9009          36 :     }
    9010          28 : SWIGINTERN GDALMultiDimInfoOptions *new_GDALMultiDimInfoOptions(char **options){
    9011          28 :         return GDALMultiDimInfoOptionsNew(options, NULL);
    9012             :     }
    9013          28 : SWIGINTERN void delete_GDALMultiDimInfoOptions(GDALMultiDimInfoOptions *self){
    9014          28 :         GDALMultiDimInfoOptionsFree( self );
    9015          28 :     }
    9016        1993 : SWIGINTERN GDALTranslateOptions *new_GDALTranslateOptions(char **options){
    9017        1993 :         return GDALTranslateOptionsNew(options, NULL);
    9018             :     }
    9019        1989 : SWIGINTERN void delete_GDALTranslateOptions(GDALTranslateOptions *self){
    9020        1989 :         GDALTranslateOptionsFree( self );
    9021        1989 :     }
    9022             : 
    9023        1991 : GDALDatasetShadow* wrapper_GDALTranslate( const char* dest,
    9024             :                                       GDALDatasetShadow* dataset,
    9025             :                                       GDALTranslateOptions* translateOptions,
    9026             :                                       GDALProgressFunc callback=NULL,
    9027             :                                       void* callback_data=NULL)
    9028             : {
    9029        1991 :     int usageError; /* ignored */
    9030        1991 :     bool bFreeOptions = false;
    9031        1991 :     if( callback )
    9032             :     {
    9033           3 :         if( translateOptions == NULL )
    9034             :         {
    9035           1 :             bFreeOptions = true;
    9036           1 :             translateOptions = GDALTranslateOptionsNew(NULL, NULL);
    9037             :         }
    9038           3 :         GDALTranslateOptionsSetProgress(translateOptions, callback, callback_data);
    9039             :     }
    9040             : #ifdef SWIGPYTHON
    9041        1991 :     std::vector<ErrorStruct> aoErrors;
    9042        2835 :     if( GetUseExceptions() )
    9043             :     {
    9044         860 :         PushStackingErrorHandler(&aoErrors);
    9045             :     }
    9046             : #endif
    9047        1991 :     GDALDatasetH hDSRet = GDALTranslate(dest, dataset, translateOptions, &usageError);
    9048        1991 :     if( bFreeOptions )
    9049           1 :         GDALTranslateOptionsFree(translateOptions);
    9050             : #ifdef SWIGPYTHON
    9051        2835 :     if( GetUseExceptions() )
    9052             :     {
    9053         860 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9054             :     }
    9055             : #endif
    9056        1991 :     return hDSRet;
    9057             : }
    9058             : 
    9059         774 : SWIGINTERN GDALWarpAppOptions *new_GDALWarpAppOptions(char **options){
    9060         774 :         return GDALWarpAppOptionsNew(options, NULL);
    9061             :     }
    9062         772 : SWIGINTERN void delete_GDALWarpAppOptions(GDALWarpAppOptions *self){
    9063         772 :         GDALWarpAppOptionsFree( self );
    9064         772 :     }
    9065             : 
    9066             : 
    9067          86 : int wrapper_GDALWarpDestDS( GDALDatasetShadow* dstDS,
    9068             :                             int object_list_count, GDALDatasetShadow** poObjects,
    9069             :                             GDALWarpAppOptions* warpAppOptions,
    9070             :                             GDALProgressFunc callback=NULL,
    9071             :                             void* callback_data=NULL)
    9072             : {
    9073          86 :     int usageError; /* ignored */
    9074          86 :     bool bFreeOptions = false;
    9075          86 :     if( callback )
    9076             :     {
    9077           1 :         if( warpAppOptions == NULL )
    9078             :         {
    9079           1 :             bFreeOptions = true;
    9080           1 :             warpAppOptions = GDALWarpAppOptionsNew(NULL, NULL);
    9081             :         }
    9082           1 :         GDALWarpAppOptionsSetProgress(warpAppOptions, callback, callback_data);
    9083             :     }
    9084             : #ifdef SWIGPYTHON
    9085          86 :     std::vector<ErrorStruct> aoErrors;
    9086         166 :     if( GetUseExceptions() )
    9087             :     {
    9088          86 :         PushStackingErrorHandler(&aoErrors);
    9089             :     }
    9090             : #endif
    9091          86 :     bool bRet = (GDALWarp(NULL, dstDS, object_list_count, poObjects, warpAppOptions, &usageError) != NULL);
    9092          86 :     if( bFreeOptions )
    9093           1 :         GDALWarpAppOptionsFree(warpAppOptions);
    9094             : #ifdef SWIGPYTHON
    9095         166 :     if( GetUseExceptions() )
    9096             :     {
    9097          86 :         PopStackingErrorHandler(&aoErrors, bRet);
    9098             :     }
    9099             : #endif
    9100          86 :     return bRet;
    9101             : }
    9102             : 
    9103             : 
    9104         689 : GDALDatasetShadow* wrapper_GDALWarpDestName( const char* dest,
    9105             :                                              int object_list_count, GDALDatasetShadow** poObjects,
    9106             :                                              GDALWarpAppOptions* warpAppOptions,
    9107             :                                              GDALProgressFunc callback=NULL,
    9108             :                                              void* callback_data=NULL)
    9109             : {
    9110         689 :     int usageError; /* ignored */
    9111         689 :     bool bFreeOptions = false;
    9112         689 :     if( callback )
    9113             :     {
    9114           2 :         if( warpAppOptions == NULL )
    9115             :         {
    9116           1 :             bFreeOptions = true;
    9117           1 :             warpAppOptions = GDALWarpAppOptionsNew(NULL, NULL);
    9118             :         }
    9119           2 :         GDALWarpAppOptionsSetProgress(warpAppOptions, callback, callback_data);
    9120             :     }
    9121             : #ifdef SWIGPYTHON
    9122         689 :     std::vector<ErrorStruct> aoErrors;
    9123        1335 :     if( GetUseExceptions() )
    9124             :     {
    9125         665 :         PushStackingErrorHandler(&aoErrors);
    9126             :     }
    9127             : #endif
    9128         689 :     GDALDatasetH hDSRet = GDALWarp(dest, NULL, object_list_count, poObjects, warpAppOptions, &usageError);
    9129         689 :     if( bFreeOptions )
    9130           1 :         GDALWarpAppOptionsFree(warpAppOptions);
    9131             : #ifdef SWIGPYTHON
    9132        1335 :     if( GetUseExceptions() )
    9133             :     {
    9134         665 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9135             :     }
    9136             : #endif
    9137         689 :     return hDSRet;
    9138             : }
    9139             : 
    9140         648 : SWIGINTERN GDALVectorTranslateOptions *new_GDALVectorTranslateOptions(char **options){
    9141         648 :         return GDALVectorTranslateOptionsNew(options, NULL);
    9142             :     }
    9143         621 : SWIGINTERN void delete_GDALVectorTranslateOptions(GDALVectorTranslateOptions *self){
    9144         621 :         GDALVectorTranslateOptionsFree( self );
    9145         621 :     }
    9146             : 
    9147          12 : int wrapper_GDALVectorTranslateDestDS( GDALDatasetShadow* dstDS,
    9148             :                                        GDALDatasetShadow* srcDS,
    9149             :                             GDALVectorTranslateOptions* options,
    9150             :                             GDALProgressFunc callback=NULL,
    9151             :                             void* callback_data=NULL)
    9152             : {
    9153          12 :     int usageError; /* ignored */
    9154          12 :     bool bFreeOptions = false;
    9155          12 :     if( callback )
    9156             :     {
    9157           0 :         if( options == NULL )
    9158             :         {
    9159           0 :             bFreeOptions = true;
    9160           0 :             options = GDALVectorTranslateOptionsNew(NULL, NULL);
    9161             :         }
    9162           0 :         GDALVectorTranslateOptionsSetProgress(options, callback, callback_data);
    9163             :     }
    9164             : #ifdef SWIGPYTHON
    9165          12 :     std::vector<ErrorStruct> aoErrors;
    9166          19 :     if( GetUseExceptions() )
    9167             :     {
    9168          11 :         PushStackingErrorHandler(&aoErrors);
    9169             :     }
    9170             : #endif
    9171          12 :     bool bRet = (GDALVectorTranslate(NULL, dstDS, 1, &srcDS, options, &usageError) != NULL);
    9172          12 :     if( bFreeOptions )
    9173           0 :         GDALVectorTranslateOptionsFree(options);
    9174             : #ifdef SWIGPYTHON
    9175          19 :     if( GetUseExceptions() )
    9176             :     {
    9177          11 :         PopStackingErrorHandler(&aoErrors, bRet);
    9178             :     }
    9179             : #endif
    9180          12 :     return bRet;
    9181             : }
    9182             : 
    9183             : 
    9184         597 : GDALDatasetShadow* wrapper_GDALVectorTranslateDestName( const char* dest,
    9185             :                                              GDALDatasetShadow* srcDS,
    9186             :                                              GDALVectorTranslateOptions* options,
    9187             :                                              GDALProgressFunc callback=NULL,
    9188             :                                              void* callback_data=NULL)
    9189             : {
    9190         597 :     int usageError; /* ignored */
    9191         597 :     bool bFreeOptions = false;
    9192         597 :     if( callback )
    9193             :     {
    9194           3 :         if( options == NULL )
    9195             :         {
    9196           0 :             bFreeOptions = true;
    9197           0 :             options = GDALVectorTranslateOptionsNew(NULL, NULL);
    9198             :         }
    9199           3 :         GDALVectorTranslateOptionsSetProgress(options, callback, callback_data);
    9200             :     }
    9201             : #ifdef SWIGPYTHON
    9202         597 :     std::vector<ErrorStruct> aoErrors;
    9203         981 :     if( GetUseExceptions() )
    9204             :     {
    9205         446 :         PushStackingErrorHandler(&aoErrors);
    9206             :     }
    9207             : #endif
    9208         597 :     GDALDatasetH hDSRet = GDALVectorTranslate(dest, NULL, 1, &srcDS, options, &usageError);
    9209         597 :     if( bFreeOptions )
    9210           0 :         GDALVectorTranslateOptionsFree(options);
    9211             : #ifdef SWIGPYTHON
    9212         981 :     if( GetUseExceptions() )
    9213             :     {
    9214         446 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9215             :     }
    9216             : #endif
    9217         597 :     return hDSRet;
    9218             : }
    9219             : 
    9220          81 : SWIGINTERN GDALDEMProcessingOptions *new_GDALDEMProcessingOptions(char **options){
    9221          81 :         return GDALDEMProcessingOptionsNew(options, NULL);
    9222             :     }
    9223          77 : SWIGINTERN void delete_GDALDEMProcessingOptions(GDALDEMProcessingOptions *self){
    9224          77 :         GDALDEMProcessingOptionsFree( self );
    9225          77 :     }
    9226             : 
    9227          77 : GDALDatasetShadow* wrapper_GDALDEMProcessing( const char* dest,
    9228             :                                       GDALDatasetShadow* dataset,
    9229             :                                       const char* pszProcessing,
    9230             :                                       const char* pszColorFilename,
    9231             :                                       GDALDEMProcessingOptions* options,
    9232             :                                       GDALProgressFunc callback=NULL,
    9233             :                                       void* callback_data=NULL)
    9234             : {
    9235          77 :     int usageError; /* ignored */
    9236          77 :     bool bFreeOptions = false;
    9237          77 :     if( callback )
    9238             :     {
    9239           0 :         if( options == NULL )
    9240             :         {
    9241           0 :             bFreeOptions = true;
    9242           0 :             options = GDALDEMProcessingOptionsNew(NULL, NULL);
    9243             :         }
    9244           0 :         GDALDEMProcessingOptionsSetProgress(options, callback, callback_data);
    9245             :     }
    9246             : #ifdef SWIGPYTHON
    9247          77 :     std::vector<ErrorStruct> aoErrors;
    9248         154 :     if( GetUseExceptions() )
    9249             :     {
    9250          77 :         PushStackingErrorHandler(&aoErrors);
    9251             :     }
    9252             : #endif
    9253          77 :     GDALDatasetH hDSRet = GDALDEMProcessing(dest, dataset, pszProcessing, pszColorFilename, options, &usageError);
    9254          77 :     if( bFreeOptions )
    9255           0 :         GDALDEMProcessingOptionsFree(options);
    9256             : #ifdef SWIGPYTHON
    9257         154 :     if( GetUseExceptions() )
    9258             :     {
    9259          77 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9260             :     }
    9261             : #endif
    9262          77 :     return hDSRet;
    9263             : }
    9264             : 
    9265          45 : SWIGINTERN GDALNearblackOptions *new_GDALNearblackOptions(char **options){
    9266          45 :         return GDALNearblackOptionsNew(options, NULL);
    9267             :     }
    9268          45 : SWIGINTERN void delete_GDALNearblackOptions(GDALNearblackOptions *self){
    9269          45 :         GDALNearblackOptionsFree( self );
    9270          45 :     }
    9271             : 
    9272           2 : int wrapper_GDALNearblackDestDS( GDALDatasetShadow* dstDS,
    9273             :                             GDALDatasetShadow* srcDS,
    9274             :                             GDALNearblackOptions* options,
    9275             :                             GDALProgressFunc callback=NULL,
    9276             :                             void* callback_data=NULL)
    9277             : {
    9278           2 :     int usageError; /* ignored */
    9279           2 :     bool bFreeOptions = false;
    9280           2 :     if( callback )
    9281             :     {
    9282           0 :         if( options == NULL )
    9283             :         {
    9284           0 :             bFreeOptions = true;
    9285           0 :             options = GDALNearblackOptionsNew(NULL, NULL);
    9286             :         }
    9287           0 :         GDALNearblackOptionsSetProgress(options, callback, callback_data);
    9288             :     }
    9289             : #ifdef SWIGPYTHON
    9290           2 :     std::vector<ErrorStruct> aoErrors;
    9291           4 :     if( GetUseExceptions() )
    9292             :     {
    9293           2 :         PushStackingErrorHandler(&aoErrors);
    9294             :     }
    9295             : #endif
    9296           2 :     bool bRet = (GDALNearblack(NULL, dstDS, srcDS, options, &usageError) != NULL);
    9297           2 :     if( bFreeOptions )
    9298           0 :         GDALNearblackOptionsFree(options);
    9299             : #ifdef SWIGPYTHON
    9300           4 :     if( GetUseExceptions() )
    9301             :     {
    9302           2 :         PopStackingErrorHandler(&aoErrors, bRet);
    9303             :     }
    9304             : #endif
    9305           2 :     return bRet;
    9306             : }
    9307             : 
    9308             : 
    9309          43 : GDALDatasetShadow* wrapper_GDALNearblackDestName( const char* dest,
    9310             :                                              GDALDatasetShadow* srcDS,
    9311             :                                              GDALNearblackOptions* options,
    9312             :                                              GDALProgressFunc callback=NULL,
    9313             :                                              void* callback_data=NULL)
    9314             : {
    9315          43 :     int usageError; /* ignored */
    9316          43 :     bool bFreeOptions = false;
    9317          43 :     if( callback )
    9318             :     {
    9319           0 :         if( options == NULL )
    9320             :         {
    9321           0 :             bFreeOptions = true;
    9322           0 :             options = GDALNearblackOptionsNew(NULL, NULL);
    9323             :         }
    9324           0 :         GDALNearblackOptionsSetProgress(options, callback, callback_data);
    9325             :     }
    9326             : #ifdef SWIGPYTHON
    9327          43 :     std::vector<ErrorStruct> aoErrors;
    9328          86 :     if( GetUseExceptions() )
    9329             :     {
    9330          43 :         PushStackingErrorHandler(&aoErrors);
    9331             :     }
    9332             : #endif
    9333          43 :     GDALDatasetH hDSRet = GDALNearblack(dest, NULL, srcDS, options, &usageError);
    9334          43 :     if( bFreeOptions )
    9335           0 :         GDALNearblackOptionsFree(options);
    9336             : #ifdef SWIGPYTHON
    9337          86 :     if( GetUseExceptions() )
    9338             :     {
    9339          43 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9340             :     }
    9341             : #endif
    9342          43 :     return hDSRet;
    9343             : }
    9344             : 
    9345          52 : SWIGINTERN GDALGridOptions *new_GDALGridOptions(char **options){
    9346          52 :         return GDALGridOptionsNew(options, NULL);
    9347             :     }
    9348          52 : SWIGINTERN void delete_GDALGridOptions(GDALGridOptions *self){
    9349          52 :         GDALGridOptionsFree( self );
    9350          52 :     }
    9351             : 
    9352          52 : GDALDatasetShadow* wrapper_GDALGrid( const char* dest,
    9353             :                                       GDALDatasetShadow* dataset,
    9354             :                                       GDALGridOptions* options,
    9355             :                                       GDALProgressFunc callback=NULL,
    9356             :                                       void* callback_data=NULL)
    9357             : {
    9358          52 :     int usageError; /* ignored */
    9359          52 :     bool bFreeOptions = false;
    9360          52 :     if( callback )
    9361             :     {
    9362           0 :         if( options == NULL )
    9363             :         {
    9364           0 :             bFreeOptions = true;
    9365           0 :             options = GDALGridOptionsNew(NULL, NULL);
    9366             :         }
    9367           0 :         GDALGridOptionsSetProgress(options, callback, callback_data);
    9368             :     }
    9369             : #ifdef SWIGPYTHON
    9370          52 :     std::vector<ErrorStruct> aoErrors;
    9371         103 :     if( GetUseExceptions() )
    9372             :     {
    9373          51 :         PushStackingErrorHandler(&aoErrors);
    9374             :     }
    9375             : #endif
    9376          52 :     GDALDatasetH hDSRet = GDALGrid(dest, dataset, options, &usageError);
    9377          52 :     if( bFreeOptions )
    9378           0 :         GDALGridOptionsFree(options);
    9379             : #ifdef SWIGPYTHON
    9380         103 :     if( GetUseExceptions() )
    9381             :     {
    9382          51 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9383             :     }
    9384             : #endif
    9385          52 :     return hDSRet;
    9386             : }
    9387             : 
    9388          12 : SWIGINTERN GDALContourOptions *new_GDALContourOptions(char **options){
    9389          12 :             return GDALContourOptionsNew(options, NULL);
    9390             :         }
    9391          12 : SWIGINTERN void delete_GDALContourOptions(GDALContourOptions *self){
    9392          12 :             GDALContourOptionsFree( self );
    9393          12 :         }
    9394             : 
    9395             : 
    9396           6 : int wrapper_GDALContourDestDS(  GDALDatasetShadow* dstDS,
    9397             :                                 GDALDatasetShadow* srcDS,
    9398             :                                 GDALContourOptions* options,
    9399             :                                 GDALProgressFunc callback=NULL,
    9400             :                                 void* callback_data=NULL)
    9401             : {
    9402           6 :     bool bFreeOptions = false;
    9403           6 :     if( callback )
    9404             :     {
    9405           0 :         if( options == NULL )
    9406             :         {
    9407           0 :             bFreeOptions = true;
    9408           0 :             options = GDALContourOptionsNew(NULL, NULL);
    9409             :         }
    9410           0 :         GDALContourOptionsSetProgress(options, callback, callback_data);
    9411             :     }
    9412             : 
    9413             : #ifdef SWIGPYTHON
    9414           6 :     std::vector<ErrorStruct> aoErrors;
    9415          12 :     if( GetUseExceptions() )
    9416             :     {
    9417           6 :         PushStackingErrorHandler(&aoErrors);
    9418             :     }
    9419             : #endif
    9420             : 
    9421           6 :     char** papszStringOptions = NULL;
    9422           6 :     GDALRasterBandH hBand = NULL;
    9423           6 :     OGRLayerH hLayer = NULL;
    9424           6 :     const CPLErr err = GDALContourProcessOptions(options, &papszStringOptions, &srcDS, &hBand, &dstDS, &hLayer);
    9425           6 :     bool bRet = (err == CE_None && GDALContourGenerateEx(hBand, hLayer, papszStringOptions, callback, callback_data) == CE_None);
    9426           6 :     if( bFreeOptions )
    9427           0 :         GDALContourOptionsFree(options);
    9428             : #ifdef SWIGPYTHON
    9429          12 :     if( GetUseExceptions() )
    9430             :     {
    9431           6 :         PopStackingErrorHandler(&aoErrors, bRet);
    9432             :     }
    9433             : #endif
    9434           6 :     CSLDestroy(papszStringOptions);
    9435           6 :     return bRet;
    9436             : }
    9437             : 
    9438             : 
    9439           6 : GDALDatasetShadow* wrapper_GDALContourDestName( const char* dest,
    9440             :                                                   GDALDatasetShadow* srcDS,
    9441             :                                                   GDALContourOptions* options,
    9442             :                                                   GDALProgressFunc callback=NULL,
    9443             :                                                   void* callback_data=NULL)
    9444             : {
    9445           6 :     bool bFreeOptions = false;
    9446           6 :     if( callback )
    9447             :     {
    9448           0 :         if( options == NULL )
    9449             :         {
    9450           0 :             bFreeOptions = true;
    9451           0 :             options = GDALContourOptionsNew(NULL, NULL);
    9452             :         }
    9453           0 :         GDALContourOptionsSetProgress(options, callback, callback_data);
    9454             :     }
    9455             : 
    9456             : #ifdef SWIGPYTHON
    9457           6 :     std::vector<ErrorStruct> aoErrors;
    9458          12 :     if( GetUseExceptions() )
    9459             :     {
    9460           6 :         PushStackingErrorHandler(&aoErrors);
    9461             :     }
    9462             : #endif
    9463             : 
    9464           6 :     GDALContourOptionsSetDestDataSource(options, dest);
    9465           6 :     char** papszStringOptions = NULL;
    9466           6 :     GDALRasterBandH hBand = NULL;
    9467           6 :     OGRLayerH hLayer = NULL;
    9468           6 :     GDALDatasetH dstDS = NULL;
    9469           6 :     CPLErr err = GDALContourProcessOptions(options, &papszStringOptions, &srcDS, &hBand, &dstDS, &hLayer);
    9470           6 :     if (err == CE_None )
    9471             :     {
    9472           6 :         err = GDALContourGenerateEx(hBand, hLayer, papszStringOptions, callback, callback_data);
    9473             :     }
    9474             : 
    9475           6 :     if( bFreeOptions )
    9476           0 :         GDALContourOptionsFree(options);
    9477             : #ifdef SWIGPYTHON
    9478          12 :     if( GetUseExceptions() )
    9479             :     {
    9480           6 :         PopStackingErrorHandler(&aoErrors, dstDS != NULL);
    9481             :     }
    9482             : #endif
    9483           6 :     CSLDestroy(papszStringOptions);
    9484           6 :     return dstDS;
    9485             : }
    9486             : 
    9487          23 : SWIGINTERN GDALRasterizeOptions *new_GDALRasterizeOptions(char **options){
    9488          23 :         return GDALRasterizeOptionsNew(options, NULL);
    9489             :     }
    9490          23 : SWIGINTERN void delete_GDALRasterizeOptions(GDALRasterizeOptions *self){
    9491          23 :         GDALRasterizeOptionsFree( self );
    9492          23 :     }
    9493             : 
    9494          13 : int wrapper_GDALRasterizeDestDS( GDALDatasetShadow* dstDS,
    9495             :                             GDALDatasetShadow* srcDS,
    9496             :                             GDALRasterizeOptions* options,
    9497             :                             GDALProgressFunc callback=NULL,
    9498             :                             void* callback_data=NULL)
    9499             : {
    9500          13 :     int usageError; /* ignored */
    9501          13 :     bool bFreeOptions = false;
    9502          13 :     if( callback )
    9503             :     {
    9504           0 :         if( options == NULL )
    9505             :         {
    9506           0 :             bFreeOptions = true;
    9507           0 :             options = GDALRasterizeOptionsNew(NULL, NULL);
    9508             :         }
    9509           0 :         GDALRasterizeOptionsSetProgress(options, callback, callback_data);
    9510             :     }
    9511             : #ifdef SWIGPYTHON
    9512          13 :     std::vector<ErrorStruct> aoErrors;
    9513          26 :     if( GetUseExceptions() )
    9514             :     {
    9515          13 :         PushStackingErrorHandler(&aoErrors);
    9516             :     }
    9517             : #endif
    9518          13 :     bool bRet = (GDALRasterize(NULL, dstDS, srcDS, options, &usageError) != NULL);
    9519          13 :     if( bFreeOptions )
    9520           0 :         GDALRasterizeOptionsFree(options);
    9521             : #ifdef SWIGPYTHON
    9522          26 :     if( GetUseExceptions() )
    9523             :     {
    9524          13 :         PopStackingErrorHandler(&aoErrors, bRet);
    9525             :     }
    9526             : #endif
    9527          13 :     return bRet;
    9528             : }
    9529             : 
    9530             : 
    9531          10 : GDALDatasetShadow* wrapper_GDALRasterizeDestName( const char* dest,
    9532             :                                              GDALDatasetShadow* srcDS,
    9533             :                                              GDALRasterizeOptions* options,
    9534             :                                              GDALProgressFunc callback=NULL,
    9535             :                                              void* callback_data=NULL)
    9536             : {
    9537          10 :     int usageError; /* ignored */
    9538          10 :     bool bFreeOptions = false;
    9539          10 :     if( callback )
    9540             :     {
    9541           0 :         if( options == NULL )
    9542             :         {
    9543           0 :             bFreeOptions = true;
    9544           0 :             options = GDALRasterizeOptionsNew(NULL, NULL);
    9545             :         }
    9546           0 :         GDALRasterizeOptionsSetProgress(options, callback, callback_data);
    9547             :     }
    9548             : #ifdef SWIGPYTHON
    9549          10 :     std::vector<ErrorStruct> aoErrors;
    9550          17 :     if( GetUseExceptions() )
    9551             :     {
    9552          10 :         PushStackingErrorHandler(&aoErrors);
    9553             :     }
    9554             : #endif
    9555          10 :     GDALDatasetH hDSRet = GDALRasterize(dest, NULL, srcDS, options, &usageError);
    9556          10 :     if( bFreeOptions )
    9557           0 :         GDALRasterizeOptionsFree(options);
    9558             : #ifdef SWIGPYTHON
    9559          17 :     if( GetUseExceptions() )
    9560             :     {
    9561          10 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9562             :     }
    9563             : #endif
    9564          10 :     return hDSRet;
    9565             : }
    9566             : 
    9567          39 : SWIGINTERN GDALFootprintOptions *new_GDALFootprintOptions(char **options){
    9568          39 :         return GDALFootprintOptionsNew(options, NULL);
    9569             :     }
    9570          37 : SWIGINTERN void delete_GDALFootprintOptions(GDALFootprintOptions *self){
    9571          37 :         GDALFootprintOptionsFree( self );
    9572          37 :     }
    9573             : 
    9574           3 : int wrapper_GDALFootprintDestDS( GDALDatasetShadow* dstDS,
    9575             :                             GDALDatasetShadow* srcDS,
    9576             :                             GDALFootprintOptions* options,
    9577             :                             GDALProgressFunc callback=NULL,
    9578             :                             void* callback_data=NULL)
    9579             : {
    9580           3 :     int usageError; /* ignored */
    9581           3 :     bool bFreeOptions = false;
    9582           3 :     if( callback )
    9583             :     {
    9584           0 :         if( options == NULL )
    9585             :         {
    9586           0 :             bFreeOptions = true;
    9587           0 :             options = GDALFootprintOptionsNew(NULL, NULL);
    9588             :         }
    9589           0 :         GDALFootprintOptionsSetProgress(options, callback, callback_data);
    9590             :     }
    9591             : #ifdef SWIGPYTHON
    9592           3 :     std::vector<ErrorStruct> aoErrors;
    9593           6 :     if( GetUseExceptions() )
    9594             :     {
    9595           3 :         PushStackingErrorHandler(&aoErrors);
    9596             :     }
    9597             : #endif
    9598           3 :     bool bRet = (GDALFootprint(NULL, dstDS, srcDS, options, &usageError) != NULL);
    9599           3 :     if( bFreeOptions )
    9600           0 :         GDALFootprintOptionsFree(options);
    9601             : #ifdef SWIGPYTHON
    9602           6 :     if( GetUseExceptions() )
    9603             :     {
    9604           3 :         PopStackingErrorHandler(&aoErrors, bRet);
    9605             :     }
    9606             : #endif
    9607           3 :     return bRet;
    9608             : }
    9609             : 
    9610             : 
    9611          34 : GDALDatasetShadow* wrapper_GDALFootprintDestName( const char* dest,
    9612             :                                              GDALDatasetShadow* srcDS,
    9613             :                                              GDALFootprintOptions* options,
    9614             :                                              GDALProgressFunc callback=NULL,
    9615             :                                              void* callback_data=NULL)
    9616             : {
    9617          34 :     int usageError; /* ignored */
    9618          34 :     bool bFreeOptions = false;
    9619          34 :     if( callback )
    9620             :     {
    9621           0 :         if( options == NULL )
    9622             :         {
    9623           0 :             bFreeOptions = true;
    9624           0 :             options = GDALFootprintOptionsNew(NULL, NULL);
    9625             :         }
    9626           0 :         GDALFootprintOptionsSetProgress(options, callback, callback_data);
    9627             :     }
    9628             : #ifdef SWIGPYTHON
    9629          34 :     std::vector<ErrorStruct> aoErrors;
    9630          68 :     if( GetUseExceptions() )
    9631             :     {
    9632          34 :         PushStackingErrorHandler(&aoErrors);
    9633             :     }
    9634             : #endif
    9635          34 :     GDALDatasetH hDSRet = GDALFootprint(dest, NULL, srcDS, options, &usageError);
    9636          34 :     if( bFreeOptions )
    9637           0 :         GDALFootprintOptionsFree(options);
    9638             : #ifdef SWIGPYTHON
    9639          68 :     if( GetUseExceptions() )
    9640             :     {
    9641          34 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9642             :     }
    9643             : #endif
    9644          34 :     return hDSRet;
    9645             : }
    9646             : 
    9647         171 : SWIGINTERN GDALBuildVRTOptions *new_GDALBuildVRTOptions(char **options){
    9648         171 :         return GDALBuildVRTOptionsNew(options, NULL);
    9649             :     }
    9650         168 : SWIGINTERN void delete_GDALBuildVRTOptions(GDALBuildVRTOptions *self){
    9651         168 :         GDALBuildVRTOptionsFree( self );
    9652         168 :     }
    9653             : 
    9654          68 : GDALDatasetShadow* wrapper_GDALBuildVRT_objects( const char* dest,
    9655             :                                              int object_list_count, GDALDatasetShadow** poObjects,
    9656             :                                              GDALBuildVRTOptions* options,
    9657             :                                              GDALProgressFunc callback=NULL,
    9658             :                                              void* callback_data=NULL)
    9659             : {
    9660          68 :     int usageError; /* ignored */
    9661          68 :     bool bFreeOptions = false;
    9662          68 :     if( callback )
    9663             :     {
    9664           0 :         if( options == NULL )
    9665             :         {
    9666           0 :             bFreeOptions = true;
    9667           0 :             options = GDALBuildVRTOptionsNew(NULL, NULL);
    9668             :         }
    9669           0 :         GDALBuildVRTOptionsSetProgress(options, callback, callback_data);
    9670             :     }
    9671             : #ifdef SWIGPYTHON
    9672          68 :     std::vector<ErrorStruct> aoErrors;
    9673         114 :     if( GetUseExceptions() )
    9674             :     {
    9675          55 :         PushStackingErrorHandler(&aoErrors);
    9676             :     }
    9677             : #endif
    9678          68 :     GDALDatasetH hDSRet = GDALBuildVRT(dest, object_list_count, poObjects, NULL, options, &usageError);
    9679          68 :     if( bFreeOptions )
    9680           0 :         GDALBuildVRTOptionsFree(options);
    9681             : #ifdef SWIGPYTHON
    9682         114 :     if( GetUseExceptions() )
    9683             :     {
    9684          55 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9685             :     }
    9686             : #endif
    9687          68 :     return hDSRet;
    9688             : }
    9689             : 
    9690             : 
    9691         100 : GDALDatasetShadow* wrapper_GDALBuildVRT_names( const char* dest,
    9692             :                                          char ** source_filenames,
    9693             :                                          GDALBuildVRTOptions* options,
    9694             :                                          GDALProgressFunc callback=NULL,
    9695             :                                          void* callback_data=NULL)
    9696             : {
    9697         100 :     int usageError; /* ignored */
    9698         100 :     bool bFreeOptions = false;
    9699         100 :     if( callback )
    9700             :     {
    9701           1 :         if( options == NULL )
    9702             :         {
    9703           0 :             bFreeOptions = true;
    9704           0 :             options = GDALBuildVRTOptionsNew(NULL, NULL);
    9705             :         }
    9706           1 :         GDALBuildVRTOptionsSetProgress(options, callback, callback_data);
    9707             :     }
    9708             : #ifdef SWIGPYTHON
    9709         100 :     std::vector<ErrorStruct> aoErrors;
    9710         173 :     if( GetUseExceptions() )
    9711             :     {
    9712          85 :         PushStackingErrorHandler(&aoErrors);
    9713             :     }
    9714             : #endif
    9715         100 :     GDALDatasetH hDSRet = GDALBuildVRT(dest, CSLCount(source_filenames), NULL, source_filenames, options, &usageError);
    9716         100 :     if( bFreeOptions )
    9717           0 :         GDALBuildVRTOptionsFree(options);
    9718             : #ifdef SWIGPYTHON
    9719         173 :     if( GetUseExceptions() )
    9720             :     {
    9721          85 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9722             :     }
    9723             : #endif
    9724         100 :     return hDSRet;
    9725             : }
    9726             : 
    9727          23 : SWIGINTERN GDALTileIndexOptions *new_GDALTileIndexOptions(char **options){
    9728          23 :         return GDALTileIndexOptionsNew(options, NULL);
    9729             :     }
    9730          23 : SWIGINTERN void delete_GDALTileIndexOptions(GDALTileIndexOptions *self){
    9731          23 :         GDALTileIndexOptionsFree( self );
    9732          23 :     }
    9733             : 
    9734          23 : GDALDatasetShadow* wrapper_TileIndex_names( const char* dest,
    9735             :                                             char ** source_filenames,
    9736             :                                             GDALTileIndexOptions* options,
    9737             :                                             GDALProgressFunc callback=NULL,
    9738             :                                             void* callback_data=NULL)
    9739             : {
    9740          23 :     int usageError; /* ignored */
    9741             : #if 0
    9742             :     bool bFreeOptions = false;
    9743             :     if( callback )
    9744             :     {
    9745             :         if( options == NULL )
    9746             :         {
    9747             :             bFreeOptions = true;
    9748             :             options = GDALTileIndexOptionsNew(NULL, NULL);
    9749             :         }
    9750             :         GDALTileIndexOptionsSetProgress(options, callback, callback_data);
    9751             :     }
    9752             : #endif
    9753             : 
    9754             : #ifdef SWIGPYTHON
    9755          23 :     std::vector<ErrorStruct> aoErrors;
    9756          46 :     if( GetUseExceptions() )
    9757             :     {
    9758          23 :         PushStackingErrorHandler(&aoErrors);
    9759             :     }
    9760             : #endif
    9761          23 :     GDALDatasetH hDSRet = GDALTileIndex(dest, CSLCount(source_filenames), source_filenames, options, &usageError);
    9762             : #if 0
    9763             :     if( bFreeOptions )
    9764             :         GDALTileIndexOptionsFree(options);
    9765             : #endif
    9766             : #ifdef SWIGPYTHON
    9767          46 :     if( GetUseExceptions() )
    9768             :     {
    9769          23 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9770             :     }
    9771             : #endif
    9772          23 :     return hDSRet;
    9773             : }
    9774             : 
    9775         104 : SWIGINTERN GDALMultiDimTranslateOptions *new_GDALMultiDimTranslateOptions(char **options){
    9776         104 :         return GDALMultiDimTranslateOptionsNew(options, NULL);
    9777             :     }
    9778         104 : SWIGINTERN void delete_GDALMultiDimTranslateOptions(GDALMultiDimTranslateOptions *self){
    9779         104 :         GDALMultiDimTranslateOptionsFree( self );
    9780         104 :     }
    9781             : 
    9782         104 : GDALDatasetShadow* wrapper_GDALMultiDimTranslateDestName( const char* dest,
    9783             :                                              int object_list_count, GDALDatasetShadow** poObjects,
    9784             :                                              GDALMultiDimTranslateOptions* multiDimTranslateOptions,
    9785             :                                              GDALProgressFunc callback=NULL,
    9786             :                                              void* callback_data=NULL)
    9787             : {
    9788         104 :     int usageError; /* ignored */
    9789         104 :     bool bFreeOptions = false;
    9790         104 :     if( callback )
    9791             :     {
    9792           0 :         if( multiDimTranslateOptions == NULL )
    9793             :         {
    9794           0 :             bFreeOptions = true;
    9795           0 :             multiDimTranslateOptions = GDALMultiDimTranslateOptionsNew(NULL, NULL);
    9796             :         }
    9797           0 :         GDALMultiDimTranslateOptionsSetProgress(multiDimTranslateOptions, callback, callback_data);
    9798             :     }
    9799             : #ifdef SWIGPYTHON
    9800         104 :     std::vector<ErrorStruct> aoErrors;
    9801         129 :     if( GetUseExceptions() )
    9802             :     {
    9803          25 :         PushStackingErrorHandler(&aoErrors);
    9804             :     }
    9805             : #endif
    9806         104 :     GDALDatasetH hDSRet = GDALMultiDimTranslate(dest, NULL, object_list_count, poObjects, multiDimTranslateOptions, &usageError);
    9807         104 :     if( bFreeOptions )
    9808           0 :         GDALMultiDimTranslateOptionsFree(multiDimTranslateOptions);
    9809             : #ifdef SWIGPYTHON
    9810         129 :     if( GetUseExceptions() )
    9811             :     {
    9812          25 :         PopStackingErrorHandler(&aoErrors, hDSRet != NULL);
    9813             :     }
    9814             : #endif
    9815         104 :     return hDSRet;
    9816             : }
    9817             : 
    9818             : #ifdef __cplusplus
    9819             : extern "C" {
    9820             : #endif
    9821       10011 : SWIGINTERN PyObject *_wrap_GetUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9822       10011 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9823       10011 :   int result;
    9824             :   
    9825       10011 :   if (!SWIG_Python_UnpackTuple(args, "GetUseExceptions", 0, 0, 0)) SWIG_fail;
    9826       10011 :   {
    9827             : #ifdef SED_HACKS
    9828       10011 :     if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
    9829             : #endif
    9830       10011 :     result = GetUseExceptions();
    9831             :   }
    9832       10011 :   resultobj = SWIG_From_int(static_cast< int >(result));
    9833       10011 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
    9834             :   return resultobj;
    9835           0 : fail:
    9836           0 :   return NULL;
    9837             : }
    9838             : 
    9839             : 
    9840       11390 : SWIGINTERN PyObject *_wrap__GetExceptionsLocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9841       11390 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9842       11390 :   int result;
    9843             :   
    9844       11390 :   if (!SWIG_Python_UnpackTuple(args, "_GetExceptionsLocal", 0, 0, 0)) SWIG_fail;
    9845       11390 :   {
    9846             : #ifdef SED_HACKS
    9847       11390 :     if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
    9848             : #endif
    9849       11390 :     {
    9850       11390 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9851       11390 :       result = (int)_GetExceptionsLocal();
    9852       11390 :       SWIG_PYTHON_THREAD_END_ALLOW;
    9853             :     }
    9854             :   }
    9855       11390 :   resultobj = SWIG_From_int(static_cast< int >(result));
    9856       11390 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
    9857             :   return resultobj;
    9858           0 : fail:
    9859           0 :   return NULL;
    9860             : }
    9861             : 
    9862             : 
    9863       22780 : SWIGINTERN PyObject *_wrap__SetExceptionsLocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9864       22780 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9865       22780 :   int arg1 ;
    9866       22780 :   int val1 ;
    9867       22780 :   int ecode1 = 0 ;
    9868       22780 :   PyObject *swig_obj[1] ;
    9869             :   
    9870       22780 :   if (!args) SWIG_fail;
    9871       22780 :   swig_obj[0] = args;
    9872       22780 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
    9873       22780 :   if (!SWIG_IsOK(ecode1)) {
    9874           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "_SetExceptionsLocal" "', argument " "1"" of type '" "int""'");
    9875             :   } 
    9876       22780 :   arg1 = static_cast< int >(val1);
    9877       22780 :   {
    9878             : #ifdef SED_HACKS
    9879       22780 :     if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
    9880             : #endif
    9881       22780 :     {
    9882       22780 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9883       22780 :       _SetExceptionsLocal(arg1);
    9884       22780 :       SWIG_PYTHON_THREAD_END_ALLOW;
    9885             :     }
    9886             :   }
    9887       22780 :   resultobj = SWIG_Py_Void();
    9888       22780 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
    9889             :   return resultobj;
    9890             : fail:
    9891             :   return NULL;
    9892             : }
    9893             : 
    9894             : 
    9895          29 : SWIGINTERN PyObject *_wrap__UseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9896          29 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9897             :   
    9898          29 :   if (!SWIG_Python_UnpackTuple(args, "_UseExceptions", 0, 0, 0)) SWIG_fail;
    9899          29 :   {
    9900          29 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9901          29 :     _UseExceptions();
    9902          29 :     SWIG_PYTHON_THREAD_END_ALLOW;
    9903             :   }
    9904          29 :   resultobj = SWIG_Py_Void();
    9905          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; } }
    9906             :   return resultobj;
    9907           0 : fail:
    9908           0 :   return NULL;
    9909             : }
    9910             : 
    9911             : 
    9912           5 : SWIGINTERN PyObject *_wrap__DontUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9913           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9914             :   
    9915           5 :   if (!SWIG_Python_UnpackTuple(args, "_DontUseExceptions", 0, 0, 0)) SWIG_fail;
    9916           5 :   {
    9917           5 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9918           5 :     _DontUseExceptions();
    9919           5 :     SWIG_PYTHON_THREAD_END_ALLOW;
    9920             :   }
    9921           5 :   resultobj = SWIG_Py_Void();
    9922           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; } }
    9923             :   return resultobj;
    9924           0 : fail:
    9925           0 :   return NULL;
    9926             : }
    9927             : 
    9928             : 
    9929       57343 : SWIGINTERN PyObject *_wrap__UserHasSpecifiedIfUsingExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9930       57343 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9931       57343 :   int result;
    9932             :   
    9933       57343 :   if (!SWIG_Python_UnpackTuple(args, "_UserHasSpecifiedIfUsingExceptions", 0, 0, 0)) SWIG_fail;
    9934       57343 :   {
    9935             : #ifdef SED_HACKS
    9936       57343 :     if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
    9937             : #endif
    9938       57343 :     {
    9939       57343 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    9940       57343 :       result = (int)_UserHasSpecifiedIfUsingExceptions();
    9941       57343 :       SWIG_PYTHON_THREAD_END_ALLOW;
    9942             :     }
    9943             :   }
    9944       57343 :   resultobj = SWIG_From_int(static_cast< int >(result));
    9945       57343 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
    9946             :   return resultobj;
    9947           0 : fail:
    9948           0 :   return NULL;
    9949             : }
    9950             : 
    9951             : 
    9952       27509 : SWIGINTERN PyObject *_wrap_VSIFReadL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9953       27509 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
    9954       27509 :   void **arg1 = (void **) 0 ;
    9955       27509 :   unsigned int arg2 ;
    9956       27509 :   unsigned int arg3 ;
    9957       27509 :   VSILFILE *arg4 = (VSILFILE *) 0 ;
    9958       27509 :   void *pyObject1 = NULL ;
    9959       27509 :   unsigned int val2 ;
    9960       27509 :   int ecode2 = 0 ;
    9961       27509 :   unsigned int val3 ;
    9962       27509 :   int ecode3 = 0 ;
    9963       27509 :   void *argp4 = 0 ;
    9964       27509 :   int res4 = 0 ;
    9965       27509 :   PyObject *swig_obj[3] ;
    9966       27509 :   unsigned int result;
    9967             :   
    9968       27509 :   {
    9969             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject1 = NULL ) */
    9970       27509 :     arg1 = &pyObject1;
    9971             :   }
    9972       27509 :   if (!SWIG_Python_UnpackTuple(args, "VSIFReadL", 3, 3, swig_obj)) SWIG_fail;
    9973       27509 :   ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[0], &val2);
    9974       27509 :   if (!SWIG_IsOK(ecode2)) {
    9975           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VSIFReadL" "', argument " "2"" of type '" "unsigned int""'");
    9976             :   } 
    9977       27509 :   arg2 = static_cast< unsigned int >(val2);
    9978       27509 :   ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val3);
    9979       27509 :   if (!SWIG_IsOK(ecode3)) {
    9980           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIFReadL" "', argument " "3"" of type '" "unsigned int""'");
    9981             :   } 
    9982       27509 :   arg3 = static_cast< unsigned int >(val3);
    9983       27509 :   res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_VSILFILE, 0 |  0 );
    9984       27509 :   if (!SWIG_IsOK(res4)) {
    9985           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "VSIFReadL" "', argument " "4"" of type '" "VSILFILE *""'"); 
    9986             :   }
    9987       27509 :   arg4 = reinterpret_cast< VSILFILE * >(argp4);
    9988       27509 :   {
    9989       27509 :     if (!arg4) {
    9990           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9991             :     }
    9992             :   }
    9993       27508 :   {
    9994       27508 :     const int bLocalUseExceptions = GetUseExceptions();
    9995       27508 :     if ( bLocalUseExceptions ) {
    9996        1638 :       pushErrorHandler();
    9997             :     }
    9998       27508 :     {
    9999       27508 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10000       27508 :       result = (unsigned int)wrapper_VSIFReadL(arg1,arg2,arg3,arg4);
   10001       27508 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10002             :     }
   10003       27508 :     if ( bLocalUseExceptions ) {
   10004        1638 :       popErrorHandler();
   10005             :     }
   10006             : #ifndef SED_HACKS
   10007             :     if ( bLocalUseExceptions ) {
   10008             :       CPLErr eclass = CPLGetLastErrorType();
   10009             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10010             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10011             :       }
   10012             :     }
   10013             : #endif
   10014             :   }
   10015       27508 :   resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
   10016       27508 :   {
   10017             :     /* %typemap(argout) ( void **outPythonObject ) */
   10018       27508 :     Py_XDECREF(resultobj);
   10019       27508 :     if (*arg1)
   10020             :     {
   10021             :       resultobj = (PyObject*)*arg1;
   10022             :     }
   10023             :     else
   10024             :     {
   10025          12 :       resultobj = Py_None;
   10026          12 :       Py_INCREF(resultobj);
   10027             :     }
   10028             :   }
   10029       27509 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   10030             :   return resultobj;
   10031             : fail:
   10032             :   return NULL;
   10033             : }
   10034             : 
   10035             : 
   10036           2 : SWIGINTERN PyObject *_wrap_VSIGetMemFileBuffer_unsafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10037           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10038           2 :   char *arg1 = (char *) 0 ;
   10039           2 :   GByte **arg2 = (GByte **) 0 ;
   10040           2 :   vsi_l_offset *arg3 = (vsi_l_offset *) 0 ;
   10041           2 :   int bToFree1 = 0 ;
   10042           2 :   GByte *out2 = NULL ;
   10043           2 :   vsi_l_offset length2 ;
   10044           2 :   PyObject *swig_obj[1] ;
   10045             :   
   10046           2 :   {
   10047           2 :     arg2 = &out2;
   10048           2 :     arg3 = &length2;
   10049             :   }
   10050           2 :   if (!args) SWIG_fail;
   10051           2 :   swig_obj[0] = args;
   10052           2 :   {
   10053             :     /* %typemap(in) (const char *utf8_path) */
   10054           2 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   10055             :     {
   10056           2 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   10057             :     }
   10058             :     else
   10059             :     {
   10060           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   10061             :       
   10062             :     }
   10063           2 :     if (arg1 == NULL)
   10064             :     {
   10065           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   10066           0 :       SWIG_fail;
   10067             :     }
   10068             :   }
   10069           2 :   {
   10070           2 :     const int bLocalUseExceptions = GetUseExceptions();
   10071           2 :     if ( bLocalUseExceptions ) {
   10072           0 :       pushErrorHandler();
   10073             :     }
   10074           2 :     {
   10075           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10076           2 :       wrapper_VSIGetMemFileBuffer((char const *)arg1,arg2,arg3);
   10077           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10078             :     }
   10079           2 :     if ( bLocalUseExceptions ) {
   10080           0 :       popErrorHandler();
   10081             :     }
   10082             : #ifndef SED_HACKS
   10083             :     if ( bLocalUseExceptions ) {
   10084             :       CPLErr eclass = CPLGetLastErrorType();
   10085             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10086             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10087             :       }
   10088             :     }
   10089             : #endif
   10090             :   }
   10091           2 :   resultobj = SWIG_Py_Void();
   10092           2 :   {
   10093           2 :     if (*arg2 == NULL) {
   10094           1 :       if( GetUseExceptions() ) {
   10095           0 :         PyErr_SetString(PyExc_RuntimeError, "Could not find path");
   10096             :         resultobj = NULL;
   10097             :       } else {
   10098           1 :         CPLError(CE_Failure, CPLE_AppDefined, "Could not find path");
   10099           1 :         resultobj = Py_None;
   10100           1 :         Py_INCREF(resultobj);
   10101             :       }
   10102             :     } else {
   10103           1 :       do {
   10104           1 :         resultobj = PyMemoryView_FromMemory(reinterpret_cast<char *>(*arg2), *arg3, PyBUF_READ);
   10105           1 :         if (resultobj == NULL) {
   10106           0 :           if( GetUseExceptions() ) {
   10107           0 :             PyErr_SetString(PyExc_RuntimeError, "Could not allocate result buffer");
   10108             :             resultobj = NULL;
   10109             :           } else {
   10110           0 :             CPLError(CE_Failure, CPLE_AppDefined, "Could not allocate result buffer");
   10111           0 :             resultobj = Py_None;
   10112           0 :             Py_INCREF(resultobj);
   10113             :           }
   10114             :         }
   10115             :       } while(0);
   10116             :     }
   10117             :   }
   10118           2 :   {
   10119             :     /* %typemap(freearg) (const char *utf8_path) */
   10120           2 :     GDALPythonFreeCStr(arg1, bToFree1);
   10121             :   }
   10122           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; } }
   10123             :   return resultobj;
   10124           0 : fail:
   10125           0 :   {
   10126             :     /* %typemap(freearg) (const char *utf8_path) */
   10127           2 :     GDALPythonFreeCStr(arg1, bToFree1);
   10128             :   }
   10129             :   return NULL;
   10130             : }
   10131             : 
   10132             : 
   10133         147 : SWIGINTERN PyObject *_wrap_Debug(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10134         147 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10135         147 :   char *arg1 = (char *) 0 ;
   10136         147 :   char *arg2 = (char *) 0 ;
   10137         147 :   int res1 ;
   10138         147 :   char *buf1 = 0 ;
   10139         147 :   int alloc1 = 0 ;
   10140         147 :   int res2 ;
   10141         147 :   char *buf2 = 0 ;
   10142         147 :   int alloc2 = 0 ;
   10143         147 :   PyObject *swig_obj[2] ;
   10144             :   
   10145         147 :   if (!SWIG_Python_UnpackTuple(args, "Debug", 2, 2, swig_obj)) SWIG_fail;
   10146         147 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   10147         147 :   if (!SWIG_IsOK(res1)) {
   10148           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Debug" "', argument " "1"" of type '" "char const *""'");
   10149             :   }
   10150         147 :   arg1 = reinterpret_cast< char * >(buf1);
   10151         147 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   10152         147 :   if (!SWIG_IsOK(res2)) {
   10153           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Debug" "', argument " "2"" of type '" "char const *""'");
   10154             :   }
   10155         147 :   arg2 = reinterpret_cast< char * >(buf2);
   10156         147 :   {
   10157         147 :     if (!arg2) {
   10158           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10159             :     }
   10160             :   }
   10161         147 :   {
   10162         147 :     const int bLocalUseExceptions = GetUseExceptions();
   10163         147 :     if ( bLocalUseExceptions ) {
   10164          98 :       pushErrorHandler();
   10165             :     }
   10166         147 :     {
   10167         147 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10168         147 :       Debug((char const *)arg1,(char const *)arg2);
   10169         147 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10170             :     }
   10171         147 :     if ( bLocalUseExceptions ) {
   10172          98 :       popErrorHandler();
   10173             :     }
   10174             : #ifndef SED_HACKS
   10175             :     if ( bLocalUseExceptions ) {
   10176             :       CPLErr eclass = CPLGetLastErrorType();
   10177             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10178             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10179             :       }
   10180             :     }
   10181             : #endif
   10182             :   }
   10183         147 :   resultobj = SWIG_Py_Void();
   10184         147 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10185         147 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10186         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; } }
   10187             :   return resultobj;
   10188           0 : fail:
   10189           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10190           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10191             :   return NULL;
   10192             : }
   10193             : 
   10194             : 
   10195           6 : SWIGINTERN PyObject *_wrap_SetErrorHandler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10196           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10197           6 :   CPLErrorHandler arg1 = (CPLErrorHandler) NULL ;
   10198           6 :   void *arg2 = (void *) NULL ;
   10199           6 :   PyObject *swig_obj[1] ;
   10200           6 :   CPLErr result;
   10201             :   
   10202           6 :   if (!SWIG_Python_UnpackTuple(args, "SetErrorHandler", 0, 1, swig_obj)) SWIG_fail;
   10203           6 :   if (swig_obj[0]) {
   10204           6 :     {
   10205             :       /* %typemap(in) (CPLErrorHandler pfnErrorHandler = NULL, void* user_data = NULL) */
   10206           6 :       int alloc = 0;
   10207           6 :       char* pszCallbackName = NULL;
   10208           6 :       arg2 = NULL;
   10209           6 :       if( SWIG_IsOK(SWIG_AsCharPtrAndSize(swig_obj[0], &pszCallbackName, NULL, &alloc)) )
   10210             :       {
   10211           3 :         if( pszCallbackName == NULL || EQUAL(pszCallbackName,"CPLQuietErrorHandler") )
   10212             :         arg1 = CPLQuietErrorHandler;
   10213           3 :         else if( EQUAL(pszCallbackName,"CPLQuietWarningsErrorHandler") )
   10214             :         arg1 = CPLQuietWarningsErrorHandler;
   10215           3 :         else if( EQUAL(pszCallbackName,"CPLDefaultErrorHandler") )
   10216             :         arg1 = CPLDefaultErrorHandler;
   10217           0 :         else if( EQUAL(pszCallbackName,"CPLLoggingErrorHandler") )
   10218             :         arg1 = CPLLoggingErrorHandler;
   10219             :         else
   10220             :         {
   10221           0 :           if (alloc == SWIG_NEWOBJ) delete[] pszCallbackName;
   10222           0 :           PyErr_SetString( PyExc_RuntimeError, "Unhandled value for passed string" );
   10223           0 :           SWIG_fail;
   10224             :         }
   10225             :         
   10226           3 :         if (alloc == SWIG_NEWOBJ) delete[] pszCallbackName;
   10227             :       }
   10228           3 :       else if (!PyCallable_Check(swig_obj[0]))
   10229             :       {
   10230           0 :         PyErr_SetString( PyExc_RuntimeError,
   10231             :           "Object given is not a String or a Python function" );
   10232           0 :         SWIG_fail;
   10233             :       }
   10234             :       else
   10235             :       {
   10236           3 :         Py_INCREF(swig_obj[0]);
   10237           3 :         arg1 = PyCPLErrorHandler;
   10238           3 :         arg2 = swig_obj[0];
   10239             :       }
   10240             :     }
   10241             :   }
   10242           6 :   {
   10243           6 :     const int bLocalUseExceptions = GetUseExceptions();
   10244           6 :     if ( bLocalUseExceptions ) {
   10245           0 :       pushErrorHandler();
   10246             :     }
   10247           6 :     {
   10248           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10249           6 :       result = (CPLErr)SetErrorHandler(arg1,arg2);
   10250           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10251             :     }
   10252           6 :     if ( bLocalUseExceptions ) {
   10253           0 :       popErrorHandler();
   10254             :     }
   10255             : #ifndef SED_HACKS
   10256             :     if ( bLocalUseExceptions ) {
   10257             :       CPLErr eclass = CPLGetLastErrorType();
   10258             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10259             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10260             :       }
   10261             :     }
   10262             : #endif
   10263             :   }
   10264           6 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10265           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; } }
   10266             :   return resultobj;
   10267             : fail:
   10268             :   return NULL;
   10269             : }
   10270             : 
   10271             : 
   10272           1 : SWIGINTERN PyObject *_wrap_SetCurrentErrorHandlerCatchDebug(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10273           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10274           1 :   int arg1 ;
   10275           1 :   int val1 ;
   10276           1 :   int ecode1 = 0 ;
   10277           1 :   PyObject *swig_obj[1] ;
   10278             :   
   10279           1 :   if (!args) SWIG_fail;
   10280           1 :   swig_obj[0] = args;
   10281           1 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   10282           1 :   if (!SWIG_IsOK(ecode1)) {
   10283           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "SetCurrentErrorHandlerCatchDebug" "', argument " "1"" of type '" "int""'");
   10284             :   } 
   10285           1 :   arg1 = static_cast< int >(val1);
   10286           1 :   {
   10287           1 :     const int bLocalUseExceptions = GetUseExceptions();
   10288           1 :     if ( bLocalUseExceptions ) {
   10289           0 :       pushErrorHandler();
   10290             :     }
   10291           1 :     {
   10292           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10293           1 :       CPLSetCurrentErrorHandlerCatchDebug(arg1);
   10294           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10295             :     }
   10296           1 :     if ( bLocalUseExceptions ) {
   10297           0 :       popErrorHandler();
   10298             :     }
   10299             : #ifndef SED_HACKS
   10300             :     if ( bLocalUseExceptions ) {
   10301             :       CPLErr eclass = CPLGetLastErrorType();
   10302             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10303             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10304             :       }
   10305             :     }
   10306             : #endif
   10307             :   }
   10308           1 :   resultobj = SWIG_Py_Void();
   10309           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; } }
   10310             :   return resultobj;
   10311             : fail:
   10312             :   return NULL;
   10313             : }
   10314             : 
   10315             : 
   10316       30124 : SWIGINTERN PyObject *_wrap_PushErrorHandler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10317       30124 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10318       30124 :   CPLErrorHandler arg1 = (CPLErrorHandler) NULL ;
   10319       30124 :   void *arg2 = (void *) NULL ;
   10320       30124 :   PyObject *swig_obj[1] ;
   10321       30124 :   CPLErr result;
   10322             :   
   10323       30124 :   if (!SWIG_Python_UnpackTuple(args, "PushErrorHandler", 0, 1, swig_obj)) SWIG_fail;
   10324       30124 :   if (swig_obj[0]) {
   10325       30048 :     {
   10326             :       /* %typemap(in) (CPLErrorHandler pfnErrorHandler = NULL, void* user_data = NULL) */
   10327       30048 :       int alloc = 0;
   10328       30048 :       char* pszCallbackName = NULL;
   10329       30048 :       arg2 = NULL;
   10330       30048 :       if( SWIG_IsOK(SWIG_AsCharPtrAndSize(swig_obj[0], &pszCallbackName, NULL, &alloc)) )
   10331             :       {
   10332       28527 :         if( pszCallbackName == NULL || EQUAL(pszCallbackName,"CPLQuietErrorHandler") )
   10333             :         arg1 = CPLQuietErrorHandler;
   10334           7 :         else if( EQUAL(pszCallbackName,"CPLQuietWarningsErrorHandler") )
   10335             :         arg1 = CPLQuietWarningsErrorHandler;
   10336           0 :         else if( EQUAL(pszCallbackName,"CPLDefaultErrorHandler") )
   10337             :         arg1 = CPLDefaultErrorHandler;
   10338           0 :         else if( EQUAL(pszCallbackName,"CPLLoggingErrorHandler") )
   10339             :         arg1 = CPLLoggingErrorHandler;
   10340             :         else
   10341             :         {
   10342           0 :           if (alloc == SWIG_NEWOBJ) delete[] pszCallbackName;
   10343           0 :           PyErr_SetString( PyExc_RuntimeError, "Unhandled value for passed string" );
   10344           0 :           SWIG_fail;
   10345             :         }
   10346             :         
   10347       28527 :         if (alloc == SWIG_NEWOBJ) delete[] pszCallbackName;
   10348             :       }
   10349        1521 :       else if (!PyCallable_Check(swig_obj[0]))
   10350             :       {
   10351           0 :         PyErr_SetString( PyExc_RuntimeError,
   10352             :           "Object given is not a String or a Python function" );
   10353           0 :         SWIG_fail;
   10354             :       }
   10355             :       else
   10356             :       {
   10357        1521 :         Py_INCREF(swig_obj[0]);
   10358        1521 :         arg1 = PyCPLErrorHandler;
   10359        1521 :         arg2 = swig_obj[0];
   10360             :       }
   10361             :     }
   10362             :   }
   10363       30124 :   {
   10364       30665 :     if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
   10365       30124 :     result = (CPLErr)PushErrorHandler(arg1,arg2);
   10366             :   }
   10367       30124 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10368       30124 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   10369             :   return resultobj;
   10370             : fail:
   10371             :   return NULL;
   10372             : }
   10373             : 
   10374             : 
   10375       30119 : SWIGINTERN PyObject *_wrap_PopErrorHandler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10376       30119 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10377             :   
   10378       30119 :   if (!SWIG_Python_UnpackTuple(args, "PopErrorHandler", 0, 0, 0)) SWIG_fail;
   10379       30119 :   {
   10380       30660 :     if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
   10381       30119 :     PopErrorHandler();
   10382             :   }
   10383       30119 :   resultobj = SWIG_Py_Void();
   10384       30119 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   10385             :   return resultobj;
   10386           0 : fail:
   10387           0 :   return NULL;
   10388             : }
   10389             : 
   10390             : 
   10391          28 : SWIGINTERN PyObject *_wrap_Error(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10392          28 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10393          28 :   CPLErr arg1 = (CPLErr) CE_Failure ;
   10394          28 :   int arg2 = (int) 0 ;
   10395          28 :   char *arg3 = (char *) "error" ;
   10396          28 :   int val1 ;
   10397          28 :   int ecode1 = 0 ;
   10398          28 :   int val2 ;
   10399          28 :   int ecode2 = 0 ;
   10400          28 :   int res3 ;
   10401          28 :   char *buf3 = 0 ;
   10402          28 :   int alloc3 = 0 ;
   10403          28 :   PyObject *swig_obj[3] ;
   10404             :   
   10405          28 :   if (!SWIG_Python_UnpackTuple(args, "Error", 0, 3, swig_obj)) SWIG_fail;
   10406          28 :   if (swig_obj[0]) {
   10407          28 :     ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   10408          28 :     if (!SWIG_IsOK(ecode1)) {
   10409           0 :       SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Error" "', argument " "1"" of type '" "CPLErr""'");
   10410             :     } 
   10411          28 :     arg1 = static_cast< CPLErr >(val1);
   10412             :   }
   10413          28 :   if (swig_obj[1]) {
   10414          28 :     ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   10415          28 :     if (!SWIG_IsOK(ecode2)) {
   10416           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Error" "', argument " "2"" of type '" "int""'");
   10417             :     } 
   10418             :     arg2 = static_cast< int >(val2);
   10419             :   }
   10420          28 :   if (swig_obj[2]) {
   10421          28 :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   10422          28 :     if (!SWIG_IsOK(res3)) {
   10423           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Error" "', argument " "3"" of type '" "char const *""'");
   10424             :     }
   10425          28 :     arg3 = reinterpret_cast< char * >(buf3);
   10426             :   }
   10427          28 :   {
   10428          28 :     const int bLocalUseExceptions = GetUseExceptions();
   10429          28 :     if ( bLocalUseExceptions ) {
   10430           1 :       pushErrorHandler();
   10431             :     }
   10432          28 :     {
   10433          28 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10434          28 :       Error(arg1,arg2,(char const *)arg3);
   10435          28 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10436             :     }
   10437          28 :     if ( bLocalUseExceptions ) {
   10438           1 :       popErrorHandler();
   10439             :     }
   10440             : #ifndef SED_HACKS
   10441             :     if ( bLocalUseExceptions ) {
   10442             :       CPLErr eclass = CPLGetLastErrorType();
   10443             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10444             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10445             :       }
   10446             :     }
   10447             : #endif
   10448             :   }
   10449          28 :   resultobj = SWIG_Py_Void();
   10450          28 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   10451          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; } }
   10452             :   return resultobj;
   10453           0 : fail:
   10454           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   10455             :   return NULL;
   10456             : }
   10457             : 
   10458             : 
   10459           0 : SWIGINTERN PyObject *_wrap_GOA2GetAuthorizationURL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10460           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10461           0 :   char *arg1 = (char *) 0 ;
   10462           0 :   int res1 ;
   10463           0 :   char *buf1 = 0 ;
   10464           0 :   int alloc1 = 0 ;
   10465           0 :   PyObject *swig_obj[1] ;
   10466           0 :   retStringAndCPLFree *result = 0 ;
   10467             :   
   10468           0 :   if (!args) SWIG_fail;
   10469           0 :   swig_obj[0] = args;
   10470           0 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   10471           0 :   if (!SWIG_IsOK(res1)) {
   10472           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GOA2GetAuthorizationURL" "', argument " "1"" of type '" "char const *""'");
   10473             :   }
   10474           0 :   arg1 = reinterpret_cast< char * >(buf1);
   10475           0 :   {
   10476           0 :     if (!arg1) {
   10477           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10478             :     }
   10479             :   }
   10480           0 :   {
   10481           0 :     const int bLocalUseExceptions = GetUseExceptions();
   10482           0 :     if ( bLocalUseExceptions ) {
   10483           0 :       pushErrorHandler();
   10484             :     }
   10485           0 :     {
   10486           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10487           0 :       result = (retStringAndCPLFree *)GOA2GetAuthorizationURL((char const *)arg1);
   10488           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10489             :     }
   10490           0 :     if ( bLocalUseExceptions ) {
   10491           0 :       popErrorHandler();
   10492             :     }
   10493             : #ifndef SED_HACKS
   10494             :     if ( bLocalUseExceptions ) {
   10495             :       CPLErr eclass = CPLGetLastErrorType();
   10496             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10497             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10498             :       }
   10499             :     }
   10500             : #endif
   10501             :   }
   10502           0 :   {
   10503             :     /* %typemap(out) (retStringAndCPLFree*) */
   10504           0 :     Py_XDECREF(resultobj);
   10505           0 :     if(result)
   10506             :     {
   10507           0 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   10508           0 :       CPLFree(result);
   10509             :     }
   10510             :     else
   10511             :     {
   10512           0 :       resultobj = Py_None;
   10513           0 :       Py_INCREF(resultobj);
   10514             :     }
   10515             :   }
   10516           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10517           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; } }
   10518             :   return resultobj;
   10519           0 : fail:
   10520           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10521             :   return NULL;
   10522             : }
   10523             : 
   10524             : 
   10525           0 : SWIGINTERN PyObject *_wrap_GOA2GetRefreshToken(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10526           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10527           0 :   char *arg1 = (char *) 0 ;
   10528           0 :   char *arg2 = (char *) 0 ;
   10529           0 :   int res1 ;
   10530           0 :   char *buf1 = 0 ;
   10531           0 :   int alloc1 = 0 ;
   10532           0 :   int res2 ;
   10533           0 :   char *buf2 = 0 ;
   10534           0 :   int alloc2 = 0 ;
   10535           0 :   PyObject *swig_obj[2] ;
   10536           0 :   retStringAndCPLFree *result = 0 ;
   10537             :   
   10538           0 :   if (!SWIG_Python_UnpackTuple(args, "GOA2GetRefreshToken", 2, 2, swig_obj)) SWIG_fail;
   10539           0 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   10540           0 :   if (!SWIG_IsOK(res1)) {
   10541           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GOA2GetRefreshToken" "', argument " "1"" of type '" "char const *""'");
   10542             :   }
   10543           0 :   arg1 = reinterpret_cast< char * >(buf1);
   10544           0 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   10545           0 :   if (!SWIG_IsOK(res2)) {
   10546           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GOA2GetRefreshToken" "', argument " "2"" of type '" "char const *""'");
   10547             :   }
   10548           0 :   arg2 = reinterpret_cast< char * >(buf2);
   10549           0 :   {
   10550           0 :     if (!arg1) {
   10551           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10552             :     }
   10553             :   }
   10554           0 :   {
   10555           0 :     const int bLocalUseExceptions = GetUseExceptions();
   10556           0 :     if ( bLocalUseExceptions ) {
   10557           0 :       pushErrorHandler();
   10558             :     }
   10559           0 :     {
   10560           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10561           0 :       result = (retStringAndCPLFree *)GOA2GetRefreshToken((char const *)arg1,(char const *)arg2);
   10562           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10563             :     }
   10564           0 :     if ( bLocalUseExceptions ) {
   10565           0 :       popErrorHandler();
   10566             :     }
   10567             : #ifndef SED_HACKS
   10568             :     if ( bLocalUseExceptions ) {
   10569             :       CPLErr eclass = CPLGetLastErrorType();
   10570             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10571             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10572             :       }
   10573             :     }
   10574             : #endif
   10575             :   }
   10576           0 :   {
   10577             :     /* %typemap(out) (retStringAndCPLFree*) */
   10578           0 :     Py_XDECREF(resultobj);
   10579           0 :     if(result)
   10580             :     {
   10581           0 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   10582           0 :       CPLFree(result);
   10583             :     }
   10584             :     else
   10585             :     {
   10586           0 :       resultobj = Py_None;
   10587           0 :       Py_INCREF(resultobj);
   10588             :     }
   10589             :   }
   10590           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10591           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10592           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; } }
   10593             :   return resultobj;
   10594           0 : fail:
   10595           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10596           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10597             :   return NULL;
   10598             : }
   10599             : 
   10600             : 
   10601           0 : SWIGINTERN PyObject *_wrap_GOA2GetAccessToken(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10602           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10603           0 :   char *arg1 = (char *) 0 ;
   10604           0 :   char *arg2 = (char *) 0 ;
   10605           0 :   int res1 ;
   10606           0 :   char *buf1 = 0 ;
   10607           0 :   int alloc1 = 0 ;
   10608           0 :   int res2 ;
   10609           0 :   char *buf2 = 0 ;
   10610           0 :   int alloc2 = 0 ;
   10611           0 :   PyObject *swig_obj[2] ;
   10612           0 :   retStringAndCPLFree *result = 0 ;
   10613             :   
   10614           0 :   if (!SWIG_Python_UnpackTuple(args, "GOA2GetAccessToken", 2, 2, swig_obj)) SWIG_fail;
   10615           0 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   10616           0 :   if (!SWIG_IsOK(res1)) {
   10617           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GOA2GetAccessToken" "', argument " "1"" of type '" "char const *""'");
   10618             :   }
   10619           0 :   arg1 = reinterpret_cast< char * >(buf1);
   10620           0 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   10621           0 :   if (!SWIG_IsOK(res2)) {
   10622           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GOA2GetAccessToken" "', argument " "2"" of type '" "char const *""'");
   10623             :   }
   10624           0 :   arg2 = reinterpret_cast< char * >(buf2);
   10625           0 :   {
   10626           0 :     if (!arg1) {
   10627           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10628             :     }
   10629             :   }
   10630           0 :   {
   10631           0 :     const int bLocalUseExceptions = GetUseExceptions();
   10632           0 :     if ( bLocalUseExceptions ) {
   10633           0 :       pushErrorHandler();
   10634             :     }
   10635           0 :     {
   10636           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10637           0 :       result = (retStringAndCPLFree *)GOA2GetAccessToken((char const *)arg1,(char const *)arg2);
   10638           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10639             :     }
   10640           0 :     if ( bLocalUseExceptions ) {
   10641           0 :       popErrorHandler();
   10642             :     }
   10643             : #ifndef SED_HACKS
   10644             :     if ( bLocalUseExceptions ) {
   10645             :       CPLErr eclass = CPLGetLastErrorType();
   10646             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10647             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10648             :       }
   10649             :     }
   10650             : #endif
   10651             :   }
   10652           0 :   {
   10653             :     /* %typemap(out) (retStringAndCPLFree*) */
   10654           0 :     Py_XDECREF(resultobj);
   10655           0 :     if(result)
   10656             :     {
   10657           0 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   10658           0 :       CPLFree(result);
   10659             :     }
   10660             :     else
   10661             :     {
   10662           0 :       resultobj = Py_None;
   10663           0 :       Py_INCREF(resultobj);
   10664             :     }
   10665             :   }
   10666           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10667           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10668           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; } }
   10669             :   return resultobj;
   10670           0 : fail:
   10671           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   10672           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10673             :   return NULL;
   10674             : }
   10675             : 
   10676             : 
   10677        1792 : SWIGINTERN PyObject *_wrap_ErrorReset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10678        1792 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10679             :   
   10680        1792 :   if (!SWIG_Python_UnpackTuple(args, "ErrorReset", 0, 0, 0)) SWIG_fail;
   10681        1792 :   {
   10682        1792 :     const int bLocalUseExceptions = GetUseExceptions();
   10683        1792 :     if ( bLocalUseExceptions ) {
   10684         305 :       pushErrorHandler();
   10685             :     }
   10686        1792 :     {
   10687        1792 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10688        1792 :       CPLErrorReset();
   10689        1792 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10690             :     }
   10691        1792 :     if ( bLocalUseExceptions ) {
   10692         305 :       popErrorHandler();
   10693             :     }
   10694             : #ifndef SED_HACKS
   10695             :     if ( bLocalUseExceptions ) {
   10696             :       CPLErr eclass = CPLGetLastErrorType();
   10697             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10698             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10699             :       }
   10700             :     }
   10701             : #endif
   10702             :   }
   10703        1792 :   resultobj = SWIG_Py_Void();
   10704        1792 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   10705             :   return resultobj;
   10706           0 : fail:
   10707           0 :   return NULL;
   10708             : }
   10709             : 
   10710             : 
   10711         170 : SWIGINTERN PyObject *_wrap_wrapper_EscapeString(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   10712         170 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10713         170 :   int arg1 ;
   10714         170 :   char *arg2 = (char *) 0 ;
   10715         170 :   int arg3 = (int) CPLES_SQL ;
   10716         170 :   int alloc1 = 0 ;
   10717         170 :   bool viewIsValid1 = false ;
   10718         170 :   Py_buffer view1 ;
   10719         170 :   int val3 ;
   10720         170 :   int ecode3 = 0 ;
   10721         170 :   PyObject * obj0 = 0 ;
   10722         170 :   PyObject * obj1 = 0 ;
   10723         170 :   char * kwnames[] = {
   10724             :     (char *)"len",  (char *)"scheme",  NULL 
   10725             :   };
   10726         170 :   retStringAndCPLFree *result = 0 ;
   10727             :   
   10728         170 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:wrapper_EscapeString", kwnames, &obj0, &obj1)) SWIG_fail;
   10729         170 :   {
   10730             :     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
   10731         170 :     char* ptr = NULL;
   10732         170 :     if( !GetBufferAsCharPtrIntSize(obj0, &arg1, &ptr, &alloc1, &viewIsValid1, &view1) ) {
   10733           0 :       SWIG_fail;
   10734             :     }
   10735         170 :     arg2 = (char *)ptr;
   10736             :   }
   10737         170 :   if (obj1) {
   10738         170 :     ecode3 = SWIG_AsVal_int(obj1, &val3);
   10739         170 :     if (!SWIG_IsOK(ecode3)) {
   10740           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "wrapper_EscapeString" "', argument " "3"" of type '" "int""'");
   10741             :     } 
   10742             :     arg3 = static_cast< int >(val3);
   10743             :   }
   10744         170 :   {
   10745         170 :     const int bLocalUseExceptions = GetUseExceptions();
   10746         170 :     if ( bLocalUseExceptions ) {
   10747         137 :       pushErrorHandler();
   10748             :     }
   10749         170 :     {
   10750         170 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10751         170 :       result = (retStringAndCPLFree *)wrapper_EscapeString(arg1,arg2,arg3);
   10752         170 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10753             :     }
   10754         170 :     if ( bLocalUseExceptions ) {
   10755         137 :       popErrorHandler();
   10756             :     }
   10757             : #ifndef SED_HACKS
   10758             :     if ( bLocalUseExceptions ) {
   10759             :       CPLErr eclass = CPLGetLastErrorType();
   10760             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10761             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10762             :       }
   10763             :     }
   10764             : #endif
   10765             :   }
   10766         170 :   {
   10767             :     /* %typemap(out) (retStringAndCPLFree*) */
   10768         170 :     Py_XDECREF(resultobj);
   10769         170 :     if(result)
   10770             :     {
   10771         170 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   10772         170 :       CPLFree(result);
   10773             :     }
   10774             :     else
   10775             :     {
   10776           0 :       resultobj = Py_None;
   10777           0 :       Py_INCREF(resultobj);
   10778             :     }
   10779             :   }
   10780         170 :   {
   10781             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   10782         170 :     if( viewIsValid1 ) {
   10783           0 :       PyBuffer_Release(&view1);
   10784             :     }
   10785         170 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   10786         170 :       delete[] arg2;
   10787             :     }
   10788             :   }
   10789         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; } }
   10790             :   return resultobj;
   10791           0 : fail:
   10792           0 :   {
   10793             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   10794           0 :     if( viewIsValid1 ) {
   10795           0 :       PyBuffer_Release(&view1);
   10796             :     }
   10797         170 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   10798           0 :       delete[] arg2;
   10799             :     }
   10800             :   }
   10801             :   return NULL;
   10802             : }
   10803             : 
   10804             : 
   10805          81 : SWIGINTERN PyObject *_wrap_EscapeBinary(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   10806          81 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10807          81 :   int arg1 ;
   10808          81 :   char *arg2 = (char *) 0 ;
   10809          81 :   size_t *arg3 = (size_t *) 0 ;
   10810          81 :   char **arg4 = (char **) 0 ;
   10811          81 :   int arg5 = (int) CPLES_SQL ;
   10812          81 :   int alloc1 = 0 ;
   10813          81 :   bool viewIsValid1 = false ;
   10814          81 :   Py_buffer view1 ;
   10815          81 :   size_t nLen3 = 0 ;
   10816          81 :   char *pBuf3 = 0 ;
   10817          81 :   int val5 ;
   10818          81 :   int ecode5 = 0 ;
   10819          81 :   PyObject * obj0 = 0 ;
   10820          81 :   PyObject * obj1 = 0 ;
   10821          81 :   char * kwnames[] = {
   10822             :     (char *)"len",  (char *)"scheme",  NULL 
   10823             :   };
   10824             :   
   10825          81 :   {
   10826             :     /* %typemap(in,numinputs=0) (size_t *nLen3, char **pBuf3 ) */
   10827          81 :     arg3 = &nLen3;
   10828          81 :     arg4 = &pBuf3;
   10829             :   }
   10830          81 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:EscapeBinary", kwnames, &obj0, &obj1)) SWIG_fail;
   10831          81 :   {
   10832             :     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
   10833          81 :     char* ptr = NULL;
   10834          81 :     if( !GetBufferAsCharPtrIntSize(obj0, &arg1, &ptr, &alloc1, &viewIsValid1, &view1) ) {
   10835           0 :       SWIG_fail;
   10836             :     }
   10837          81 :     arg2 = (char *)ptr;
   10838             :   }
   10839          81 :   if (obj1) {
   10840          81 :     ecode5 = SWIG_AsVal_int(obj1, &val5);
   10841          81 :     if (!SWIG_IsOK(ecode5)) {
   10842           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "EscapeBinary" "', argument " "5"" of type '" "int""'");
   10843             :     } 
   10844             :     arg5 = static_cast< int >(val5);
   10845             :   }
   10846          81 :   {
   10847          81 :     const int bLocalUseExceptions = GetUseExceptions();
   10848          81 :     if ( bLocalUseExceptions ) {
   10849          72 :       pushErrorHandler();
   10850             :     }
   10851          81 :     {
   10852          81 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   10853          81 :       EscapeBinary(arg1,arg2,arg3,arg4,arg5);
   10854          81 :       SWIG_PYTHON_THREAD_END_ALLOW;
   10855             :     }
   10856          81 :     if ( bLocalUseExceptions ) {
   10857          72 :       popErrorHandler();
   10858             :     }
   10859             : #ifndef SED_HACKS
   10860             :     if ( bLocalUseExceptions ) {
   10861             :       CPLErr eclass = CPLGetLastErrorType();
   10862             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10863             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10864             :       }
   10865             :     }
   10866             : #endif
   10867             :   }
   10868          81 :   resultobj = SWIG_Py_Void();
   10869          81 :   {
   10870             :     /* %typemap(argout) (size_t *nLen, char **pBuf ) */
   10871          81 :     Py_XDECREF(resultobj);
   10872          81 :     if( *arg4 ) {
   10873          81 :       resultobj = PyByteArray_FromStringAndSize( *arg4, *arg3 );
   10874             :     }
   10875             :     else {
   10876           0 :       resultobj = Py_None;
   10877           0 :       Py_INCREF(Py_None);
   10878             :     }
   10879             :   }
   10880          81 :   {
   10881             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   10882          81 :     if( viewIsValid1 ) {
   10883          81 :       PyBuffer_Release(&view1);
   10884             :     }
   10885           0 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   10886           0 :       delete[] arg2;
   10887             :     }
   10888             :   }
   10889          81 :   {
   10890             :     /* %typemap(freearg) (size_t *nLen, char **pBuf ) */
   10891          81 :     VSIFree( *arg4 );
   10892             :   }
   10893          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; } }
   10894             :   return resultobj;
   10895           0 : fail:
   10896           0 :   {
   10897             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   10898           0 :     if( viewIsValid1 ) {
   10899           0 :       PyBuffer_Release(&view1);
   10900             :     }
   10901           0 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   10902           0 :       delete[] arg2;
   10903             :     }
   10904             :   }
   10905           0 :   {
   10906             :     /* %typemap(freearg) (size_t *nLen, char **pBuf ) */
   10907           0 :     VSIFree( *arg4 );
   10908             :   }
   10909             :   return NULL;
   10910             : }
   10911             : 
   10912             : 
   10913           2 : SWIGINTERN PyObject *_wrap_GetLastErrorNo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10914           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10915           2 :   int result;
   10916             :   
   10917           2 :   if (!SWIG_Python_UnpackTuple(args, "GetLastErrorNo", 0, 0, 0)) SWIG_fail;
   10918           2 :   {
   10919             : #ifdef SED_HACKS
   10920           2 :     if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
   10921             : #endif
   10922             :     
   10923           2 :     result = CPLGetLastErrorNo();
   10924             :   }
   10925           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10926           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; } }
   10927             :   return resultobj;
   10928           0 : fail:
   10929           0 :   return NULL;
   10930             : }
   10931             : 
   10932             : 
   10933          75 : SWIGINTERN PyObject *_wrap_GetLastErrorType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10934          75 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10935          75 :   int result;
   10936             :   
   10937          75 :   if (!SWIG_Python_UnpackTuple(args, "GetLastErrorType", 0, 0, 0)) SWIG_fail;
   10938          75 :   {
   10939             : #ifdef SED_HACKS
   10940          87 :     if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
   10941             : #endif
   10942             :     
   10943          75 :     result = CPLGetLastErrorType();
   10944             :   }
   10945          75 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10946          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; } }
   10947             :   return resultobj;
   10948           0 : fail:
   10949           0 :   return NULL;
   10950             : }
   10951             : 
   10952             : 
   10953        2102 : SWIGINTERN PyObject *_wrap_GetLastErrorMsg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10954        2102 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10955        2102 :   char *result = 0 ;
   10956             :   
   10957        2102 :   if (!SWIG_Python_UnpackTuple(args, "GetLastErrorMsg", 0, 0, 0)) SWIG_fail;
   10958        2102 :   {
   10959             : #ifdef SED_HACKS
   10960        2331 :     if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
   10961             : #endif
   10962             :     
   10963        2102 :     result = (char*)CPLGetLastErrorMsg();
   10964             :   }
   10965        2102 :   resultobj = SWIG_FromCharPtr((const char *)result);
   10966        2102 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   10967             :   return resultobj;
   10968           0 : fail:
   10969           0 :   return NULL;
   10970             : }
   10971             : 
   10972             : 
   10973           0 : SWIGINTERN PyObject *_wrap_GetErrorCounter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10974           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10975           0 :   unsigned int result;
   10976             :   
   10977           0 :   if (!SWIG_Python_UnpackTuple(args, "GetErrorCounter", 0, 0, 0)) SWIG_fail;
   10978           0 :   {
   10979             : #ifdef SED_HACKS
   10980           0 :     if( GetUseExceptions() ) bLocalUseExceptionsCode = FALSE;
   10981             : #endif
   10982             :     
   10983           0 :     result = CPLGetErrorCounter();
   10984             :   }
   10985           0 :   resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
   10986           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; } }
   10987             :   return resultobj;
   10988           0 : fail:
   10989           0 :   return NULL;
   10990             : }
   10991             : 
   10992             : 
   10993           4 : SWIGINTERN PyObject *_wrap_VSIGetLastErrorNo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10994           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   10995           4 :   int result;
   10996             :   
   10997           4 :   if (!SWIG_Python_UnpackTuple(args, "VSIGetLastErrorNo", 0, 0, 0)) SWIG_fail;
   10998           4 :   {
   10999           4 :     const int bLocalUseExceptions = GetUseExceptions();
   11000           4 :     if ( bLocalUseExceptions ) {
   11001           0 :       pushErrorHandler();
   11002             :     }
   11003           4 :     {
   11004           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11005           4 :       result = (int)VSIGetLastErrorNo();
   11006           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11007             :     }
   11008           4 :     if ( bLocalUseExceptions ) {
   11009           0 :       popErrorHandler();
   11010             :     }
   11011             : #ifndef SED_HACKS
   11012             :     if ( bLocalUseExceptions ) {
   11013             :       CPLErr eclass = CPLGetLastErrorType();
   11014             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11015             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11016             :       }
   11017             :     }
   11018             : #endif
   11019             :   }
   11020           4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11021           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; } }
   11022             :   return resultobj;
   11023           0 : fail:
   11024           0 :   return NULL;
   11025             : }
   11026             : 
   11027             : 
   11028          42 : SWIGINTERN PyObject *_wrap_VSIGetLastErrorMsg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11029          42 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11030          42 :   char *result = 0 ;
   11031             :   
   11032          42 :   if (!SWIG_Python_UnpackTuple(args, "VSIGetLastErrorMsg", 0, 0, 0)) SWIG_fail;
   11033          42 :   {
   11034          42 :     const int bLocalUseExceptions = GetUseExceptions();
   11035          42 :     if ( bLocalUseExceptions ) {
   11036          11 :       pushErrorHandler();
   11037             :     }
   11038          42 :     {
   11039          42 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11040          42 :       result = (char *)VSIGetLastErrorMsg();
   11041          42 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11042             :     }
   11043          42 :     if ( bLocalUseExceptions ) {
   11044          11 :       popErrorHandler();
   11045             :     }
   11046             : #ifndef SED_HACKS
   11047             :     if ( bLocalUseExceptions ) {
   11048             :       CPLErr eclass = CPLGetLastErrorType();
   11049             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11050             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11051             :       }
   11052             :     }
   11053             : #endif
   11054             :   }
   11055          42 :   resultobj = SWIG_FromCharPtr((const char *)result);
   11056          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; } }
   11057             :   return resultobj;
   11058           0 : fail:
   11059           0 :   return NULL;
   11060             : }
   11061             : 
   11062             : 
   11063           3 : SWIGINTERN PyObject *_wrap_VSIErrorReset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11064           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11065             :   
   11066           3 :   if (!SWIG_Python_UnpackTuple(args, "VSIErrorReset", 0, 0, 0)) SWIG_fail;
   11067           3 :   {
   11068           3 :     const int bLocalUseExceptions = GetUseExceptions();
   11069           3 :     if ( bLocalUseExceptions ) {
   11070           1 :       pushErrorHandler();
   11071             :     }
   11072           3 :     {
   11073           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11074           3 :       VSIErrorReset();
   11075           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11076             :     }
   11077           3 :     if ( bLocalUseExceptions ) {
   11078           1 :       popErrorHandler();
   11079             :     }
   11080             : #ifndef SED_HACKS
   11081             :     if ( bLocalUseExceptions ) {
   11082             :       CPLErr eclass = CPLGetLastErrorType();
   11083             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11084             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11085             :       }
   11086             :     }
   11087             : #endif
   11088             :   }
   11089           3 :   resultobj = SWIG_Py_Void();
   11090           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; } }
   11091             :   return resultobj;
   11092           0 : fail:
   11093           0 :   return NULL;
   11094             : }
   11095             : 
   11096             : 
   11097           0 : SWIGINTERN PyObject *_wrap_PushFinderLocation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11098           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11099           0 :   char *arg1 = (char *) 0 ;
   11100           0 :   int bToFree1 = 0 ;
   11101           0 :   PyObject *swig_obj[1] ;
   11102             :   
   11103           0 :   if (!args) SWIG_fail;
   11104           0 :   swig_obj[0] = args;
   11105           0 :   {
   11106             :     /* %typemap(in) (const char *utf8_path) */
   11107           0 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   11108             :     {
   11109           0 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   11110             :     }
   11111             :     else
   11112             :     {
   11113           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   11114             :       
   11115             :     }
   11116           0 :     if (arg1 == NULL)
   11117             :     {
   11118           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   11119           0 :       SWIG_fail;
   11120             :     }
   11121             :   }
   11122           0 :   {
   11123           0 :     if (!arg1) {
   11124           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11125             :     }
   11126             :   }
   11127           0 :   {
   11128           0 :     const int bLocalUseExceptions = GetUseExceptions();
   11129           0 :     if ( bLocalUseExceptions ) {
   11130           0 :       pushErrorHandler();
   11131             :     }
   11132           0 :     {
   11133           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11134           0 :       CPLPushFinderLocation((char const *)arg1);
   11135           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11136             :     }
   11137           0 :     if ( bLocalUseExceptions ) {
   11138           0 :       popErrorHandler();
   11139             :     }
   11140             : #ifndef SED_HACKS
   11141             :     if ( bLocalUseExceptions ) {
   11142             :       CPLErr eclass = CPLGetLastErrorType();
   11143             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11144             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11145             :       }
   11146             :     }
   11147             : #endif
   11148             :   }
   11149           0 :   resultobj = SWIG_Py_Void();
   11150           0 :   {
   11151             :     /* %typemap(freearg) (const char *utf8_path) */
   11152           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   11153             :   }
   11154           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; } }
   11155             :   return resultobj;
   11156           0 : fail:
   11157           0 :   {
   11158             :     /* %typemap(freearg) (const char *utf8_path) */
   11159           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   11160             :   }
   11161             :   return NULL;
   11162             : }
   11163             : 
   11164             : 
   11165           0 : SWIGINTERN PyObject *_wrap_PopFinderLocation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11166           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11167             :   
   11168           0 :   if (!SWIG_Python_UnpackTuple(args, "PopFinderLocation", 0, 0, 0)) SWIG_fail;
   11169           0 :   {
   11170           0 :     const int bLocalUseExceptions = GetUseExceptions();
   11171           0 :     if ( bLocalUseExceptions ) {
   11172           0 :       pushErrorHandler();
   11173             :     }
   11174           0 :     {
   11175           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11176           0 :       CPLPopFinderLocation();
   11177           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11178             :     }
   11179           0 :     if ( bLocalUseExceptions ) {
   11180           0 :       popErrorHandler();
   11181             :     }
   11182             : #ifndef SED_HACKS
   11183             :     if ( bLocalUseExceptions ) {
   11184             :       CPLErr eclass = CPLGetLastErrorType();
   11185             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11186             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11187             :       }
   11188             :     }
   11189             : #endif
   11190             :   }
   11191           0 :   resultobj = SWIG_Py_Void();
   11192           0 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   11193             :   return resultobj;
   11194           0 : fail:
   11195           0 :   return NULL;
   11196             : }
   11197             : 
   11198             : 
   11199           0 : SWIGINTERN PyObject *_wrap_FinderClean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11200           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11201             :   
   11202           0 :   if (!SWIG_Python_UnpackTuple(args, "FinderClean", 0, 0, 0)) SWIG_fail;
   11203           0 :   {
   11204           0 :     const int bLocalUseExceptions = GetUseExceptions();
   11205           0 :     if ( bLocalUseExceptions ) {
   11206           0 :       pushErrorHandler();
   11207             :     }
   11208           0 :     {
   11209           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11210           0 :       CPLFinderClean();
   11211           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11212             :     }
   11213           0 :     if ( bLocalUseExceptions ) {
   11214           0 :       popErrorHandler();
   11215             :     }
   11216             : #ifndef SED_HACKS
   11217             :     if ( bLocalUseExceptions ) {
   11218             :       CPLErr eclass = CPLGetLastErrorType();
   11219             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11220             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11221             :       }
   11222             :     }
   11223             : #endif
   11224             :   }
   11225           0 :   resultobj = SWIG_Py_Void();
   11226           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; } }
   11227             :   return resultobj;
   11228           0 : fail:
   11229           0 :   return NULL;
   11230             : }
   11231             : 
   11232             : 
   11233          47 : SWIGINTERN PyObject *_wrap_FindFile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11234          47 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11235          47 :   char *arg1 = (char *) 0 ;
   11236          47 :   char *arg2 = (char *) 0 ;
   11237          47 :   int res1 ;
   11238          47 :   char *buf1 = 0 ;
   11239          47 :   int alloc1 = 0 ;
   11240          47 :   int bToFree2 = 0 ;
   11241          47 :   PyObject *swig_obj[2] ;
   11242          47 :   char *result = 0 ;
   11243             :   
   11244          47 :   if (!SWIG_Python_UnpackTuple(args, "FindFile", 2, 2, swig_obj)) SWIG_fail;
   11245          47 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   11246          47 :   if (!SWIG_IsOK(res1)) {
   11247           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FindFile" "', argument " "1"" of type '" "char const *""'");
   11248             :   }
   11249          47 :   arg1 = reinterpret_cast< char * >(buf1);
   11250          47 :   {
   11251             :     /* %typemap(in) (const char *utf8_path) */
   11252          47 :     if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
   11253             :     {
   11254          47 :       arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
   11255             :     }
   11256             :     else
   11257             :     {
   11258           0 :       arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
   11259             :       
   11260             :     }
   11261          47 :     if (arg2 == NULL)
   11262             :     {
   11263           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   11264           0 :       SWIG_fail;
   11265             :     }
   11266             :   }
   11267          47 :   {
   11268          47 :     if (!arg2) {
   11269          47 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11270             :     }
   11271             :   }
   11272          47 :   {
   11273          47 :     const int bLocalUseExceptions = GetUseExceptions();
   11274          47 :     if ( bLocalUseExceptions ) {
   11275          47 :       pushErrorHandler();
   11276             :     }
   11277          47 :     {
   11278          47 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11279          47 :       result = (char *)CPLFindFile((char const *)arg1,(char const *)arg2);
   11280          47 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11281             :     }
   11282          47 :     if ( bLocalUseExceptions ) {
   11283          47 :       popErrorHandler();
   11284             :     }
   11285             : #ifndef SED_HACKS
   11286             :     if ( bLocalUseExceptions ) {
   11287             :       CPLErr eclass = CPLGetLastErrorType();
   11288             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11289             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11290             :       }
   11291             :     }
   11292             : #endif
   11293             :   }
   11294          47 :   resultobj = SWIG_FromCharPtr((const char *)result);
   11295          47 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   11296          47 :   {
   11297             :     /* %typemap(freearg) (const char *utf8_path) */
   11298          47 :     GDALPythonFreeCStr(arg2, bToFree2);
   11299             :   }
   11300          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; } }
   11301             :   return resultobj;
   11302           0 : fail:
   11303           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   11304           0 :   {
   11305             :     /* %typemap(freearg) (const char *utf8_path) */
   11306          47 :     GDALPythonFreeCStr(arg2, bToFree2);
   11307             :   }
   11308             :   return NULL;
   11309             : }
   11310             : 
   11311             : 
   11312        3244 : SWIGINTERN PyObject *_wrap_ReadDir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11313        3244 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11314        3244 :   char *arg1 = (char *) 0 ;
   11315        3244 :   int arg2 = (int) 0 ;
   11316        3244 :   int bToFree1 = 0 ;
   11317        3244 :   int val2 ;
   11318        3244 :   int ecode2 = 0 ;
   11319        3244 :   PyObject *swig_obj[2] ;
   11320        3244 :   char **result = 0 ;
   11321             :   
   11322        3244 :   if (!SWIG_Python_UnpackTuple(args, "ReadDir", 1, 2, swig_obj)) SWIG_fail;
   11323        3244 :   {
   11324             :     /* %typemap(in) (const char *utf8_path) */
   11325        3244 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   11326             :     {
   11327        3237 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   11328             :     }
   11329             :     else
   11330             :     {
   11331           7 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   11332             :       
   11333             :     }
   11334        3244 :     if (arg1 == NULL)
   11335             :     {
   11336           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   11337           0 :       SWIG_fail;
   11338             :     }
   11339             :   }
   11340        3244 :   if (swig_obj[1]) {
   11341           6 :     ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   11342           6 :     if (!SWIG_IsOK(ecode2)) {
   11343           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReadDir" "', argument " "2"" of type '" "int""'");
   11344             :     } 
   11345             :     arg2 = static_cast< int >(val2);
   11346             :   }
   11347        3244 :   {
   11348        3244 :     if (!arg1) {
   11349        3244 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11350             :     }
   11351             :   }
   11352        3244 :   {
   11353        3244 :     const int bLocalUseExceptions = GetUseExceptions();
   11354        3244 :     if ( bLocalUseExceptions ) {
   11355        2493 :       pushErrorHandler();
   11356             :     }
   11357        3244 :     {
   11358        3244 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11359        3244 :       result = (char **)wrapper_VSIReadDirEx((char const *)arg1,arg2);
   11360        3244 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11361             :     }
   11362        3244 :     if ( bLocalUseExceptions ) {
   11363        2493 :       popErrorHandler();
   11364             :     }
   11365             : #ifndef SED_HACKS
   11366             :     if ( bLocalUseExceptions ) {
   11367             :       CPLErr eclass = CPLGetLastErrorType();
   11368             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11369             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11370             :       }
   11371             :     }
   11372             : #endif
   11373             :   }
   11374        3244 :   {
   11375             :     /* %typemap(out) char **CSL -> ( string ) */
   11376        3244 :     bool bErr = false;
   11377        3244 :     resultobj = CSLToList(result, &bErr);
   11378        3244 :     CSLDestroy(result);
   11379        3244 :     if( bErr ) {
   11380           0 :       SWIG_fail;
   11381             :     }
   11382             :   }
   11383        3244 :   {
   11384             :     /* %typemap(freearg) (const char *utf8_path) */
   11385        3244 :     GDALPythonFreeCStr(arg1, bToFree1);
   11386             :   }
   11387        3276 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   11388             :   return resultobj;
   11389           0 : fail:
   11390           0 :   {
   11391             :     /* %typemap(freearg) (const char *utf8_path) */
   11392        3244 :     GDALPythonFreeCStr(arg1, bToFree1);
   11393             :   }
   11394             :   return NULL;
   11395             : }
   11396             : 
   11397             : 
   11398        1122 : SWIGINTERN PyObject *_wrap_ReadDirRecursive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11399        1122 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11400        1122 :   char *arg1 = (char *) 0 ;
   11401        1122 :   int bToFree1 = 0 ;
   11402        1122 :   PyObject *swig_obj[1] ;
   11403        1122 :   char **result = 0 ;
   11404             :   
   11405        1122 :   if (!args) SWIG_fail;
   11406        1122 :   swig_obj[0] = args;
   11407        1122 :   {
   11408             :     /* %typemap(in) (const char *utf8_path) */
   11409        1122 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   11410             :     {
   11411        1058 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   11412             :     }
   11413             :     else
   11414             :     {
   11415          64 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   11416             :       
   11417             :     }
   11418        1122 :     if (arg1 == NULL)
   11419             :     {
   11420           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   11421           0 :       SWIG_fail;
   11422             :     }
   11423             :   }
   11424        1122 :   {
   11425        1122 :     if (!arg1) {
   11426        1122 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11427             :     }
   11428             :   }
   11429        1122 :   {
   11430        1122 :     const int bLocalUseExceptions = GetUseExceptions();
   11431        1122 :     if ( bLocalUseExceptions ) {
   11432         299 :       pushErrorHandler();
   11433             :     }
   11434        1122 :     {
   11435        1122 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11436        1122 :       result = (char **)VSIReadDirRecursive((char const *)arg1);
   11437        1122 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11438             :     }
   11439        1122 :     if ( bLocalUseExceptions ) {
   11440         299 :       popErrorHandler();
   11441             :     }
   11442             : #ifndef SED_HACKS
   11443             :     if ( bLocalUseExceptions ) {
   11444             :       CPLErr eclass = CPLGetLastErrorType();
   11445             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11446             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11447             :       }
   11448             :     }
   11449             : #endif
   11450             :   }
   11451        1122 :   {
   11452             :     /* %typemap(out) char **CSL -> ( string ) */
   11453        1122 :     bool bErr = false;
   11454        1122 :     resultobj = CSLToList(result, &bErr);
   11455        1122 :     CSLDestroy(result);
   11456        1122 :     if( bErr ) {
   11457           0 :       SWIG_fail;
   11458             :     }
   11459             :   }
   11460        1122 :   {
   11461             :     /* %typemap(freearg) (const char *utf8_path) */
   11462        1122 :     GDALPythonFreeCStr(arg1, bToFree1);
   11463             :   }
   11464        1122 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   11465             :   return resultobj;
   11466           0 : fail:
   11467           0 :   {
   11468             :     /* %typemap(freearg) (const char *utf8_path) */
   11469        1122 :     GDALPythonFreeCStr(arg1, bToFree1);
   11470             :   }
   11471             :   return NULL;
   11472             : }
   11473             : 
   11474             : 
   11475          35 : SWIGINTERN PyObject *_wrap_OpenDir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11476          35 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11477          35 :   char *arg1 = (char *) 0 ;
   11478          35 :   int arg2 = (int) -1 ;
   11479          35 :   char **arg3 = (char **) NULL ;
   11480          35 :   int bToFree1 = 0 ;
   11481          35 :   int val2 ;
   11482          35 :   int ecode2 = 0 ;
   11483          35 :   PyObject *swig_obj[3] ;
   11484          35 :   VSIDIR *result = 0 ;
   11485             :   
   11486          35 :   if (!SWIG_Python_UnpackTuple(args, "OpenDir", 1, 3, swig_obj)) SWIG_fail;
   11487          35 :   {
   11488             :     /* %typemap(in) (const char *utf8_path) */
   11489          35 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   11490             :     {
   11491          35 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   11492             :     }
   11493             :     else
   11494             :     {
   11495           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   11496             :       
   11497             :     }
   11498          35 :     if (arg1 == NULL)
   11499             :     {
   11500           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   11501           0 :       SWIG_fail;
   11502             :     }
   11503             :   }
   11504          35 :   if (swig_obj[1]) {
   11505          22 :     ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   11506          22 :     if (!SWIG_IsOK(ecode2)) {
   11507           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OpenDir" "', argument " "2"" of type '" "int""'");
   11508             :     } 
   11509             :     arg2 = static_cast< int >(val2);
   11510             :   }
   11511          35 :   if (swig_obj[2]) {
   11512          18 :     {
   11513             :       /* %typemap(in) char **dict */
   11514          18 :       arg3 = NULL;
   11515          18 :       if ( PySequence_Check( swig_obj[2] ) ) {
   11516          18 :         int bErr = FALSE;
   11517          18 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   11518          18 :         if ( bErr )
   11519             :         {
   11520           0 :           SWIG_fail;
   11521             :         }
   11522             :       }
   11523           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   11524           0 :         int bErr = FALSE;
   11525           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   11526           0 :         if ( bErr )
   11527             :         {
   11528           0 :           SWIG_fail;
   11529             :         }
   11530             :       }
   11531             :       else {
   11532           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   11533           0 :         SWIG_fail;
   11534             :       }
   11535             :     }
   11536             :   }
   11537          35 :   {
   11538          35 :     if (!arg1) {
   11539          35 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11540             :     }
   11541             :   }
   11542          35 :   {
   11543          35 :     const int bLocalUseExceptions = GetUseExceptions();
   11544          35 :     if ( bLocalUseExceptions ) {
   11545           0 :       pushErrorHandler();
   11546             :     }
   11547          35 :     {
   11548          35 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11549          35 :       result = (VSIDIR *)wrapper_VSIOpenDir((char const *)arg1,arg2,arg3);
   11550          35 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11551             :     }
   11552          35 :     if ( bLocalUseExceptions ) {
   11553           0 :       popErrorHandler();
   11554             :     }
   11555             : #ifndef SED_HACKS
   11556             :     if ( bLocalUseExceptions ) {
   11557             :       CPLErr eclass = CPLGetLastErrorType();
   11558             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11559             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11560             :       }
   11561             :     }
   11562             : #endif
   11563             :   }
   11564          35 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VSIDIR, 0 |  0 );
   11565          35 :   {
   11566             :     /* %typemap(freearg) (const char *utf8_path) */
   11567          35 :     GDALPythonFreeCStr(arg1, bToFree1);
   11568             :   }
   11569          35 :   {
   11570             :     /* %typemap(freearg) char **dict */
   11571          35 :     CSLDestroy( arg3 );
   11572             :   }
   11573          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; } }
   11574             :   return resultobj;
   11575           0 : fail:
   11576           0 :   {
   11577             :     /* %typemap(freearg) (const char *utf8_path) */
   11578           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   11579             :   }
   11580           0 :   {
   11581             :     /* %typemap(freearg) char **dict */
   11582           0 :     CSLDestroy( arg3 );
   11583             :   }
   11584             :   return NULL;
   11585             : }
   11586             : 
   11587             : 
   11588          81 : SWIGINTERN PyObject *_wrap_DirEntry_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11589          81 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11590          81 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11591          81 :   void *argp1 = 0 ;
   11592          81 :   int res1 = 0 ;
   11593          81 :   PyObject *swig_obj[1] ;
   11594          81 :   char *result = 0 ;
   11595             :   
   11596          81 :   if (!args) SWIG_fail;
   11597          81 :   swig_obj[0] = args;
   11598          81 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11599          81 :   if (!SWIG_IsOK(res1)) {
   11600           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_name_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   11601             :   }
   11602          81 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11603          81 :   {
   11604          81 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11605          81 :     result = (char *) ((arg1)->name);
   11606          81 :     SWIG_PYTHON_THREAD_END_ALLOW;
   11607             :   }
   11608          81 :   resultobj = SWIG_FromCharPtr((const char *)result);
   11609          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; } }
   11610             :   return resultobj;
   11611             : fail:
   11612             :   return NULL;
   11613             : }
   11614             : 
   11615             : 
   11616          42 : SWIGINTERN PyObject *_wrap_DirEntry_mode_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11617          42 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11618          42 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11619          42 :   void *argp1 = 0 ;
   11620          42 :   int res1 = 0 ;
   11621          42 :   PyObject *swig_obj[1] ;
   11622          42 :   int result;
   11623             :   
   11624          42 :   if (!args) SWIG_fail;
   11625          42 :   swig_obj[0] = args;
   11626          42 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11627          42 :   if (!SWIG_IsOK(res1)) {
   11628           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_mode_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   11629             :   }
   11630          42 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11631          42 :   {
   11632          42 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11633          42 :     result = (int) ((arg1)->mode);
   11634          42 :     SWIG_PYTHON_THREAD_END_ALLOW;
   11635             :   }
   11636          42 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11637          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; } }
   11638             :   return resultobj;
   11639             : fail:
   11640             :   return NULL;
   11641             : }
   11642             : 
   11643             : 
   11644          15 : SWIGINTERN PyObject *_wrap_DirEntry_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11645          15 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11646          15 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11647          15 :   void *argp1 = 0 ;
   11648          15 :   int res1 = 0 ;
   11649          15 :   PyObject *swig_obj[1] ;
   11650          15 :   GIntBig result;
   11651             :   
   11652          15 :   if (!args) SWIG_fail;
   11653          15 :   swig_obj[0] = args;
   11654          15 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11655          15 :   if (!SWIG_IsOK(res1)) {
   11656           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_size_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   11657             :   }
   11658          15 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11659          15 :   {
   11660          15 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11661          15 :     result =  ((arg1)->size);
   11662          15 :     SWIG_PYTHON_THREAD_END_ALLOW;
   11663             :   }
   11664          15 :   {
   11665          15 :     resultobj = PyLong_FromLongLong(result);
   11666             :   }
   11667          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; } }
   11668             :   return resultobj;
   11669             : fail:
   11670             :   return NULL;
   11671             : }
   11672             : 
   11673             : 
   11674          12 : SWIGINTERN PyObject *_wrap_DirEntry_mtime_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11675          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11676          12 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11677          12 :   void *argp1 = 0 ;
   11678          12 :   int res1 = 0 ;
   11679          12 :   PyObject *swig_obj[1] ;
   11680          12 :   GIntBig result;
   11681             :   
   11682          12 :   if (!args) SWIG_fail;
   11683          12 :   swig_obj[0] = args;
   11684          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11685          12 :   if (!SWIG_IsOK(res1)) {
   11686           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_mtime_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   11687             :   }
   11688          12 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11689          12 :   {
   11690          12 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11691          12 :     result =  ((arg1)->mtime);
   11692          12 :     SWIG_PYTHON_THREAD_END_ALLOW;
   11693             :   }
   11694          12 :   {
   11695          12 :     resultobj = PyLong_FromLongLong(result);
   11696             :   }
   11697          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; } }
   11698             :   return resultobj;
   11699             : fail:
   11700             :   return NULL;
   11701             : }
   11702             : 
   11703             : 
   11704           2 : SWIGINTERN PyObject *_wrap_DirEntry_modeKnown_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11705           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11706           2 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11707           2 :   void *argp1 = 0 ;
   11708           2 :   int res1 = 0 ;
   11709           2 :   PyObject *swig_obj[1] ;
   11710           2 :   bool result;
   11711             :   
   11712           2 :   if (!args) SWIG_fail;
   11713           2 :   swig_obj[0] = args;
   11714           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11715           2 :   if (!SWIG_IsOK(res1)) {
   11716           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_modeKnown_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   11717             :   }
   11718           2 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11719           2 :   {
   11720           2 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11721           2 :     result = (bool) ((arg1)->modeKnown);
   11722           2 :     SWIG_PYTHON_THREAD_END_ALLOW;
   11723             :   }
   11724           2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   11725           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; } }
   11726             :   return resultobj;
   11727             : fail:
   11728             :   return NULL;
   11729             : }
   11730             : 
   11731             : 
   11732           2 : SWIGINTERN PyObject *_wrap_DirEntry_sizeKnown_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11733           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11734           2 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11735           2 :   void *argp1 = 0 ;
   11736           2 :   int res1 = 0 ;
   11737           2 :   PyObject *swig_obj[1] ;
   11738           2 :   bool result;
   11739             :   
   11740           2 :   if (!args) SWIG_fail;
   11741           2 :   swig_obj[0] = args;
   11742           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11743           2 :   if (!SWIG_IsOK(res1)) {
   11744           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_sizeKnown_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   11745             :   }
   11746           2 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11747           2 :   {
   11748           2 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11749           2 :     result = (bool) ((arg1)->sizeKnown);
   11750           2 :     SWIG_PYTHON_THREAD_END_ALLOW;
   11751             :   }
   11752           2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   11753           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; } }
   11754             :   return resultobj;
   11755             : fail:
   11756             :   return NULL;
   11757             : }
   11758             : 
   11759             : 
   11760           2 : SWIGINTERN PyObject *_wrap_DirEntry_mtimeKnown_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11761           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11762           2 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11763           2 :   void *argp1 = 0 ;
   11764           2 :   int res1 = 0 ;
   11765           2 :   PyObject *swig_obj[1] ;
   11766           2 :   bool result;
   11767             :   
   11768           2 :   if (!args) SWIG_fail;
   11769           2 :   swig_obj[0] = args;
   11770           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11771           2 :   if (!SWIG_IsOK(res1)) {
   11772           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_mtimeKnown_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   11773             :   }
   11774           2 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11775           2 :   {
   11776           2 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11777           2 :     result = (bool) ((arg1)->mtimeKnown);
   11778           2 :     SWIG_PYTHON_THREAD_END_ALLOW;
   11779             :   }
   11780           2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   11781           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; } }
   11782             :   return resultobj;
   11783             : fail:
   11784             :   return NULL;
   11785             : }
   11786             : 
   11787             : 
   11788           2 : SWIGINTERN PyObject *_wrap_DirEntry_extra_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11789           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11790           2 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11791           2 :   void *argp1 = 0 ;
   11792           2 :   int res1 = 0 ;
   11793           2 :   PyObject *swig_obj[1] ;
   11794           2 :   char **result = 0 ;
   11795             :   
   11796           2 :   if (!args) SWIG_fail;
   11797           2 :   swig_obj[0] = args;
   11798           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11799           2 :   if (!SWIG_IsOK(res1)) {
   11800           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_extra_get" "', argument " "1"" of type '" "DirEntry *""'"); 
   11801             :   }
   11802           2 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11803           2 :   {
   11804           2 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11805           2 :     result = (char **) ((arg1)->extra);
   11806           2 :     SWIG_PYTHON_THREAD_END_ALLOW;
   11807             :   }
   11808           2 :   {
   11809             :     /* %typemap(out) char **dict */
   11810           2 :     resultobj = GetCSLStringAsPyDict(result, false);
   11811             :   }
   11812           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; } }
   11813             :   return resultobj;
   11814             : fail:
   11815             :   return NULL;
   11816             : }
   11817             : 
   11818             : 
   11819           0 : SWIGINTERN PyObject *_wrap_new_DirEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11820           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11821           0 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11822           0 :   void *argp1 = 0 ;
   11823           0 :   int res1 = 0 ;
   11824           0 :   PyObject *swig_obj[1] ;
   11825           0 :   DirEntry *result = 0 ;
   11826             :   
   11827           0 :   if (!args) SWIG_fail;
   11828           0 :   swig_obj[0] = args;
   11829           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11830           0 :   if (!SWIG_IsOK(res1)) {
   11831           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DirEntry" "', argument " "1"" of type '" "DirEntry const *""'"); 
   11832             :   }
   11833           0 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11834           0 :   {
   11835           0 :     const int bLocalUseExceptions = GetUseExceptions();
   11836           0 :     if ( bLocalUseExceptions ) {
   11837           0 :       pushErrorHandler();
   11838             :     }
   11839           0 :     {
   11840           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11841           0 :       result = (DirEntry *)new_DirEntry((DirEntry const *)arg1);
   11842           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11843             :     }
   11844           0 :     if ( bLocalUseExceptions ) {
   11845           0 :       popErrorHandler();
   11846             :     }
   11847             : #ifndef SED_HACKS
   11848             :     if ( bLocalUseExceptions ) {
   11849             :       CPLErr eclass = CPLGetLastErrorType();
   11850             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11851             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11852             :       }
   11853             :     }
   11854             : #endif
   11855             :   }
   11856           0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DirEntry, SWIG_POINTER_NEW |  0 );
   11857           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; } }
   11858             :   return resultobj;
   11859             : fail:
   11860             :   return NULL;
   11861             : }
   11862             : 
   11863             : 
   11864          79 : SWIGINTERN PyObject *_wrap_delete_DirEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11865          79 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11866          79 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11867          79 :   void *argp1 = 0 ;
   11868          79 :   int res1 = 0 ;
   11869          79 :   PyObject *swig_obj[1] ;
   11870             :   
   11871          79 :   if (!args) SWIG_fail;
   11872          79 :   swig_obj[0] = args;
   11873          79 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, SWIG_POINTER_DISOWN |  0 );
   11874          79 :   if (!SWIG_IsOK(res1)) {
   11875           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DirEntry" "', argument " "1"" of type '" "DirEntry *""'"); 
   11876             :   }
   11877          79 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11878          79 :   {
   11879          79 :     const int bLocalUseExceptions = GetUseExceptions();
   11880          79 :     if ( bLocalUseExceptions ) {
   11881           0 :       pushErrorHandler();
   11882             :     }
   11883          79 :     {
   11884          79 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11885          79 :       delete_DirEntry(arg1);
   11886          79 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11887             :     }
   11888          79 :     if ( bLocalUseExceptions ) {
   11889           0 :       popErrorHandler();
   11890             :     }
   11891             : #ifndef SED_HACKS
   11892             :     if ( bLocalUseExceptions ) {
   11893             :       CPLErr eclass = CPLGetLastErrorType();
   11894             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11895             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11896             :       }
   11897             :     }
   11898             : #endif
   11899             :   }
   11900          79 :   resultobj = SWIG_Py_Void();
   11901          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; } }
   11902             :   return resultobj;
   11903             : fail:
   11904             :   return NULL;
   11905             : }
   11906             : 
   11907             : 
   11908           0 : SWIGINTERN PyObject *_wrap_DirEntry_IsDirectory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11909           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11910           0 :   DirEntry *arg1 = (DirEntry *) 0 ;
   11911           0 :   void *argp1 = 0 ;
   11912           0 :   int res1 = 0 ;
   11913           0 :   PyObject *swig_obj[1] ;
   11914           0 :   bool result;
   11915             :   
   11916           0 :   if (!args) SWIG_fail;
   11917           0 :   swig_obj[0] = args;
   11918           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_DirEntry, 0 |  0 );
   11919           0 :   if (!SWIG_IsOK(res1)) {
   11920           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DirEntry_IsDirectory" "', argument " "1"" of type '" "DirEntry *""'"); 
   11921             :   }
   11922           0 :   arg1 = reinterpret_cast< DirEntry * >(argp1);
   11923           0 :   {
   11924           0 :     const int bLocalUseExceptions = GetUseExceptions();
   11925           0 :     if ( bLocalUseExceptions ) {
   11926           0 :       pushErrorHandler();
   11927             :     }
   11928           0 :     {
   11929           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11930           0 :       result = (bool)DirEntry_IsDirectory(arg1);
   11931           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11932             :     }
   11933           0 :     if ( bLocalUseExceptions ) {
   11934           0 :       popErrorHandler();
   11935             :     }
   11936             : #ifndef SED_HACKS
   11937             :     if ( bLocalUseExceptions ) {
   11938             :       CPLErr eclass = CPLGetLastErrorType();
   11939             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11940             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11941             :       }
   11942             :     }
   11943             : #endif
   11944             :   }
   11945           0 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   11946           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; } }
   11947             :   return resultobj;
   11948             : fail:
   11949             :   return NULL;
   11950             : }
   11951             : 
   11952             : 
   11953         277 : SWIGINTERN PyObject *DirEntry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11954         277 :   PyObject *obj;
   11955         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   11956         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_DirEntry, SWIG_NewClientData(obj));
   11957         277 :   return SWIG_Py_Void();
   11958             : }
   11959             : 
   11960           0 : SWIGINTERN PyObject *DirEntry_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11961           0 :   return SWIG_Python_InitShadowInstance(args);
   11962             : }
   11963             : 
   11964         112 : SWIGINTERN PyObject *_wrap_GetNextDirEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11965         112 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   11966         112 :   VSIDIR *arg1 = (VSIDIR *) 0 ;
   11967         112 :   void *argp1 = 0 ;
   11968         112 :   int res1 = 0 ;
   11969         112 :   PyObject *swig_obj[1] ;
   11970         112 :   DirEntry *result = 0 ;
   11971             :   
   11972         112 :   if (!args) SWIG_fail;
   11973         112 :   swig_obj[0] = args;
   11974         112 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSIDIR, 0 |  0 );
   11975         112 :   if (!SWIG_IsOK(res1)) {
   11976           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetNextDirEntry" "', argument " "1"" of type '" "VSIDIR *""'"); 
   11977             :   }
   11978         112 :   arg1 = reinterpret_cast< VSIDIR * >(argp1);
   11979         112 :   {
   11980         112 :     if (!arg1) {
   11981           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11982             :     }
   11983             :   }
   11984         112 :   {
   11985         112 :     const int bLocalUseExceptions = GetUseExceptions();
   11986         112 :     if ( bLocalUseExceptions ) {
   11987           0 :       pushErrorHandler();
   11988             :     }
   11989         112 :     {
   11990         112 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   11991         112 :       result = (DirEntry *)wrapper_VSIGetNextDirEntry(arg1);
   11992         112 :       SWIG_PYTHON_THREAD_END_ALLOW;
   11993             :     }
   11994         112 :     if ( bLocalUseExceptions ) {
   11995           0 :       popErrorHandler();
   11996             :     }
   11997             : #ifndef SED_HACKS
   11998             :     if ( bLocalUseExceptions ) {
   11999             :       CPLErr eclass = CPLGetLastErrorType();
   12000             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12001             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12002             :       }
   12003             :     }
   12004             : #endif
   12005             :   }
   12006         112 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DirEntry, SWIG_POINTER_OWN |  0 );
   12007         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; } }
   12008             :   return resultobj;
   12009             : fail:
   12010             :   return NULL;
   12011             : }
   12012             : 
   12013             : 
   12014          33 : SWIGINTERN PyObject *_wrap_CloseDir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12015          33 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12016          33 :   VSIDIR *arg1 = (VSIDIR *) 0 ;
   12017          33 :   void *argp1 = 0 ;
   12018          33 :   int res1 = 0 ;
   12019          33 :   PyObject *swig_obj[1] ;
   12020             :   
   12021          33 :   if (!args) SWIG_fail;
   12022          33 :   swig_obj[0] = args;
   12023          33 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSIDIR, 0 |  0 );
   12024          33 :   if (!SWIG_IsOK(res1)) {
   12025           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CloseDir" "', argument " "1"" of type '" "VSIDIR *""'"); 
   12026             :   }
   12027          33 :   arg1 = reinterpret_cast< VSIDIR * >(argp1);
   12028          33 :   {
   12029          33 :     if (!arg1) {
   12030           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12031             :     }
   12032             :   }
   12033          33 :   {
   12034          33 :     const int bLocalUseExceptions = GetUseExceptions();
   12035          33 :     if ( bLocalUseExceptions ) {
   12036           0 :       pushErrorHandler();
   12037             :     }
   12038          33 :     {
   12039          33 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12040          33 :       VSICloseDir(arg1);
   12041          33 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12042             :     }
   12043          33 :     if ( bLocalUseExceptions ) {
   12044           0 :       popErrorHandler();
   12045             :     }
   12046             : #ifndef SED_HACKS
   12047             :     if ( bLocalUseExceptions ) {
   12048             :       CPLErr eclass = CPLGetLastErrorType();
   12049             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12050             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12051             :       }
   12052             :     }
   12053             : #endif
   12054             :   }
   12055          33 :   resultobj = SWIG_Py_Void();
   12056          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; } }
   12057             :   return resultobj;
   12058             : fail:
   12059             :   return NULL;
   12060             : }
   12061             : 
   12062             : 
   12063        4174 : SWIGINTERN PyObject *_wrap_SetConfigOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12064        4174 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12065        4174 :   char *arg1 = (char *) 0 ;
   12066        4174 :   char *arg2 = (char *) 0 ;
   12067        4174 :   int res1 ;
   12068        4174 :   char *buf1 = 0 ;
   12069        4174 :   int alloc1 = 0 ;
   12070        4174 :   int res2 ;
   12071        4174 :   char *buf2 = 0 ;
   12072        4174 :   int alloc2 = 0 ;
   12073        4174 :   PyObject *swig_obj[2] ;
   12074             :   
   12075        4174 :   if (!SWIG_Python_UnpackTuple(args, "SetConfigOption", 2, 2, swig_obj)) SWIG_fail;
   12076        4174 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12077        4174 :   if (!SWIG_IsOK(res1)) {
   12078           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SetConfigOption" "', argument " "1"" of type '" "char const *""'");
   12079             :   }
   12080        4174 :   arg1 = reinterpret_cast< char * >(buf1);
   12081        4174 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12082        4174 :   if (!SWIG_IsOK(res2)) {
   12083           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SetConfigOption" "', argument " "2"" of type '" "char const *""'");
   12084             :   }
   12085        4174 :   arg2 = reinterpret_cast< char * >(buf2);
   12086        4174 :   {
   12087        4174 :     if (!arg1) {
   12088           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12089             :     }
   12090             :   }
   12091        4174 :   {
   12092        4174 :     const int bLocalUseExceptions = GetUseExceptions();
   12093        4174 :     if ( bLocalUseExceptions ) {
   12094         227 :       pushErrorHandler();
   12095             :     }
   12096        4174 :     {
   12097        4174 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12098        4174 :       CPLSetConfigOption((char const *)arg1,(char const *)arg2);
   12099        4174 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12100             :     }
   12101        4174 :     if ( bLocalUseExceptions ) {
   12102         227 :       popErrorHandler();
   12103             :     }
   12104             : #ifndef SED_HACKS
   12105             :     if ( bLocalUseExceptions ) {
   12106             :       CPLErr eclass = CPLGetLastErrorType();
   12107             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12108             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12109             :       }
   12110             :     }
   12111             : #endif
   12112             :   }
   12113        4174 :   resultobj = SWIG_Py_Void();
   12114        4174 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12115        4174 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12116        4174 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   12117             :   return resultobj;
   12118           0 : fail:
   12119           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12120           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12121             :   return NULL;
   12122             : }
   12123             : 
   12124             : 
   12125        6062 : SWIGINTERN PyObject *_wrap_SetThreadLocalConfigOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12126        6062 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12127        6062 :   char *arg1 = (char *) 0 ;
   12128        6062 :   char *arg2 = (char *) 0 ;
   12129        6062 :   int res1 ;
   12130        6062 :   char *buf1 = 0 ;
   12131        6062 :   int alloc1 = 0 ;
   12132        6062 :   int res2 ;
   12133        6062 :   char *buf2 = 0 ;
   12134        6062 :   int alloc2 = 0 ;
   12135        6062 :   PyObject *swig_obj[2] ;
   12136             :   
   12137        6062 :   if (!SWIG_Python_UnpackTuple(args, "SetThreadLocalConfigOption", 2, 2, swig_obj)) SWIG_fail;
   12138        6062 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12139        6062 :   if (!SWIG_IsOK(res1)) {
   12140           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SetThreadLocalConfigOption" "', argument " "1"" of type '" "char const *""'");
   12141             :   }
   12142        6062 :   arg1 = reinterpret_cast< char * >(buf1);
   12143        6062 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12144        6062 :   if (!SWIG_IsOK(res2)) {
   12145           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SetThreadLocalConfigOption" "', argument " "2"" of type '" "char const *""'");
   12146             :   }
   12147        6062 :   arg2 = reinterpret_cast< char * >(buf2);
   12148        6062 :   {
   12149        6062 :     if (!arg1) {
   12150           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12151             :     }
   12152             :   }
   12153        6062 :   {
   12154        6062 :     const int bLocalUseExceptions = GetUseExceptions();
   12155        6062 :     if ( bLocalUseExceptions ) {
   12156        2924 :       pushErrorHandler();
   12157             :     }
   12158        6062 :     {
   12159        6062 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12160        6062 :       CPLSetThreadLocalConfigOption((char const *)arg1,(char const *)arg2);
   12161        6062 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12162             :     }
   12163        6062 :     if ( bLocalUseExceptions ) {
   12164        2924 :       popErrorHandler();
   12165             :     }
   12166             : #ifndef SED_HACKS
   12167             :     if ( bLocalUseExceptions ) {
   12168             :       CPLErr eclass = CPLGetLastErrorType();
   12169             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12170             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12171             :       }
   12172             :     }
   12173             : #endif
   12174             :   }
   12175        6062 :   resultobj = SWIG_Py_Void();
   12176        6062 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12177        6062 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12178        6062 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   12179             :   return resultobj;
   12180           0 : fail:
   12181           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12182           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12183             :   return NULL;
   12184             : }
   12185             : 
   12186             : 
   12187       21300 : SWIGINTERN PyObject *_wrap_GetConfigOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12188       21300 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12189       21300 :   char *arg1 = (char *) 0 ;
   12190       21300 :   char *arg2 = (char *) NULL ;
   12191       21300 :   int res1 ;
   12192       21300 :   char *buf1 = 0 ;
   12193       21300 :   int alloc1 = 0 ;
   12194       21300 :   int res2 ;
   12195       21300 :   char *buf2 = 0 ;
   12196       21300 :   int alloc2 = 0 ;
   12197       21300 :   PyObject *swig_obj[2] ;
   12198       21300 :   char *result = 0 ;
   12199             :   
   12200       21300 :   if (!SWIG_Python_UnpackTuple(args, "GetConfigOption", 1, 2, swig_obj)) SWIG_fail;
   12201       21300 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12202       21300 :   if (!SWIG_IsOK(res1)) {
   12203           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetConfigOption" "', argument " "1"" of type '" "char const *""'");
   12204             :   }
   12205       21300 :   arg1 = reinterpret_cast< char * >(buf1);
   12206       21300 :   if (swig_obj[1]) {
   12207        1049 :     res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12208        1049 :     if (!SWIG_IsOK(res2)) {
   12209           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetConfigOption" "', argument " "2"" of type '" "char const *""'");
   12210             :     }
   12211        1049 :     arg2 = reinterpret_cast< char * >(buf2);
   12212             :   }
   12213       21300 :   {
   12214       21300 :     if (!arg1) {
   12215           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12216             :     }
   12217             :   }
   12218       21300 :   {
   12219       21300 :     const int bLocalUseExceptions = GetUseExceptions();
   12220       21300 :     if ( bLocalUseExceptions ) {
   12221       20753 :       pushErrorHandler();
   12222             :     }
   12223       21300 :     {
   12224       21300 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12225       21300 :       result = (char *)wrapper_CPLGetConfigOption((char const *)arg1,(char const *)arg2);
   12226       21300 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12227             :     }
   12228       21300 :     if ( bLocalUseExceptions ) {
   12229       20753 :       popErrorHandler();
   12230             :     }
   12231             : #ifndef SED_HACKS
   12232             :     if ( bLocalUseExceptions ) {
   12233             :       CPLErr eclass = CPLGetLastErrorType();
   12234             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12235             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12236             :       }
   12237             :     }
   12238             : #endif
   12239             :   }
   12240       21300 :   resultobj = SWIG_FromCharPtr((const char *)result);
   12241       21300 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12242       21300 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12243       21300 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   12244             :   return resultobj;
   12245           0 : fail:
   12246           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12247           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12248             :   return NULL;
   12249             : }
   12250             : 
   12251             : 
   12252        1904 : SWIGINTERN PyObject *_wrap_GetGlobalConfigOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12253        1904 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12254        1904 :   char *arg1 = (char *) 0 ;
   12255        1904 :   char *arg2 = (char *) NULL ;
   12256        1904 :   int res1 ;
   12257        1904 :   char *buf1 = 0 ;
   12258        1904 :   int alloc1 = 0 ;
   12259        1904 :   int res2 ;
   12260        1904 :   char *buf2 = 0 ;
   12261        1904 :   int alloc2 = 0 ;
   12262        1904 :   PyObject *swig_obj[2] ;
   12263        1904 :   char *result = 0 ;
   12264             :   
   12265        1904 :   if (!SWIG_Python_UnpackTuple(args, "GetGlobalConfigOption", 1, 2, swig_obj)) SWIG_fail;
   12266        1904 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12267        1904 :   if (!SWIG_IsOK(res1)) {
   12268           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetGlobalConfigOption" "', argument " "1"" of type '" "char const *""'");
   12269             :   }
   12270        1904 :   arg1 = reinterpret_cast< char * >(buf1);
   12271        1904 :   if (swig_obj[1]) {
   12272           0 :     res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12273           0 :     if (!SWIG_IsOK(res2)) {
   12274           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetGlobalConfigOption" "', argument " "2"" of type '" "char const *""'");
   12275             :     }
   12276           0 :     arg2 = reinterpret_cast< char * >(buf2);
   12277             :   }
   12278        1904 :   {
   12279        1904 :     if (!arg1) {
   12280           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12281             :     }
   12282             :   }
   12283        1904 :   {
   12284        1904 :     const int bLocalUseExceptions = GetUseExceptions();
   12285        1904 :     if ( bLocalUseExceptions ) {
   12286          68 :       pushErrorHandler();
   12287             :     }
   12288        1904 :     {
   12289        1904 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12290        1904 :       result = (char *)wrapper_CPLGetGlobalConfigOption((char const *)arg1,(char const *)arg2);
   12291        1904 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12292             :     }
   12293        1904 :     if ( bLocalUseExceptions ) {
   12294          68 :       popErrorHandler();
   12295             :     }
   12296             : #ifndef SED_HACKS
   12297             :     if ( bLocalUseExceptions ) {
   12298             :       CPLErr eclass = CPLGetLastErrorType();
   12299             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12300             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12301             :       }
   12302             :     }
   12303             : #endif
   12304             :   }
   12305        1904 :   resultobj = SWIG_FromCharPtr((const char *)result);
   12306        1904 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12307        1904 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12308        1904 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   12309             :   return resultobj;
   12310           0 : fail:
   12311           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12312           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12313             :   return NULL;
   12314             : }
   12315             : 
   12316             : 
   12317        3036 : SWIGINTERN PyObject *_wrap_GetThreadLocalConfigOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12318        3036 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12319        3036 :   char *arg1 = (char *) 0 ;
   12320        3036 :   char *arg2 = (char *) NULL ;
   12321        3036 :   int res1 ;
   12322        3036 :   char *buf1 = 0 ;
   12323        3036 :   int alloc1 = 0 ;
   12324        3036 :   int res2 ;
   12325        3036 :   char *buf2 = 0 ;
   12326        3036 :   int alloc2 = 0 ;
   12327        3036 :   PyObject *swig_obj[2] ;
   12328        3036 :   char *result = 0 ;
   12329             :   
   12330        3036 :   if (!SWIG_Python_UnpackTuple(args, "GetThreadLocalConfigOption", 1, 2, swig_obj)) SWIG_fail;
   12331        3036 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12332        3036 :   if (!SWIG_IsOK(res1)) {
   12333           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetThreadLocalConfigOption" "', argument " "1"" of type '" "char const *""'");
   12334             :   }
   12335        3036 :   arg1 = reinterpret_cast< char * >(buf1);
   12336        3036 :   if (swig_obj[1]) {
   12337           0 :     res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12338           0 :     if (!SWIG_IsOK(res2)) {
   12339           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetThreadLocalConfigOption" "', argument " "2"" of type '" "char const *""'");
   12340             :     }
   12341           0 :     arg2 = reinterpret_cast< char * >(buf2);
   12342             :   }
   12343        3036 :   {
   12344        3036 :     if (!arg1) {
   12345           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12346             :     }
   12347             :   }
   12348        3036 :   {
   12349        3036 :     const int bLocalUseExceptions = GetUseExceptions();
   12350        3036 :     if ( bLocalUseExceptions ) {
   12351        1462 :       pushErrorHandler();
   12352             :     }
   12353        3036 :     {
   12354        3036 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12355        3036 :       result = (char *)wrapper_CPLGetThreadLocalConfigOption((char const *)arg1,(char const *)arg2);
   12356        3036 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12357             :     }
   12358        3036 :     if ( bLocalUseExceptions ) {
   12359        1462 :       popErrorHandler();
   12360             :     }
   12361             : #ifndef SED_HACKS
   12362             :     if ( bLocalUseExceptions ) {
   12363             :       CPLErr eclass = CPLGetLastErrorType();
   12364             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12365             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12366             :       }
   12367             :     }
   12368             : #endif
   12369             :   }
   12370        3036 :   resultobj = SWIG_FromCharPtr((const char *)result);
   12371        3036 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12372        3036 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12373        3036 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   12374             :   return resultobj;
   12375           0 : fail:
   12376           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12377           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12378             :   return NULL;
   12379             : }
   12380             : 
   12381             : 
   12382           6 : SWIGINTERN PyObject *_wrap_GetConfigOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12383           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12384           6 :   char **result = 0 ;
   12385             :   
   12386           6 :   if (!SWIG_Python_UnpackTuple(args, "GetConfigOptions", 0, 0, 0)) SWIG_fail;
   12387           6 :   {
   12388           6 :     const int bLocalUseExceptions = GetUseExceptions();
   12389           6 :     if ( bLocalUseExceptions ) {
   12390           0 :       pushErrorHandler();
   12391             :     }
   12392           6 :     {
   12393           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12394           6 :       result = (char **)wrapper_GetConfigOptions();
   12395           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12396             :     }
   12397           6 :     if ( bLocalUseExceptions ) {
   12398           0 :       popErrorHandler();
   12399             :     }
   12400             : #ifndef SED_HACKS
   12401             :     if ( bLocalUseExceptions ) {
   12402             :       CPLErr eclass = CPLGetLastErrorType();
   12403             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12404             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12405             :       }
   12406             :     }
   12407             : #endif
   12408             :   }
   12409           6 :   {
   12410             :     /* %typemap(out) char **dict */
   12411           6 :     resultobj = GetCSLStringAsPyDict(result, true);
   12412             :   }
   12413           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; } }
   12414             :   return resultobj;
   12415           0 : fail:
   12416           0 :   return NULL;
   12417             : }
   12418             : 
   12419             : 
   12420          31 : SWIGINTERN PyObject *_wrap_SetPathSpecificOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12421          31 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12422          31 :   char *arg1 = (char *) 0 ;
   12423          31 :   char *arg2 = (char *) 0 ;
   12424          31 :   char *arg3 = (char *) 0 ;
   12425          31 :   int res1 ;
   12426          31 :   char *buf1 = 0 ;
   12427          31 :   int alloc1 = 0 ;
   12428          31 :   int res2 ;
   12429          31 :   char *buf2 = 0 ;
   12430          31 :   int alloc2 = 0 ;
   12431          31 :   int res3 ;
   12432          31 :   char *buf3 = 0 ;
   12433          31 :   int alloc3 = 0 ;
   12434          31 :   PyObject *swig_obj[3] ;
   12435             :   
   12436          31 :   if (!SWIG_Python_UnpackTuple(args, "SetPathSpecificOption", 3, 3, swig_obj)) SWIG_fail;
   12437          31 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12438          31 :   if (!SWIG_IsOK(res1)) {
   12439           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SetPathSpecificOption" "', argument " "1"" of type '" "char const *""'");
   12440             :   }
   12441          31 :   arg1 = reinterpret_cast< char * >(buf1);
   12442          31 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12443          31 :   if (!SWIG_IsOK(res2)) {
   12444           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SetPathSpecificOption" "', argument " "2"" of type '" "char const *""'");
   12445             :   }
   12446          31 :   arg2 = reinterpret_cast< char * >(buf2);
   12447          31 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   12448          31 :   if (!SWIG_IsOK(res3)) {
   12449           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SetPathSpecificOption" "', argument " "3"" of type '" "char const *""'");
   12450             :   }
   12451          31 :   arg3 = reinterpret_cast< char * >(buf3);
   12452          31 :   {
   12453          31 :     if (!arg1) {
   12454           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12455             :     }
   12456             :   }
   12457          30 :   {
   12458          30 :     if (!arg2) {
   12459           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12460             :     }
   12461             :   }
   12462          29 :   {
   12463          29 :     const int bLocalUseExceptions = GetUseExceptions();
   12464          29 :     if ( bLocalUseExceptions ) {
   12465          19 :       pushErrorHandler();
   12466             :     }
   12467          29 :     {
   12468          29 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12469          29 :       VSISetPathSpecificOption((char const *)arg1,(char const *)arg2,(char const *)arg3);
   12470          29 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12471             :     }
   12472          29 :     if ( bLocalUseExceptions ) {
   12473          19 :       popErrorHandler();
   12474             :     }
   12475             : #ifndef SED_HACKS
   12476             :     if ( bLocalUseExceptions ) {
   12477             :       CPLErr eclass = CPLGetLastErrorType();
   12478             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12479             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12480             :       }
   12481             :     }
   12482             : #endif
   12483             :   }
   12484          29 :   resultobj = SWIG_Py_Void();
   12485          29 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12486          29 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12487          29 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   12488          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; } }
   12489             :   return resultobj;
   12490           2 : fail:
   12491           2 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12492           2 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12493           2 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   12494             :   return NULL;
   12495             : }
   12496             : 
   12497             : 
   12498          56 : SWIGINTERN PyObject *_wrap_SetCredential(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12499          56 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12500          56 :   char *arg1 = (char *) 0 ;
   12501          56 :   char *arg2 = (char *) 0 ;
   12502          56 :   char *arg3 = (char *) 0 ;
   12503          56 :   int res1 ;
   12504          56 :   char *buf1 = 0 ;
   12505          56 :   int alloc1 = 0 ;
   12506          56 :   int res2 ;
   12507          56 :   char *buf2 = 0 ;
   12508          56 :   int alloc2 = 0 ;
   12509          56 :   int res3 ;
   12510          56 :   char *buf3 = 0 ;
   12511          56 :   int alloc3 = 0 ;
   12512          56 :   PyObject *swig_obj[3] ;
   12513             :   
   12514          56 :   if (!SWIG_Python_UnpackTuple(args, "SetCredential", 3, 3, swig_obj)) SWIG_fail;
   12515          56 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12516          56 :   if (!SWIG_IsOK(res1)) {
   12517           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SetCredential" "', argument " "1"" of type '" "char const *""'");
   12518             :   }
   12519          56 :   arg1 = reinterpret_cast< char * >(buf1);
   12520          56 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12521          56 :   if (!SWIG_IsOK(res2)) {
   12522           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SetCredential" "', argument " "2"" of type '" "char const *""'");
   12523             :   }
   12524          56 :   arg2 = reinterpret_cast< char * >(buf2);
   12525          56 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   12526          56 :   if (!SWIG_IsOK(res3)) {
   12527           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SetCredential" "', argument " "3"" of type '" "char const *""'");
   12528             :   }
   12529          56 :   arg3 = reinterpret_cast< char * >(buf3);
   12530          56 :   {
   12531          56 :     if (!arg1) {
   12532           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12533             :     }
   12534             :   }
   12535          56 :   {
   12536          56 :     if (!arg2) {
   12537           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12538             :     }
   12539             :   }
   12540          56 :   {
   12541          56 :     const int bLocalUseExceptions = GetUseExceptions();
   12542          56 :     if ( bLocalUseExceptions ) {
   12543           0 :       pushErrorHandler();
   12544             :     }
   12545          56 :     {
   12546          56 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12547          56 :       wrapper_VSISetCredential((char const *)arg1,(char const *)arg2,(char const *)arg3);
   12548          56 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12549             :     }
   12550          56 :     if ( bLocalUseExceptions ) {
   12551           0 :       popErrorHandler();
   12552             :     }
   12553             : #ifndef SED_HACKS
   12554             :     if ( bLocalUseExceptions ) {
   12555             :       CPLErr eclass = CPLGetLastErrorType();
   12556             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12557             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12558             :       }
   12559             :     }
   12560             : #endif
   12561             :   }
   12562          56 :   resultobj = SWIG_Py_Void();
   12563          56 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12564          56 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12565          56 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   12566          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; } }
   12567             :   return resultobj;
   12568           0 : fail:
   12569           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12570           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12571           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   12572             :   return NULL;
   12573             : }
   12574             : 
   12575             : 
   12576           0 : SWIGINTERN PyObject *_wrap_GetCredential(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12577           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12578           0 :   char *arg1 = (char *) 0 ;
   12579           0 :   char *arg2 = (char *) 0 ;
   12580           0 :   char *arg3 = (char *) NULL ;
   12581           0 :   int res1 ;
   12582           0 :   char *buf1 = 0 ;
   12583           0 :   int alloc1 = 0 ;
   12584           0 :   int res2 ;
   12585           0 :   char *buf2 = 0 ;
   12586           0 :   int alloc2 = 0 ;
   12587           0 :   int res3 ;
   12588           0 :   char *buf3 = 0 ;
   12589           0 :   int alloc3 = 0 ;
   12590           0 :   PyObject *swig_obj[3] ;
   12591           0 :   char *result = 0 ;
   12592             :   
   12593           0 :   if (!SWIG_Python_UnpackTuple(args, "GetCredential", 2, 3, swig_obj)) SWIG_fail;
   12594           0 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12595           0 :   if (!SWIG_IsOK(res1)) {
   12596           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetCredential" "', argument " "1"" of type '" "char const *""'");
   12597             :   }
   12598           0 :   arg1 = reinterpret_cast< char * >(buf1);
   12599           0 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12600           0 :   if (!SWIG_IsOK(res2)) {
   12601           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetCredential" "', argument " "2"" of type '" "char const *""'");
   12602             :   }
   12603           0 :   arg2 = reinterpret_cast< char * >(buf2);
   12604           0 :   if (swig_obj[2]) {
   12605           0 :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   12606           0 :     if (!SWIG_IsOK(res3)) {
   12607           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GetCredential" "', argument " "3"" of type '" "char const *""'");
   12608             :     }
   12609           0 :     arg3 = reinterpret_cast< char * >(buf3);
   12610             :   }
   12611           0 :   {
   12612           0 :     if (!arg1) {
   12613           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12614             :     }
   12615             :   }
   12616           0 :   {
   12617           0 :     if (!arg2) {
   12618           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12619             :     }
   12620             :   }
   12621           0 :   {
   12622           0 :     const int bLocalUseExceptions = GetUseExceptions();
   12623           0 :     if ( bLocalUseExceptions ) {
   12624           0 :       pushErrorHandler();
   12625             :     }
   12626           0 :     {
   12627           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12628           0 :       result = (char *)wrapper_VSIGetCredential((char const *)arg1,(char const *)arg2,(char const *)arg3);
   12629           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12630             :     }
   12631           0 :     if ( bLocalUseExceptions ) {
   12632           0 :       popErrorHandler();
   12633             :     }
   12634             : #ifndef SED_HACKS
   12635             :     if ( bLocalUseExceptions ) {
   12636             :       CPLErr eclass = CPLGetLastErrorType();
   12637             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12638             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12639             :       }
   12640             :     }
   12641             : #endif
   12642             :   }
   12643           0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   12644           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12645           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12646           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   12647           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; } }
   12648             :   return resultobj;
   12649           0 : fail:
   12650           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12651           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12652           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   12653             :   return NULL;
   12654             : }
   12655             : 
   12656             : 
   12657          12 : SWIGINTERN PyObject *_wrap_GetPathSpecificOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12658          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12659          12 :   char *arg1 = (char *) 0 ;
   12660          12 :   char *arg2 = (char *) 0 ;
   12661          12 :   char *arg3 = (char *) NULL ;
   12662          12 :   int res1 ;
   12663          12 :   char *buf1 = 0 ;
   12664          12 :   int alloc1 = 0 ;
   12665          12 :   int res2 ;
   12666          12 :   char *buf2 = 0 ;
   12667          12 :   int alloc2 = 0 ;
   12668          12 :   int res3 ;
   12669          12 :   char *buf3 = 0 ;
   12670          12 :   int alloc3 = 0 ;
   12671          12 :   PyObject *swig_obj[3] ;
   12672          12 :   char *result = 0 ;
   12673             :   
   12674          12 :   if (!SWIG_Python_UnpackTuple(args, "GetPathSpecificOption", 2, 3, swig_obj)) SWIG_fail;
   12675          12 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12676          12 :   if (!SWIG_IsOK(res1)) {
   12677           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetPathSpecificOption" "', argument " "1"" of type '" "char const *""'");
   12678             :   }
   12679          12 :   arg1 = reinterpret_cast< char * >(buf1);
   12680          12 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   12681          12 :   if (!SWIG_IsOK(res2)) {
   12682           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetPathSpecificOption" "', argument " "2"" of type '" "char const *""'");
   12683             :   }
   12684          12 :   arg2 = reinterpret_cast< char * >(buf2);
   12685          12 :   if (swig_obj[2]) {
   12686           2 :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   12687           2 :     if (!SWIG_IsOK(res3)) {
   12688           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GetPathSpecificOption" "', argument " "3"" of type '" "char const *""'");
   12689             :     }
   12690           2 :     arg3 = reinterpret_cast< char * >(buf3);
   12691             :   }
   12692          12 :   {
   12693          12 :     if (!arg1) {
   12694           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12695             :     }
   12696             :   }
   12697          11 :   {
   12698          11 :     if (!arg2) {
   12699           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   12700             :     }
   12701             :   }
   12702          10 :   {
   12703          10 :     const int bLocalUseExceptions = GetUseExceptions();
   12704          10 :     if ( bLocalUseExceptions ) {
   12705          10 :       pushErrorHandler();
   12706             :     }
   12707          10 :     {
   12708          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12709          10 :       result = (char *)wrapper_VSIGetPathSpecificOption((char const *)arg1,(char const *)arg2,(char const *)arg3);
   12710          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12711             :     }
   12712          10 :     if ( bLocalUseExceptions ) {
   12713          10 :       popErrorHandler();
   12714             :     }
   12715             : #ifndef SED_HACKS
   12716             :     if ( bLocalUseExceptions ) {
   12717             :       CPLErr eclass = CPLGetLastErrorType();
   12718             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12719             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12720             :       }
   12721             :     }
   12722             : #endif
   12723             :   }
   12724          10 :   resultobj = SWIG_FromCharPtr((const char *)result);
   12725          10 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12726          10 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12727          10 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   12728          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; } }
   12729             :   return resultobj;
   12730           2 : fail:
   12731           2 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12732           2 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   12733           2 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   12734             :   return NULL;
   12735             : }
   12736             : 
   12737             : 
   12738           8 : SWIGINTERN PyObject *_wrap_ClearCredentials(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12739           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12740           8 :   char *arg1 = (char *) NULL ;
   12741           8 :   int res1 ;
   12742           8 :   char *buf1 = 0 ;
   12743           8 :   int alloc1 = 0 ;
   12744           8 :   PyObject *swig_obj[1] ;
   12745             :   
   12746           8 :   if (!SWIG_Python_UnpackTuple(args, "ClearCredentials", 0, 1, swig_obj)) SWIG_fail;
   12747           8 :   if (swig_obj[0]) {
   12748           8 :     res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12749           8 :     if (!SWIG_IsOK(res1)) {
   12750           0 :       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClearCredentials" "', argument " "1"" of type '" "char const *""'");
   12751             :     }
   12752           8 :     arg1 = reinterpret_cast< char * >(buf1);
   12753             :   }
   12754           8 :   {
   12755           8 :     const int bLocalUseExceptions = GetUseExceptions();
   12756           8 :     if ( bLocalUseExceptions ) {
   12757           0 :       pushErrorHandler();
   12758             :     }
   12759           8 :     {
   12760           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12761           8 :       wrapper_VSIClearCredentials((char const *)arg1);
   12762           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12763             :     }
   12764           8 :     if ( bLocalUseExceptions ) {
   12765           0 :       popErrorHandler();
   12766             :     }
   12767             : #ifndef SED_HACKS
   12768             :     if ( bLocalUseExceptions ) {
   12769             :       CPLErr eclass = CPLGetLastErrorType();
   12770             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12771             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12772             :       }
   12773             :     }
   12774             : #endif
   12775             :   }
   12776           8 :   resultobj = SWIG_Py_Void();
   12777           8 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12778           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; } }
   12779             :   return resultobj;
   12780           0 : fail:
   12781           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12782             :   return NULL;
   12783             : }
   12784             : 
   12785             : 
   12786          10 : SWIGINTERN PyObject *_wrap_ClearPathSpecificOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12787          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12788          10 :   char *arg1 = (char *) NULL ;
   12789          10 :   int res1 ;
   12790          10 :   char *buf1 = 0 ;
   12791          10 :   int alloc1 = 0 ;
   12792          10 :   PyObject *swig_obj[1] ;
   12793             :   
   12794          10 :   if (!SWIG_Python_UnpackTuple(args, "ClearPathSpecificOptions", 0, 1, swig_obj)) SWIG_fail;
   12795          10 :   if (swig_obj[0]) {
   12796           7 :     res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12797           7 :     if (!SWIG_IsOK(res1)) {
   12798           0 :       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClearPathSpecificOptions" "', argument " "1"" of type '" "char const *""'");
   12799             :     }
   12800           7 :     arg1 = reinterpret_cast< char * >(buf1);
   12801             :   }
   12802          10 :   {
   12803          10 :     const int bLocalUseExceptions = GetUseExceptions();
   12804          10 :     if ( bLocalUseExceptions ) {
   12805           5 :       pushErrorHandler();
   12806             :     }
   12807          10 :     {
   12808          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12809          10 :       wrapper_VSIClearPathSpecificOptions((char const *)arg1);
   12810          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12811             :     }
   12812          10 :     if ( bLocalUseExceptions ) {
   12813           5 :       popErrorHandler();
   12814             :     }
   12815             : #ifndef SED_HACKS
   12816             :     if ( bLocalUseExceptions ) {
   12817             :       CPLErr eclass = CPLGetLastErrorType();
   12818             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12819             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12820             :       }
   12821             :     }
   12822             : #endif
   12823             :   }
   12824          10 :   resultobj = SWIG_Py_Void();
   12825          10 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12826          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; } }
   12827             :   return resultobj;
   12828           0 : fail:
   12829           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12830             :   return NULL;
   12831             : }
   12832             : 
   12833             : 
   12834           0 : SWIGINTERN PyObject *_wrap_CPLBinaryToHex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12835           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12836           0 :   int arg1 ;
   12837           0 :   GByte *arg2 = (GByte *) 0 ;
   12838           0 :   int alloc1 = 0 ;
   12839           0 :   bool viewIsValid1 = false ;
   12840           0 :   Py_buffer view1 ;
   12841           0 :   PyObject *swig_obj[1] ;
   12842           0 :   retStringAndCPLFree *result = 0 ;
   12843             :   
   12844           0 :   if (!args) SWIG_fail;
   12845           0 :   swig_obj[0] = args;
   12846           0 :   {
   12847             :     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
   12848           0 :     char* ptr = NULL;
   12849           0 :     if( !GetBufferAsCharPtrIntSize(swig_obj[0], &arg1, &ptr, &alloc1, &viewIsValid1, &view1) ) {
   12850           0 :       SWIG_fail;
   12851             :     }
   12852           0 :     arg2 = (GByte *)ptr;
   12853             :   }
   12854           0 :   {
   12855           0 :     const int bLocalUseExceptions = GetUseExceptions();
   12856           0 :     if ( bLocalUseExceptions ) {
   12857           0 :       pushErrorHandler();
   12858             :     }
   12859           0 :     {
   12860           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12861           0 :       result = (retStringAndCPLFree *)CPLBinaryToHex(arg1,(GByte const *)arg2);
   12862           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12863             :     }
   12864           0 :     if ( bLocalUseExceptions ) {
   12865           0 :       popErrorHandler();
   12866             :     }
   12867             : #ifndef SED_HACKS
   12868             :     if ( bLocalUseExceptions ) {
   12869             :       CPLErr eclass = CPLGetLastErrorType();
   12870             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12871             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12872             :       }
   12873             :     }
   12874             : #endif
   12875             :   }
   12876           0 :   {
   12877             :     /* %typemap(out) (retStringAndCPLFree*) */
   12878           0 :     Py_XDECREF(resultobj);
   12879           0 :     if(result)
   12880             :     {
   12881           0 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   12882           0 :       CPLFree(result);
   12883             :     }
   12884             :     else
   12885             :     {
   12886           0 :       resultobj = Py_None;
   12887           0 :       Py_INCREF(resultobj);
   12888             :     }
   12889             :   }
   12890           0 :   {
   12891             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   12892           0 :     if( viewIsValid1 ) {
   12893           0 :       PyBuffer_Release(&view1);
   12894             :     }
   12895           0 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   12896           0 :       delete[] arg2;
   12897             :     }
   12898             :   }
   12899           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; } }
   12900             :   return resultobj;
   12901           0 : fail:
   12902           0 :   {
   12903             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   12904           0 :     if( viewIsValid1 ) {
   12905           0 :       PyBuffer_Release(&view1);
   12906             :     }
   12907           0 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   12908             :       delete[] arg2;
   12909             :     }
   12910             :   }
   12911             :   return NULL;
   12912             : }
   12913             : 
   12914             : 
   12915           0 : SWIGINTERN PyObject *_wrap_CPLHexToBinary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12916           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12917           0 :   char *arg1 = (char *) 0 ;
   12918           0 :   int *arg2 = (int *) 0 ;
   12919           0 :   int res1 ;
   12920           0 :   char *buf1 = 0 ;
   12921           0 :   int alloc1 = 0 ;
   12922           0 :   void *argp2 = 0 ;
   12923           0 :   int res2 = 0 ;
   12924           0 :   PyObject *swig_obj[2] ;
   12925           0 :   GByte *result = 0 ;
   12926             :   
   12927           0 :   if (!SWIG_Python_UnpackTuple(args, "CPLHexToBinary", 2, 2, swig_obj)) SWIG_fail;
   12928           0 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   12929           0 :   if (!SWIG_IsOK(res1)) {
   12930           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CPLHexToBinary" "', argument " "1"" of type '" "char const *""'");
   12931             :   }
   12932           0 :   arg1 = reinterpret_cast< char * >(buf1);
   12933           0 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_int, 0 |  0 );
   12934           0 :   if (!SWIG_IsOK(res2)) {
   12935           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CPLHexToBinary" "', argument " "2"" of type '" "int *""'"); 
   12936             :   }
   12937           0 :   arg2 = reinterpret_cast< int * >(argp2);
   12938           0 :   {
   12939           0 :     const int bLocalUseExceptions = GetUseExceptions();
   12940           0 :     if ( bLocalUseExceptions ) {
   12941           0 :       pushErrorHandler();
   12942             :     }
   12943           0 :     {
   12944           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   12945           0 :       result = (GByte *)CPLHexToBinary((char const *)arg1,arg2);
   12946           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   12947             :     }
   12948           0 :     if ( bLocalUseExceptions ) {
   12949           0 :       popErrorHandler();
   12950             :     }
   12951             : #ifndef SED_HACKS
   12952             :     if ( bLocalUseExceptions ) {
   12953             :       CPLErr eclass = CPLGetLastErrorType();
   12954             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12955             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12956             :       }
   12957             :     }
   12958             : #endif
   12959             :   }
   12960           0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GByte, 0 |  0 );
   12961           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12962           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; } }
   12963             :   return resultobj;
   12964           0 : fail:
   12965           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   12966             :   return NULL;
   12967             : }
   12968             : 
   12969             : 
   12970        3581 : SWIGINTERN PyObject *_wrap_FileFromMemBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12971        3581 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   12972        3581 :   char *arg1 = (char *) 0 ;
   12973        3581 :   GIntBig arg2 ;
   12974        3581 :   char *arg3 = (char *) 0 ;
   12975        3581 :   int bToFree1 = 0 ;
   12976        3581 :   int alloc2 = 0 ;
   12977        3581 :   bool viewIsValid2 = false ;
   12978        3581 :   Py_buffer view2 ;
   12979        3581 :   PyObject *swig_obj[2] ;
   12980        3581 :   VSI_RETVAL result;
   12981             :   
   12982        3581 :   if (!SWIG_Python_UnpackTuple(args, "FileFromMemBuffer", 2, 2, swig_obj)) SWIG_fail;
   12983        3581 :   {
   12984             :     /* %typemap(in) (const char *utf8_path) */
   12985        3581 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   12986             :     {
   12987        1760 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   12988             :     }
   12989             :     else
   12990             :     {
   12991        1821 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   12992             :       
   12993             :     }
   12994        3581 :     if (arg1 == NULL)
   12995             :     {
   12996           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   12997           0 :       SWIG_fail;
   12998             :     }
   12999             :   }
   13000        3581 :   {
   13001             :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   13002        3581 :     char* ptr = NULL;
   13003        3581 :     if( !GetBufferAsCharPtrGIntBigSize(swig_obj[1], &arg2, &ptr, &alloc2, &viewIsValid2, &view2) ) {
   13004           0 :       SWIG_fail;
   13005             :     }
   13006        3581 :     arg3 = (char *)ptr;
   13007             :   }
   13008        3581 :   {
   13009        3581 :     if (!arg1) {
   13010        3581 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13011             :     }
   13012             :   }
   13013        3581 :   {
   13014        3581 :     const int bLocalUseExceptions = GetUseExceptions();
   13015        3581 :     if ( bLocalUseExceptions ) {
   13016        1261 :       pushErrorHandler();
   13017             :     }
   13018        3581 :     {
   13019        3581 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13020        3581 :       result = wrapper_VSIFileFromMemBuffer((char const *)arg1,arg2,(char const *)arg3);
   13021        3581 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13022             :     }
   13023        3581 :     if ( bLocalUseExceptions ) {
   13024        1261 :       popErrorHandler();
   13025             :     }
   13026             : #ifndef SED_HACKS
   13027             :     if ( bLocalUseExceptions ) {
   13028             :       CPLErr eclass = CPLGetLastErrorType();
   13029             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13030             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13031             :       }
   13032             :     }
   13033             : #endif
   13034             :   }
   13035        3581 :   {
   13036             :     /* %typemap(out) VSI_RETVAL */
   13037        3582 :     if ( result != 0 && GetUseExceptions()) {
   13038           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   13039           0 :       if( pszMessage[0] != '\0' )
   13040           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   13041             :       else
   13042           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   13043           0 :       SWIG_fail;
   13044             :     }
   13045             :   }
   13046        3581 :   {
   13047             :     /* %typemap(freearg) (const char *utf8_path) */
   13048        3581 :     GDALPythonFreeCStr(arg1, bToFree1);
   13049             :   }
   13050        3581 :   {
   13051             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   13052        3581 :     if( viewIsValid2 ) {
   13053        1250 :       PyBuffer_Release(&view2);
   13054             :     }
   13055        2331 :     else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
   13056        2331 :       delete[] arg3;
   13057             :     }
   13058             :   }
   13059        3581 :   {
   13060             :     /* %typemap(ret) VSI_RETVAL */
   13061        3581 :     resultobj = PyInt_FromLong( result );
   13062             :   }
   13063        3581 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   13064             :   return resultobj;
   13065           0 : fail:
   13066           0 :   {
   13067             :     /* %typemap(freearg) (const char *utf8_path) */
   13068           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   13069             :   }
   13070           0 :   {
   13071             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   13072           0 :     if( viewIsValid2 ) {
   13073           0 :       PyBuffer_Release(&view2);
   13074             :     }
   13075        3581 :     else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
   13076           0 :       delete[] arg3;
   13077             :     }
   13078             :   }
   13079             :   return NULL;
   13080             : }
   13081             : 
   13082             : 
   13083        7706 : SWIGINTERN PyObject *_wrap_Unlink(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13084        7706 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13085        7706 :   char *arg1 = (char *) 0 ;
   13086        7706 :   int bToFree1 = 0 ;
   13087        7706 :   PyObject *swig_obj[1] ;
   13088        7706 :   VSI_RETVAL result;
   13089             :   
   13090        7706 :   if (!args) SWIG_fail;
   13091        7706 :   swig_obj[0] = args;
   13092        7706 :   {
   13093             :     /* %typemap(in) (const char *utf8_path) */
   13094        7706 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   13095             :     {
   13096        6875 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   13097             :     }
   13098             :     else
   13099             :     {
   13100         831 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   13101             :       
   13102             :     }
   13103        7706 :     if (arg1 == NULL)
   13104             :     {
   13105           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13106           0 :       SWIG_fail;
   13107             :     }
   13108             :   }
   13109        7706 :   {
   13110        7706 :     if (!arg1) {
   13111        7706 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13112             :     }
   13113             :   }
   13114        7706 :   {
   13115        7706 :     const int bLocalUseExceptions = GetUseExceptions();
   13116        7706 :     if ( bLocalUseExceptions ) {
   13117        1436 :       pushErrorHandler();
   13118             :     }
   13119        7706 :     {
   13120        7706 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13121        7706 :       result = VSIUnlink((char const *)arg1);
   13122        7706 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13123             :     }
   13124        7706 :     if ( bLocalUseExceptions ) {
   13125        1436 :       popErrorHandler();
   13126             :     }
   13127             : #ifndef SED_HACKS
   13128             :     if ( bLocalUseExceptions ) {
   13129             :       CPLErr eclass = CPLGetLastErrorType();
   13130             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13131             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13132             :       }
   13133             :     }
   13134             : #endif
   13135             :   }
   13136        7706 :   {
   13137             :     /* %typemap(out) VSI_RETVAL */
   13138        8269 :     if ( result != 0 && GetUseExceptions()) {
   13139          27 :       const char* pszMessage = CPLGetLastErrorMsg();
   13140          27 :       if( pszMessage[0] != '\0' )
   13141           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   13142             :       else
   13143          27 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   13144          27 :       SWIG_fail;
   13145             :     }
   13146             :   }
   13147        7679 :   {
   13148             :     /* %typemap(freearg) (const char *utf8_path) */
   13149        7679 :     GDALPythonFreeCStr(arg1, bToFree1);
   13150             :   }
   13151        7679 :   {
   13152             :     /* %typemap(ret) VSI_RETVAL */
   13153        7679 :     resultobj = PyInt_FromLong( result );
   13154             :   }
   13155        7679 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   13156             :   return resultobj;
   13157          27 : fail:
   13158          27 :   {
   13159             :     /* %typemap(freearg) (const char *utf8_path) */
   13160        7733 :     GDALPythonFreeCStr(arg1, bToFree1);
   13161             :   }
   13162             :   return NULL;
   13163             : }
   13164             : 
   13165             : 
   13166          11 : SWIGINTERN PyObject *_wrap_UnlinkBatch(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13167          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13168          11 :   char **arg1 = (char **) 0 ;
   13169          11 :   PyObject *swig_obj[1] ;
   13170          11 :   bool result;
   13171             :   
   13172          11 :   if (!args) SWIG_fail;
   13173          11 :   swig_obj[0] = args;
   13174          11 :   {
   13175             :     /* %typemap(in) char **dict */
   13176          11 :     arg1 = NULL;
   13177          11 :     if ( PySequence_Check( swig_obj[0] ) ) {
   13178          11 :       int bErr = FALSE;
   13179          11 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   13180          11 :       if ( bErr )
   13181             :       {
   13182           0 :         SWIG_fail;
   13183             :       }
   13184             :     }
   13185           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   13186           0 :       int bErr = FALSE;
   13187           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   13188           0 :       if ( bErr )
   13189             :       {
   13190           0 :         SWIG_fail;
   13191             :       }
   13192             :     }
   13193             :     else {
   13194           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   13195           0 :       SWIG_fail;
   13196             :     }
   13197             :   }
   13198          11 :   {
   13199          11 :     const int bLocalUseExceptions = GetUseExceptions();
   13200          11 :     if ( bLocalUseExceptions ) {
   13201           0 :       pushErrorHandler();
   13202             :     }
   13203          11 :     {
   13204          11 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13205          11 :       result = (bool)wrapper_VSIUnlinkBatch(arg1);
   13206          11 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13207             :     }
   13208          11 :     if ( bLocalUseExceptions ) {
   13209           0 :       popErrorHandler();
   13210             :     }
   13211             : #ifndef SED_HACKS
   13212             :     if ( bLocalUseExceptions ) {
   13213             :       CPLErr eclass = CPLGetLastErrorType();
   13214             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13215             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13216             :       }
   13217             :     }
   13218             : #endif
   13219             :   }
   13220          11 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   13221          11 :   {
   13222             :     /* %typemap(freearg) char **dict */
   13223          11 :     CSLDestroy( arg1 );
   13224             :   }
   13225          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; } }
   13226             :   return resultobj;
   13227           0 : fail:
   13228           0 :   {
   13229             :     /* %typemap(freearg) char **dict */
   13230           0 :     CSLDestroy( arg1 );
   13231             :   }
   13232             :   return NULL;
   13233             : }
   13234             : 
   13235             : 
   13236           0 : SWIGINTERN PyObject *_wrap_HasThreadSupport(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13237           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13238           0 :   int result;
   13239             :   
   13240           0 :   if (!SWIG_Python_UnpackTuple(args, "HasThreadSupport", 0, 0, 0)) SWIG_fail;
   13241           0 :   {
   13242           0 :     const int bLocalUseExceptions = GetUseExceptions();
   13243           0 :     if ( bLocalUseExceptions ) {
   13244           0 :       pushErrorHandler();
   13245             :     }
   13246           0 :     {
   13247           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13248           0 :       result = (int)wrapper_HasThreadSupport();
   13249           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13250             :     }
   13251           0 :     if ( bLocalUseExceptions ) {
   13252           0 :       popErrorHandler();
   13253             :     }
   13254             : #ifndef SED_HACKS
   13255             :     if ( bLocalUseExceptions ) {
   13256             :       CPLErr eclass = CPLGetLastErrorType();
   13257             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13258             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13259             :       }
   13260             :     }
   13261             : #endif
   13262             :   }
   13263           0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13264           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; } }
   13265             :   return resultobj;
   13266           0 : fail:
   13267           0 :   return NULL;
   13268             : }
   13269             : 
   13270             : 
   13271           2 : SWIGINTERN PyObject *_wrap_GetCurrentThreadCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13272           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13273           2 :   int result;
   13274             :   
   13275           2 :   if (!SWIG_Python_UnpackTuple(args, "GetCurrentThreadCount", 0, 0, 0)) SWIG_fail;
   13276           2 :   {
   13277           2 :     const int bLocalUseExceptions = GetUseExceptions();
   13278           2 :     if ( bLocalUseExceptions ) {
   13279           2 :       pushErrorHandler();
   13280             :     }
   13281           2 :     {
   13282           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13283           2 :       result = (int)CPLGetCurrentThreadCount();
   13284           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13285             :     }
   13286           2 :     if ( bLocalUseExceptions ) {
   13287           2 :       popErrorHandler();
   13288             :     }
   13289             : #ifndef SED_HACKS
   13290             :     if ( bLocalUseExceptions ) {
   13291             :       CPLErr eclass = CPLGetLastErrorType();
   13292             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13293             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13294             :       }
   13295             :     }
   13296             : #endif
   13297             :   }
   13298           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13299           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; } }
   13300             :   return resultobj;
   13301           0 : fail:
   13302           0 :   return NULL;
   13303             : }
   13304             : 
   13305             : 
   13306        4964 : SWIGINTERN PyObject *_wrap_Mkdir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13307        4964 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13308        4964 :   char *arg1 = (char *) 0 ;
   13309        4964 :   int arg2 ;
   13310        4964 :   int bToFree1 = 0 ;
   13311        4964 :   int val2 ;
   13312        4964 :   int ecode2 = 0 ;
   13313        4964 :   PyObject *swig_obj[2] ;
   13314        4964 :   VSI_RETVAL result;
   13315             :   
   13316        4964 :   if (!SWIG_Python_UnpackTuple(args, "Mkdir", 2, 2, swig_obj)) SWIG_fail;
   13317        4964 :   {
   13318             :     /* %typemap(in) (const char *utf8_path) */
   13319        4964 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   13320             :     {
   13321        4675 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   13322             :     }
   13323             :     else
   13324             :     {
   13325         289 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   13326             :       
   13327             :     }
   13328        4964 :     if (arg1 == NULL)
   13329             :     {
   13330           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13331           0 :       SWIG_fail;
   13332             :     }
   13333             :   }
   13334        4964 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   13335        4964 :   if (!SWIG_IsOK(ecode2)) {
   13336           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Mkdir" "', argument " "2"" of type '" "int""'");
   13337             :   } 
   13338        4964 :   arg2 = static_cast< int >(val2);
   13339        4964 :   {
   13340        4964 :     if (!arg1) {
   13341        4964 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13342             :     }
   13343             :   }
   13344        4964 :   {
   13345        4964 :     const int bLocalUseExceptions = GetUseExceptions();
   13346        4964 :     if ( bLocalUseExceptions ) {
   13347        1686 :       pushErrorHandler();
   13348             :     }
   13349        4964 :     {
   13350        4964 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13351        4964 :       result = VSIMkdir((char const *)arg1,arg2);
   13352        4964 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13353             :     }
   13354        4964 :     if ( bLocalUseExceptions ) {
   13355        1686 :       popErrorHandler();
   13356             :     }
   13357             : #ifndef SED_HACKS
   13358             :     if ( bLocalUseExceptions ) {
   13359             :       CPLErr eclass = CPLGetLastErrorType();
   13360             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13361             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13362             :       }
   13363             :     }
   13364             : #endif
   13365             :   }
   13366        4964 :   {
   13367             :     /* %typemap(out) VSI_RETVAL */
   13368        5011 :     if ( result != 0 && GetUseExceptions()) {
   13369           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   13370           0 :       if( pszMessage[0] != '\0' )
   13371           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   13372             :       else
   13373           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   13374           0 :       SWIG_fail;
   13375             :     }
   13376             :   }
   13377        4964 :   {
   13378             :     /* %typemap(freearg) (const char *utf8_path) */
   13379        4964 :     GDALPythonFreeCStr(arg1, bToFree1);
   13380             :   }
   13381        4964 :   {
   13382             :     /* %typemap(ret) VSI_RETVAL */
   13383        4964 :     resultobj = PyInt_FromLong( result );
   13384             :   }
   13385        4964 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   13386             :   return resultobj;
   13387           0 : fail:
   13388           0 :   {
   13389             :     /* %typemap(freearg) (const char *utf8_path) */
   13390        4964 :     GDALPythonFreeCStr(arg1, bToFree1);
   13391             :   }
   13392             :   return NULL;
   13393             : }
   13394             : 
   13395             : 
   13396          34 : SWIGINTERN PyObject *_wrap_Rmdir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13397          34 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13398          34 :   char *arg1 = (char *) 0 ;
   13399          34 :   int bToFree1 = 0 ;
   13400          34 :   PyObject *swig_obj[1] ;
   13401          34 :   VSI_RETVAL result;
   13402             :   
   13403          34 :   if (!args) SWIG_fail;
   13404          34 :   swig_obj[0] = args;
   13405          34 :   {
   13406             :     /* %typemap(in) (const char *utf8_path) */
   13407          34 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   13408             :     {
   13409          31 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   13410             :     }
   13411             :     else
   13412             :     {
   13413           3 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   13414             :       
   13415             :     }
   13416          34 :     if (arg1 == NULL)
   13417             :     {
   13418           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13419           0 :       SWIG_fail;
   13420             :     }
   13421             :   }
   13422          34 :   {
   13423          34 :     if (!arg1) {
   13424          34 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13425             :     }
   13426             :   }
   13427          34 :   {
   13428          34 :     const int bLocalUseExceptions = GetUseExceptions();
   13429          34 :     if ( bLocalUseExceptions ) {
   13430           1 :       pushErrorHandler();
   13431             :     }
   13432          34 :     {
   13433          34 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13434          34 :       result = VSIRmdir((char const *)arg1);
   13435          34 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13436             :     }
   13437          34 :     if ( bLocalUseExceptions ) {
   13438           1 :       popErrorHandler();
   13439             :     }
   13440             : #ifndef SED_HACKS
   13441             :     if ( bLocalUseExceptions ) {
   13442             :       CPLErr eclass = CPLGetLastErrorType();
   13443             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13444             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13445             :       }
   13446             :     }
   13447             : #endif
   13448             :   }
   13449          34 :   {
   13450             :     /* %typemap(out) VSI_RETVAL */
   13451          51 :     if ( result != 0 && GetUseExceptions()) {
   13452           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   13453           0 :       if( pszMessage[0] != '\0' )
   13454           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   13455             :       else
   13456           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   13457           0 :       SWIG_fail;
   13458             :     }
   13459             :   }
   13460          34 :   {
   13461             :     /* %typemap(freearg) (const char *utf8_path) */
   13462          34 :     GDALPythonFreeCStr(arg1, bToFree1);
   13463             :   }
   13464          34 :   {
   13465             :     /* %typemap(ret) VSI_RETVAL */
   13466          34 :     resultobj = PyInt_FromLong( result );
   13467             :   }
   13468          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; } }
   13469             :   return resultobj;
   13470           0 : fail:
   13471           0 :   {
   13472             :     /* %typemap(freearg) (const char *utf8_path) */
   13473          34 :     GDALPythonFreeCStr(arg1, bToFree1);
   13474             :   }
   13475             :   return NULL;
   13476             : }
   13477             : 
   13478             : 
   13479          10 : SWIGINTERN PyObject *_wrap_MkdirRecursive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13480          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13481          10 :   char *arg1 = (char *) 0 ;
   13482          10 :   int arg2 ;
   13483          10 :   int bToFree1 = 0 ;
   13484          10 :   int val2 ;
   13485          10 :   int ecode2 = 0 ;
   13486          10 :   PyObject *swig_obj[2] ;
   13487          10 :   VSI_RETVAL result;
   13488             :   
   13489          10 :   if (!SWIG_Python_UnpackTuple(args, "MkdirRecursive", 2, 2, swig_obj)) SWIG_fail;
   13490          10 :   {
   13491             :     /* %typemap(in) (const char *utf8_path) */
   13492          10 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   13493             :     {
   13494          10 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   13495             :     }
   13496             :     else
   13497             :     {
   13498           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   13499             :       
   13500             :     }
   13501          10 :     if (arg1 == NULL)
   13502             :     {
   13503           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13504           0 :       SWIG_fail;
   13505             :     }
   13506             :   }
   13507          10 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   13508          10 :   if (!SWIG_IsOK(ecode2)) {
   13509           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MkdirRecursive" "', argument " "2"" of type '" "int""'");
   13510             :   } 
   13511          10 :   arg2 = static_cast< int >(val2);
   13512          10 :   {
   13513          10 :     if (!arg1) {
   13514          10 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13515             :     }
   13516             :   }
   13517          10 :   {
   13518          10 :     const int bLocalUseExceptions = GetUseExceptions();
   13519          10 :     if ( bLocalUseExceptions ) {
   13520           8 :       pushErrorHandler();
   13521             :     }
   13522          10 :     {
   13523          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13524          10 :       result = VSIMkdirRecursive((char const *)arg1,arg2);
   13525          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13526             :     }
   13527          10 :     if ( bLocalUseExceptions ) {
   13528           8 :       popErrorHandler();
   13529             :     }
   13530             : #ifndef SED_HACKS
   13531             :     if ( bLocalUseExceptions ) {
   13532             :       CPLErr eclass = CPLGetLastErrorType();
   13533             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13534             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13535             :       }
   13536             :     }
   13537             : #endif
   13538             :   }
   13539          10 :   {
   13540             :     /* %typemap(out) VSI_RETVAL */
   13541          10 :     if ( result != 0 && GetUseExceptions()) {
   13542           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   13543           0 :       if( pszMessage[0] != '\0' )
   13544           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   13545             :       else
   13546           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   13547           0 :       SWIG_fail;
   13548             :     }
   13549             :   }
   13550          10 :   {
   13551             :     /* %typemap(freearg) (const char *utf8_path) */
   13552          10 :     GDALPythonFreeCStr(arg1, bToFree1);
   13553             :   }
   13554          10 :   {
   13555             :     /* %typemap(ret) VSI_RETVAL */
   13556          10 :     resultobj = PyInt_FromLong( result );
   13557             :   }
   13558          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; } }
   13559             :   return resultobj;
   13560           0 : fail:
   13561           0 :   {
   13562             :     /* %typemap(freearg) (const char *utf8_path) */
   13563          10 :     GDALPythonFreeCStr(arg1, bToFree1);
   13564             :   }
   13565             :   return NULL;
   13566             : }
   13567             : 
   13568             : 
   13569        4622 : SWIGINTERN PyObject *_wrap_RmdirRecursive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13570        4622 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13571        4622 :   char *arg1 = (char *) 0 ;
   13572        4622 :   int bToFree1 = 0 ;
   13573        4622 :   PyObject *swig_obj[1] ;
   13574        4622 :   VSI_RETVAL result;
   13575             :   
   13576        4622 :   if (!args) SWIG_fail;
   13577        4622 :   swig_obj[0] = args;
   13578        4622 :   {
   13579             :     /* %typemap(in) (const char *utf8_path) */
   13580        4622 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   13581             :     {
   13582        4615 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   13583             :     }
   13584             :     else
   13585             :     {
   13586           7 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   13587             :       
   13588             :     }
   13589        4622 :     if (arg1 == NULL)
   13590             :     {
   13591           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13592           0 :       SWIG_fail;
   13593             :     }
   13594             :   }
   13595        4622 :   {
   13596        4622 :     if (!arg1) {
   13597        4622 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13598             :     }
   13599             :   }
   13600        4622 :   {
   13601        4622 :     const int bLocalUseExceptions = GetUseExceptions();
   13602        4622 :     if ( bLocalUseExceptions ) {
   13603        1643 :       pushErrorHandler();
   13604             :     }
   13605        4622 :     {
   13606        4622 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13607        4622 :       result = VSIRmdirRecursive((char const *)arg1);
   13608        4622 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13609             :     }
   13610        4622 :     if ( bLocalUseExceptions ) {
   13611        1643 :       popErrorHandler();
   13612             :     }
   13613             : #ifndef SED_HACKS
   13614             :     if ( bLocalUseExceptions ) {
   13615             :       CPLErr eclass = CPLGetLastErrorType();
   13616             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13617             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13618             :       }
   13619             :     }
   13620             : #endif
   13621             :   }
   13622        4622 :   {
   13623             :     /* %typemap(out) VSI_RETVAL */
   13624        4633 :     if ( result != 0 && GetUseExceptions()) {
   13625           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   13626           0 :       if( pszMessage[0] != '\0' )
   13627           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   13628             :       else
   13629           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   13630           0 :       SWIG_fail;
   13631             :     }
   13632             :   }
   13633        4622 :   {
   13634             :     /* %typemap(freearg) (const char *utf8_path) */
   13635        4622 :     GDALPythonFreeCStr(arg1, bToFree1);
   13636             :   }
   13637        4622 :   {
   13638             :     /* %typemap(ret) VSI_RETVAL */
   13639        4622 :     resultobj = PyInt_FromLong( result );
   13640             :   }
   13641        4622 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   13642             :   return resultobj;
   13643           0 : fail:
   13644           0 :   {
   13645             :     /* %typemap(freearg) (const char *utf8_path) */
   13646        4622 :     GDALPythonFreeCStr(arg1, bToFree1);
   13647             :   }
   13648             :   return NULL;
   13649             : }
   13650             : 
   13651             : 
   13652          12 : SWIGINTERN PyObject *_wrap_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13653          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13654          12 :   char *arg1 = (char *) 0 ;
   13655          12 :   char *arg2 = (char *) 0 ;
   13656          12 :   int bToFree1 = 0 ;
   13657          12 :   int bToFree2 = 0 ;
   13658          12 :   PyObject *swig_obj[2] ;
   13659          12 :   VSI_RETVAL result;
   13660             :   
   13661          12 :   if (!SWIG_Python_UnpackTuple(args, "Rename", 2, 2, swig_obj)) SWIG_fail;
   13662          12 :   {
   13663             :     /* %typemap(in) (const char *utf8_path) */
   13664          12 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   13665             :     {
   13666          12 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   13667             :     }
   13668             :     else
   13669             :     {
   13670           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   13671             :       
   13672             :     }
   13673          12 :     if (arg1 == NULL)
   13674             :     {
   13675           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13676           0 :       SWIG_fail;
   13677             :     }
   13678             :   }
   13679          12 :   {
   13680             :     /* %typemap(in) (const char *utf8_path) */
   13681          12 :     if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
   13682             :     {
   13683          12 :       arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
   13684             :     }
   13685             :     else
   13686             :     {
   13687           0 :       arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
   13688             :       
   13689             :     }
   13690          12 :     if (arg2 == NULL)
   13691             :     {
   13692           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13693           0 :       SWIG_fail;
   13694             :     }
   13695             :   }
   13696          12 :   {
   13697          12 :     if (!arg1) {
   13698          12 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13699             :     }
   13700             :   }
   13701          12 :   {
   13702          12 :     if (!arg2) {
   13703          12 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13704             :     }
   13705             :   }
   13706          12 :   {
   13707          12 :     const int bLocalUseExceptions = GetUseExceptions();
   13708          12 :     if ( bLocalUseExceptions ) {
   13709           2 :       pushErrorHandler();
   13710             :     }
   13711          12 :     {
   13712          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13713          12 :       result = VSIRename((char const *)arg1,(char const *)arg2);
   13714          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13715             :     }
   13716          12 :     if ( bLocalUseExceptions ) {
   13717           2 :       popErrorHandler();
   13718             :     }
   13719             : #ifndef SED_HACKS
   13720             :     if ( bLocalUseExceptions ) {
   13721             :       CPLErr eclass = CPLGetLastErrorType();
   13722             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13723             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13724             :       }
   13725             :     }
   13726             : #endif
   13727             :   }
   13728          12 :   {
   13729             :     /* %typemap(out) VSI_RETVAL */
   13730          14 :     if ( result != 0 && GetUseExceptions()) {
   13731           1 :       const char* pszMessage = CPLGetLastErrorMsg();
   13732           1 :       if( pszMessage[0] != '\0' )
   13733           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   13734             :       else
   13735           1 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   13736           1 :       SWIG_fail;
   13737             :     }
   13738             :   }
   13739          11 :   {
   13740             :     /* %typemap(freearg) (const char *utf8_path) */
   13741          11 :     GDALPythonFreeCStr(arg1, bToFree1);
   13742             :   }
   13743          11 :   {
   13744             :     /* %typemap(freearg) (const char *utf8_path) */
   13745          11 :     GDALPythonFreeCStr(arg2, bToFree2);
   13746             :   }
   13747          11 :   {
   13748             :     /* %typemap(ret) VSI_RETVAL */
   13749          11 :     resultobj = PyInt_FromLong( result );
   13750             :   }
   13751          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; } }
   13752             :   return resultobj;
   13753           1 : fail:
   13754           1 :   {
   13755             :     /* %typemap(freearg) (const char *utf8_path) */
   13756           1 :     GDALPythonFreeCStr(arg1, bToFree1);
   13757             :   }
   13758           1 :   {
   13759             :     /* %typemap(freearg) (const char *utf8_path) */
   13760          13 :     GDALPythonFreeCStr(arg2, bToFree2);
   13761             :   }
   13762             :   return NULL;
   13763             : }
   13764             : 
   13765             : 
   13766           7 : SWIGINTERN PyObject *_wrap_Move(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   13767           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13768           7 :   char *arg1 = (char *) 0 ;
   13769           7 :   char *arg2 = (char *) 0 ;
   13770           7 :   char **arg3 = (char **) NULL ;
   13771           7 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   13772           7 :   void *arg5 = (void *) NULL ;
   13773           7 :   int bToFree1 = 0 ;
   13774           7 :   int bToFree2 = 0 ;
   13775           7 :   PyObject * obj0 = 0 ;
   13776           7 :   PyObject * obj1 = 0 ;
   13777           7 :   PyObject * obj2 = 0 ;
   13778           7 :   PyObject * obj3 = 0 ;
   13779           7 :   PyObject * obj4 = 0 ;
   13780           7 :   char * kwnames[] = {
   13781             :     (char *)"old_path",  (char *)"new_path",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   13782             :   };
   13783           7 :   VSI_RETVAL result;
   13784             :   
   13785             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   13786           7 :   PyProgressData *psProgressInfo;
   13787           7 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   13788           7 :   psProgressInfo->nLastReported = -1;
   13789           7 :   psProgressInfo->psPyCallback = NULL;
   13790           7 :   psProgressInfo->psPyCallbackData = NULL;
   13791           7 :   arg5 = psProgressInfo;
   13792           7 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:Move", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   13793           7 :   {
   13794             :     /* %typemap(in) (const char *utf8_path) */
   13795           7 :     if (PyUnicode_Check(obj0) || PyBytes_Check(obj0))
   13796             :     {
   13797           0 :       arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   13798             :     }
   13799             :     else
   13800             :     {
   13801           7 :       arg1 = GDALPythonPathToCStr(obj0, &bToFree1);
   13802             :       
   13803             :     }
   13804           7 :     if (arg1 == NULL)
   13805             :     {
   13806           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13807           0 :       SWIG_fail;
   13808             :     }
   13809             :   }
   13810           7 :   {
   13811             :     /* %typemap(in) (const char *utf8_path) */
   13812           7 :     if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
   13813             :     {
   13814           0 :       arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
   13815             :     }
   13816             :     else
   13817             :     {
   13818           7 :       arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
   13819             :       
   13820             :     }
   13821           7 :     if (arg2 == NULL)
   13822             :     {
   13823           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   13824           0 :       SWIG_fail;
   13825             :     }
   13826             :   }
   13827           7 :   if (obj2) {
   13828           0 :     {
   13829             :       /* %typemap(in) char **dict */
   13830           0 :       arg3 = NULL;
   13831           0 :       if ( PySequence_Check( obj2 ) ) {
   13832           0 :         int bErr = FALSE;
   13833           0 :         arg3 = CSLFromPySequence(obj2, &bErr);
   13834           0 :         if ( bErr )
   13835             :         {
   13836           0 :           SWIG_fail;
   13837             :         }
   13838             :       }
   13839           0 :       else if ( PyMapping_Check( obj2 ) ) {
   13840           0 :         int bErr = FALSE;
   13841           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   13842           0 :         if ( bErr )
   13843             :         {
   13844           0 :           SWIG_fail;
   13845             :         }
   13846             :       }
   13847             :       else {
   13848           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   13849           0 :         SWIG_fail;
   13850             :       }
   13851             :     }
   13852             :   }
   13853           7 :   if (obj3) {
   13854           4 :     {
   13855             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   13856             :       /* callback_func typemap */
   13857             :       
   13858             :       /* In some cases 0 is passed instead of None. */
   13859             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   13860           4 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   13861             :       {
   13862           0 :         if( PyLong_AsLong(obj3) == 0 )
   13863             :         {
   13864           0 :           obj3 = Py_None;
   13865             :         }
   13866             :       }
   13867             :       
   13868           4 :       if (obj3 && obj3 != Py_None ) {
   13869           4 :         void* cbfunction = NULL;
   13870           4 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   13871             :             (void**)&cbfunction,
   13872             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   13873             :             SWIG_POINTER_EXCEPTION | 0 ));
   13874             :         
   13875           4 :         if ( cbfunction == GDALTermProgress ) {
   13876             :           arg4 = GDALTermProgress;
   13877             :         } else {
   13878           4 :           if (!PyCallable_Check(obj3)) {
   13879           0 :             PyErr_SetString( PyExc_RuntimeError,
   13880             :               "Object given is not a Python function" );
   13881           0 :             SWIG_fail;
   13882             :           }
   13883           4 :           psProgressInfo->psPyCallback = obj3;
   13884           4 :           arg4 = PyProgressProxy;
   13885             :         }
   13886             :         
   13887             :       }
   13888             :       
   13889             :     }
   13890             :   }
   13891           7 :   if (obj4) {
   13892           0 :     {
   13893             :       /* %typemap(in) ( void* callback_data=NULL)  */
   13894           0 :       psProgressInfo->psPyCallbackData = obj4 ;
   13895             :     }
   13896             :   }
   13897           7 :   {
   13898           7 :     if (!arg1) {
   13899           7 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13900             :     }
   13901             :   }
   13902           7 :   {
   13903           7 :     if (!arg2) {
   13904           7 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   13905             :     }
   13906             :   }
   13907           7 :   {
   13908           7 :     const int bLocalUseExceptions = GetUseExceptions();
   13909           7 :     if ( bLocalUseExceptions ) {
   13910           0 :       pushErrorHandler();
   13911             :     }
   13912           7 :     {
   13913           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   13914           7 :       result = wrapper_VSIMove((char const *)arg1,(char const *)arg2,arg3,arg4,arg5);
   13915           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   13916             :     }
   13917           7 :     if ( bLocalUseExceptions ) {
   13918           0 :       popErrorHandler();
   13919             :     }
   13920             : #ifndef SED_HACKS
   13921             :     if ( bLocalUseExceptions ) {
   13922             :       CPLErr eclass = CPLGetLastErrorType();
   13923             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13924             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13925             :       }
   13926             :     }
   13927             : #endif
   13928             :   }
   13929           7 :   {
   13930             :     /* %typemap(out) VSI_RETVAL */
   13931           8 :     if ( result != 0 && GetUseExceptions()) {
   13932           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   13933           0 :       if( pszMessage[0] != '\0' )
   13934           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   13935             :       else
   13936           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   13937           0 :       SWIG_fail;
   13938             :     }
   13939             :   }
   13940           7 :   {
   13941             :     /* %typemap(freearg) (const char *utf8_path) */
   13942           7 :     GDALPythonFreeCStr(arg1, bToFree1);
   13943             :   }
   13944           7 :   {
   13945             :     /* %typemap(freearg) (const char *utf8_path) */
   13946           7 :     GDALPythonFreeCStr(arg2, bToFree2);
   13947             :   }
   13948           7 :   {
   13949             :     /* %typemap(freearg) char **dict */
   13950           7 :     CSLDestroy( arg3 );
   13951             :   }
   13952           7 :   {
   13953             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   13954             :     
   13955           7 :     CPLFree(psProgressInfo);
   13956             :     
   13957             :   }
   13958           7 :   {
   13959             :     /* %typemap(ret) VSI_RETVAL */
   13960           7 :     resultobj = PyInt_FromLong( result );
   13961             :   }
   13962           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; } }
   13963             :   return resultobj;
   13964           0 : fail:
   13965           0 :   {
   13966             :     /* %typemap(freearg) (const char *utf8_path) */
   13967           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   13968             :   }
   13969           0 :   {
   13970             :     /* %typemap(freearg) (const char *utf8_path) */
   13971           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   13972             :   }
   13973           0 :   {
   13974             :     /* %typemap(freearg) char **dict */
   13975           0 :     CSLDestroy( arg3 );
   13976             :   }
   13977           0 :   {
   13978             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   13979             :     
   13980           0 :     CPLFree(psProgressInfo);
   13981             :     
   13982             :   }
   13983             :   return NULL;
   13984             : }
   13985             : 
   13986             : 
   13987          42 : SWIGINTERN PyObject *_wrap_Sync(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   13988          42 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   13989          42 :   char *arg1 = (char *) 0 ;
   13990          42 :   char *arg2 = (char *) 0 ;
   13991          42 :   char **arg3 = (char **) NULL ;
   13992          42 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   13993          42 :   void *arg5 = (void *) NULL ;
   13994          42 :   int bToFree1 = 0 ;
   13995          42 :   int bToFree2 = 0 ;
   13996          42 :   PyObject * obj0 = 0 ;
   13997          42 :   PyObject * obj1 = 0 ;
   13998          42 :   PyObject * obj2 = 0 ;
   13999          42 :   PyObject * obj3 = 0 ;
   14000          42 :   PyObject * obj4 = 0 ;
   14001          42 :   char * kwnames[] = {
   14002             :     (char *)"pszSource",  (char *)"pszTarget",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   14003             :   };
   14004          42 :   bool result;
   14005             :   
   14006             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   14007          42 :   PyProgressData *psProgressInfo;
   14008          42 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   14009          42 :   psProgressInfo->nLastReported = -1;
   14010          42 :   psProgressInfo->psPyCallback = NULL;
   14011          42 :   psProgressInfo->psPyCallbackData = NULL;
   14012          42 :   arg5 = psProgressInfo;
   14013          42 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:Sync", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   14014          42 :   {
   14015             :     /* %typemap(in) (const char *utf8_path) */
   14016          42 :     if (PyUnicode_Check(obj0) || PyBytes_Check(obj0))
   14017             :     {
   14018          30 :       arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   14019             :     }
   14020             :     else
   14021             :     {
   14022          12 :       arg1 = GDALPythonPathToCStr(obj0, &bToFree1);
   14023             :       
   14024             :     }
   14025          42 :     if (arg1 == NULL)
   14026             :     {
   14027           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14028           0 :       SWIG_fail;
   14029             :     }
   14030             :   }
   14031          42 :   {
   14032             :     /* %typemap(in) (const char *utf8_path) */
   14033          42 :     if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
   14034             :     {
   14035          31 :       arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
   14036             :     }
   14037             :     else
   14038             :     {
   14039          11 :       arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
   14040             :       
   14041             :     }
   14042          42 :     if (arg2 == NULL)
   14043             :     {
   14044           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14045           0 :       SWIG_fail;
   14046             :     }
   14047             :   }
   14048          42 :   if (obj2) {
   14049          26 :     {
   14050             :       /* %typemap(in) char **dict */
   14051          26 :       arg3 = NULL;
   14052          26 :       if ( PySequence_Check( obj2 ) ) {
   14053          26 :         int bErr = FALSE;
   14054          26 :         arg3 = CSLFromPySequence(obj2, &bErr);
   14055          26 :         if ( bErr )
   14056             :         {
   14057           0 :           SWIG_fail;
   14058             :         }
   14059             :       }
   14060           0 :       else if ( PyMapping_Check( obj2 ) ) {
   14061           0 :         int bErr = FALSE;
   14062           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   14063           0 :         if ( bErr )
   14064             :         {
   14065           0 :           SWIG_fail;
   14066             :         }
   14067             :       }
   14068             :       else {
   14069           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   14070           0 :         SWIG_fail;
   14071             :       }
   14072             :     }
   14073             :   }
   14074          42 :   if (obj3) {
   14075           7 :     {
   14076             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   14077             :       /* callback_func typemap */
   14078             :       
   14079             :       /* In some cases 0 is passed instead of None. */
   14080             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   14081           7 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   14082             :       {
   14083           0 :         if( PyLong_AsLong(obj3) == 0 )
   14084             :         {
   14085           0 :           obj3 = Py_None;
   14086             :         }
   14087             :       }
   14088             :       
   14089           7 :       if (obj3 && obj3 != Py_None ) {
   14090           7 :         void* cbfunction = NULL;
   14091           7 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   14092             :             (void**)&cbfunction,
   14093             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   14094             :             SWIG_POINTER_EXCEPTION | 0 ));
   14095             :         
   14096           7 :         if ( cbfunction == GDALTermProgress ) {
   14097             :           arg4 = GDALTermProgress;
   14098             :         } else {
   14099           7 :           if (!PyCallable_Check(obj3)) {
   14100           0 :             PyErr_SetString( PyExc_RuntimeError,
   14101             :               "Object given is not a Python function" );
   14102           0 :             SWIG_fail;
   14103             :           }
   14104           7 :           psProgressInfo->psPyCallback = obj3;
   14105           7 :           arg4 = PyProgressProxy;
   14106             :         }
   14107             :         
   14108             :       }
   14109             :       
   14110             :     }
   14111             :   }
   14112          42 :   if (obj4) {
   14113           6 :     {
   14114             :       /* %typemap(in) ( void* callback_data=NULL)  */
   14115           6 :       psProgressInfo->psPyCallbackData = obj4 ;
   14116             :     }
   14117             :   }
   14118          42 :   {
   14119          42 :     if (!arg1) {
   14120          42 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14121             :     }
   14122             :   }
   14123          42 :   {
   14124          42 :     if (!arg2) {
   14125          42 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14126             :     }
   14127             :   }
   14128          42 :   {
   14129          42 :     const int bLocalUseExceptions = GetUseExceptions();
   14130          42 :     if ( bLocalUseExceptions ) {
   14131           1 :       pushErrorHandler();
   14132             :     }
   14133          42 :     {
   14134          42 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14135          42 :       result = (bool)wrapper_VSISync((char const *)arg1,(char const *)arg2,arg3,arg4,arg5);
   14136          42 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14137             :     }
   14138          42 :     if ( bLocalUseExceptions ) {
   14139           1 :       popErrorHandler();
   14140             :     }
   14141             : #ifndef SED_HACKS
   14142             :     if ( bLocalUseExceptions ) {
   14143             :       CPLErr eclass = CPLGetLastErrorType();
   14144             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14145             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14146             :       }
   14147             :     }
   14148             : #endif
   14149             :   }
   14150          42 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   14151          42 :   {
   14152             :     /* %typemap(freearg) (const char *utf8_path) */
   14153          42 :     GDALPythonFreeCStr(arg1, bToFree1);
   14154             :   }
   14155          42 :   {
   14156             :     /* %typemap(freearg) (const char *utf8_path) */
   14157          42 :     GDALPythonFreeCStr(arg2, bToFree2);
   14158             :   }
   14159          42 :   {
   14160             :     /* %typemap(freearg) char **dict */
   14161          42 :     CSLDestroy( arg3 );
   14162             :   }
   14163          42 :   {
   14164             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   14165             :     
   14166          42 :     CPLFree(psProgressInfo);
   14167             :     
   14168             :   }
   14169          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; } }
   14170             :   return resultobj;
   14171           0 : fail:
   14172           0 :   {
   14173             :     /* %typemap(freearg) (const char *utf8_path) */
   14174           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   14175             :   }
   14176           0 :   {
   14177             :     /* %typemap(freearg) (const char *utf8_path) */
   14178           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   14179             :   }
   14180           0 :   {
   14181             :     /* %typemap(freearg) char **dict */
   14182           0 :     CSLDestroy( arg3 );
   14183             :   }
   14184           0 :   {
   14185             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   14186             :     
   14187           0 :     CPLFree(psProgressInfo);
   14188             :     
   14189             :   }
   14190             :   return NULL;
   14191             : }
   14192             : 
   14193             : 
   14194           1 : SWIGINTERN PyObject *_wrap_AbortPendingUploads(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14195           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14196           1 :   char *arg1 = (char *) 0 ;
   14197           1 :   int bToFree1 = 0 ;
   14198           1 :   PyObject *swig_obj[1] ;
   14199           1 :   bool result;
   14200             :   
   14201           1 :   if (!args) SWIG_fail;
   14202           1 :   swig_obj[0] = args;
   14203           1 :   {
   14204             :     /* %typemap(in) (const char *utf8_path) */
   14205           1 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   14206             :     {
   14207           1 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   14208             :     }
   14209             :     else
   14210             :     {
   14211           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   14212             :       
   14213             :     }
   14214           1 :     if (arg1 == NULL)
   14215             :     {
   14216           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14217           0 :       SWIG_fail;
   14218             :     }
   14219             :   }
   14220           1 :   {
   14221           1 :     if (!arg1) {
   14222           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14223             :     }
   14224             :   }
   14225           1 :   {
   14226           1 :     const int bLocalUseExceptions = GetUseExceptions();
   14227           1 :     if ( bLocalUseExceptions ) {
   14228           0 :       pushErrorHandler();
   14229             :     }
   14230           1 :     {
   14231           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14232           1 :       result = (bool)VSIAbortPendingUploads((char const *)arg1);
   14233           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14234             :     }
   14235           1 :     if ( bLocalUseExceptions ) {
   14236           0 :       popErrorHandler();
   14237             :     }
   14238             : #ifndef SED_HACKS
   14239             :     if ( bLocalUseExceptions ) {
   14240             :       CPLErr eclass = CPLGetLastErrorType();
   14241             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14242             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14243             :       }
   14244             :     }
   14245             : #endif
   14246             :   }
   14247           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   14248           1 :   {
   14249             :     /* %typemap(freearg) (const char *utf8_path) */
   14250           1 :     GDALPythonFreeCStr(arg1, bToFree1);
   14251             :   }
   14252           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; } }
   14253             :   return resultobj;
   14254           0 : fail:
   14255           0 :   {
   14256             :     /* %typemap(freearg) (const char *utf8_path) */
   14257           1 :     GDALPythonFreeCStr(arg1, bToFree1);
   14258             :   }
   14259             :   return NULL;
   14260             : }
   14261             : 
   14262             : 
   14263          29 : SWIGINTERN PyObject *_wrap_CopyFile(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   14264          29 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14265          29 :   char *arg1 = (char *) 0 ;
   14266          29 :   char *arg2 = (char *) 0 ;
   14267          29 :   VSILFILE *arg3 = (VSILFILE *) NULL ;
   14268          29 :   GIntBig arg4 = (GIntBig) -1 ;
   14269          29 :   char **arg5 = (char **) NULL ;
   14270          29 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   14271          29 :   void *arg7 = (void *) NULL ;
   14272          29 :   int bToFree1 = 0 ;
   14273          29 :   int bToFree2 = 0 ;
   14274          29 :   void *argp3 = 0 ;
   14275          29 :   int res3 = 0 ;
   14276          29 :   PyObject * obj0 = 0 ;
   14277          29 :   PyObject * obj1 = 0 ;
   14278          29 :   PyObject * obj2 = 0 ;
   14279          29 :   PyObject * obj3 = 0 ;
   14280          29 :   PyObject * obj4 = 0 ;
   14281          29 :   PyObject * obj5 = 0 ;
   14282          29 :   PyObject * obj6 = 0 ;
   14283          29 :   char * kwnames[] = {
   14284             :     (char *)"pszSource",  (char *)"pszTarget",  (char *)"fpSource",  (char *)"nSourceSize",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   14285             :   };
   14286          29 :   int result;
   14287             :   
   14288             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   14289          29 :   PyProgressData *psProgressInfo;
   14290          29 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   14291          29 :   psProgressInfo->nLastReported = -1;
   14292          29 :   psProgressInfo->psPyCallback = NULL;
   14293          29 :   psProgressInfo->psPyCallbackData = NULL;
   14294          29 :   arg7 = psProgressInfo;
   14295          29 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOOOO:CopyFile", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   14296          29 :   {
   14297             :     /* %typemap(in) (const char *utf8_path_or_none) */
   14298          29 :     if( obj0 == Py_None )
   14299             :     {
   14300             :       arg1 = NULL;
   14301             :     }
   14302             :     else
   14303             :     {
   14304          25 :       arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   14305          25 :       if (arg1 == NULL)
   14306             :       {
   14307           0 :         PyErr_SetString( PyExc_RuntimeError, "not a string" );
   14308           0 :         SWIG_fail;
   14309             :       }
   14310             :     }
   14311             :   }
   14312          29 :   {
   14313             :     /* %typemap(in) (const char *utf8_path) */
   14314          29 :     if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
   14315             :     {
   14316          18 :       arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
   14317             :     }
   14318             :     else
   14319             :     {
   14320          11 :       arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
   14321             :       
   14322             :     }
   14323          29 :     if (arg2 == NULL)
   14324             :     {
   14325           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14326           0 :       SWIG_fail;
   14327             :     }
   14328             :   }
   14329          29 :   if (obj2) {
   14330           3 :     res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_VSILFILE, 0 |  0 );
   14331           3 :     if (!SWIG_IsOK(res3)) {
   14332           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CopyFile" "', argument " "3"" of type '" "VSILFILE *""'"); 
   14333             :     }
   14334           3 :     arg3 = reinterpret_cast< VSILFILE * >(argp3);
   14335             :   }
   14336          29 :   if (obj3) {
   14337           0 :     {
   14338           0 :       arg4 = (GIntBig)PyLong_AsLongLong(obj3);
   14339             :     }
   14340             :   }
   14341          29 :   if (obj4) {
   14342           1 :     {
   14343             :       /* %typemap(in) char **dict */
   14344           1 :       arg5 = NULL;
   14345           1 :       if ( PySequence_Check( obj4 ) ) {
   14346           1 :         int bErr = FALSE;
   14347           1 :         arg5 = CSLFromPySequence(obj4, &bErr);
   14348           1 :         if ( bErr )
   14349             :         {
   14350           0 :           SWIG_fail;
   14351             :         }
   14352             :       }
   14353           0 :       else if ( PyMapping_Check( obj4 ) ) {
   14354           0 :         int bErr = FALSE;
   14355           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   14356           0 :         if ( bErr )
   14357             :         {
   14358           0 :           SWIG_fail;
   14359             :         }
   14360             :       }
   14361             :       else {
   14362           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   14363           0 :         SWIG_fail;
   14364             :       }
   14365             :     }
   14366             :   }
   14367          29 :   if (obj5) {
   14368           4 :     {
   14369             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   14370             :       /* callback_func typemap */
   14371             :       
   14372             :       /* In some cases 0 is passed instead of None. */
   14373             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   14374           4 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   14375             :       {
   14376           0 :         if( PyLong_AsLong(obj5) == 0 )
   14377             :         {
   14378           0 :           obj5 = Py_None;
   14379             :         }
   14380             :       }
   14381             :       
   14382           4 :       if (obj5 && obj5 != Py_None ) {
   14383           4 :         void* cbfunction = NULL;
   14384           4 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   14385             :             (void**)&cbfunction,
   14386             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   14387             :             SWIG_POINTER_EXCEPTION | 0 ));
   14388             :         
   14389           4 :         if ( cbfunction == GDALTermProgress ) {
   14390             :           arg6 = GDALTermProgress;
   14391             :         } else {
   14392           4 :           if (!PyCallable_Check(obj5)) {
   14393           0 :             PyErr_SetString( PyExc_RuntimeError,
   14394             :               "Object given is not a Python function" );
   14395           0 :             SWIG_fail;
   14396             :           }
   14397           4 :           psProgressInfo->psPyCallback = obj5;
   14398           4 :           arg6 = PyProgressProxy;
   14399             :         }
   14400             :         
   14401             :       }
   14402             :       
   14403             :     }
   14404             :   }
   14405          29 :   if (obj6) {
   14406           4 :     {
   14407             :       /* %typemap(in) ( void* callback_data=NULL)  */
   14408           4 :       psProgressInfo->psPyCallbackData = obj6 ;
   14409             :     }
   14410             :   }
   14411          29 :   {
   14412          29 :     if (!arg2) {
   14413          29 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14414             :     }
   14415             :   }
   14416          29 :   {
   14417          29 :     const int bLocalUseExceptions = GetUseExceptions();
   14418          29 :     if ( bLocalUseExceptions ) {
   14419          11 :       pushErrorHandler();
   14420             :     }
   14421          29 :     {
   14422          29 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14423          29 :       result = (int)wrapper_VSICopyFile((char const *)arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
   14424          29 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14425             :     }
   14426          29 :     if ( bLocalUseExceptions ) {
   14427          11 :       popErrorHandler();
   14428             :     }
   14429             : #ifndef SED_HACKS
   14430             :     if ( bLocalUseExceptions ) {
   14431             :       CPLErr eclass = CPLGetLastErrorType();
   14432             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14433             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14434             :       }
   14435             :     }
   14436             : #endif
   14437             :   }
   14438          29 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14439          29 :   {
   14440             :     /* %typemap(freearg) (const char *utf8_path_or_none) */
   14441          29 :     if( arg1 != NULL )
   14442          25 :     GDALPythonFreeCStr(arg1, bToFree1);
   14443             :   }
   14444          29 :   {
   14445             :     /* %typemap(freearg) (const char *utf8_path) */
   14446          29 :     GDALPythonFreeCStr(arg2, bToFree2);
   14447             :   }
   14448          29 :   {
   14449             :     /* %typemap(freearg) char **dict */
   14450          29 :     CSLDestroy( arg5 );
   14451             :   }
   14452          29 :   {
   14453             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   14454             :     
   14455          29 :     CPLFree(psProgressInfo);
   14456             :     
   14457             :   }
   14458          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; } }
   14459             :   return resultobj;
   14460           0 : fail:
   14461           0 :   {
   14462             :     /* %typemap(freearg) (const char *utf8_path_or_none) */
   14463           0 :     if( arg1 != NULL )
   14464           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   14465             :   }
   14466           0 :   {
   14467             :     /* %typemap(freearg) (const char *utf8_path) */
   14468           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   14469             :   }
   14470           0 :   {
   14471             :     /* %typemap(freearg) char **dict */
   14472           0 :     CSLDestroy( arg5 );
   14473             :   }
   14474           0 :   {
   14475             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   14476             :     
   14477           0 :     CPLFree(psProgressInfo);
   14478             :     
   14479             :   }
   14480             :   return NULL;
   14481             : }
   14482             : 
   14483             : 
   14484          20 : SWIGINTERN PyObject *_wrap_CopyFileRestartable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14485          20 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14486          20 :   char *arg1 = (char *) 0 ;
   14487          20 :   char *arg2 = (char *) 0 ;
   14488          20 :   char *arg3 = (char *) 0 ;
   14489          20 :   int *arg4 = (int *) 0 ;
   14490          20 :   char **arg5 = (char **) 0 ;
   14491          20 :   char **arg6 = (char **) NULL ;
   14492          20 :   GDALProgressFunc arg7 = (GDALProgressFunc) NULL ;
   14493          20 :   void *arg8 = (void *) NULL ;
   14494          20 :   int bToFree1 = 0 ;
   14495          20 :   int bToFree2 = 0 ;
   14496          20 :   int res3 ;
   14497          20 :   char *buf3 = 0 ;
   14498          20 :   int alloc3 = 0 ;
   14499          20 :   int nRetCode4 = 0 ;
   14500          20 :   char *pszOutputPayload4 = 0 ;
   14501          20 :   PyObject *swig_obj[6] ;
   14502             :   
   14503             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   14504          20 :   PyProgressData *psProgressInfo;
   14505          20 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   14506          20 :   psProgressInfo->nLastReported = -1;
   14507          20 :   psProgressInfo->psPyCallback = NULL;
   14508          20 :   psProgressInfo->psPyCallbackData = NULL;
   14509          20 :   arg8 = psProgressInfo;
   14510          20 :   {
   14511             :     /* %typemap(in) (int* pnRetCode, char** ppszOutputPayload) */
   14512          20 :     arg4 = &nRetCode4;
   14513          20 :     arg5 = &pszOutputPayload4;
   14514             :   }
   14515          20 :   if (!SWIG_Python_UnpackTuple(args, "CopyFileRestartable", 3, 6, swig_obj)) SWIG_fail;
   14516          20 :   {
   14517             :     /* %typemap(in) (const char *utf8_path_or_none) */
   14518          20 :     if( swig_obj[0] == Py_None )
   14519             :     {
   14520             :       arg1 = NULL;
   14521             :     }
   14522             :     else
   14523             :     {
   14524          20 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   14525          20 :       if (arg1 == NULL)
   14526             :       {
   14527           0 :         PyErr_SetString( PyExc_RuntimeError, "not a string" );
   14528           0 :         SWIG_fail;
   14529             :       }
   14530             :     }
   14531             :   }
   14532          20 :   {
   14533             :     /* %typemap(in) (const char *utf8_path) */
   14534          20 :     if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
   14535             :     {
   14536          20 :       arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
   14537             :     }
   14538             :     else
   14539             :     {
   14540           0 :       arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
   14541             :       
   14542             :     }
   14543          20 :     if (arg2 == NULL)
   14544             :     {
   14545           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14546           0 :       SWIG_fail;
   14547             :     }
   14548             :   }
   14549          20 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   14550          20 :   if (!SWIG_IsOK(res3)) {
   14551           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CopyFileRestartable" "', argument " "3"" of type '" "char const *""'");
   14552             :   }
   14553          20 :   arg3 = reinterpret_cast< char * >(buf3);
   14554          20 :   if (swig_obj[3]) {
   14555          18 :     {
   14556             :       /* %typemap(in) char **dict */
   14557          18 :       arg6 = NULL;
   14558          18 :       if ( PySequence_Check( swig_obj[3] ) ) {
   14559          18 :         int bErr = FALSE;
   14560          18 :         arg6 = CSLFromPySequence(swig_obj[3], &bErr);
   14561          18 :         if ( bErr )
   14562             :         {
   14563           0 :           SWIG_fail;
   14564             :         }
   14565             :       }
   14566           0 :       else if ( PyMapping_Check( swig_obj[3] ) ) {
   14567           0 :         int bErr = FALSE;
   14568           0 :         arg6 = CSLFromPyMapping(swig_obj[3], &bErr);
   14569           0 :         if ( bErr )
   14570             :         {
   14571           0 :           SWIG_fail;
   14572             :         }
   14573             :       }
   14574             :       else {
   14575           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   14576           0 :         SWIG_fail;
   14577             :       }
   14578             :     }
   14579             :   }
   14580          20 :   if (swig_obj[4]) {
   14581           2 :     {
   14582             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   14583             :       /* callback_func typemap */
   14584             :       
   14585             :       /* In some cases 0 is passed instead of None. */
   14586             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   14587           2 :       if ( PyLong_Check(swig_obj[4]) || PyInt_Check(swig_obj[4]) )
   14588             :       {
   14589           0 :         if( PyLong_AsLong(swig_obj[4]) == 0 )
   14590             :         {
   14591           0 :           swig_obj[4] = Py_None;
   14592             :         }
   14593             :       }
   14594             :       
   14595           2 :       if (swig_obj[4] && swig_obj[4] != Py_None ) {
   14596           2 :         void* cbfunction = NULL;
   14597           2 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[4],
   14598             :             (void**)&cbfunction,
   14599             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   14600             :             SWIG_POINTER_EXCEPTION | 0 ));
   14601             :         
   14602           2 :         if ( cbfunction == GDALTermProgress ) {
   14603             :           arg7 = GDALTermProgress;
   14604             :         } else {
   14605           2 :           if (!PyCallable_Check(swig_obj[4])) {
   14606           0 :             PyErr_SetString( PyExc_RuntimeError,
   14607             :               "Object given is not a Python function" );
   14608           0 :             SWIG_fail;
   14609             :           }
   14610           2 :           psProgressInfo->psPyCallback = swig_obj[4];
   14611           2 :           arg7 = PyProgressProxy;
   14612             :         }
   14613             :         
   14614             :       }
   14615             :       
   14616             :     }
   14617             :   }
   14618          20 :   if (swig_obj[5]) {
   14619           0 :     {
   14620             :       /* %typemap(in) ( void* callback_data=NULL)  */
   14621           0 :       psProgressInfo->psPyCallbackData = swig_obj[5] ;
   14622             :     }
   14623             :   }
   14624          20 :   {
   14625          20 :     if (!arg2) {
   14626          20 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14627             :     }
   14628             :   }
   14629          20 :   {
   14630          20 :     const int bLocalUseExceptions = GetUseExceptions();
   14631          20 :     if ( bLocalUseExceptions ) {
   14632           0 :       pushErrorHandler();
   14633             :     }
   14634          20 :     {
   14635          20 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14636          20 :       CopyFileRestartable((char const *)arg1,(char const *)arg2,(char const *)arg3,arg4,arg5,arg6,arg7,arg8);
   14637          20 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14638             :     }
   14639          20 :     if ( bLocalUseExceptions ) {
   14640           0 :       popErrorHandler();
   14641             :     }
   14642             : #ifndef SED_HACKS
   14643             :     if ( bLocalUseExceptions ) {
   14644             :       CPLErr eclass = CPLGetLastErrorType();
   14645             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14646             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14647             :       }
   14648             :     }
   14649             : #endif
   14650             :   }
   14651          20 :   resultobj = SWIG_Py_Void();
   14652          20 :   {
   14653             :     /* %typemap(argout) (int* pnRetCode, char** ppszOutputPayload)  */
   14654          20 :     PyObject *r = PyTuple_New( 2 );
   14655          20 :     PyTuple_SetItem( r, 0, PyLong_FromLong(*arg4) );
   14656          20 :     if( *arg5 )
   14657             :     {
   14658           2 :       PyTuple_SetItem( r, 1, GDALPythonObjectFromCStr(*arg5) );
   14659           2 :       VSIFree(*arg5);
   14660             :     }
   14661             :     else
   14662             :     {
   14663          18 :       Py_INCREF(Py_None);
   14664          18 :       PyTuple_SetItem( r, 1, Py_None );
   14665             :     }
   14666             : #if SWIG_VERSION >= 0x040300
   14667             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   14668             : #else
   14669          20 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   14670             : #endif
   14671             :   }
   14672          20 :   {
   14673             :     /* %typemap(freearg) (const char *utf8_path_or_none) */
   14674          20 :     if( arg1 != NULL )
   14675          20 :     GDALPythonFreeCStr(arg1, bToFree1);
   14676             :   }
   14677          20 :   {
   14678             :     /* %typemap(freearg) (const char *utf8_path) */
   14679          20 :     GDALPythonFreeCStr(arg2, bToFree2);
   14680             :   }
   14681          20 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   14682          20 :   {
   14683             :     /* %typemap(freearg) char **dict */
   14684          20 :     CSLDestroy( arg6 );
   14685             :   }
   14686          20 :   {
   14687             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   14688             :     
   14689          20 :     CPLFree(psProgressInfo);
   14690             :     
   14691             :   }
   14692          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; } }
   14693             :   return resultobj;
   14694           0 : fail:
   14695           0 :   {
   14696             :     /* %typemap(freearg) (const char *utf8_path_or_none) */
   14697           0 :     if( arg1 != NULL )
   14698           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   14699             :   }
   14700           0 :   {
   14701             :     /* %typemap(freearg) (const char *utf8_path) */
   14702           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   14703             :   }
   14704           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   14705           0 :   {
   14706             :     /* %typemap(freearg) char **dict */
   14707           0 :     CSLDestroy( arg6 );
   14708             :   }
   14709           0 :   {
   14710             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   14711             :     
   14712           0 :     CPLFree(psProgressInfo);
   14713             :     
   14714             :   }
   14715             :   return NULL;
   14716             : }
   14717             : 
   14718             : 
   14719           0 : SWIGINTERN PyObject *_wrap_MoveFile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14720           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14721           0 :   char *arg1 = (char *) 0 ;
   14722           0 :   char *arg2 = (char *) 0 ;
   14723           0 :   int bToFree1 = 0 ;
   14724           0 :   int bToFree2 = 0 ;
   14725           0 :   PyObject *swig_obj[2] ;
   14726           0 :   int result;
   14727             :   
   14728           0 :   if (!SWIG_Python_UnpackTuple(args, "MoveFile", 2, 2, swig_obj)) SWIG_fail;
   14729           0 :   {
   14730             :     /* %typemap(in) (const char *utf8_path_or_none) */
   14731           0 :     if( swig_obj[0] == Py_None )
   14732             :     {
   14733             :       arg1 = NULL;
   14734             :     }
   14735             :     else
   14736             :     {
   14737           0 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   14738           0 :       if (arg1 == NULL)
   14739             :       {
   14740           0 :         PyErr_SetString( PyExc_RuntimeError, "not a string" );
   14741           0 :         SWIG_fail;
   14742             :       }
   14743             :     }
   14744             :   }
   14745           0 :   {
   14746             :     /* %typemap(in) (const char *utf8_path) */
   14747           0 :     if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
   14748             :     {
   14749           0 :       arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
   14750             :     }
   14751             :     else
   14752             :     {
   14753           0 :       arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
   14754             :       
   14755             :     }
   14756           0 :     if (arg2 == NULL)
   14757             :     {
   14758           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14759           0 :       SWIG_fail;
   14760             :     }
   14761             :   }
   14762           0 :   {
   14763           0 :     if (!arg2) {
   14764           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14765             :     }
   14766             :   }
   14767           0 :   {
   14768           0 :     const int bLocalUseExceptions = GetUseExceptions();
   14769           0 :     if ( bLocalUseExceptions ) {
   14770           0 :       pushErrorHandler();
   14771             :     }
   14772           0 :     {
   14773           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14774           0 :       result = (int)wrapper_MoveFile((char const *)arg1,(char const *)arg2);
   14775           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14776             :     }
   14777           0 :     if ( bLocalUseExceptions ) {
   14778           0 :       popErrorHandler();
   14779             :     }
   14780             : #ifndef SED_HACKS
   14781             :     if ( bLocalUseExceptions ) {
   14782             :       CPLErr eclass = CPLGetLastErrorType();
   14783             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14784             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14785             :       }
   14786             :     }
   14787             : #endif
   14788             :   }
   14789           0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14790           0 :   {
   14791             :     /* %typemap(freearg) (const char *utf8_path_or_none) */
   14792           0 :     if( arg1 != NULL )
   14793           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   14794             :   }
   14795           0 :   {
   14796             :     /* %typemap(freearg) (const char *utf8_path) */
   14797           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   14798             :   }
   14799           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; } }
   14800             :   return resultobj;
   14801           0 : fail:
   14802           0 :   {
   14803             :     /* %typemap(freearg) (const char *utf8_path_or_none) */
   14804           0 :     if( arg1 != NULL )
   14805           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   14806             :   }
   14807           0 :   {
   14808             :     /* %typemap(freearg) (const char *utf8_path) */
   14809           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   14810             :   }
   14811             :   return NULL;
   14812             : }
   14813             : 
   14814             : 
   14815           9 : SWIGINTERN PyObject *_wrap_GetActualURL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14816           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14817           9 :   char *arg1 = (char *) 0 ;
   14818           9 :   int bToFree1 = 0 ;
   14819           9 :   PyObject *swig_obj[1] ;
   14820           9 :   char *result = 0 ;
   14821             :   
   14822           9 :   if (!args) SWIG_fail;
   14823           9 :   swig_obj[0] = args;
   14824           9 :   {
   14825             :     /* %typemap(in) (const char *utf8_path) */
   14826           9 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   14827             :     {
   14828           9 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   14829             :     }
   14830             :     else
   14831             :     {
   14832           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   14833             :       
   14834             :     }
   14835           9 :     if (arg1 == NULL)
   14836             :     {
   14837           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14838           0 :       SWIG_fail;
   14839             :     }
   14840             :   }
   14841           9 :   {
   14842           9 :     if (!arg1) {
   14843           9 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14844             :     }
   14845             :   }
   14846           9 :   {
   14847           9 :     const int bLocalUseExceptions = GetUseExceptions();
   14848           9 :     if ( bLocalUseExceptions ) {
   14849           2 :       pushErrorHandler();
   14850             :     }
   14851           9 :     {
   14852           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14853           9 :       result = (char *)VSIGetActualURL((char const *)arg1);
   14854           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14855             :     }
   14856           9 :     if ( bLocalUseExceptions ) {
   14857           2 :       popErrorHandler();
   14858             :     }
   14859             : #ifndef SED_HACKS
   14860             :     if ( bLocalUseExceptions ) {
   14861             :       CPLErr eclass = CPLGetLastErrorType();
   14862             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14863             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14864             :       }
   14865             :     }
   14866             : #endif
   14867             :   }
   14868           9 :   resultobj = SWIG_FromCharPtr((const char *)result);
   14869           9 :   {
   14870             :     /* %typemap(freearg) (const char *utf8_path) */
   14871           9 :     GDALPythonFreeCStr(arg1, bToFree1);
   14872             :   }
   14873           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; } }
   14874             :   return resultobj;
   14875           0 : fail:
   14876           0 :   {
   14877             :     /* %typemap(freearg) (const char *utf8_path) */
   14878           9 :     GDALPythonFreeCStr(arg1, bToFree1);
   14879             :   }
   14880             :   return NULL;
   14881             : }
   14882             : 
   14883             : 
   14884          23 : SWIGINTERN PyObject *_wrap_GetSignedURL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14885          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   14886          23 :   char *arg1 = (char *) 0 ;
   14887          23 :   char **arg2 = (char **) NULL ;
   14888          23 :   int bToFree1 = 0 ;
   14889          23 :   PyObject *swig_obj[2] ;
   14890          23 :   retStringAndCPLFree *result = 0 ;
   14891             :   
   14892          23 :   if (!SWIG_Python_UnpackTuple(args, "GetSignedURL", 1, 2, swig_obj)) SWIG_fail;
   14893          23 :   {
   14894             :     /* %typemap(in) (const char *utf8_path) */
   14895          23 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   14896             :     {
   14897          23 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   14898             :     }
   14899             :     else
   14900             :     {
   14901           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   14902             :       
   14903             :     }
   14904          23 :     if (arg1 == NULL)
   14905             :     {
   14906           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   14907           0 :       SWIG_fail;
   14908             :     }
   14909             :   }
   14910          23 :   if (swig_obj[1]) {
   14911           7 :     {
   14912             :       /* %typemap(in) char **dict */
   14913           7 :       arg2 = NULL;
   14914           7 :       if ( PySequence_Check( swig_obj[1] ) ) {
   14915           7 :         int bErr = FALSE;
   14916           7 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   14917           7 :         if ( bErr )
   14918             :         {
   14919           0 :           SWIG_fail;
   14920             :         }
   14921             :       }
   14922           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   14923           0 :         int bErr = FALSE;
   14924           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   14925           0 :         if ( bErr )
   14926             :         {
   14927           0 :           SWIG_fail;
   14928             :         }
   14929             :       }
   14930             :       else {
   14931           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   14932           0 :         SWIG_fail;
   14933             :       }
   14934             :     }
   14935             :   }
   14936          23 :   {
   14937          23 :     if (!arg1) {
   14938          23 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   14939             :     }
   14940             :   }
   14941          23 :   {
   14942          23 :     const int bLocalUseExceptions = GetUseExceptions();
   14943          23 :     if ( bLocalUseExceptions ) {
   14944           4 :       pushErrorHandler();
   14945             :     }
   14946          23 :     {
   14947          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   14948          23 :       result = (retStringAndCPLFree *)wrapper_VSIGetSignedURL((char const *)arg1,arg2);
   14949          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   14950             :     }
   14951          23 :     if ( bLocalUseExceptions ) {
   14952           4 :       popErrorHandler();
   14953             :     }
   14954             : #ifndef SED_HACKS
   14955             :     if ( bLocalUseExceptions ) {
   14956             :       CPLErr eclass = CPLGetLastErrorType();
   14957             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14958             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14959             :       }
   14960             :     }
   14961             : #endif
   14962             :   }
   14963          23 :   {
   14964             :     /* %typemap(out) (retStringAndCPLFree*) */
   14965          23 :     Py_XDECREF(resultobj);
   14966          23 :     if(result)
   14967             :     {
   14968          14 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   14969          14 :       CPLFree(result);
   14970             :     }
   14971             :     else
   14972             :     {
   14973           9 :       resultobj = Py_None;
   14974           9 :       Py_INCREF(resultobj);
   14975             :     }
   14976             :   }
   14977          23 :   {
   14978             :     /* %typemap(freearg) (const char *utf8_path) */
   14979          23 :     GDALPythonFreeCStr(arg1, bToFree1);
   14980             :   }
   14981          23 :   {
   14982             :     /* %typemap(freearg) char **dict */
   14983          23 :     CSLDestroy( arg2 );
   14984             :   }
   14985          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; } }
   14986             :   return resultobj;
   14987           0 : fail:
   14988           0 :   {
   14989             :     /* %typemap(freearg) (const char *utf8_path) */
   14990           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   14991             :   }
   14992           0 :   {
   14993             :     /* %typemap(freearg) char **dict */
   14994           0 :     CSLDestroy( arg2 );
   14995             :   }
   14996             :   return NULL;
   14997             : }
   14998             : 
   14999             : 
   15000           2 : SWIGINTERN PyObject *_wrap_GetFileSystemsPrefixes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15001           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15002           2 :   char **result = 0 ;
   15003             :   
   15004           2 :   if (!SWIG_Python_UnpackTuple(args, "GetFileSystemsPrefixes", 0, 0, 0)) SWIG_fail;
   15005           2 :   {
   15006           2 :     const int bLocalUseExceptions = GetUseExceptions();
   15007           2 :     if ( bLocalUseExceptions ) {
   15008           0 :       pushErrorHandler();
   15009             :     }
   15010           2 :     {
   15011           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15012           2 :       result = (char **)VSIGetFileSystemsPrefixes();
   15013           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15014             :     }
   15015           2 :     if ( bLocalUseExceptions ) {
   15016           0 :       popErrorHandler();
   15017             :     }
   15018             : #ifndef SED_HACKS
   15019             :     if ( bLocalUseExceptions ) {
   15020             :       CPLErr eclass = CPLGetLastErrorType();
   15021             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15022             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15023             :       }
   15024             :     }
   15025             : #endif
   15026             :   }
   15027           2 :   {
   15028             :     /* %typemap(out) char **CSL -> ( string ) */
   15029           2 :     bool bErr = false;
   15030           2 :     resultobj = CSLToList(result, &bErr);
   15031           2 :     CSLDestroy(result);
   15032           2 :     if( bErr ) {
   15033           0 :       SWIG_fail;
   15034             :     }
   15035             :   }
   15036           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; } }
   15037             :   return resultobj;
   15038             : fail:
   15039             :   return NULL;
   15040             : }
   15041             : 
   15042             : 
   15043          30 : SWIGINTERN PyObject *_wrap_GetFileSystemOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15044          30 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15045          30 :   char *arg1 = (char *) 0 ;
   15046          30 :   int bToFree1 = 0 ;
   15047          30 :   PyObject *swig_obj[1] ;
   15048          30 :   char *result = 0 ;
   15049             :   
   15050          30 :   if (!args) SWIG_fail;
   15051          30 :   swig_obj[0] = args;
   15052          30 :   {
   15053             :     /* %typemap(in) (const char *utf8_path) */
   15054          30 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   15055             :     {
   15056          30 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   15057             :     }
   15058             :     else
   15059             :     {
   15060           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   15061             :       
   15062             :     }
   15063          30 :     if (arg1 == NULL)
   15064             :     {
   15065           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   15066           0 :       SWIG_fail;
   15067             :     }
   15068             :   }
   15069          30 :   {
   15070          30 :     if (!arg1) {
   15071          30 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15072             :     }
   15073             :   }
   15074          30 :   {
   15075          30 :     const int bLocalUseExceptions = GetUseExceptions();
   15076          30 :     if ( bLocalUseExceptions ) {
   15077           0 :       pushErrorHandler();
   15078             :     }
   15079          30 :     {
   15080          30 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15081          30 :       result = (char *)VSIGetFileSystemOptions((char const *)arg1);
   15082          30 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15083             :     }
   15084          30 :     if ( bLocalUseExceptions ) {
   15085           0 :       popErrorHandler();
   15086             :     }
   15087             : #ifndef SED_HACKS
   15088             :     if ( bLocalUseExceptions ) {
   15089             :       CPLErr eclass = CPLGetLastErrorType();
   15090             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15091             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15092             :       }
   15093             :     }
   15094             : #endif
   15095             :   }
   15096          30 :   resultobj = SWIG_FromCharPtr((const char *)result);
   15097          30 :   {
   15098             :     /* %typemap(freearg) (const char *utf8_path) */
   15099          30 :     GDALPythonFreeCStr(arg1, bToFree1);
   15100             :   }
   15101          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; } }
   15102             :   return resultobj;
   15103           0 : fail:
   15104           0 :   {
   15105             :     /* %typemap(freearg) (const char *utf8_path) */
   15106          30 :     GDALPythonFreeCStr(arg1, bToFree1);
   15107             :   }
   15108             :   return NULL;
   15109             : }
   15110             : 
   15111             : 
   15112         277 : SWIGINTERN PyObject *VSILFILE_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15113         277 :   PyObject *obj;
   15114         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   15115         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_VSILFILE, SWIG_NewClientData(obj));
   15116         277 :   return SWIG_Py_Void();
   15117             : }
   15118             : 
   15119         646 : SWIGINTERN PyObject *_wrap_StatBuf_mode_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15120         646 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15121         646 :   StatBuf *arg1 = (StatBuf *) 0 ;
   15122         646 :   void *argp1 = 0 ;
   15123         646 :   int res1 = 0 ;
   15124         646 :   PyObject *swig_obj[1] ;
   15125         646 :   int result;
   15126             :   
   15127         646 :   if (!args) SWIG_fail;
   15128         646 :   swig_obj[0] = args;
   15129         646 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
   15130         646 :   if (!SWIG_IsOK(res1)) {
   15131           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_mode_get" "', argument " "1"" of type '" "StatBuf *""'"); 
   15132             :   }
   15133         646 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
   15134         646 :   {
   15135         646 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15136         646 :     result = (int) ((arg1)->mode);
   15137         646 :     SWIG_PYTHON_THREAD_END_ALLOW;
   15138             :   }
   15139         646 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15140         646 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   15141             :   return resultobj;
   15142             : fail:
   15143             :   return NULL;
   15144             : }
   15145             : 
   15146             : 
   15147        1555 : SWIGINTERN PyObject *_wrap_StatBuf_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15148        1555 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15149        1555 :   StatBuf *arg1 = (StatBuf *) 0 ;
   15150        1555 :   void *argp1 = 0 ;
   15151        1555 :   int res1 = 0 ;
   15152        1555 :   PyObject *swig_obj[1] ;
   15153        1555 :   GIntBig result;
   15154             :   
   15155        1555 :   if (!args) SWIG_fail;
   15156        1555 :   swig_obj[0] = args;
   15157        1555 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
   15158        1555 :   if (!SWIG_IsOK(res1)) {
   15159           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_size_get" "', argument " "1"" of type '" "StatBuf *""'"); 
   15160             :   }
   15161        1555 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
   15162        1555 :   {
   15163        1555 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15164        1555 :     result =  ((arg1)->size);
   15165        1555 :     SWIG_PYTHON_THREAD_END_ALLOW;
   15166             :   }
   15167        1555 :   {
   15168        1555 :     resultobj = PyLong_FromLongLong(result);
   15169             :   }
   15170        1555 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   15171             :   return resultobj;
   15172             : fail:
   15173             :   return NULL;
   15174             : }
   15175             : 
   15176             : 
   15177         124 : SWIGINTERN PyObject *_wrap_StatBuf_mtime_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15178         124 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15179         124 :   StatBuf *arg1 = (StatBuf *) 0 ;
   15180         124 :   void *argp1 = 0 ;
   15181         124 :   int res1 = 0 ;
   15182         124 :   PyObject *swig_obj[1] ;
   15183         124 :   GIntBig result;
   15184             :   
   15185         124 :   if (!args) SWIG_fail;
   15186         124 :   swig_obj[0] = args;
   15187         124 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
   15188         124 :   if (!SWIG_IsOK(res1)) {
   15189           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_mtime_get" "', argument " "1"" of type '" "StatBuf *""'"); 
   15190             :   }
   15191         124 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
   15192         124 :   {
   15193         124 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15194         124 :     result =  ((arg1)->mtime);
   15195         124 :     SWIG_PYTHON_THREAD_END_ALLOW;
   15196             :   }
   15197         124 :   {
   15198         124 :     resultobj = PyLong_FromLongLong(result);
   15199             :   }
   15200         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; } }
   15201             :   return resultobj;
   15202             : fail:
   15203             :   return NULL;
   15204             : }
   15205             : 
   15206             : 
   15207           0 : SWIGINTERN PyObject *_wrap_new_StatBuf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15208           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15209           0 :   StatBuf *arg1 = (StatBuf *) 0 ;
   15210           0 :   void *argp1 = 0 ;
   15211           0 :   int res1 = 0 ;
   15212           0 :   PyObject *swig_obj[1] ;
   15213           0 :   StatBuf *result = 0 ;
   15214             :   
   15215           0 :   if (!args) SWIG_fail;
   15216           0 :   swig_obj[0] = args;
   15217           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
   15218           0 :   if (!SWIG_IsOK(res1)) {
   15219           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StatBuf" "', argument " "1"" of type '" "StatBuf *""'"); 
   15220             :   }
   15221           0 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
   15222           0 :   {
   15223           0 :     const int bLocalUseExceptions = GetUseExceptions();
   15224           0 :     if ( bLocalUseExceptions ) {
   15225           0 :       pushErrorHandler();
   15226             :     }
   15227           0 :     {
   15228           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15229           0 :       result = (StatBuf *)new_StatBuf(arg1);
   15230           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15231             :     }
   15232           0 :     if ( bLocalUseExceptions ) {
   15233           0 :       popErrorHandler();
   15234             :     }
   15235             : #ifndef SED_HACKS
   15236             :     if ( bLocalUseExceptions ) {
   15237             :       CPLErr eclass = CPLGetLastErrorType();
   15238             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15239             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15240             :       }
   15241             :     }
   15242             : #endif
   15243             :   }
   15244           0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StatBuf, SWIG_POINTER_NEW |  0 );
   15245           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; } }
   15246             :   return resultobj;
   15247             : fail:
   15248             :   return NULL;
   15249             : }
   15250             : 
   15251             : 
   15252        4818 : SWIGINTERN PyObject *_wrap_delete_StatBuf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15253        4818 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15254        4818 :   StatBuf *arg1 = (StatBuf *) 0 ;
   15255        4818 :   void *argp1 = 0 ;
   15256        4818 :   int res1 = 0 ;
   15257        4818 :   PyObject *swig_obj[1] ;
   15258             :   
   15259        4818 :   if (!args) SWIG_fail;
   15260        4818 :   swig_obj[0] = args;
   15261        4818 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, SWIG_POINTER_DISOWN |  0 );
   15262        4818 :   if (!SWIG_IsOK(res1)) {
   15263           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StatBuf" "', argument " "1"" of type '" "StatBuf *""'"); 
   15264             :   }
   15265        4818 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
   15266        4818 :   {
   15267        4818 :     const int bLocalUseExceptions = GetUseExceptions();
   15268        4818 :     if ( bLocalUseExceptions ) {
   15269        3270 :       pushErrorHandler();
   15270             :     }
   15271        4818 :     {
   15272        4818 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15273        4818 :       delete_StatBuf(arg1);
   15274        4818 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15275             :     }
   15276        4818 :     if ( bLocalUseExceptions ) {
   15277        3270 :       popErrorHandler();
   15278             :     }
   15279             : #ifndef SED_HACKS
   15280             :     if ( bLocalUseExceptions ) {
   15281             :       CPLErr eclass = CPLGetLastErrorType();
   15282             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15283             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15284             :       }
   15285             :     }
   15286             : #endif
   15287             :   }
   15288        4818 :   resultobj = SWIG_Py_Void();
   15289        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; } }
   15290             :   return resultobj;
   15291             : fail:
   15292             :   return NULL;
   15293             : }
   15294             : 
   15295             : 
   15296        2502 : SWIGINTERN PyObject *_wrap_StatBuf_IsDirectory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15297        2502 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15298        2502 :   StatBuf *arg1 = (StatBuf *) 0 ;
   15299        2502 :   void *argp1 = 0 ;
   15300        2502 :   int res1 = 0 ;
   15301        2502 :   PyObject *swig_obj[1] ;
   15302        2502 :   int result;
   15303             :   
   15304        2502 :   if (!args) SWIG_fail;
   15305        2502 :   swig_obj[0] = args;
   15306        2502 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
   15307        2502 :   if (!SWIG_IsOK(res1)) {
   15308           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_IsDirectory" "', argument " "1"" of type '" "StatBuf *""'"); 
   15309             :   }
   15310        2502 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
   15311        2502 :   {
   15312        2502 :     const int bLocalUseExceptions = GetUseExceptions();
   15313        2502 :     if ( bLocalUseExceptions ) {
   15314        2497 :       pushErrorHandler();
   15315             :     }
   15316        2502 :     {
   15317        2502 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15318        2502 :       result = (int)StatBuf_IsDirectory(arg1);
   15319        2502 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15320             :     }
   15321        2502 :     if ( bLocalUseExceptions ) {
   15322        2497 :       popErrorHandler();
   15323             :     }
   15324             : #ifndef SED_HACKS
   15325             :     if ( bLocalUseExceptions ) {
   15326             :       CPLErr eclass = CPLGetLastErrorType();
   15327             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15328             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15329             :       }
   15330             :     }
   15331             : #endif
   15332             :   }
   15333        2502 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15334        2502 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   15335             :   return resultobj;
   15336             : fail:
   15337             :   return NULL;
   15338             : }
   15339             : 
   15340             : 
   15341         277 : SWIGINTERN PyObject *StatBuf_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15342         277 :   PyObject *obj;
   15343         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   15344         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_StatBuf, SWIG_NewClientData(obj));
   15345         277 :   return SWIG_Py_Void();
   15346             : }
   15347             : 
   15348           0 : SWIGINTERN PyObject *StatBuf_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15349           0 :   return SWIG_Python_InitShadowInstance(args);
   15350             : }
   15351             : 
   15352        6300 : SWIGINTERN PyObject *_wrap_VSIStatL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15353        6300 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15354        6300 :   char *arg1 = (char *) 0 ;
   15355        6300 :   StatBuf *arg2 = (StatBuf *) 0 ;
   15356        6300 :   int arg3 = (int) 0 ;
   15357        6300 :   int bToFree1 = 0 ;
   15358        6300 :   StatBuf sStatBuf2 ;
   15359        6300 :   int val3 ;
   15360        6300 :   int ecode3 = 0 ;
   15361        6300 :   PyObject *swig_obj[2] ;
   15362        6300 :   int result;
   15363             :   
   15364        6300 :   {
   15365             :     /* %typemap(in,numinputs=0) (StatBuf *psStatBufOut) (StatBuf sStatBuf2 ) */
   15366        6300 :     arg2 = &sStatBuf2;
   15367             :   }
   15368        6300 :   if (!SWIG_Python_UnpackTuple(args, "VSIStatL", 1, 2, swig_obj)) SWIG_fail;
   15369        6300 :   {
   15370             :     /* %typemap(in) (const char *utf8_path) */
   15371        6300 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   15372             :     {
   15373        5430 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   15374             :     }
   15375             :     else
   15376             :     {
   15377         870 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   15378             :       
   15379             :     }
   15380        6300 :     if (arg1 == NULL)
   15381             :     {
   15382           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   15383           0 :       SWIG_fail;
   15384             :     }
   15385             :   }
   15386        6300 :   if (swig_obj[1]) {
   15387        2531 :     ecode3 = SWIG_AsVal_int(swig_obj[1], &val3);
   15388        2531 :     if (!SWIG_IsOK(ecode3)) {
   15389           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIStatL" "', argument " "3"" of type '" "int""'");
   15390             :     } 
   15391             :     arg3 = static_cast< int >(val3);
   15392             :   }
   15393        6300 :   {
   15394        6300 :     if (!arg1) {
   15395        6300 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15396             :     }
   15397             :   }
   15398        6300 :   {
   15399        6300 :     const int bLocalUseExceptions = GetUseExceptions();
   15400        6300 :     if ( bLocalUseExceptions ) {
   15401        3691 :       pushErrorHandler();
   15402             :     }
   15403        6300 :     {
   15404        6300 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15405        6300 :       result = (int)wrapper_VSIStatL((char const *)arg1,arg2,arg3);
   15406        6300 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15407             :     }
   15408        6300 :     if ( bLocalUseExceptions ) {
   15409        3691 :       popErrorHandler();
   15410             :     }
   15411             : #ifndef SED_HACKS
   15412             :     if ( bLocalUseExceptions ) {
   15413             :       CPLErr eclass = CPLGetLastErrorType();
   15414             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15415             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15416             :       }
   15417             :     }
   15418             : #endif
   15419             :   }
   15420        6300 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15421        6300 :   {
   15422             :     /* %typemap(argout) (StatBuf *psStatBufOut)*/
   15423        6300 :     Py_DECREF(resultobj);
   15424        6300 :     if (result == 0)
   15425        4818 :     resultobj = SWIG_NewPointerObj((void*)new_StatBuf( arg2 ),SWIGTYPE_p_StatBuf,1);
   15426             :     else
   15427             :     {
   15428        1482 :       resultobj = Py_None;
   15429        1482 :       Py_INCREF(resultobj);
   15430             :     }
   15431             :   }
   15432        6300 :   {
   15433             :     /* %typemap(freearg) (const char *utf8_path) */
   15434        6300 :     GDALPythonFreeCStr(arg1, bToFree1);
   15435             :   }
   15436        6532 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   15437             :   return resultobj;
   15438           0 : fail:
   15439           0 :   {
   15440             :     /* %typemap(freearg) (const char *utf8_path) */
   15441        6300 :     GDALPythonFreeCStr(arg1, bToFree1);
   15442             :   }
   15443             :   return NULL;
   15444             : }
   15445             : 
   15446             : 
   15447          35 : SWIGINTERN PyObject *_wrap_GetFileMetadata(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15448          35 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15449          35 :   char *arg1 = (char *) 0 ;
   15450          35 :   char *arg2 = (char *) 0 ;
   15451          35 :   char **arg3 = (char **) NULL ;
   15452          35 :   int bToFree1 = 0 ;
   15453          35 :   int res2 ;
   15454          35 :   char *buf2 = 0 ;
   15455          35 :   int alloc2 = 0 ;
   15456          35 :   PyObject *swig_obj[3] ;
   15457          35 :   char **result = 0 ;
   15458             :   
   15459          35 :   if (!SWIG_Python_UnpackTuple(args, "GetFileMetadata", 2, 3, swig_obj)) SWIG_fail;
   15460          35 :   {
   15461             :     /* %typemap(in) (const char *utf8_path) */
   15462          35 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   15463             :     {
   15464          35 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   15465             :     }
   15466             :     else
   15467             :     {
   15468           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   15469             :       
   15470             :     }
   15471          35 :     if (arg1 == NULL)
   15472             :     {
   15473           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   15474           0 :       SWIG_fail;
   15475             :     }
   15476             :   }
   15477          35 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   15478          35 :   if (!SWIG_IsOK(res2)) {
   15479           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetFileMetadata" "', argument " "2"" of type '" "char const *""'");
   15480             :   }
   15481          35 :   arg2 = reinterpret_cast< char * >(buf2);
   15482          35 :   if (swig_obj[2]) {
   15483           0 :     {
   15484             :       /* %typemap(in) char **dict */
   15485           0 :       arg3 = NULL;
   15486           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   15487           0 :         int bErr = FALSE;
   15488           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   15489           0 :         if ( bErr )
   15490             :         {
   15491           0 :           SWIG_fail;
   15492             :         }
   15493             :       }
   15494           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   15495           0 :         int bErr = FALSE;
   15496           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   15497           0 :         if ( bErr )
   15498             :         {
   15499           0 :           SWIG_fail;
   15500             :         }
   15501             :       }
   15502             :       else {
   15503           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   15504           0 :         SWIG_fail;
   15505             :       }
   15506             :     }
   15507             :   }
   15508          35 :   {
   15509          35 :     if (!arg1) {
   15510          35 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15511             :     }
   15512             :   }
   15513          35 :   {
   15514          35 :     const int bLocalUseExceptions = GetUseExceptions();
   15515          35 :     if ( bLocalUseExceptions ) {
   15516          16 :       pushErrorHandler();
   15517             :     }
   15518          35 :     {
   15519          35 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15520          35 :       result = (char **)VSIGetFileMetadata((char const *)arg1,(char const *)arg2,arg3);
   15521          35 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15522             :     }
   15523          35 :     if ( bLocalUseExceptions ) {
   15524          16 :       popErrorHandler();
   15525             :     }
   15526             : #ifndef SED_HACKS
   15527             :     if ( bLocalUseExceptions ) {
   15528             :       CPLErr eclass = CPLGetLastErrorType();
   15529             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15530             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15531             :       }
   15532             :     }
   15533             : #endif
   15534             :   }
   15535          35 :   {
   15536             :     /* %typemap(out) char **dict */
   15537          35 :     resultobj = GetCSLStringAsPyDict(result, true);
   15538             :   }
   15539          35 :   {
   15540             :     /* %typemap(freearg) (const char *utf8_path) */
   15541          35 :     GDALPythonFreeCStr(arg1, bToFree1);
   15542             :   }
   15543          35 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   15544          35 :   {
   15545             :     /* %typemap(freearg) char **dict */
   15546          35 :     CSLDestroy( arg3 );
   15547             :   }
   15548          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; } }
   15549             :   return resultobj;
   15550           0 : fail:
   15551           0 :   {
   15552             :     /* %typemap(freearg) (const char *utf8_path) */
   15553           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   15554             :   }
   15555           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   15556           0 :   {
   15557             :     /* %typemap(freearg) char **dict */
   15558           0 :     CSLDestroy( arg3 );
   15559             :   }
   15560             :   return NULL;
   15561             : }
   15562             : 
   15563             : 
   15564          17 : SWIGINTERN PyObject *_wrap_SetFileMetadata(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15565          17 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15566          17 :   char *arg1 = (char *) 0 ;
   15567          17 :   char **arg2 = (char **) 0 ;
   15568          17 :   char *arg3 = (char *) 0 ;
   15569          17 :   char **arg4 = (char **) NULL ;
   15570          17 :   int bToFree1 = 0 ;
   15571          17 :   int res3 ;
   15572          17 :   char *buf3 = 0 ;
   15573          17 :   int alloc3 = 0 ;
   15574          17 :   PyObject *swig_obj[4] ;
   15575          17 :   bool result;
   15576             :   
   15577          17 :   if (!SWIG_Python_UnpackTuple(args, "SetFileMetadata", 3, 4, swig_obj)) SWIG_fail;
   15578          17 :   {
   15579             :     /* %typemap(in) (const char *utf8_path) */
   15580          17 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   15581             :     {
   15582          17 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   15583             :     }
   15584             :     else
   15585             :     {
   15586           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   15587             :       
   15588             :     }
   15589          17 :     if (arg1 == NULL)
   15590             :     {
   15591           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   15592           0 :       SWIG_fail;
   15593             :     }
   15594             :   }
   15595          17 :   {
   15596             :     /* %typemap(in) char **dict */
   15597          17 :     arg2 = NULL;
   15598          17 :     if ( PySequence_Check( swig_obj[1] ) ) {
   15599           0 :       int bErr = FALSE;
   15600           0 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   15601           0 :       if ( bErr )
   15602             :       {
   15603           0 :         SWIG_fail;
   15604             :       }
   15605             :     }
   15606          17 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   15607          17 :       int bErr = FALSE;
   15608          17 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   15609          17 :       if ( bErr )
   15610             :       {
   15611           0 :         SWIG_fail;
   15612             :       }
   15613             :     }
   15614             :     else {
   15615           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   15616           0 :       SWIG_fail;
   15617             :     }
   15618             :   }
   15619          17 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   15620          17 :   if (!SWIG_IsOK(res3)) {
   15621           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SetFileMetadata" "', argument " "3"" of type '" "char const *""'");
   15622             :   }
   15623          17 :   arg3 = reinterpret_cast< char * >(buf3);
   15624          17 :   if (swig_obj[3]) {
   15625           1 :     {
   15626             :       /* %typemap(in) char **dict */
   15627           1 :       arg4 = NULL;
   15628           1 :       if ( PySequence_Check( swig_obj[3] ) ) {
   15629           1 :         int bErr = FALSE;
   15630           1 :         arg4 = CSLFromPySequence(swig_obj[3], &bErr);
   15631           1 :         if ( bErr )
   15632             :         {
   15633           0 :           SWIG_fail;
   15634             :         }
   15635             :       }
   15636           0 :       else if ( PyMapping_Check( swig_obj[3] ) ) {
   15637           0 :         int bErr = FALSE;
   15638           0 :         arg4 = CSLFromPyMapping(swig_obj[3], &bErr);
   15639           0 :         if ( bErr )
   15640             :         {
   15641           0 :           SWIG_fail;
   15642             :         }
   15643             :       }
   15644             :       else {
   15645           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   15646           0 :         SWIG_fail;
   15647             :       }
   15648             :     }
   15649             :   }
   15650          17 :   {
   15651          17 :     if (!arg1) {
   15652          17 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15653             :     }
   15654             :   }
   15655          17 :   {
   15656          17 :     const int bLocalUseExceptions = GetUseExceptions();
   15657          17 :     if ( bLocalUseExceptions ) {
   15658           0 :       pushErrorHandler();
   15659             :     }
   15660          17 :     {
   15661          17 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15662          17 :       result = (bool)VSISetFileMetadata((char const *)arg1,arg2,(char const *)arg3,arg4);
   15663          17 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15664             :     }
   15665          17 :     if ( bLocalUseExceptions ) {
   15666           0 :       popErrorHandler();
   15667             :     }
   15668             : #ifndef SED_HACKS
   15669             :     if ( bLocalUseExceptions ) {
   15670             :       CPLErr eclass = CPLGetLastErrorType();
   15671             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15672             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15673             :       }
   15674             :     }
   15675             : #endif
   15676             :   }
   15677          17 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   15678          17 :   {
   15679             :     /* %typemap(freearg) (const char *utf8_path) */
   15680          17 :     GDALPythonFreeCStr(arg1, bToFree1);
   15681             :   }
   15682          17 :   {
   15683             :     /* %typemap(freearg) char **dict */
   15684          17 :     CSLDestroy( arg2 );
   15685             :   }
   15686          17 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   15687          17 :   {
   15688             :     /* %typemap(freearg) char **dict */
   15689          17 :     CSLDestroy( arg4 );
   15690             :   }
   15691          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; } }
   15692             :   return resultobj;
   15693           0 : fail:
   15694           0 :   {
   15695             :     /* %typemap(freearg) (const char *utf8_path) */
   15696           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   15697             :   }
   15698           0 :   {
   15699             :     /* %typemap(freearg) char **dict */
   15700           0 :     CSLDestroy( arg2 );
   15701             :   }
   15702           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   15703           0 :   {
   15704             :     /* %typemap(freearg) char **dict */
   15705           0 :     CSLDestroy( arg4 );
   15706             :   }
   15707             :   return NULL;
   15708             : }
   15709             : 
   15710             : 
   15711        4597 : SWIGINTERN PyObject *_wrap_VSIFOpenL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15712        4597 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15713        4597 :   char *arg1 = (char *) 0 ;
   15714        4597 :   char *arg2 = (char *) 0 ;
   15715        4597 :   int bToFree1 = 0 ;
   15716        4597 :   int res2 ;
   15717        4597 :   char *buf2 = 0 ;
   15718        4597 :   int alloc2 = 0 ;
   15719        4597 :   PyObject *swig_obj[2] ;
   15720        4597 :   VSILFILE *result = 0 ;
   15721             :   
   15722        4597 :   if (!SWIG_Python_UnpackTuple(args, "VSIFOpenL", 2, 2, swig_obj)) SWIG_fail;
   15723        4597 :   {
   15724             :     /* %typemap(in) (const char *utf8_path) */
   15725        4597 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   15726             :     {
   15727        3940 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   15728             :     }
   15729             :     else
   15730             :     {
   15731         657 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   15732             :       
   15733             :     }
   15734        4597 :     if (arg1 == NULL)
   15735             :     {
   15736           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   15737           0 :       SWIG_fail;
   15738             :     }
   15739             :   }
   15740        4597 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   15741        4597 :   if (!SWIG_IsOK(res2)) {
   15742           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VSIFOpenL" "', argument " "2"" of type '" "char const *""'");
   15743             :   }
   15744        4597 :   arg2 = reinterpret_cast< char * >(buf2);
   15745        4597 :   {
   15746        4597 :     if (!arg1) {
   15747        4597 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15748             :     }
   15749             :   }
   15750        4597 :   {
   15751        4597 :     const int bLocalUseExceptions = GetUseExceptions();
   15752        4597 :     if ( bLocalUseExceptions ) {
   15753         900 :       pushErrorHandler();
   15754             :     }
   15755        4597 :     {
   15756        4597 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15757        4597 :       result = (VSILFILE *)wrapper_VSIFOpenL((char const *)arg1,(char const *)arg2);
   15758        4597 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15759             :     }
   15760        4597 :     if ( bLocalUseExceptions ) {
   15761         900 :       popErrorHandler();
   15762             :     }
   15763             : #ifndef SED_HACKS
   15764             :     if ( bLocalUseExceptions ) {
   15765             :       CPLErr eclass = CPLGetLastErrorType();
   15766             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15767             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15768             :       }
   15769             :     }
   15770             : #endif
   15771             :   }
   15772        4597 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VSILFILE, 0 |  0 );
   15773        4597 :   {
   15774             :     /* %typemap(freearg) (const char *utf8_path) */
   15775        4597 :     GDALPythonFreeCStr(arg1, bToFree1);
   15776             :   }
   15777        4597 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   15778        4653 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   15779             :   return resultobj;
   15780           0 : fail:
   15781           0 :   {
   15782             :     /* %typemap(freearg) (const char *utf8_path) */
   15783           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   15784             :   }
   15785           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   15786             :   return NULL;
   15787             : }
   15788             : 
   15789             : 
   15790         361 : SWIGINTERN PyObject *_wrap_VSIFOpenExL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15791         361 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15792         361 :   char *arg1 = (char *) 0 ;
   15793         361 :   char *arg2 = (char *) 0 ;
   15794         361 :   int arg3 = (int) FALSE ;
   15795         361 :   char **arg4 = (char **) NULL ;
   15796         361 :   int bToFree1 = 0 ;
   15797         361 :   int res2 ;
   15798         361 :   char *buf2 = 0 ;
   15799         361 :   int alloc2 = 0 ;
   15800         361 :   int val3 ;
   15801         361 :   int ecode3 = 0 ;
   15802         361 :   PyObject *swig_obj[4] ;
   15803         361 :   VSILFILE *result = 0 ;
   15804             :   
   15805         361 :   if (!SWIG_Python_UnpackTuple(args, "VSIFOpenExL", 2, 4, swig_obj)) SWIG_fail;
   15806         361 :   {
   15807             :     /* %typemap(in) (const char *utf8_path) */
   15808         361 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   15809             :     {
   15810         250 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   15811             :     }
   15812             :     else
   15813             :     {
   15814         111 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   15815             :       
   15816             :     }
   15817         361 :     if (arg1 == NULL)
   15818             :     {
   15819           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   15820           0 :       SWIG_fail;
   15821             :     }
   15822             :   }
   15823         361 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   15824         361 :   if (!SWIG_IsOK(res2)) {
   15825           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VSIFOpenExL" "', argument " "2"" of type '" "char const *""'");
   15826             :   }
   15827         361 :   arg2 = reinterpret_cast< char * >(buf2);
   15828         361 :   if (swig_obj[2]) {
   15829         361 :     ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   15830         361 :     if (!SWIG_IsOK(ecode3)) {
   15831           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIFOpenExL" "', argument " "3"" of type '" "int""'");
   15832             :     } 
   15833             :     arg3 = static_cast< int >(val3);
   15834             :   }
   15835         361 :   if (swig_obj[3]) {
   15836          21 :     {
   15837             :       /* %typemap(in) char **dict */
   15838          21 :       arg4 = NULL;
   15839          21 :       if ( PySequence_Check( swig_obj[3] ) ) {
   15840          21 :         int bErr = FALSE;
   15841          21 :         arg4 = CSLFromPySequence(swig_obj[3], &bErr);
   15842          21 :         if ( bErr )
   15843             :         {
   15844           0 :           SWIG_fail;
   15845             :         }
   15846             :       }
   15847           0 :       else if ( PyMapping_Check( swig_obj[3] ) ) {
   15848           0 :         int bErr = FALSE;
   15849           0 :         arg4 = CSLFromPyMapping(swig_obj[3], &bErr);
   15850           0 :         if ( bErr )
   15851             :         {
   15852           0 :           SWIG_fail;
   15853             :         }
   15854             :       }
   15855             :       else {
   15856           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   15857           0 :         SWIG_fail;
   15858             :       }
   15859             :     }
   15860             :   }
   15861         361 :   {
   15862         361 :     if (!arg1) {
   15863         361 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15864             :     }
   15865             :   }
   15866         361 :   {
   15867         361 :     const int bLocalUseExceptions = GetUseExceptions();
   15868         361 :     if ( bLocalUseExceptions ) {
   15869         177 :       pushErrorHandler();
   15870             :     }
   15871         361 :     {
   15872         361 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15873         361 :       result = (VSILFILE *)wrapper_VSIFOpenExL((char const *)arg1,(char const *)arg2,arg3,arg4);
   15874         361 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15875             :     }
   15876         361 :     if ( bLocalUseExceptions ) {
   15877         177 :       popErrorHandler();
   15878             :     }
   15879             : #ifndef SED_HACKS
   15880             :     if ( bLocalUseExceptions ) {
   15881             :       CPLErr eclass = CPLGetLastErrorType();
   15882             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15883             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15884             :       }
   15885             :     }
   15886             : #endif
   15887             :   }
   15888         361 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VSILFILE, 0 |  0 );
   15889         361 :   {
   15890             :     /* %typemap(freearg) (const char *utf8_path) */
   15891         361 :     GDALPythonFreeCStr(arg1, bToFree1);
   15892             :   }
   15893         361 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   15894         361 :   {
   15895             :     /* %typemap(freearg) char **dict */
   15896         361 :     CSLDestroy( arg4 );
   15897             :   }
   15898         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; } }
   15899             :   return resultobj;
   15900           0 : fail:
   15901           0 :   {
   15902             :     /* %typemap(freearg) (const char *utf8_path) */
   15903           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   15904             :   }
   15905           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   15906           0 :   {
   15907             :     /* %typemap(freearg) char **dict */
   15908           0 :     CSLDestroy( arg4 );
   15909             :   }
   15910             :   return NULL;
   15911             : }
   15912             : 
   15913             : 
   15914          40 : SWIGINTERN PyObject *_wrap_VSIFEofL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15915          40 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15916          40 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   15917          40 :   void *argp1 = 0 ;
   15918          40 :   int res1 = 0 ;
   15919          40 :   PyObject *swig_obj[1] ;
   15920          40 :   int result;
   15921             :   
   15922          40 :   if (!args) SWIG_fail;
   15923          40 :   swig_obj[0] = args;
   15924          40 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   15925          40 :   if (!SWIG_IsOK(res1)) {
   15926           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFEofL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   15927             :   }
   15928          40 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   15929          40 :   {
   15930          40 :     if (!arg1) {
   15931           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15932             :     }
   15933             :   }
   15934          40 :   {
   15935          40 :     const int bLocalUseExceptions = GetUseExceptions();
   15936          40 :     if ( bLocalUseExceptions ) {
   15937          11 :       pushErrorHandler();
   15938             :     }
   15939          40 :     {
   15940          40 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15941          40 :       result = (int)VSIFEofL(arg1);
   15942          40 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15943             :     }
   15944          40 :     if ( bLocalUseExceptions ) {
   15945          11 :       popErrorHandler();
   15946             :     }
   15947             : #ifndef SED_HACKS
   15948             :     if ( bLocalUseExceptions ) {
   15949             :       CPLErr eclass = CPLGetLastErrorType();
   15950             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15951             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15952             :       }
   15953             :     }
   15954             : #endif
   15955             :   }
   15956          40 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15957          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; } }
   15958             :   return resultobj;
   15959             : fail:
   15960             :   return NULL;
   15961             : }
   15962             : 
   15963             : 
   15964        1653 : SWIGINTERN PyObject *_wrap_VSIFErrorL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15965        1653 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   15966        1653 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   15967        1653 :   void *argp1 = 0 ;
   15968        1653 :   int res1 = 0 ;
   15969        1653 :   PyObject *swig_obj[1] ;
   15970        1653 :   int result;
   15971             :   
   15972        1653 :   if (!args) SWIG_fail;
   15973        1653 :   swig_obj[0] = args;
   15974        1653 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   15975        1653 :   if (!SWIG_IsOK(res1)) {
   15976           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFErrorL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   15977             :   }
   15978        1653 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   15979        1653 :   {
   15980        1653 :     if (!arg1) {
   15981           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   15982             :     }
   15983             :   }
   15984        1653 :   {
   15985        1653 :     const int bLocalUseExceptions = GetUseExceptions();
   15986        1653 :     if ( bLocalUseExceptions ) {
   15987          10 :       pushErrorHandler();
   15988             :     }
   15989        1653 :     {
   15990        1653 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   15991        1653 :       result = (int)VSIFErrorL(arg1);
   15992        1653 :       SWIG_PYTHON_THREAD_END_ALLOW;
   15993             :     }
   15994        1653 :     if ( bLocalUseExceptions ) {
   15995          10 :       popErrorHandler();
   15996             :     }
   15997             : #ifndef SED_HACKS
   15998             :     if ( bLocalUseExceptions ) {
   15999             :       CPLErr eclass = CPLGetLastErrorType();
   16000             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16001             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16002             :       }
   16003             :     }
   16004             : #endif
   16005             :   }
   16006        1653 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16007        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; } }
   16008             :   return resultobj;
   16009             : fail:
   16010             :   return NULL;
   16011             : }
   16012             : 
   16013             : 
   16014           5 : SWIGINTERN PyObject *_wrap_VSIFClearErrL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16015           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16016           5 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   16017           5 :   void *argp1 = 0 ;
   16018           5 :   int res1 = 0 ;
   16019           5 :   PyObject *swig_obj[1] ;
   16020             :   
   16021           5 :   if (!args) SWIG_fail;
   16022           5 :   swig_obj[0] = args;
   16023           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16024           5 :   if (!SWIG_IsOK(res1)) {
   16025           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFClearErrL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   16026             :   }
   16027           5 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   16028           5 :   {
   16029           5 :     if (!arg1) {
   16030           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16031             :     }
   16032             :   }
   16033           5 :   {
   16034           5 :     const int bLocalUseExceptions = GetUseExceptions();
   16035           5 :     if ( bLocalUseExceptions ) {
   16036           1 :       pushErrorHandler();
   16037             :     }
   16038           5 :     {
   16039           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16040           5 :       VSIFClearErrL(arg1);
   16041           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16042             :     }
   16043           5 :     if ( bLocalUseExceptions ) {
   16044           1 :       popErrorHandler();
   16045             :     }
   16046             : #ifndef SED_HACKS
   16047             :     if ( bLocalUseExceptions ) {
   16048             :       CPLErr eclass = CPLGetLastErrorType();
   16049             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16050             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16051             :       }
   16052             :     }
   16053             : #endif
   16054             :   }
   16055           5 :   resultobj = SWIG_Py_Void();
   16056           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; } }
   16057             :   return resultobj;
   16058             : fail:
   16059             :   return NULL;
   16060             : }
   16061             : 
   16062             : 
   16063           3 : SWIGINTERN PyObject *_wrap_VSIFFlushL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16064           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16065           3 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   16066           3 :   void *argp1 = 0 ;
   16067           3 :   int res1 = 0 ;
   16068           3 :   PyObject *swig_obj[1] ;
   16069           3 :   int result;
   16070             :   
   16071           3 :   if (!args) SWIG_fail;
   16072           3 :   swig_obj[0] = args;
   16073           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16074           3 :   if (!SWIG_IsOK(res1)) {
   16075           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFFlushL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   16076             :   }
   16077           3 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   16078           3 :   {
   16079           3 :     if (!arg1) {
   16080           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16081             :     }
   16082             :   }
   16083           3 :   {
   16084           3 :     const int bLocalUseExceptions = GetUseExceptions();
   16085           3 :     if ( bLocalUseExceptions ) {
   16086           0 :       pushErrorHandler();
   16087             :     }
   16088           3 :     {
   16089           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16090           3 :       result = (int)VSIFFlushL(arg1);
   16091           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16092             :     }
   16093           3 :     if ( bLocalUseExceptions ) {
   16094           0 :       popErrorHandler();
   16095             :     }
   16096             : #ifndef SED_HACKS
   16097             :     if ( bLocalUseExceptions ) {
   16098             :       CPLErr eclass = CPLGetLastErrorType();
   16099             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16100             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16101             :       }
   16102             :     }
   16103             : #endif
   16104             :   }
   16105           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16106           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; } }
   16107             :   return resultobj;
   16108             : fail:
   16109             :   return NULL;
   16110             : }
   16111             : 
   16112             : 
   16113        4638 : SWIGINTERN PyObject *_wrap_VSIFCloseL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16114        4638 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16115        4638 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   16116        4638 :   void *argp1 = 0 ;
   16117        4638 :   int res1 = 0 ;
   16118        4638 :   PyObject *swig_obj[1] ;
   16119        4638 :   VSI_RETVAL result;
   16120             :   
   16121        4638 :   if (!args) SWIG_fail;
   16122        4638 :   swig_obj[0] = args;
   16123        4638 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16124        4638 :   if (!SWIG_IsOK(res1)) {
   16125           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFCloseL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   16126             :   }
   16127        4638 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   16128        4638 :   {
   16129        4638 :     if (!arg1) {
   16130           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16131             :     }
   16132             :   }
   16133        4638 :   {
   16134        4638 :     const int bLocalUseExceptions = GetUseExceptions();
   16135        4638 :     if ( bLocalUseExceptions ) {
   16136        1001 :       pushErrorHandler();
   16137             :     }
   16138        4638 :     {
   16139        4638 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16140        4638 :       result = VSIFCloseL(arg1);
   16141        4638 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16142             :     }
   16143        4638 :     if ( bLocalUseExceptions ) {
   16144        1001 :       popErrorHandler();
   16145             :     }
   16146             : #ifndef SED_HACKS
   16147             :     if ( bLocalUseExceptions ) {
   16148             :       CPLErr eclass = CPLGetLastErrorType();
   16149             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16150             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16151             :       }
   16152             :     }
   16153             : #endif
   16154             :   }
   16155        4638 :   {
   16156             :     /* %typemap(out) VSI_RETVAL */
   16157        4717 :     if ( result != 0 && GetUseExceptions()) {
   16158           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   16159           0 :       if( pszMessage[0] != '\0' )
   16160           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   16161             :       else
   16162           0 :       PyErr_SetString( PyExc_RuntimeError, "unknown error occurred" );
   16163           0 :       SWIG_fail;
   16164             :     }
   16165             :   }
   16166        4638 :   {
   16167             :     /* %typemap(ret) VSI_RETVAL */
   16168        4638 :     resultobj = PyInt_FromLong( result );
   16169             :   }
   16170        4638 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16171             :   return resultobj;
   16172             : fail:
   16173             :   return NULL;
   16174             : }
   16175             : 
   16176             : 
   16177       65890 : SWIGINTERN PyObject *_wrap_VSIFSeekL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16178       65890 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16179       65890 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   16180       65890 :   GIntBig arg2 ;
   16181       65890 :   int arg3 ;
   16182       65890 :   void *argp1 = 0 ;
   16183       65890 :   int res1 = 0 ;
   16184       65890 :   int val3 ;
   16185       65890 :   int ecode3 = 0 ;
   16186       65890 :   PyObject *swig_obj[3] ;
   16187       65890 :   int result;
   16188             :   
   16189       65890 :   if (!SWIG_Python_UnpackTuple(args, "VSIFSeekL", 3, 3, swig_obj)) SWIG_fail;
   16190       65890 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16191       65890 :   if (!SWIG_IsOK(res1)) {
   16192           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFSeekL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   16193             :   }
   16194       65890 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   16195       65890 :   {
   16196       65890 :     arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
   16197             :   }
   16198       65890 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   16199       65890 :   if (!SWIG_IsOK(ecode3)) {
   16200           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIFSeekL" "', argument " "3"" of type '" "int""'");
   16201             :   } 
   16202       65890 :   arg3 = static_cast< int >(val3);
   16203       65890 :   {
   16204       65890 :     if (!arg1) {
   16205           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16206             :     }
   16207             :   }
   16208       65890 :   {
   16209       65890 :     const int bLocalUseExceptions = GetUseExceptions();
   16210       65890 :     if ( bLocalUseExceptions ) {
   16211        2672 :       pushErrorHandler();
   16212             :     }
   16213       65890 :     {
   16214       65890 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16215       65890 :       result = (int)wrapper_VSIFSeekL(arg1,arg2,arg3);
   16216       65890 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16217             :     }
   16218       65890 :     if ( bLocalUseExceptions ) {
   16219        2672 :       popErrorHandler();
   16220             :     }
   16221             : #ifndef SED_HACKS
   16222             :     if ( bLocalUseExceptions ) {
   16223             :       CPLErr eclass = CPLGetLastErrorType();
   16224             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16225             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16226             :       }
   16227             :     }
   16228             : #endif
   16229             :   }
   16230       65890 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16231       65890 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16232             :   return resultobj;
   16233             : fail:
   16234             :   return NULL;
   16235             : }
   16236             : 
   16237             : 
   16238         810 : SWIGINTERN PyObject *_wrap_VSIFTellL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16239         810 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16240         810 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   16241         810 :   void *argp1 = 0 ;
   16242         810 :   int res1 = 0 ;
   16243         810 :   PyObject *swig_obj[1] ;
   16244         810 :   GIntBig result;
   16245             :   
   16246         810 :   if (!args) SWIG_fail;
   16247         810 :   swig_obj[0] = args;
   16248         810 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16249         810 :   if (!SWIG_IsOK(res1)) {
   16250           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFTellL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   16251             :   }
   16252         810 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   16253         810 :   {
   16254         810 :     if (!arg1) {
   16255           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16256             :     }
   16257             :   }
   16258         810 :   {
   16259         810 :     const int bLocalUseExceptions = GetUseExceptions();
   16260         810 :     if ( bLocalUseExceptions ) {
   16261         603 :       pushErrorHandler();
   16262             :     }
   16263         810 :     {
   16264         810 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16265         810 :       result = VSIFTellL(arg1);
   16266         810 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16267             :     }
   16268         810 :     if ( bLocalUseExceptions ) {
   16269         603 :       popErrorHandler();
   16270             :     }
   16271             : #ifndef SED_HACKS
   16272             :     if ( bLocalUseExceptions ) {
   16273             :       CPLErr eclass = CPLGetLastErrorType();
   16274             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16275             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16276             :       }
   16277             :     }
   16278             : #endif
   16279             :   }
   16280         810 :   {
   16281         810 :     resultobj = PyLong_FromLongLong(result);
   16282             :   }
   16283         810 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16284             :   return resultobj;
   16285             : fail:
   16286             :   return NULL;
   16287             : }
   16288             : 
   16289             : 
   16290          36 : SWIGINTERN PyObject *_wrap_VSIFTruncateL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16291          36 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16292          36 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   16293          36 :   GIntBig arg2 ;
   16294          36 :   void *argp1 = 0 ;
   16295          36 :   int res1 = 0 ;
   16296          36 :   PyObject *swig_obj[2] ;
   16297          36 :   int result;
   16298             :   
   16299          36 :   if (!SWIG_Python_UnpackTuple(args, "VSIFTruncateL", 2, 2, swig_obj)) SWIG_fail;
   16300          36 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16301          36 :   if (!SWIG_IsOK(res1)) {
   16302           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFTruncateL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   16303             :   }
   16304          36 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   16305          36 :   {
   16306          36 :     arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
   16307             :   }
   16308          36 :   {
   16309          36 :     if (!arg1) {
   16310           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16311             :     }
   16312             :   }
   16313          36 :   {
   16314          36 :     const int bLocalUseExceptions = GetUseExceptions();
   16315          36 :     if ( bLocalUseExceptions ) {
   16316          15 :       pushErrorHandler();
   16317             :     }
   16318          36 :     {
   16319          36 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16320          36 :       result = (int)VSIFTruncateL(arg1,arg2);
   16321          36 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16322             :     }
   16323          36 :     if ( bLocalUseExceptions ) {
   16324          15 :       popErrorHandler();
   16325             :     }
   16326             : #ifndef SED_HACKS
   16327             :     if ( bLocalUseExceptions ) {
   16328             :       CPLErr eclass = CPLGetLastErrorType();
   16329             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16330             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16331             :       }
   16332             :     }
   16333             : #endif
   16334             :   }
   16335          36 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16336          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; } }
   16337             :   return resultobj;
   16338             : fail:
   16339             :   return NULL;
   16340             : }
   16341             : 
   16342             : 
   16343           2 : SWIGINTERN PyObject *_wrap_VSISupportsSparseFiles(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16344           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16345           2 :   char *arg1 = (char *) 0 ;
   16346           2 :   int bToFree1 = 0 ;
   16347           2 :   PyObject *swig_obj[1] ;
   16348           2 :   int result;
   16349             :   
   16350           2 :   if (!args) SWIG_fail;
   16351           2 :   swig_obj[0] = args;
   16352           2 :   {
   16353             :     /* %typemap(in) (const char *utf8_path) */
   16354           2 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   16355             :     {
   16356           2 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   16357             :     }
   16358             :     else
   16359             :     {
   16360           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   16361             :       
   16362             :     }
   16363           2 :     if (arg1 == NULL)
   16364             :     {
   16365           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   16366           0 :       SWIG_fail;
   16367             :     }
   16368             :   }
   16369           2 :   {
   16370           2 :     if (!arg1) {
   16371           2 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16372             :     }
   16373             :   }
   16374           2 :   {
   16375           2 :     const int bLocalUseExceptions = GetUseExceptions();
   16376           2 :     if ( bLocalUseExceptions ) {
   16377           0 :       pushErrorHandler();
   16378             :     }
   16379           2 :     {
   16380           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16381           2 :       result = (int)VSISupportsSparseFiles((char const *)arg1);
   16382           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16383             :     }
   16384           2 :     if ( bLocalUseExceptions ) {
   16385           0 :       popErrorHandler();
   16386             :     }
   16387             : #ifndef SED_HACKS
   16388             :     if ( bLocalUseExceptions ) {
   16389             :       CPLErr eclass = CPLGetLastErrorType();
   16390             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16391             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16392             :       }
   16393             :     }
   16394             : #endif
   16395             :   }
   16396           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16397           2 :   {
   16398             :     /* %typemap(freearg) (const char *utf8_path) */
   16399           2 :     GDALPythonFreeCStr(arg1, bToFree1);
   16400             :   }
   16401           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; } }
   16402             :   return resultobj;
   16403           0 : fail:
   16404           0 :   {
   16405             :     /* %typemap(freearg) (const char *utf8_path) */
   16406           2 :     GDALPythonFreeCStr(arg1, bToFree1);
   16407             :   }
   16408             :   return NULL;
   16409             : }
   16410             : 
   16411             : 
   16412           3 : SWIGINTERN PyObject *_wrap_VSIFGetRangeStatusL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16413           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16414           3 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   16415           3 :   GIntBig arg2 ;
   16416           3 :   GIntBig arg3 ;
   16417           3 :   void *argp1 = 0 ;
   16418           3 :   int res1 = 0 ;
   16419           3 :   PyObject *swig_obj[3] ;
   16420           3 :   int result;
   16421             :   
   16422           3 :   if (!SWIG_Python_UnpackTuple(args, "VSIFGetRangeStatusL", 3, 3, swig_obj)) SWIG_fail;
   16423           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16424           3 :   if (!SWIG_IsOK(res1)) {
   16425           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFGetRangeStatusL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   16426             :   }
   16427           3 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   16428           3 :   {
   16429           3 :     arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
   16430             :   }
   16431           3 :   {
   16432           3 :     arg3 = (GIntBig)PyLong_AsLongLong(swig_obj[2]);
   16433             :   }
   16434           3 :   {
   16435           3 :     if (!arg1) {
   16436           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16437             :     }
   16438             :   }
   16439           3 :   {
   16440           3 :     const int bLocalUseExceptions = GetUseExceptions();
   16441           3 :     if ( bLocalUseExceptions ) {
   16442           0 :       pushErrorHandler();
   16443             :     }
   16444           3 :     {
   16445           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16446           3 :       result = (int)VSIFGetRangeStatusL(arg1,arg2,arg3);
   16447           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16448             :     }
   16449           3 :     if ( bLocalUseExceptions ) {
   16450           0 :       popErrorHandler();
   16451             :     }
   16452             : #ifndef SED_HACKS
   16453             :     if ( bLocalUseExceptions ) {
   16454             :       CPLErr eclass = CPLGetLastErrorType();
   16455             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16456             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16457             :       }
   16458             :     }
   16459             : #endif
   16460             :   }
   16461           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16462           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; } }
   16463             :   return resultobj;
   16464             : fail:
   16465             :   return NULL;
   16466             : }
   16467             : 
   16468             : 
   16469      346816 : SWIGINTERN PyObject *_wrap_VSIFWriteL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16470      346816 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16471      346816 :   int arg1 ;
   16472      346816 :   char *arg2 = (char *) 0 ;
   16473      346816 :   int arg3 ;
   16474      346816 :   int arg4 ;
   16475      346816 :   VSILFILE *arg5 = (VSILFILE *) 0 ;
   16476      346816 :   int alloc1 = 0 ;
   16477      346816 :   bool viewIsValid1 = false ;
   16478      346816 :   Py_buffer view1 ;
   16479      346816 :   int val3 ;
   16480      346816 :   int ecode3 = 0 ;
   16481      346816 :   int val4 ;
   16482      346816 :   int ecode4 = 0 ;
   16483      346816 :   void *argp5 = 0 ;
   16484      346816 :   int res5 = 0 ;
   16485      346816 :   PyObject *swig_obj[4] ;
   16486      346816 :   int result;
   16487             :   
   16488      346816 :   if (!SWIG_Python_UnpackTuple(args, "VSIFWriteL", 4, 4, swig_obj)) SWIG_fail;
   16489      346816 :   {
   16490             :     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
   16491      346816 :     char* ptr = NULL;
   16492      346816 :     if( !GetBufferAsCharPtrIntSize(swig_obj[0], &arg1, &ptr, &alloc1, &viewIsValid1, &view1) ) {
   16493           0 :       SWIG_fail;
   16494             :     }
   16495      346816 :     arg2 = (char *)ptr;
   16496             :   }
   16497      346816 :   ecode3 = SWIG_AsVal_int(swig_obj[1], &val3);
   16498      346816 :   if (!SWIG_IsOK(ecode3)) {
   16499           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIFWriteL" "', argument " "3"" of type '" "int""'");
   16500             :   } 
   16501      346816 :   arg3 = static_cast< int >(val3);
   16502      346816 :   ecode4 = SWIG_AsVal_int(swig_obj[2], &val4);
   16503      346816 :   if (!SWIG_IsOK(ecode4)) {
   16504           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VSIFWriteL" "', argument " "4"" of type '" "int""'");
   16505             :   } 
   16506      346816 :   arg4 = static_cast< int >(val4);
   16507      346816 :   res5 = SWIG_ConvertPtr(swig_obj[3], &argp5,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16508      346816 :   if (!SWIG_IsOK(res5)) {
   16509           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "VSIFWriteL" "', argument " "5"" of type '" "VSILFILE *""'"); 
   16510             :   }
   16511      346816 :   arg5 = reinterpret_cast< VSILFILE * >(argp5);
   16512      346816 :   {
   16513      346816 :     if (!arg5) {
   16514           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16515             :     }
   16516             :   }
   16517      346816 :   {
   16518      346816 :     const int bLocalUseExceptions = GetUseExceptions();
   16519      346816 :     if ( bLocalUseExceptions ) {
   16520      105875 :       pushErrorHandler();
   16521             :     }
   16522      346816 :     {
   16523      346816 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16524      346816 :       result = (int)wrapper_VSIFWriteL(arg1,arg2,arg3,arg4,arg5);
   16525      346816 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16526             :     }
   16527      346816 :     if ( bLocalUseExceptions ) {
   16528      105875 :       popErrorHandler();
   16529             :     }
   16530             : #ifndef SED_HACKS
   16531             :     if ( bLocalUseExceptions ) {
   16532             :       CPLErr eclass = CPLGetLastErrorType();
   16533             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16534             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16535             :       }
   16536             :     }
   16537             : #endif
   16538             :   }
   16539      346816 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16540      346816 :   {
   16541             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   16542      346816 :     if( viewIsValid1 ) {
   16543        6530 :       PyBuffer_Release(&view1);
   16544             :     }
   16545      340286 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   16546      340286 :       delete[] arg2;
   16547             :     }
   16548             :   }
   16549      346816 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16550             :   return resultobj;
   16551           0 : fail:
   16552           0 :   {
   16553             :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
   16554           0 :     if( viewIsValid1 ) {
   16555           0 :       PyBuffer_Release(&view1);
   16556             :     }
   16557      346816 :     else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
   16558           0 :       delete[] arg2;
   16559             :     }
   16560             :   }
   16561             :   return NULL;
   16562             : }
   16563             : 
   16564             : 
   16565         213 : SWIGINTERN PyObject *_wrap_CPLReadLineL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16566         213 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16567         213 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
   16568         213 :   void *argp1 = 0 ;
   16569         213 :   int res1 = 0 ;
   16570         213 :   PyObject *swig_obj[1] ;
   16571         213 :   char *result = 0 ;
   16572             :   
   16573         213 :   if (!args) SWIG_fail;
   16574         213 :   swig_obj[0] = args;
   16575         213 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_VSILFILE, 0 |  0 );
   16576         213 :   if (!SWIG_IsOK(res1)) {
   16577           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CPLReadLineL" "', argument " "1"" of type '" "VSILFILE *""'"); 
   16578             :   }
   16579         213 :   arg1 = reinterpret_cast< VSILFILE * >(argp1);
   16580         213 :   {
   16581         213 :     if (!arg1) {
   16582           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16583             :     }
   16584             :   }
   16585         213 :   {
   16586         213 :     const int bLocalUseExceptions = GetUseExceptions();
   16587         213 :     if ( bLocalUseExceptions ) {
   16588          41 :       pushErrorHandler();
   16589             :     }
   16590         213 :     {
   16591         213 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16592         213 :       result = (char *)CPLReadLineL(arg1);
   16593         213 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16594             :     }
   16595         213 :     if ( bLocalUseExceptions ) {
   16596          41 :       popErrorHandler();
   16597             :     }
   16598             : #ifndef SED_HACKS
   16599             :     if ( bLocalUseExceptions ) {
   16600             :       CPLErr eclass = CPLGetLastErrorType();
   16601             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16602             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16603             :       }
   16604             :     }
   16605             : #endif
   16606             :   }
   16607         213 :   resultobj = SWIG_FromCharPtr((const char *)result);
   16608         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; } }
   16609             :   return resultobj;
   16610             : fail:
   16611             :   return NULL;
   16612             : }
   16613             : 
   16614             : 
   16615         331 : SWIGINTERN PyObject *_wrap_VSICurlClearCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16616         331 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16617             :   
   16618         331 :   if (!SWIG_Python_UnpackTuple(args, "VSICurlClearCache", 0, 0, 0)) SWIG_fail;
   16619         331 :   {
   16620         331 :     const int bLocalUseExceptions = GetUseExceptions();
   16621         331 :     if ( bLocalUseExceptions ) {
   16622         113 :       pushErrorHandler();
   16623             :     }
   16624         331 :     {
   16625         331 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16626         331 :       VSICurlClearCache();
   16627         331 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16628             :     }
   16629         331 :     if ( bLocalUseExceptions ) {
   16630         113 :       popErrorHandler();
   16631             :     }
   16632             : #ifndef SED_HACKS
   16633             :     if ( bLocalUseExceptions ) {
   16634             :       CPLErr eclass = CPLGetLastErrorType();
   16635             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16636             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16637             :       }
   16638             :     }
   16639             : #endif
   16640             :   }
   16641         331 :   resultobj = SWIG_Py_Void();
   16642         331 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16643             :   return resultobj;
   16644           0 : fail:
   16645           0 :   return NULL;
   16646             : }
   16647             : 
   16648             : 
   16649           2 : SWIGINTERN PyObject *_wrap_VSICurlPartialClearCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16650           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16651           2 :   char *arg1 = (char *) 0 ;
   16652           2 :   int bToFree1 = 0 ;
   16653           2 :   PyObject *swig_obj[1] ;
   16654             :   
   16655           2 :   if (!args) SWIG_fail;
   16656           2 :   swig_obj[0] = args;
   16657           2 :   {
   16658             :     /* %typemap(in) (const char *utf8_path) */
   16659           2 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   16660             :     {
   16661           2 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   16662             :     }
   16663             :     else
   16664             :     {
   16665           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   16666             :       
   16667             :     }
   16668           2 :     if (arg1 == NULL)
   16669             :     {
   16670           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   16671           0 :       SWIG_fail;
   16672             :     }
   16673             :   }
   16674           2 :   {
   16675           2 :     if (!arg1) {
   16676           2 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16677             :     }
   16678             :   }
   16679           2 :   {
   16680           2 :     const int bLocalUseExceptions = GetUseExceptions();
   16681           2 :     if ( bLocalUseExceptions ) {
   16682           0 :       pushErrorHandler();
   16683             :     }
   16684           2 :     {
   16685           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16686           2 :       VSICurlPartialClearCache((char const *)arg1);
   16687           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16688             :     }
   16689           2 :     if ( bLocalUseExceptions ) {
   16690           0 :       popErrorHandler();
   16691             :     }
   16692             : #ifndef SED_HACKS
   16693             :     if ( bLocalUseExceptions ) {
   16694             :       CPLErr eclass = CPLGetLastErrorType();
   16695             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16696             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16697             :       }
   16698             :     }
   16699             : #endif
   16700             :   }
   16701           2 :   resultobj = SWIG_Py_Void();
   16702           2 :   {
   16703             :     /* %typemap(freearg) (const char *utf8_path) */
   16704           2 :     GDALPythonFreeCStr(arg1, bToFree1);
   16705             :   }
   16706           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; } }
   16707             :   return resultobj;
   16708           0 : fail:
   16709           0 :   {
   16710             :     /* %typemap(freearg) (const char *utf8_path) */
   16711           2 :     GDALPythonFreeCStr(arg1, bToFree1);
   16712             :   }
   16713             :   return NULL;
   16714             : }
   16715             : 
   16716             : 
   16717           2 : SWIGINTERN PyObject *_wrap_NetworkStatsReset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16718           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16719             :   
   16720           2 :   if (!SWIG_Python_UnpackTuple(args, "NetworkStatsReset", 0, 0, 0)) SWIG_fail;
   16721           2 :   {
   16722           2 :     const int bLocalUseExceptions = GetUseExceptions();
   16723           2 :     if ( bLocalUseExceptions ) {
   16724           0 :       pushErrorHandler();
   16725             :     }
   16726           2 :     {
   16727           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16728           2 :       VSINetworkStatsReset();
   16729           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16730             :     }
   16731           2 :     if ( bLocalUseExceptions ) {
   16732           0 :       popErrorHandler();
   16733             :     }
   16734             : #ifndef SED_HACKS
   16735             :     if ( bLocalUseExceptions ) {
   16736             :       CPLErr eclass = CPLGetLastErrorType();
   16737             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16738             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16739             :       }
   16740             :     }
   16741             : #endif
   16742             :   }
   16743           2 :   resultobj = SWIG_Py_Void();
   16744           2 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16745             :   return resultobj;
   16746           0 : fail:
   16747           0 :   return NULL;
   16748             : }
   16749             : 
   16750             : 
   16751           1 : SWIGINTERN PyObject *_wrap_NetworkStatsGetAsSerializedJSON(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16752           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16753           1 :   char **arg1 = (char **) NULL ;
   16754           1 :   PyObject *swig_obj[1] ;
   16755           1 :   retStringAndCPLFree *result = 0 ;
   16756             :   
   16757           1 :   if (!SWIG_Python_UnpackTuple(args, "NetworkStatsGetAsSerializedJSON", 0, 1, swig_obj)) SWIG_fail;
   16758           1 :   if (swig_obj[0]) {
   16759           0 :     {
   16760             :       /* %typemap(in) char **dict */
   16761           0 :       arg1 = NULL;
   16762           0 :       if ( PySequence_Check( swig_obj[0] ) ) {
   16763           0 :         int bErr = FALSE;
   16764           0 :         arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   16765           0 :         if ( bErr )
   16766             :         {
   16767           0 :           SWIG_fail;
   16768             :         }
   16769             :       }
   16770           0 :       else if ( PyMapping_Check( swig_obj[0] ) ) {
   16771           0 :         int bErr = FALSE;
   16772           0 :         arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   16773           0 :         if ( bErr )
   16774             :         {
   16775           0 :           SWIG_fail;
   16776             :         }
   16777             :       }
   16778             :       else {
   16779           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   16780           0 :         SWIG_fail;
   16781             :       }
   16782             :     }
   16783             :   }
   16784           1 :   {
   16785           1 :     const int bLocalUseExceptions = GetUseExceptions();
   16786           1 :     if ( bLocalUseExceptions ) {
   16787           0 :       pushErrorHandler();
   16788             :     }
   16789           1 :     {
   16790           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16791           1 :       result = (retStringAndCPLFree *)VSINetworkStatsGetAsSerializedJSON(arg1);
   16792           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16793             :     }
   16794           1 :     if ( bLocalUseExceptions ) {
   16795           0 :       popErrorHandler();
   16796             :     }
   16797             : #ifndef SED_HACKS
   16798             :     if ( bLocalUseExceptions ) {
   16799             :       CPLErr eclass = CPLGetLastErrorType();
   16800             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16801             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16802             :       }
   16803             :     }
   16804             : #endif
   16805             :   }
   16806           1 :   {
   16807             :     /* %typemap(out) (retStringAndCPLFree*) */
   16808           1 :     Py_XDECREF(resultobj);
   16809           1 :     if(result)
   16810             :     {
   16811           1 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   16812           1 :       CPLFree(result);
   16813             :     }
   16814             :     else
   16815             :     {
   16816           0 :       resultobj = Py_None;
   16817           0 :       Py_INCREF(resultobj);
   16818             :     }
   16819             :   }
   16820           1 :   {
   16821             :     /* %typemap(freearg) char **dict */
   16822           1 :     CSLDestroy( arg1 );
   16823             :   }
   16824           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; } }
   16825             :   return resultobj;
   16826           0 : fail:
   16827           0 :   {
   16828             :     /* %typemap(freearg) char **dict */
   16829           0 :     CSLDestroy( arg1 );
   16830             :   }
   16831             :   return NULL;
   16832             : }
   16833             : 
   16834             : 
   16835         887 : SWIGINTERN PyObject *_wrap_ParseCommandLine(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16836         887 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16837         887 :   char *arg1 = (char *) 0 ;
   16838         887 :   int bToFree1 = 0 ;
   16839         887 :   PyObject *swig_obj[1] ;
   16840         887 :   char **result = 0 ;
   16841             :   
   16842         887 :   if (!args) SWIG_fail;
   16843         887 :   swig_obj[0] = args;
   16844         887 :   {
   16845             :     /* %typemap(in) (const char *utf8_path) */
   16846         887 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   16847             :     {
   16848         887 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   16849             :     }
   16850             :     else
   16851             :     {
   16852           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   16853             :       
   16854             :     }
   16855         887 :     if (arg1 == NULL)
   16856             :     {
   16857           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   16858           0 :       SWIG_fail;
   16859             :     }
   16860             :   }
   16861         887 :   {
   16862         887 :     if (!arg1) {
   16863         887 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   16864             :     }
   16865             :   }
   16866         887 :   {
   16867         887 :     const int bLocalUseExceptions = GetUseExceptions();
   16868         887 :     if ( bLocalUseExceptions ) {
   16869         766 :       pushErrorHandler();
   16870             :     }
   16871         887 :     {
   16872         887 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16873         887 :       result = (char **)CSLParseCommandLine((char const *)arg1);
   16874         887 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16875             :     }
   16876         887 :     if ( bLocalUseExceptions ) {
   16877         766 :       popErrorHandler();
   16878             :     }
   16879             : #ifndef SED_HACKS
   16880             :     if ( bLocalUseExceptions ) {
   16881             :       CPLErr eclass = CPLGetLastErrorType();
   16882             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16883             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16884             :       }
   16885             :     }
   16886             : #endif
   16887             :   }
   16888         887 :   {
   16889             :     /* %typemap(out) char **CSL -> ( string ) */
   16890         887 :     bool bErr = false;
   16891         887 :     resultobj = CSLToList(result, &bErr);
   16892         887 :     CSLDestroy(result);
   16893         887 :     if( bErr ) {
   16894           0 :       SWIG_fail;
   16895             :     }
   16896             :   }
   16897         887 :   {
   16898             :     /* %typemap(freearg) (const char *utf8_path) */
   16899         887 :     GDALPythonFreeCStr(arg1, bToFree1);
   16900             :   }
   16901         887 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   16902             :   return resultobj;
   16903           0 : fail:
   16904           0 :   {
   16905             :     /* %typemap(freearg) (const char *utf8_path) */
   16906         887 :     GDALPythonFreeCStr(arg1, bToFree1);
   16907             :   }
   16908             :   return NULL;
   16909             : }
   16910             : 
   16911             : 
   16912          48 : SWIGINTERN PyObject *_wrap_GetNumCPUs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16913          48 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16914          48 :   int result;
   16915             :   
   16916          48 :   if (!SWIG_Python_UnpackTuple(args, "GetNumCPUs", 0, 0, 0)) SWIG_fail;
   16917          48 :   {
   16918          48 :     const int bLocalUseExceptions = GetUseExceptions();
   16919          48 :     if ( bLocalUseExceptions ) {
   16920          40 :       pushErrorHandler();
   16921             :     }
   16922          48 :     {
   16923          48 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16924          48 :       result = (int)CPLGetNumCPUs();
   16925          48 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16926             :     }
   16927          48 :     if ( bLocalUseExceptions ) {
   16928          40 :       popErrorHandler();
   16929             :     }
   16930             : #ifndef SED_HACKS
   16931             :     if ( bLocalUseExceptions ) {
   16932             :       CPLErr eclass = CPLGetLastErrorType();
   16933             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16934             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16935             :       }
   16936             :     }
   16937             : #endif
   16938             :   }
   16939          48 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16940          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; } }
   16941             :   return resultobj;
   16942           0 : fail:
   16943           0 :   return NULL;
   16944             : }
   16945             : 
   16946             : 
   16947           2 : SWIGINTERN PyObject *_wrap_GetUsablePhysicalRAM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16948           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16949           2 :   GIntBig result;
   16950             :   
   16951           2 :   if (!SWIG_Python_UnpackTuple(args, "GetUsablePhysicalRAM", 0, 0, 0)) SWIG_fail;
   16952           2 :   {
   16953           2 :     const int bLocalUseExceptions = GetUseExceptions();
   16954           2 :     if ( bLocalUseExceptions ) {
   16955           1 :       pushErrorHandler();
   16956             :     }
   16957           2 :     {
   16958           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   16959           2 :       result = CPLGetUsablePhysicalRAM();
   16960           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   16961             :     }
   16962           2 :     if ( bLocalUseExceptions ) {
   16963           1 :       popErrorHandler();
   16964             :     }
   16965             : #ifndef SED_HACKS
   16966             :     if ( bLocalUseExceptions ) {
   16967             :       CPLErr eclass = CPLGetLastErrorType();
   16968             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16969             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16970             :       }
   16971             :     }
   16972             : #endif
   16973             :   }
   16974           2 :   {
   16975           2 :     resultobj = PyLong_FromLongLong(result);
   16976             :   }
   16977           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; } }
   16978             :   return resultobj;
   16979           0 : fail:
   16980           0 :   return NULL;
   16981             : }
   16982             : 
   16983             : 
   16984           8 : SWIGINTERN PyObject *_wrap_MultipartUploadGetCapabilities(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16985           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   16986           8 :   char *arg1 = (char *) 0 ;
   16987           8 :   int *arg2 = (int *) 0 ;
   16988           8 :   int *arg3 = (int *) 0 ;
   16989           8 :   int *arg4 = (int *) 0 ;
   16990           8 :   int *arg5 = (int *) 0 ;
   16991           8 :   size_t *arg6 = (size_t *) 0 ;
   16992           8 :   size_t *arg7 = (size_t *) 0 ;
   16993           8 :   int *arg8 = (int *) 0 ;
   16994           8 :   int res1 ;
   16995           8 :   char *buf1 = 0 ;
   16996           8 :   int alloc1 = 0 ;
   16997           8 :   int nRetCode2 = 0 ;
   16998           8 :   int bNonSequentialUploadSupported2 = 0 ;
   16999           8 :   int bParallelUploadSupported2 = 0 ;
   17000           8 :   int bSupportsAbort2 = 0 ;
   17001           8 :   size_t nMinPartSize2 = 0 ;
   17002           8 :   size_t nMaxPartSize2 = 0 ;
   17003           8 :   int nMaxPartCount2 = 0 ;
   17004           8 :   PyObject *swig_obj[1] ;
   17005             :   
   17006           8 :   {
   17007           8 :     arg2 = &nRetCode2;
   17008           8 :     arg3 = &bNonSequentialUploadSupported2;
   17009           8 :     arg4 = &bParallelUploadSupported2;
   17010           8 :     arg5 = &bSupportsAbort2;
   17011           8 :     arg6 = &nMinPartSize2;
   17012           8 :     arg7 = &nMaxPartSize2;
   17013           8 :     arg8 = &nMaxPartCount2;
   17014             :   }
   17015           8 :   if (!args) SWIG_fail;
   17016           8 :   swig_obj[0] = args;
   17017           8 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   17018           8 :   if (!SWIG_IsOK(res1)) {
   17019           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipartUploadGetCapabilities" "', argument " "1"" of type '" "char const *""'");
   17020             :   }
   17021           8 :   arg1 = reinterpret_cast< char * >(buf1);
   17022           8 :   {
   17023           8 :     if (!arg1) {
   17024           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17025             :     }
   17026             :   }
   17027           7 :   {
   17028           7 :     const int bLocalUseExceptions = GetUseExceptions();
   17029           7 :     if ( bLocalUseExceptions ) {
   17030           2 :       pushErrorHandler();
   17031             :     }
   17032           7 :     {
   17033           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17034           7 :       MultipartUploadGetCapabilities((char const *)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
   17035           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17036             :     }
   17037           7 :     if ( bLocalUseExceptions ) {
   17038           2 :       popErrorHandler();
   17039             :     }
   17040             : #ifndef SED_HACKS
   17041             :     if ( bLocalUseExceptions ) {
   17042             :       CPLErr eclass = CPLGetLastErrorType();
   17043             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17044             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17045             :       }
   17046             :     }
   17047             : #endif
   17048             :   }
   17049           7 :   resultobj = SWIG_Py_Void();
   17050           7 :   {
   17051           7 :     if( *arg2 == 0 )
   17052             :     {
   17053           2 :       Py_DECREF(resultobj);
   17054           2 :       resultobj = Py_None;
   17055           2 :       Py_INCREF(Py_None);
   17056             :     }
   17057             :     else
   17058             :     {
   17059           5 :       PyObject *r = PyTuple_New( 6 );
   17060           5 :       PyTuple_SetItem( r, 0, PyBool_FromLong(*arg3) );
   17061           5 :       PyTuple_SetItem( r, 1, PyBool_FromLong(*arg4) );
   17062           5 :       PyTuple_SetItem( r, 2, PyBool_FromLong(*arg5) );
   17063           5 :       PyTuple_SetItem( r, 3, PyLong_FromUnsignedLongLong(*arg6) );
   17064           5 :       PyTuple_SetItem( r, 4, PyLong_FromUnsignedLongLong(*arg7) );
   17065           5 :       PyTuple_SetItem( r, 5, PyLong_FromUnsignedLongLong(*arg8) );
   17066             : #if SWIG_VERSION >= 0x040300
   17067             :       resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   17068             : #else
   17069           5 :       resultobj = SWIG_Python_AppendOutput(resultobj,r);
   17070             : #endif
   17071             :     }
   17072             :   }
   17073           7 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17074          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; } }
   17075             :   return resultobj;
   17076           1 : fail:
   17077           1 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17078             :   return NULL;
   17079             : }
   17080             : 
   17081             : 
   17082           5 : SWIGINTERN PyObject *_wrap_MultipartUploadStart(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17083           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17084           5 :   char *arg1 = (char *) 0 ;
   17085           5 :   char **arg2 = (char **) NULL ;
   17086           5 :   int res1 ;
   17087           5 :   char *buf1 = 0 ;
   17088           5 :   int alloc1 = 0 ;
   17089           5 :   PyObject *swig_obj[2] ;
   17090           5 :   retStringAndCPLFree *result = 0 ;
   17091             :   
   17092           5 :   if (!SWIG_Python_UnpackTuple(args, "MultipartUploadStart", 1, 2, swig_obj)) SWIG_fail;
   17093           5 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   17094           5 :   if (!SWIG_IsOK(res1)) {
   17095           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipartUploadStart" "', argument " "1"" of type '" "char const *""'");
   17096             :   }
   17097           5 :   arg1 = reinterpret_cast< char * >(buf1);
   17098           5 :   if (swig_obj[1]) {
   17099           0 :     {
   17100             :       /* %typemap(in) char **dict */
   17101           0 :       arg2 = NULL;
   17102           0 :       if ( PySequence_Check( swig_obj[1] ) ) {
   17103           0 :         int bErr = FALSE;
   17104           0 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   17105           0 :         if ( bErr )
   17106             :         {
   17107           0 :           SWIG_fail;
   17108             :         }
   17109             :       }
   17110           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   17111           0 :         int bErr = FALSE;
   17112           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   17113           0 :         if ( bErr )
   17114             :         {
   17115           0 :           SWIG_fail;
   17116             :         }
   17117             :       }
   17118             :       else {
   17119           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   17120           0 :         SWIG_fail;
   17121             :       }
   17122             :     }
   17123             :   }
   17124           5 :   {
   17125           5 :     if (!arg1) {
   17126           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17127             :     }
   17128             :   }
   17129           4 :   {
   17130           4 :     const int bLocalUseExceptions = GetUseExceptions();
   17131           4 :     if ( bLocalUseExceptions ) {
   17132           1 :       pushErrorHandler();
   17133             :     }
   17134           4 :     {
   17135           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17136           4 :       result = (retStringAndCPLFree *)MultipartUploadStart((char const *)arg1,arg2);
   17137           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17138             :     }
   17139           4 :     if ( bLocalUseExceptions ) {
   17140           1 :       popErrorHandler();
   17141             :     }
   17142             : #ifndef SED_HACKS
   17143             :     if ( bLocalUseExceptions ) {
   17144             :       CPLErr eclass = CPLGetLastErrorType();
   17145             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17146             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17147             :       }
   17148             :     }
   17149             : #endif
   17150             :   }
   17151           4 :   {
   17152             :     /* %typemap(out) (retStringAndCPLFree*) */
   17153           4 :     Py_XDECREF(resultobj);
   17154           4 :     if(result)
   17155             :     {
   17156           1 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   17157           1 :       CPLFree(result);
   17158             :     }
   17159             :     else
   17160             :     {
   17161           3 :       resultobj = Py_None;
   17162           3 :       Py_INCREF(resultobj);
   17163             :     }
   17164             :   }
   17165           4 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17166           4 :   {
   17167             :     /* %typemap(freearg) char **dict */
   17168           4 :     CSLDestroy( arg2 );
   17169             :   }
   17170           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; } }
   17171             :   return resultobj;
   17172           1 : fail:
   17173           1 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17174           1 :   {
   17175             :     /* %typemap(freearg) char **dict */
   17176           1 :     CSLDestroy( arg2 );
   17177             :   }
   17178             :   return NULL;
   17179             : }
   17180             : 
   17181             : 
   17182           7 : SWIGINTERN PyObject *_wrap_MultipartUploadAddPart(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17183           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17184           7 :   char *arg1 = (char *) 0 ;
   17185           7 :   char *arg2 = (char *) 0 ;
   17186           7 :   int arg3 ;
   17187           7 :   GUIntBig arg4 ;
   17188           7 :   size_t arg5 ;
   17189           7 :   char *arg6 = (char *) 0 ;
   17190           7 :   char **arg7 = (char **) NULL ;
   17191           7 :   int res1 ;
   17192           7 :   char *buf1 = 0 ;
   17193           7 :   int alloc1 = 0 ;
   17194           7 :   int res2 ;
   17195           7 :   char *buf2 = 0 ;
   17196           7 :   int alloc2 = 0 ;
   17197           7 :   int val3 ;
   17198           7 :   int ecode3 = 0 ;
   17199           7 :   int alloc5 = 0 ;
   17200           7 :   bool viewIsValid5 = false ;
   17201           7 :   Py_buffer view5 ;
   17202           7 :   PyObject *swig_obj[6] ;
   17203           7 :   retStringAndCPLFree *result = 0 ;
   17204             :   
   17205           7 :   if (!SWIG_Python_UnpackTuple(args, "MultipartUploadAddPart", 5, 6, swig_obj)) SWIG_fail;
   17206           7 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   17207           7 :   if (!SWIG_IsOK(res1)) {
   17208           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipartUploadAddPart" "', argument " "1"" of type '" "char const *""'");
   17209             :   }
   17210           7 :   arg1 = reinterpret_cast< char * >(buf1);
   17211           7 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   17212           7 :   if (!SWIG_IsOK(res2)) {
   17213           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultipartUploadAddPart" "', argument " "2"" of type '" "char const *""'");
   17214             :   }
   17215           7 :   arg2 = reinterpret_cast< char * >(buf2);
   17216           7 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   17217           7 :   if (!SWIG_IsOK(ecode3)) {
   17218           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultipartUploadAddPart" "', argument " "3"" of type '" "int""'");
   17219             :   } 
   17220           7 :   arg3 = static_cast< int >(val3);
   17221           7 :   {
   17222           7 :     arg4 = (GIntBig)PyLong_AsUnsignedLongLong(swig_obj[3]);
   17223             :   }
   17224           7 :   {
   17225             :     /* %typemap(in,numinputs=1) (size_t nLen, char *pBuf ) */
   17226           7 :     char* ptr = NULL;
   17227           7 :     if( !GetBufferAsCharPtrSizetSize(swig_obj[4], &arg5, &ptr, &alloc5, &viewIsValid5, &view5) ) {
   17228           0 :       SWIG_fail;
   17229             :     }
   17230           7 :     arg6 = (char *)ptr;
   17231             :   }
   17232           7 :   if (swig_obj[5]) {
   17233           0 :     {
   17234             :       /* %typemap(in) char **dict */
   17235           0 :       arg7 = NULL;
   17236           0 :       if ( PySequence_Check( swig_obj[5] ) ) {
   17237           0 :         int bErr = FALSE;
   17238           0 :         arg7 = CSLFromPySequence(swig_obj[5], &bErr);
   17239           0 :         if ( bErr )
   17240             :         {
   17241           0 :           SWIG_fail;
   17242             :         }
   17243             :       }
   17244           0 :       else if ( PyMapping_Check( swig_obj[5] ) ) {
   17245           0 :         int bErr = FALSE;
   17246           0 :         arg7 = CSLFromPyMapping(swig_obj[5], &bErr);
   17247           0 :         if ( bErr )
   17248             :         {
   17249           0 :           SWIG_fail;
   17250             :         }
   17251             :       }
   17252             :       else {
   17253           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   17254           0 :         SWIG_fail;
   17255             :       }
   17256             :     }
   17257             :   }
   17258           7 :   {
   17259           7 :     if (!arg1) {
   17260           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17261             :     }
   17262             :   }
   17263           6 :   {
   17264           6 :     if (!arg2) {
   17265           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17266             :     }
   17267             :   }
   17268           5 :   {
   17269           5 :     const int bLocalUseExceptions = GetUseExceptions();
   17270           5 :     if ( bLocalUseExceptions ) {
   17271           1 :       pushErrorHandler();
   17272             :     }
   17273           5 :     {
   17274           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17275           5 :       result = (retStringAndCPLFree *)MultipartUploadAddPart((char const *)arg1,(char const *)arg2,arg3,arg4,arg5,(char const *)arg6,arg7);
   17276           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17277             :     }
   17278           5 :     if ( bLocalUseExceptions ) {
   17279           1 :       popErrorHandler();
   17280             :     }
   17281             : #ifndef SED_HACKS
   17282             :     if ( bLocalUseExceptions ) {
   17283             :       CPLErr eclass = CPLGetLastErrorType();
   17284             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17285             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17286             :       }
   17287             :     }
   17288             : #endif
   17289             :   }
   17290           5 :   {
   17291             :     /* %typemap(out) (retStringAndCPLFree*) */
   17292           5 :     Py_XDECREF(resultobj);
   17293           5 :     if(result)
   17294             :     {
   17295           2 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   17296           2 :       CPLFree(result);
   17297             :     }
   17298             :     else
   17299             :     {
   17300           3 :       resultobj = Py_None;
   17301           3 :       Py_INCREF(resultobj);
   17302             :     }
   17303             :   }
   17304           5 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17305           5 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17306           5 :   {
   17307             :     /* %typemap(freearg) (size_t *nLen, char *pBuf ) */
   17308           5 :     if( viewIsValid5 ) {
   17309           5 :       PyBuffer_Release(&view5);
   17310             :     }
   17311           0 :     else if (ReturnSame(alloc5) == SWIG_NEWOBJ ) {
   17312           0 :       delete[] arg6;
   17313             :     }
   17314             :   }
   17315           5 :   {
   17316             :     /* %typemap(freearg) char **dict */
   17317           5 :     CSLDestroy( arg7 );
   17318             :   }
   17319           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; } }
   17320             :   return resultobj;
   17321           2 : fail:
   17322           2 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17323           2 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17324           2 :   {
   17325             :     /* %typemap(freearg) (size_t *nLen, char *pBuf ) */
   17326           2 :     if( viewIsValid5 ) {
   17327           2 :       PyBuffer_Release(&view5);
   17328             :     }
   17329           0 :     else if (ReturnSame(alloc5) == SWIG_NEWOBJ ) {
   17330           0 :       delete[] arg6;
   17331             :     }
   17332             :   }
   17333           2 :   {
   17334             :     /* %typemap(freearg) char **dict */
   17335           2 :     CSLDestroy( arg7 );
   17336             :   }
   17337             :   return NULL;
   17338             : }
   17339             : 
   17340             : 
   17341           7 : SWIGINTERN PyObject *_wrap_MultipartUploadEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17342           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17343           7 :   char *arg1 = (char *) 0 ;
   17344           7 :   char *arg2 = (char *) 0 ;
   17345           7 :   char **arg3 = (char **) 0 ;
   17346           7 :   GUIntBig arg4 ;
   17347           7 :   char **arg5 = (char **) NULL ;
   17348           7 :   int res1 ;
   17349           7 :   char *buf1 = 0 ;
   17350           7 :   int alloc1 = 0 ;
   17351           7 :   int res2 ;
   17352           7 :   char *buf2 = 0 ;
   17353           7 :   int alloc2 = 0 ;
   17354           7 :   PyObject *swig_obj[5] ;
   17355           7 :   bool result;
   17356             :   
   17357           7 :   if (!SWIG_Python_UnpackTuple(args, "MultipartUploadEnd", 4, 5, swig_obj)) SWIG_fail;
   17358           7 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   17359           7 :   if (!SWIG_IsOK(res1)) {
   17360           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipartUploadEnd" "', argument " "1"" of type '" "char const *""'");
   17361             :   }
   17362           7 :   arg1 = reinterpret_cast< char * >(buf1);
   17363           7 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   17364           7 :   if (!SWIG_IsOK(res2)) {
   17365           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultipartUploadEnd" "', argument " "2"" of type '" "char const *""'");
   17366             :   }
   17367           7 :   arg2 = reinterpret_cast< char * >(buf2);
   17368           7 :   {
   17369             :     /* %typemap(in) char **dict */
   17370           7 :     arg3 = NULL;
   17371           7 :     if ( PySequence_Check( swig_obj[2] ) ) {
   17372           7 :       int bErr = FALSE;
   17373           7 :       arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   17374           7 :       if ( bErr )
   17375             :       {
   17376           0 :         SWIG_fail;
   17377             :       }
   17378             :     }
   17379           0 :     else if ( PyMapping_Check( swig_obj[2] ) ) {
   17380           0 :       int bErr = FALSE;
   17381           0 :       arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   17382           0 :       if ( bErr )
   17383             :       {
   17384           0 :         SWIG_fail;
   17385             :       }
   17386             :     }
   17387             :     else {
   17388           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   17389           0 :       SWIG_fail;
   17390             :     }
   17391             :   }
   17392           7 :   {
   17393           7 :     arg4 = (GIntBig)PyLong_AsUnsignedLongLong(swig_obj[3]);
   17394             :   }
   17395           7 :   if (swig_obj[4]) {
   17396           0 :     {
   17397             :       /* %typemap(in) char **dict */
   17398           0 :       arg5 = NULL;
   17399           0 :       if ( PySequence_Check( swig_obj[4] ) ) {
   17400           0 :         int bErr = FALSE;
   17401           0 :         arg5 = CSLFromPySequence(swig_obj[4], &bErr);
   17402           0 :         if ( bErr )
   17403             :         {
   17404           0 :           SWIG_fail;
   17405             :         }
   17406             :       }
   17407           0 :       else if ( PyMapping_Check( swig_obj[4] ) ) {
   17408           0 :         int bErr = FALSE;
   17409           0 :         arg5 = CSLFromPyMapping(swig_obj[4], &bErr);
   17410           0 :         if ( bErr )
   17411             :         {
   17412           0 :           SWIG_fail;
   17413             :         }
   17414             :       }
   17415             :       else {
   17416           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   17417           0 :         SWIG_fail;
   17418             :       }
   17419             :     }
   17420             :   }
   17421           7 :   {
   17422           7 :     if (!arg1) {
   17423           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17424             :     }
   17425             :   }
   17426           6 :   {
   17427           6 :     if (!arg2) {
   17428           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17429             :     }
   17430             :   }
   17431           5 :   {
   17432           5 :     const int bLocalUseExceptions = GetUseExceptions();
   17433           5 :     if ( bLocalUseExceptions ) {
   17434           1 :       pushErrorHandler();
   17435             :     }
   17436           5 :     {
   17437           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17438           5 :       result = (bool)MultipartUploadEnd((char const *)arg1,(char const *)arg2,arg3,arg4,arg5);
   17439           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17440             :     }
   17441           5 :     if ( bLocalUseExceptions ) {
   17442           1 :       popErrorHandler();
   17443             :     }
   17444             : #ifndef SED_HACKS
   17445             :     if ( bLocalUseExceptions ) {
   17446             :       CPLErr eclass = CPLGetLastErrorType();
   17447             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17448             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17449             :       }
   17450             :     }
   17451             : #endif
   17452             :   }
   17453           5 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   17454           5 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17455           5 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17456           5 :   {
   17457             :     /* %typemap(freearg) char **dict */
   17458           5 :     CSLDestroy( arg3 );
   17459             :   }
   17460           5 :   {
   17461             :     /* %typemap(freearg) char **dict */
   17462           5 :     CSLDestroy( arg5 );
   17463             :   }
   17464           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; } }
   17465             :   return resultobj;
   17466           2 : fail:
   17467           2 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17468           2 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17469           2 :   {
   17470             :     /* %typemap(freearg) char **dict */
   17471           2 :     CSLDestroy( arg3 );
   17472             :   }
   17473           2 :   {
   17474             :     /* %typemap(freearg) char **dict */
   17475           2 :     CSLDestroy( arg5 );
   17476             :   }
   17477             :   return NULL;
   17478             : }
   17479             : 
   17480             : 
   17481           8 : SWIGINTERN PyObject *_wrap_MultipartUploadAbort(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17482           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17483           8 :   char *arg1 = (char *) 0 ;
   17484           8 :   char *arg2 = (char *) 0 ;
   17485           8 :   char **arg3 = (char **) NULL ;
   17486           8 :   int res1 ;
   17487           8 :   char *buf1 = 0 ;
   17488           8 :   int alloc1 = 0 ;
   17489           8 :   int res2 ;
   17490           8 :   char *buf2 = 0 ;
   17491           8 :   int alloc2 = 0 ;
   17492           8 :   PyObject *swig_obj[3] ;
   17493           8 :   bool result;
   17494             :   
   17495           8 :   if (!SWIG_Python_UnpackTuple(args, "MultipartUploadAbort", 2, 3, swig_obj)) SWIG_fail;
   17496           8 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   17497           8 :   if (!SWIG_IsOK(res1)) {
   17498           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipartUploadAbort" "', argument " "1"" of type '" "char const *""'");
   17499             :   }
   17500           8 :   arg1 = reinterpret_cast< char * >(buf1);
   17501           8 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   17502           8 :   if (!SWIG_IsOK(res2)) {
   17503           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultipartUploadAbort" "', argument " "2"" of type '" "char const *""'");
   17504             :   }
   17505           8 :   arg2 = reinterpret_cast< char * >(buf2);
   17506           8 :   if (swig_obj[2]) {
   17507           0 :     {
   17508             :       /* %typemap(in) char **dict */
   17509           0 :       arg3 = NULL;
   17510           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   17511           0 :         int bErr = FALSE;
   17512           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   17513           0 :         if ( bErr )
   17514             :         {
   17515           0 :           SWIG_fail;
   17516             :         }
   17517             :       }
   17518           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   17519           0 :         int bErr = FALSE;
   17520           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   17521           0 :         if ( bErr )
   17522             :         {
   17523           0 :           SWIG_fail;
   17524             :         }
   17525             :       }
   17526             :       else {
   17527           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   17528           0 :         SWIG_fail;
   17529             :       }
   17530             :     }
   17531             :   }
   17532           8 :   {
   17533           8 :     if (!arg1) {
   17534           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17535             :     }
   17536             :   }
   17537           7 :   {
   17538           7 :     if (!arg2) {
   17539           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17540             :     }
   17541             :   }
   17542           6 :   {
   17543           6 :     const int bLocalUseExceptions = GetUseExceptions();
   17544           6 :     if ( bLocalUseExceptions ) {
   17545           3 :       pushErrorHandler();
   17546             :     }
   17547           6 :     {
   17548           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17549           6 :       result = (bool)MultipartUploadAbort((char const *)arg1,(char const *)arg2,arg3);
   17550           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17551             :     }
   17552           6 :     if ( bLocalUseExceptions ) {
   17553           3 :       popErrorHandler();
   17554             :     }
   17555             : #ifndef SED_HACKS
   17556             :     if ( bLocalUseExceptions ) {
   17557             :       CPLErr eclass = CPLGetLastErrorType();
   17558             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17559             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17560             :       }
   17561             :     }
   17562             : #endif
   17563             :   }
   17564           6 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   17565           6 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17566           6 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17567           6 :   {
   17568             :     /* %typemap(freearg) char **dict */
   17569           6 :     CSLDestroy( arg3 );
   17570             :   }
   17571          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; } }
   17572             :   return resultobj;
   17573           2 : fail:
   17574           2 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   17575           2 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17576           2 :   {
   17577             :     /* %typemap(freearg) char **dict */
   17578           2 :     CSLDestroy( arg3 );
   17579             :   }
   17580             :   return NULL;
   17581             : }
   17582             : 
   17583             : 
   17584        2482 : SWIGINTERN PyObject *_wrap_MajorObject_GetDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17585        2482 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17586        2482 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   17587        2482 :   void *argp1 = 0 ;
   17588        2482 :   int res1 = 0 ;
   17589        2482 :   PyObject *swig_obj[1] ;
   17590        2482 :   char *result = 0 ;
   17591             :   
   17592        2482 :   if (!args) SWIG_fail;
   17593        2482 :   swig_obj[0] = args;
   17594        2482 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   17595        2482 :   if (!SWIG_IsOK(res1)) {
   17596           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetDescription" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   17597             :   }
   17598        2482 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   17599        2482 :   {
   17600        2482 :     const int bLocalUseExceptions = GetUseExceptions();
   17601        2482 :     if ( bLocalUseExceptions ) {
   17602        1246 :       pushErrorHandler();
   17603             :     }
   17604        2482 :     {
   17605        2482 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17606        2482 :       result = (char *)GDALMajorObjectShadow_GetDescription(arg1);
   17607        2482 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17608             :     }
   17609        2482 :     if ( bLocalUseExceptions ) {
   17610        1246 :       popErrorHandler();
   17611             :     }
   17612             : #ifndef SED_HACKS
   17613             :     if ( bLocalUseExceptions ) {
   17614             :       CPLErr eclass = CPLGetLastErrorType();
   17615             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17616             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17617             :       }
   17618             :     }
   17619             : #endif
   17620             :   }
   17621        2482 :   resultobj = SWIG_FromCharPtr((const char *)result);
   17622        2482 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   17623             :   return resultobj;
   17624             : fail:
   17625             :   return NULL;
   17626             : }
   17627             : 
   17628             : 
   17629          42 : SWIGINTERN PyObject *_wrap_MajorObject_SetDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17630          42 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17631          42 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   17632          42 :   char *arg2 = (char *) 0 ;
   17633          42 :   void *argp1 = 0 ;
   17634          42 :   int res1 = 0 ;
   17635          42 :   int res2 ;
   17636          42 :   char *buf2 = 0 ;
   17637          42 :   int alloc2 = 0 ;
   17638          42 :   PyObject *swig_obj[2] ;
   17639             :   
   17640          42 :   if (!SWIG_Python_UnpackTuple(args, "MajorObject_SetDescription", 2, 2, swig_obj)) SWIG_fail;
   17641          42 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   17642          42 :   if (!SWIG_IsOK(res1)) {
   17643           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetDescription" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   17644             :   }
   17645          42 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   17646          42 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   17647          42 :   if (!SWIG_IsOK(res2)) {
   17648           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetDescription" "', argument " "2"" of type '" "char const *""'");
   17649             :   }
   17650          42 :   arg2 = reinterpret_cast< char * >(buf2);
   17651          42 :   {
   17652          42 :     if (!arg2) {
   17653           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17654             :     }
   17655             :   }
   17656          42 :   {
   17657          42 :     const int bLocalUseExceptions = GetUseExceptions();
   17658          42 :     if ( bLocalUseExceptions ) {
   17659          37 :       pushErrorHandler();
   17660             :     }
   17661          42 :     {
   17662          42 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17663          42 :       GDALMajorObjectShadow_SetDescription(arg1,(char const *)arg2);
   17664          42 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17665             :     }
   17666          42 :     if ( bLocalUseExceptions ) {
   17667          37 :       popErrorHandler();
   17668             :     }
   17669             : #ifndef SED_HACKS
   17670             :     if ( bLocalUseExceptions ) {
   17671             :       CPLErr eclass = CPLGetLastErrorType();
   17672             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17673             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17674             :       }
   17675             :     }
   17676             : #endif
   17677             :   }
   17678          42 :   resultobj = SWIG_Py_Void();
   17679          42 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17680          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; } }
   17681             :   return resultobj;
   17682           0 : fail:
   17683           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17684             :   return NULL;
   17685             : }
   17686             : 
   17687             : 
   17688          72 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadataDomainList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17689          72 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17690          72 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   17691          72 :   void *argp1 = 0 ;
   17692          72 :   int res1 = 0 ;
   17693          72 :   PyObject *swig_obj[1] ;
   17694          72 :   char **result = 0 ;
   17695             :   
   17696          72 :   if (!args) SWIG_fail;
   17697          72 :   swig_obj[0] = args;
   17698          72 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   17699          72 :   if (!SWIG_IsOK(res1)) {
   17700           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadataDomainList" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   17701             :   }
   17702          72 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   17703          72 :   {
   17704          72 :     const int bLocalUseExceptions = GetUseExceptions();
   17705          72 :     if ( bLocalUseExceptions ) {
   17706          39 :       pushErrorHandler();
   17707             :     }
   17708          72 :     {
   17709          72 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17710          72 :       result = (char **)GDALMajorObjectShadow_GetMetadataDomainList(arg1);
   17711          72 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17712             :     }
   17713          72 :     if ( bLocalUseExceptions ) {
   17714          39 :       popErrorHandler();
   17715             :     }
   17716             : #ifndef SED_HACKS
   17717             :     if ( bLocalUseExceptions ) {
   17718             :       CPLErr eclass = CPLGetLastErrorType();
   17719             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17720             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17721             :       }
   17722             :     }
   17723             : #endif
   17724             :   }
   17725          72 :   {
   17726             :     /* %typemap(out) char **CSL -> ( string ) */
   17727          72 :     bool bErr = false;
   17728          72 :     resultobj = CSLToList(result, &bErr);
   17729          72 :     CSLDestroy(result);
   17730          72 :     if( bErr ) {
   17731           0 :       SWIG_fail;
   17732             :     }
   17733             :   }
   17734          72 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   17735             :   return resultobj;
   17736             : fail:
   17737             :   return NULL;
   17738             : }
   17739             : 
   17740             : 
   17741        6987 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadata_Dict(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17742        6987 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17743        6987 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   17744        6987 :   char *arg2 = (char *) "" ;
   17745        6987 :   void *argp1 = 0 ;
   17746        6987 :   int res1 = 0 ;
   17747        6987 :   int res2 ;
   17748        6987 :   char *buf2 = 0 ;
   17749        6987 :   int alloc2 = 0 ;
   17750        6987 :   PyObject *swig_obj[2] ;
   17751        6987 :   char **result = 0 ;
   17752             :   
   17753        6987 :   if (!SWIG_Python_UnpackTuple(args, "MajorObject_GetMetadata_Dict", 1, 2, swig_obj)) SWIG_fail;
   17754        6987 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   17755        6987 :   if (!SWIG_IsOK(res1)) {
   17756           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadata_Dict" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   17757             :   }
   17758        6987 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   17759        6987 :   if (swig_obj[1]) {
   17760        6893 :     res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   17761        6893 :     if (!SWIG_IsOK(res2)) {
   17762           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadata_Dict" "', argument " "2"" of type '" "char const *""'");
   17763             :     }
   17764        6893 :     arg2 = reinterpret_cast< char * >(buf2);
   17765             :   }
   17766        6987 :   {
   17767        6987 :     const int bLocalUseExceptions = GetUseExceptions();
   17768        6987 :     if ( bLocalUseExceptions ) {
   17769        1700 :       pushErrorHandler();
   17770             :     }
   17771        6987 :     {
   17772        6987 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17773        6987 :       result = (char **)GDALMajorObjectShadow_GetMetadata_Dict(arg1,(char const *)arg2);
   17774        6987 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17775             :     }
   17776        6987 :     if ( bLocalUseExceptions ) {
   17777        1700 :       popErrorHandler();
   17778             :     }
   17779             : #ifndef SED_HACKS
   17780             :     if ( bLocalUseExceptions ) {
   17781             :       CPLErr eclass = CPLGetLastErrorType();
   17782             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17783             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17784             :       }
   17785             :     }
   17786             : #endif
   17787             :   }
   17788        6987 :   {
   17789             :     /* %typemap(out) char **dict */
   17790        6987 :     resultobj = GetCSLStringAsPyDict(result, false);
   17791             :   }
   17792        6987 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17793        6987 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   17794             :   return resultobj;
   17795           0 : fail:
   17796           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17797             :   return NULL;
   17798             : }
   17799             : 
   17800             : 
   17801         408 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadata_List(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17802         408 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17803         408 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   17804         408 :   char *arg2 = (char *) "" ;
   17805         408 :   void *argp1 = 0 ;
   17806         408 :   int res1 = 0 ;
   17807         408 :   int res2 ;
   17808         408 :   char *buf2 = 0 ;
   17809         408 :   int alloc2 = 0 ;
   17810         408 :   PyObject *swig_obj[2] ;
   17811         408 :   char **result = 0 ;
   17812             :   
   17813         408 :   if (!SWIG_Python_UnpackTuple(args, "MajorObject_GetMetadata_List", 1, 2, swig_obj)) SWIG_fail;
   17814         408 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   17815         408 :   if (!SWIG_IsOK(res1)) {
   17816           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadata_List" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   17817             :   }
   17818         408 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   17819         408 :   if (swig_obj[1]) {
   17820         365 :     res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   17821         365 :     if (!SWIG_IsOK(res2)) {
   17822           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadata_List" "', argument " "2"" of type '" "char const *""'");
   17823             :     }
   17824         365 :     arg2 = reinterpret_cast< char * >(buf2);
   17825             :   }
   17826         408 :   {
   17827         408 :     const int bLocalUseExceptions = GetUseExceptions();
   17828         408 :     if ( bLocalUseExceptions ) {
   17829         109 :       pushErrorHandler();
   17830             :     }
   17831         408 :     {
   17832         408 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17833         408 :       result = (char **)GDALMajorObjectShadow_GetMetadata_List(arg1,(char const *)arg2);
   17834         408 :       SWIG_PYTHON_THREAD_END_ALLOW;
   17835             :     }
   17836         408 :     if ( bLocalUseExceptions ) {
   17837         109 :       popErrorHandler();
   17838             :     }
   17839             : #ifndef SED_HACKS
   17840             :     if ( bLocalUseExceptions ) {
   17841             :       CPLErr eclass = CPLGetLastErrorType();
   17842             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17843             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17844             :       }
   17845             :     }
   17846             : #endif
   17847             :   }
   17848         408 :   {
   17849             :     /* %typemap(out) char **options -> ( string ) */
   17850         408 :     bool bErr = false;
   17851         408 :     resultobj = CSLToList(result, &bErr);
   17852         408 :     if( bErr ) {
   17853           0 :       SWIG_fail;
   17854             :     }
   17855             :   }
   17856         408 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17857         408 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   17858             :   return resultobj;
   17859           0 : fail:
   17860           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17861             :   return NULL;
   17862             : }
   17863             : 
   17864             : 
   17865             : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
   17866             :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17867             :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   17868             :   char **arg2 = (char **) 0 ;
   17869             :   char *arg3 = (char *) "" ;
   17870             :   void *argp1 = 0 ;
   17871             :   int res1 = 0 ;
   17872             :   int res3 ;
   17873             :   char *buf3 = 0 ;
   17874             :   int alloc3 = 0 ;
   17875             :   CPLErr result;
   17876             :   
   17877             :   if ((nobjs < 2) || (nobjs > 3)) SWIG_fail;
   17878             :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   17879             :   if (!SWIG_IsOK(res1)) {
   17880             :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadata" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   17881             :   }
   17882             :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   17883             :   {
   17884             :     /* %typemap(in) char **dict */
   17885             :     arg2 = NULL;
   17886             :     if ( PySequence_Check( swig_obj[1] ) ) {
   17887             :       int bErr = FALSE;
   17888             :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   17889             :       if ( bErr )
   17890             :       {
   17891             :         SWIG_fail;
   17892             :       }
   17893             :     }
   17894             :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   17895             :       int bErr = FALSE;
   17896             :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   17897             :       if ( bErr )
   17898             :       {
   17899             :         SWIG_fail;
   17900             :       }
   17901             :     }
   17902             :     else {
   17903             :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   17904             :       SWIG_fail;
   17905             :     }
   17906             :   }
   17907             :   if (swig_obj[2]) {
   17908             :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   17909             :     if (!SWIG_IsOK(res3)) {
   17910             :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadata" "', argument " "3"" of type '" "char const *""'");
   17911             :     }
   17912             :     arg3 = reinterpret_cast< char * >(buf3);
   17913             :   }
   17914             :   {
   17915             :     const int bLocalUseExceptions = GetUseExceptions();
   17916             :     if ( bLocalUseExceptions ) {
   17917             :       pushErrorHandler();
   17918             :     }
   17919             :     {
   17920             :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17921             :       result = (CPLErr)GDALMajorObjectShadow_SetMetadata__SWIG_0(arg1,arg2,(char const *)arg3);
   17922             :       SWIG_PYTHON_THREAD_END_ALLOW;
   17923             :     }
   17924             :     if ( bLocalUseExceptions ) {
   17925             :       popErrorHandler();
   17926             :     }
   17927             : #ifndef SED_HACKS
   17928             :     if ( bLocalUseExceptions ) {
   17929             :       CPLErr eclass = CPLGetLastErrorType();
   17930             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17931             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17932             :       }
   17933             :     }
   17934             : #endif
   17935             :   }
   17936             :   resultobj = SWIG_From_int(static_cast< int >(result));
   17937             :   {
   17938             :     /* %typemap(freearg) char **dict */
   17939             :     CSLDestroy( arg2 );
   17940             :   }
   17941             :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   17942             :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   17943             :   return resultobj;
   17944             : fail:
   17945             :   {
   17946             :     /* %typemap(freearg) char **dict */
   17947             :     CSLDestroy( arg2 );
   17948             :   }
   17949             :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   17950             :   return NULL;
   17951             : }
   17952             : 
   17953             : 
   17954             : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
   17955             :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   17956             :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   17957             :   char *arg2 = (char *) 0 ;
   17958             :   char *arg3 = (char *) "" ;
   17959             :   void *argp1 = 0 ;
   17960             :   int res1 = 0 ;
   17961             :   int res2 ;
   17962             :   char *buf2 = 0 ;
   17963             :   int alloc2 = 0 ;
   17964             :   int res3 ;
   17965             :   char *buf3 = 0 ;
   17966             :   int alloc3 = 0 ;
   17967             :   CPLErr result;
   17968             :   
   17969             :   if ((nobjs < 2) || (nobjs > 3)) SWIG_fail;
   17970             :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   17971             :   if (!SWIG_IsOK(res1)) {
   17972             :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadata" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   17973             :   }
   17974             :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   17975             :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   17976             :   if (!SWIG_IsOK(res2)) {
   17977             :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetMetadata" "', argument " "2"" of type '" "char *""'");
   17978             :   }
   17979             :   arg2 = reinterpret_cast< char * >(buf2);
   17980             :   if (swig_obj[2]) {
   17981             :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   17982             :     if (!SWIG_IsOK(res3)) {
   17983             :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadata" "', argument " "3"" of type '" "char const *""'");
   17984             :     }
   17985             :     arg3 = reinterpret_cast< char * >(buf3);
   17986             :   }
   17987             :   {
   17988             :     const int bLocalUseExceptions = GetUseExceptions();
   17989             :     if ( bLocalUseExceptions ) {
   17990             :       pushErrorHandler();
   17991             :     }
   17992             :     {
   17993             :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   17994             :       result = (CPLErr)GDALMajorObjectShadow_SetMetadata__SWIG_1(arg1,arg2,(char const *)arg3);
   17995             :       SWIG_PYTHON_THREAD_END_ALLOW;
   17996             :     }
   17997             :     if ( bLocalUseExceptions ) {
   17998             :       popErrorHandler();
   17999             :     }
   18000             : #ifndef SED_HACKS
   18001             :     if ( bLocalUseExceptions ) {
   18002             :       CPLErr eclass = CPLGetLastErrorType();
   18003             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18004             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18005             :       }
   18006             :     }
   18007             : #endif
   18008             :   }
   18009             :   resultobj = SWIG_From_int(static_cast< int >(result));
   18010             :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   18011             :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   18012             :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   18013             :   return resultobj;
   18014             : fail:
   18015             :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   18016             :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   18017             :   return NULL;
   18018             : }
   18019             : 
   18020             : 
   18021         276 : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata(PyObject *self, PyObject *args) {
   18022         276 :   Py_ssize_t argc;
   18023         276 :   PyObject *argv[4] = {
   18024             :     0
   18025             :   };
   18026             :   
   18027         276 :   if (!(argc = SWIG_Python_UnpackTuple(args, "MajorObject_SetMetadata", 0, 3, argv))) SWIG_fail;
   18028         276 :   --argc;
   18029         276 :   if ((argc >= 2) && (argc <= 3)) {
   18030         276 :     int _v;
   18031         276 :     void *vptr = 0;
   18032         276 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALMajorObjectShadow, 0);
   18033         297 :     _v = SWIG_CheckState(res);
   18034         276 :     if (_v) {
   18035         276 :       {
   18036             :         /* %typecheck(SWIG_TYPECHECK_POINTER) (char **dict) */
   18037             :         /* Note: we exclude explicitly strings, because they can be considered as a sequence of characters, */
   18038             :         /* which is not desirable since it makes it impossible to define bindings such as SetMetadata(string) and SetMetadata(array_of_string) */
   18039             :         /* (see #4816) */
   18040         276 :         _v = ((PyMapping_Check(argv[1]) || PySequence_Check(argv[1]) ) && !SWIG_CheckState(SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0)) ) ? 1 : 0;
   18041             :       }
   18042         255 :       if (_v) {
   18043         255 :         if (argc <= 2) {
   18044         255 :           return _wrap_MajorObject_SetMetadata__SWIG_0(self, argc, argv);
   18045             :         }
   18046         107 :         int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
   18047         107 :         _v = SWIG_CheckState(res);
   18048         107 :         if (_v) {
   18049         107 :           return _wrap_MajorObject_SetMetadata__SWIG_0(self, argc, argv);
   18050             :         }
   18051             :       }
   18052             :     }
   18053             :   }
   18054          21 :   if ((argc >= 2) && (argc <= 3)) {
   18055          21 :     int _v;
   18056          21 :     void *vptr = 0;
   18057          21 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALMajorObjectShadow, 0);
   18058          22 :     _v = SWIG_CheckState(res);
   18059          21 :     if (_v) {
   18060          21 :       int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
   18061          21 :       _v = SWIG_CheckState(res);
   18062          20 :       if (_v) {
   18063          20 :         if (argc <= 2) {
   18064          20 :           return _wrap_MajorObject_SetMetadata__SWIG_1(self, argc, argv);
   18065             :         }
   18066          16 :         int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
   18067          16 :         _v = SWIG_CheckState(res);
   18068          16 :         if (_v) {
   18069          16 :           return _wrap_MajorObject_SetMetadata__SWIG_1(self, argc, argv);
   18070             :         }
   18071             :       }
   18072             :     }
   18073             :   }
   18074             :   
   18075           0 : fail:
   18076           1 :   SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'MajorObject_SetMetadata'.\n"
   18077             :     "  Possible C/C++ prototypes are:\n"
   18078             :     "    GDALMajorObjectShadow::SetMetadata(char **,char const *)\n"
   18079             :     "    GDALMajorObjectShadow::SetMetadata(char *,char const *)\n");
   18080             :   return 0;
   18081             : }
   18082             : 
   18083             : 
   18084       56360 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadataItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18085       56360 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18086       56360 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   18087       56360 :   char *arg2 = (char *) 0 ;
   18088       56360 :   char *arg3 = (char *) "" ;
   18089       56360 :   void *argp1 = 0 ;
   18090       56360 :   int res1 = 0 ;
   18091       56360 :   int res2 ;
   18092       56360 :   char *buf2 = 0 ;
   18093       56360 :   int alloc2 = 0 ;
   18094       56360 :   int res3 ;
   18095       56360 :   char *buf3 = 0 ;
   18096       56360 :   int alloc3 = 0 ;
   18097       56360 :   PyObject *swig_obj[3] ;
   18098       56360 :   char *result = 0 ;
   18099             :   
   18100       56360 :   if (!SWIG_Python_UnpackTuple(args, "MajorObject_GetMetadataItem", 2, 3, swig_obj)) SWIG_fail;
   18101       56360 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   18102       56360 :   if (!SWIG_IsOK(res1)) {
   18103           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadataItem" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   18104             :   }
   18105       56360 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   18106       56360 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   18107       56360 :   if (!SWIG_IsOK(res2)) {
   18108           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadataItem" "', argument " "2"" of type '" "char const *""'");
   18109             :   }
   18110       56360 :   arg2 = reinterpret_cast< char * >(buf2);
   18111       56360 :   if (swig_obj[2]) {
   18112        6965 :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   18113        6965 :     if (!SWIG_IsOK(res3)) {
   18114           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_GetMetadataItem" "', argument " "3"" of type '" "char const *""'");
   18115             :     }
   18116        6965 :     arg3 = reinterpret_cast< char * >(buf3);
   18117             :   }
   18118       56360 :   {
   18119       56360 :     if (!arg2) {
   18120           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18121             :     }
   18122             :   }
   18123       56360 :   {
   18124       56360 :     const int bLocalUseExceptions = GetUseExceptions();
   18125       56360 :     if ( bLocalUseExceptions ) {
   18126       51934 :       pushErrorHandler();
   18127             :     }
   18128       56360 :     {
   18129       56360 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18130       56360 :       result = (char *)GDALMajorObjectShadow_GetMetadataItem(arg1,(char const *)arg2,(char const *)arg3);
   18131       56360 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18132             :     }
   18133       56360 :     if ( bLocalUseExceptions ) {
   18134       51934 :       popErrorHandler();
   18135             :     }
   18136             : #ifndef SED_HACKS
   18137             :     if ( bLocalUseExceptions ) {
   18138             :       CPLErr eclass = CPLGetLastErrorType();
   18139             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18140             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18141             :       }
   18142             :     }
   18143             : #endif
   18144             :   }
   18145       56360 :   resultobj = SWIG_FromCharPtr((const char *)result);
   18146       56360 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   18147       56360 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   18148       56362 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   18149             :   return resultobj;
   18150           0 : fail:
   18151           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   18152           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   18153             :   return NULL;
   18154             : }
   18155             : 
   18156             : 
   18157         480 : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadataItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18158         480 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18159         480 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
   18160         480 :   char *arg2 = (char *) 0 ;
   18161         480 :   char *arg3 = (char *) 0 ;
   18162         480 :   char *arg4 = (char *) "" ;
   18163         480 :   void *argp1 = 0 ;
   18164         480 :   int res1 = 0 ;
   18165         480 :   int res2 ;
   18166         480 :   char *buf2 = 0 ;
   18167         480 :   int alloc2 = 0 ;
   18168         480 :   int res3 ;
   18169         480 :   char *buf3 = 0 ;
   18170         480 :   int alloc3 = 0 ;
   18171         480 :   int res4 ;
   18172         480 :   char *buf4 = 0 ;
   18173         480 :   int alloc4 = 0 ;
   18174         480 :   PyObject *swig_obj[4] ;
   18175         480 :   CPLErr result;
   18176             :   
   18177         480 :   if (!SWIG_Python_UnpackTuple(args, "MajorObject_SetMetadataItem", 3, 4, swig_obj)) SWIG_fail;
   18178         480 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
   18179         480 :   if (!SWIG_IsOK(res1)) {
   18180           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadataItem" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
   18181             :   }
   18182         480 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
   18183         480 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   18184         480 :   if (!SWIG_IsOK(res2)) {
   18185           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetMetadataItem" "', argument " "2"" of type '" "char const *""'");
   18186             :   }
   18187         480 :   arg2 = reinterpret_cast< char * >(buf2);
   18188         480 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   18189         480 :   if (!SWIG_IsOK(res3)) {
   18190           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadataItem" "', argument " "3"" of type '" "char const *""'");
   18191             :   }
   18192         480 :   arg3 = reinterpret_cast< char * >(buf3);
   18193         480 :   if (swig_obj[3]) {
   18194          69 :     res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
   18195          69 :     if (!SWIG_IsOK(res4)) {
   18196           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MajorObject_SetMetadataItem" "', argument " "4"" of type '" "char const *""'");
   18197             :     }
   18198          69 :     arg4 = reinterpret_cast< char * >(buf4);
   18199             :   }
   18200         480 :   {
   18201         480 :     if (!arg2) {
   18202           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18203             :     }
   18204             :   }
   18205         480 :   {
   18206         480 :     const int bLocalUseExceptions = GetUseExceptions();
   18207         480 :     if ( bLocalUseExceptions ) {
   18208         119 :       pushErrorHandler();
   18209             :     }
   18210         480 :     {
   18211         480 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18212         480 :       result = (CPLErr)GDALMajorObjectShadow_SetMetadataItem(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
   18213         480 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18214             :     }
   18215         480 :     if ( bLocalUseExceptions ) {
   18216         119 :       popErrorHandler();
   18217             :     }
   18218             : #ifndef SED_HACKS
   18219             :     if ( bLocalUseExceptions ) {
   18220             :       CPLErr eclass = CPLGetLastErrorType();
   18221             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18222             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18223             :       }
   18224             :     }
   18225             : #endif
   18226             :   }
   18227         480 :   resultobj = SWIG_From_int(static_cast< int >(result));
   18228         480 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   18229         480 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   18230         480 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   18231         480 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   18232             :   return resultobj;
   18233           0 : fail:
   18234           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   18235           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   18236           0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   18237             :   return NULL;
   18238             : }
   18239             : 
   18240             : 
   18241         277 : SWIGINTERN PyObject *MajorObject_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18242         277 :   PyObject *obj;
   18243         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   18244         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALMajorObjectShadow, SWIG_NewClientData(obj));
   18245         277 :   return SWIG_Py_Void();
   18246             : }
   18247             : 
   18248       97387 : SWIGINTERN PyObject *_wrap_Driver_ShortName_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18249       97387 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18250       97387 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   18251       97387 :   void *argp1 = 0 ;
   18252       97387 :   int res1 = 0 ;
   18253       97387 :   PyObject *swig_obj[1] ;
   18254       97387 :   char *result = 0 ;
   18255             :   
   18256       97387 :   if (!args) SWIG_fail;
   18257       97387 :   swig_obj[0] = args;
   18258       97387 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   18259       97387 :   if (!SWIG_IsOK(res1)) {
   18260           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_ShortName_get" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   18261             :   }
   18262       97387 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   18263       97387 :   {
   18264       97387 :     const int bLocalUseExceptions = GetUseExceptions();
   18265       97387 :     if ( bLocalUseExceptions ) {
   18266       51018 :       pushErrorHandler();
   18267             :     }
   18268       97387 :     {
   18269       97387 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18270       97387 :       result = (char *)GDALDriverShadow_ShortName_get(arg1);
   18271       97387 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18272             :     }
   18273       97387 :     if ( bLocalUseExceptions ) {
   18274       51018 :       popErrorHandler();
   18275             :     }
   18276             : #ifndef SED_HACKS
   18277             :     if ( bLocalUseExceptions ) {
   18278             :       CPLErr eclass = CPLGetLastErrorType();
   18279             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18280             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18281             :       }
   18282             :     }
   18283             : #endif
   18284             :   }
   18285       97387 :   resultobj = SWIG_FromCharPtr((const char *)result);
   18286       97387 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   18287             :   return resultobj;
   18288             : fail:
   18289             :   return NULL;
   18290             : }
   18291             : 
   18292             : 
   18293          17 : SWIGINTERN PyObject *_wrap_Driver_LongName_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18294          17 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18295          17 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   18296          17 :   void *argp1 = 0 ;
   18297          17 :   int res1 = 0 ;
   18298          17 :   PyObject *swig_obj[1] ;
   18299          17 :   char *result = 0 ;
   18300             :   
   18301          17 :   if (!args) SWIG_fail;
   18302          17 :   swig_obj[0] = args;
   18303          17 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   18304          17 :   if (!SWIG_IsOK(res1)) {
   18305           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_LongName_get" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   18306             :   }
   18307          17 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   18308          17 :   {
   18309          17 :     const int bLocalUseExceptions = GetUseExceptions();
   18310          17 :     if ( bLocalUseExceptions ) {
   18311           0 :       pushErrorHandler();
   18312             :     }
   18313          17 :     {
   18314          17 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18315          17 :       result = (char *)GDALDriverShadow_LongName_get(arg1);
   18316          17 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18317             :     }
   18318          17 :     if ( bLocalUseExceptions ) {
   18319           0 :       popErrorHandler();
   18320             :     }
   18321             : #ifndef SED_HACKS
   18322             :     if ( bLocalUseExceptions ) {
   18323             :       CPLErr eclass = CPLGetLastErrorType();
   18324             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18325             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18326             :       }
   18327             :     }
   18328             : #endif
   18329             :   }
   18330          17 :   resultobj = SWIG_FromCharPtr((const char *)result);
   18331          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; } }
   18332             :   return resultobj;
   18333             : fail:
   18334             :   return NULL;
   18335             : }
   18336             : 
   18337             : 
   18338           0 : SWIGINTERN PyObject *_wrap_Driver_HelpTopic_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   18339           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18340           0 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   18341           0 :   void *argp1 = 0 ;
   18342           0 :   int res1 = 0 ;
   18343           0 :   PyObject *swig_obj[1] ;
   18344           0 :   char *result = 0 ;
   18345             :   
   18346           0 :   if (!args) SWIG_fail;
   18347           0 :   swig_obj[0] = args;
   18348           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   18349           0 :   if (!SWIG_IsOK(res1)) {
   18350           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_HelpTopic_get" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   18351             :   }
   18352           0 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   18353           0 :   {
   18354           0 :     const int bLocalUseExceptions = GetUseExceptions();
   18355           0 :     if ( bLocalUseExceptions ) {
   18356           0 :       pushErrorHandler();
   18357             :     }
   18358           0 :     {
   18359           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18360           0 :       result = (char *)GDALDriverShadow_HelpTopic_get(arg1);
   18361           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18362             :     }
   18363           0 :     if ( bLocalUseExceptions ) {
   18364           0 :       popErrorHandler();
   18365             :     }
   18366             : #ifndef SED_HACKS
   18367             :     if ( bLocalUseExceptions ) {
   18368             :       CPLErr eclass = CPLGetLastErrorType();
   18369             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18370             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18371             :       }
   18372             :     }
   18373             : #endif
   18374             :   }
   18375           0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   18376           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; } }
   18377             :   return resultobj;
   18378             : fail:
   18379             :   return NULL;
   18380             : }
   18381             : 
   18382             : 
   18383       16670 : SWIGINTERN PyObject *_wrap_Driver_Create(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   18384       16670 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18385       16670 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   18386       16670 :   char *arg2 = (char *) 0 ;
   18387       16670 :   int arg3 ;
   18388       16670 :   int arg4 ;
   18389       16670 :   int arg5 = (int) 1 ;
   18390       16670 :   GDALDataType arg6 = (GDALDataType) GDT_Byte ;
   18391       16670 :   char **arg7 = (char **) 0 ;
   18392       16670 :   void *argp1 = 0 ;
   18393       16670 :   int res1 = 0 ;
   18394       16670 :   int bToFree2 = 0 ;
   18395       16670 :   int val3 ;
   18396       16670 :   int ecode3 = 0 ;
   18397       16670 :   int val4 ;
   18398       16670 :   int ecode4 = 0 ;
   18399       16670 :   int val5 ;
   18400       16670 :   int ecode5 = 0 ;
   18401       16670 :   PyObject * obj0 = 0 ;
   18402       16670 :   PyObject * obj1 = 0 ;
   18403       16670 :   PyObject * obj2 = 0 ;
   18404       16670 :   PyObject * obj3 = 0 ;
   18405       16670 :   PyObject * obj4 = 0 ;
   18406       16670 :   PyObject * obj5 = 0 ;
   18407       16670 :   PyObject * obj6 = 0 ;
   18408       16670 :   char * kwnames[] = {
   18409             :     (char *)"self",  (char *)"utf8_path",  (char *)"xsize",  (char *)"ysize",  (char *)"bands",  (char *)"eType",  (char *)"options",  NULL 
   18410             :   };
   18411       16670 :   GDALDatasetShadow *result = 0 ;
   18412             :   
   18413       16670 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOO:Driver_Create", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   18414       16670 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   18415       16670 :   if (!SWIG_IsOK(res1)) {
   18416           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Create" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   18417             :   }
   18418       16670 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   18419       16670 :   {
   18420             :     /* %typemap(in) (const char *utf8_path) */
   18421       16670 :     if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
   18422             :     {
   18423       13086 :       arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
   18424             :     }
   18425             :     else
   18426             :     {
   18427        3584 :       arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
   18428             :       
   18429             :     }
   18430       16670 :     if (arg2 == NULL)
   18431             :     {
   18432           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   18433           0 :       SWIG_fail;
   18434             :     }
   18435             :   }
   18436       16670 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   18437       16670 :   if (!SWIG_IsOK(ecode3)) {
   18438           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Driver_Create" "', argument " "3"" of type '" "int""'");
   18439             :   } 
   18440       16670 :   arg3 = static_cast< int >(val3);
   18441       16670 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   18442       16670 :   if (!SWIG_IsOK(ecode4)) {
   18443           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Driver_Create" "', argument " "4"" of type '" "int""'");
   18444             :   } 
   18445       16670 :   arg4 = static_cast< int >(val4);
   18446       16670 :   if (obj4) {
   18447       15102 :     ecode5 = SWIG_AsVal_int(obj4, &val5);
   18448       15102 :     if (!SWIG_IsOK(ecode5)) {
   18449           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Driver_Create" "', argument " "5"" of type '" "int""'");
   18450             :     } 
   18451             :     arg5 = static_cast< int >(val5);
   18452             :   }
   18453       16670 :   if (obj5) {
   18454        8710 :     {
   18455        8710 :       if (PyInt_Check(obj5))
   18456             :       {
   18457        8706 :         arg6 = static_cast<GDALDataType>(PyInt_AsLong(obj5));
   18458             :       }
   18459             :       else
   18460             :       {
   18461           4 :         PyObject* gdal_array = PyImport_ImportModule("osgeo.gdal_array");
   18462           4 :         if (gdal_array)
   18463             :         {
   18464           4 :           PyObject* dict = PyModule_GetDict(gdal_array);
   18465           4 :           PyObject* fn = PyDict_GetItemString(dict, "NumericTypeCodeToGDALTypeCode");
   18466           4 :           PyObject* type_code = PyObject_CallFunctionObjArgs(fn, obj5, NULL);
   18467             :           
   18468           4 :           Py_DECREF(gdal_array);
   18469           4 :           if (type_code && PyInt_Check(type_code))
   18470             :           {
   18471           2 :             arg6 = static_cast<GDALDataType>(PyInt_AsLong(type_code));
   18472           2 :             Py_DECREF(type_code);
   18473             :           }
   18474             :           else
   18475             :           {
   18476           2 :             Py_XDECREF(type_code);
   18477           2 :             PyErr_SetString(PyExc_RuntimeError, "type must be a GDAL data type code or NumPy type");
   18478           2 :             SWIG_fail;
   18479             :           }
   18480             :         }
   18481             :         else
   18482             :         {
   18483           0 :           PyErr_SetString(PyExc_RuntimeError, "gdal_array module is not available; type must be a specified as a GDAL data type code");
   18484           0 :           SWIG_fail;
   18485             :         }
   18486             :       }
   18487             :     }
   18488             :   }
   18489       16668 :   if (obj6) {
   18490        4123 :     {
   18491             :       /* %typemap(in) char **dict */
   18492        4123 :       arg7 = NULL;
   18493        4123 :       if ( PySequence_Check( obj6 ) ) {
   18494        4097 :         int bErr = FALSE;
   18495        4097 :         arg7 = CSLFromPySequence(obj6, &bErr);
   18496        4097 :         if ( bErr )
   18497             :         {
   18498           0 :           SWIG_fail;
   18499             :         }
   18500             :       }
   18501          26 :       else if ( PyMapping_Check( obj6 ) ) {
   18502          26 :         int bErr = FALSE;
   18503          26 :         arg7 = CSLFromPyMapping(obj6, &bErr);
   18504          26 :         if ( bErr )
   18505             :         {
   18506           0 :           SWIG_fail;
   18507             :         }
   18508             :       }
   18509             :       else {
   18510           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   18511           0 :         SWIG_fail;
   18512             :       }
   18513             :     }
   18514             :   }
   18515       16668 :   {
   18516       16668 :     if (!arg2) {
   18517       16668 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18518             :     }
   18519             :   }
   18520       16668 :   {
   18521       16668 :     const int bLocalUseExceptions = GetUseExceptions();
   18522       16668 :     if ( bLocalUseExceptions ) {
   18523        4917 :       pushErrorHandler();
   18524             :     }
   18525       16668 :     {
   18526       16668 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18527       16668 :       result = (GDALDatasetShadow *)GDALDriverShadow_Create(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
   18528       16668 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18529             :     }
   18530       16668 :     if ( bLocalUseExceptions ) {
   18531        4917 :       popErrorHandler();
   18532             :     }
   18533             : #ifndef SED_HACKS
   18534             :     if ( bLocalUseExceptions ) {
   18535             :       CPLErr eclass = CPLGetLastErrorType();
   18536             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18537             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18538             :       }
   18539             :     }
   18540             : #endif
   18541             :   }
   18542       16668 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   18543       16668 :   {
   18544             :     /* %typemap(freearg) (const char *utf8_path) */
   18545       16668 :     GDALPythonFreeCStr(arg2, bToFree2);
   18546             :   }
   18547       16668 :   {
   18548             :     /* %typemap(freearg) char **dict */
   18549       16668 :     CSLDestroy( arg7 );
   18550             :   }
   18551       16716 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   18552             :   return resultobj;
   18553           2 : fail:
   18554           2 :   {
   18555             :     /* %typemap(freearg) (const char *utf8_path) */
   18556           2 :     GDALPythonFreeCStr(arg2, bToFree2);
   18557             :   }
   18558           2 :   {
   18559             :     /* %typemap(freearg) char **dict */
   18560           2 :     CSLDestroy( arg7 );
   18561             :   }
   18562             :   return NULL;
   18563             : }
   18564             : 
   18565             : 
   18566          67 : SWIGINTERN PyObject *_wrap_Driver_CreateVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   18567          67 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18568          67 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   18569          67 :   char *arg2 = (char *) 0 ;
   18570          67 :   char **arg3 = (char **) 0 ;
   18571          67 :   void *argp1 = 0 ;
   18572          67 :   int res1 = 0 ;
   18573          67 :   int bToFree2 = 0 ;
   18574          67 :   PyObject * obj0 = 0 ;
   18575          67 :   PyObject * obj1 = 0 ;
   18576          67 :   PyObject * obj2 = 0 ;
   18577          67 :   char * kwnames[] = {
   18578             :     (char *)"self",  (char *)"utf8_path",  (char *)"options",  NULL 
   18579             :   };
   18580          67 :   GDALDatasetShadow *result = 0 ;
   18581             :   
   18582          67 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:Driver_CreateVector", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   18583          67 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   18584          67 :   if (!SWIG_IsOK(res1)) {
   18585           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CreateVector" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   18586             :   }
   18587          67 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   18588          67 :   {
   18589             :     /* %typemap(in) (const char *utf8_path) */
   18590          67 :     if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
   18591             :     {
   18592          48 :       arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
   18593             :     }
   18594             :     else
   18595             :     {
   18596          19 :       arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
   18597             :       
   18598             :     }
   18599          67 :     if (arg2 == NULL)
   18600             :     {
   18601           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   18602           0 :       SWIG_fail;
   18603             :     }
   18604             :   }
   18605          67 :   if (obj2) {
   18606           0 :     {
   18607             :       /* %typemap(in) char **dict */
   18608           0 :       arg3 = NULL;
   18609           0 :       if ( PySequence_Check( obj2 ) ) {
   18610           0 :         int bErr = FALSE;
   18611           0 :         arg3 = CSLFromPySequence(obj2, &bErr);
   18612           0 :         if ( bErr )
   18613             :         {
   18614           0 :           SWIG_fail;
   18615             :         }
   18616             :       }
   18617           0 :       else if ( PyMapping_Check( obj2 ) ) {
   18618           0 :         int bErr = FALSE;
   18619           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   18620           0 :         if ( bErr )
   18621             :         {
   18622           0 :           SWIG_fail;
   18623             :         }
   18624             :       }
   18625             :       else {
   18626           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   18627           0 :         SWIG_fail;
   18628             :       }
   18629             :     }
   18630             :   }
   18631          67 :   {
   18632          67 :     if (!arg2) {
   18633          67 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18634             :     }
   18635             :   }
   18636          67 :   {
   18637          67 :     const int bLocalUseExceptions = GetUseExceptions();
   18638          67 :     if ( bLocalUseExceptions ) {
   18639          67 :       pushErrorHandler();
   18640             :     }
   18641          67 :     {
   18642          67 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18643          67 :       result = (GDALDatasetShadow *)GDALDriverShadow_CreateVector(arg1,(char const *)arg2,arg3);
   18644          67 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18645             :     }
   18646          67 :     if ( bLocalUseExceptions ) {
   18647          67 :       popErrorHandler();
   18648             :     }
   18649             : #ifndef SED_HACKS
   18650             :     if ( bLocalUseExceptions ) {
   18651             :       CPLErr eclass = CPLGetLastErrorType();
   18652             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18653             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18654             :       }
   18655             :     }
   18656             : #endif
   18657             :   }
   18658          67 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   18659          67 :   {
   18660             :     /* %typemap(freearg) (const char *utf8_path) */
   18661          67 :     GDALPythonFreeCStr(arg2, bToFree2);
   18662             :   }
   18663          67 :   {
   18664             :     /* %typemap(freearg) char **dict */
   18665          67 :     CSLDestroy( arg3 );
   18666             :   }
   18667          67 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   18668             :   return resultobj;
   18669           0 : fail:
   18670           0 :   {
   18671             :     /* %typemap(freearg) (const char *utf8_path) */
   18672           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   18673             :   }
   18674           0 :   {
   18675             :     /* %typemap(freearg) char **dict */
   18676           0 :     CSLDestroy( arg3 );
   18677             :   }
   18678             :   return NULL;
   18679             : }
   18680             : 
   18681             : 
   18682         424 : SWIGINTERN PyObject *_wrap_Driver_CreateMultiDimensional(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   18683         424 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18684         424 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   18685         424 :   char *arg2 = (char *) 0 ;
   18686         424 :   char **arg3 = (char **) 0 ;
   18687         424 :   char **arg4 = (char **) 0 ;
   18688         424 :   void *argp1 = 0 ;
   18689         424 :   int res1 = 0 ;
   18690         424 :   int bToFree2 = 0 ;
   18691         424 :   PyObject * obj0 = 0 ;
   18692         424 :   PyObject * obj1 = 0 ;
   18693         424 :   PyObject * obj2 = 0 ;
   18694         424 :   PyObject * obj3 = 0 ;
   18695         424 :   char * kwnames[] = {
   18696             :     (char *)"self",  (char *)"utf8_path",  (char *)"root_group_options",  (char *)"options",  NULL 
   18697             :   };
   18698         424 :   GDALDatasetShadow *result = 0 ;
   18699             :   
   18700         424 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OO:Driver_CreateMultiDimensional", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
   18701         424 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   18702         424 :   if (!SWIG_IsOK(res1)) {
   18703           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CreateMultiDimensional" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   18704             :   }
   18705         424 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   18706         424 :   {
   18707             :     /* %typemap(in) (const char *utf8_path) */
   18708         424 :     if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
   18709             :     {
   18710         239 :       arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
   18711             :     }
   18712             :     else
   18713             :     {
   18714         185 :       arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
   18715             :       
   18716             :     }
   18717         424 :     if (arg2 == NULL)
   18718             :     {
   18719           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   18720           0 :       SWIG_fail;
   18721             :     }
   18722             :   }
   18723         424 :   if (obj2) {
   18724           1 :     {
   18725             :       /* %typemap(in) char **dict */
   18726           1 :       arg3 = NULL;
   18727           1 :       if ( PySequence_Check( obj2 ) ) {
   18728           1 :         int bErr = FALSE;
   18729           1 :         arg3 = CSLFromPySequence(obj2, &bErr);
   18730           1 :         if ( bErr )
   18731             :         {
   18732           0 :           SWIG_fail;
   18733             :         }
   18734             :       }
   18735           0 :       else if ( PyMapping_Check( obj2 ) ) {
   18736           0 :         int bErr = FALSE;
   18737           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   18738           0 :         if ( bErr )
   18739             :         {
   18740           0 :           SWIG_fail;
   18741             :         }
   18742             :       }
   18743             :       else {
   18744           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   18745           0 :         SWIG_fail;
   18746             :       }
   18747             :     }
   18748             :   }
   18749         424 :   if (obj3) {
   18750         217 :     {
   18751             :       /* %typemap(in) char **dict */
   18752         217 :       arg4 = NULL;
   18753         217 :       if ( PySequence_Check( obj3 ) ) {
   18754         217 :         int bErr = FALSE;
   18755         217 :         arg4 = CSLFromPySequence(obj3, &bErr);
   18756         217 :         if ( bErr )
   18757             :         {
   18758           0 :           SWIG_fail;
   18759             :         }
   18760             :       }
   18761           0 :       else if ( PyMapping_Check( obj3 ) ) {
   18762           0 :         int bErr = FALSE;
   18763           0 :         arg4 = CSLFromPyMapping(obj3, &bErr);
   18764           0 :         if ( bErr )
   18765             :         {
   18766           0 :           SWIG_fail;
   18767             :         }
   18768             :       }
   18769             :       else {
   18770           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   18771           0 :         SWIG_fail;
   18772             :       }
   18773             :     }
   18774             :   }
   18775         424 :   {
   18776         424 :     if (!arg2) {
   18777         424 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18778             :     }
   18779             :   }
   18780         424 :   {
   18781         424 :     const int bLocalUseExceptions = GetUseExceptions();
   18782         424 :     if ( bLocalUseExceptions ) {
   18783         109 :       pushErrorHandler();
   18784             :     }
   18785         424 :     {
   18786         424 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18787         424 :       result = (GDALDatasetShadow *)GDALDriverShadow_CreateMultiDimensional(arg1,(char const *)arg2,arg3,arg4);
   18788         424 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18789             :     }
   18790         424 :     if ( bLocalUseExceptions ) {
   18791         109 :       popErrorHandler();
   18792             :     }
   18793             : #ifndef SED_HACKS
   18794             :     if ( bLocalUseExceptions ) {
   18795             :       CPLErr eclass = CPLGetLastErrorType();
   18796             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18797             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18798             :       }
   18799             :     }
   18800             : #endif
   18801             :   }
   18802         424 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   18803         424 :   {
   18804             :     /* %typemap(freearg) (const char *utf8_path) */
   18805         424 :     GDALPythonFreeCStr(arg2, bToFree2);
   18806             :   }
   18807         424 :   {
   18808             :     /* %typemap(freearg) char **dict */
   18809         424 :     CSLDestroy( arg3 );
   18810             :   }
   18811         424 :   {
   18812             :     /* %typemap(freearg) char **dict */
   18813         424 :     CSLDestroy( arg4 );
   18814             :   }
   18815         424 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   18816             :   return resultobj;
   18817           0 : fail:
   18818           0 :   {
   18819             :     /* %typemap(freearg) (const char *utf8_path) */
   18820           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   18821             :   }
   18822           0 :   {
   18823             :     /* %typemap(freearg) char **dict */
   18824           0 :     CSLDestroy( arg3 );
   18825             :   }
   18826           0 :   {
   18827             :     /* %typemap(freearg) char **dict */
   18828           0 :     CSLDestroy( arg4 );
   18829             :   }
   18830             :   return NULL;
   18831             : }
   18832             : 
   18833             : 
   18834        3878 : SWIGINTERN PyObject *_wrap_Driver_CreateCopy(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   18835        3878 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   18836        3878 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   18837        3878 :   char *arg2 = (char *) 0 ;
   18838        3878 :   GDALDatasetShadow *arg3 = (GDALDatasetShadow *) 0 ;
   18839        3878 :   int arg4 = (int) 1 ;
   18840        3878 :   char **arg5 = (char **) 0 ;
   18841        3878 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   18842        3878 :   void *arg7 = (void *) NULL ;
   18843        3878 :   void *argp1 = 0 ;
   18844        3878 :   int res1 = 0 ;
   18845        3878 :   int bToFree2 = 0 ;
   18846        3878 :   void *argp3 = 0 ;
   18847        3878 :   int res3 = 0 ;
   18848        3878 :   int val4 ;
   18849        3878 :   int ecode4 = 0 ;
   18850        3878 :   PyObject * obj0 = 0 ;
   18851        3878 :   PyObject * obj1 = 0 ;
   18852        3878 :   PyObject * obj2 = 0 ;
   18853        3878 :   PyObject * obj3 = 0 ;
   18854        3878 :   PyObject * obj4 = 0 ;
   18855        3878 :   PyObject * obj5 = 0 ;
   18856        3878 :   PyObject * obj6 = 0 ;
   18857        3878 :   char * kwnames[] = {
   18858             :     (char *)"self",  (char *)"utf8_path",  (char *)"src",  (char *)"strict",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   18859             :   };
   18860        3878 :   GDALDatasetShadow *result = 0 ;
   18861             :   
   18862             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   18863        3878 :   PyProgressData *psProgressInfo;
   18864        3878 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   18865        3878 :   psProgressInfo->nLastReported = -1;
   18866        3878 :   psProgressInfo->psPyCallback = NULL;
   18867        3878 :   psProgressInfo->psPyCallbackData = NULL;
   18868        3878 :   arg7 = psProgressInfo;
   18869        3878 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|OOOO:Driver_CreateCopy", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   18870        3878 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   18871        3878 :   if (!SWIG_IsOK(res1)) {
   18872           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CreateCopy" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   18873             :   }
   18874        3878 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   18875        3878 :   {
   18876             :     /* %typemap(in) (const char *utf8_path) */
   18877        3878 :     if (PyUnicode_Check(obj1) || PyBytes_Check(obj1))
   18878             :     {
   18879        3721 :       arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
   18880             :     }
   18881             :     else
   18882             :     {
   18883         157 :       arg2 = GDALPythonPathToCStr(obj1, &bToFree2);
   18884             :       
   18885             :     }
   18886        3878 :     if (arg2 == NULL)
   18887             :     {
   18888           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   18889           0 :       SWIG_fail;
   18890             :     }
   18891             :   }
   18892        3878 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   18893        3878 :   if (!SWIG_IsOK(res3)) {
   18894           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Driver_CreateCopy" "', argument " "3"" of type '" "GDALDatasetShadow *""'"); 
   18895             :   }
   18896        3878 :   arg3 = reinterpret_cast< GDALDatasetShadow * >(argp3);
   18897        3878 :   if (obj3) {
   18898         485 :     ecode4 = SWIG_AsVal_int(obj3, &val4);
   18899         485 :     if (!SWIG_IsOK(ecode4)) {
   18900           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Driver_CreateCopy" "', argument " "4"" of type '" "int""'");
   18901             :     } 
   18902             :     arg4 = static_cast< int >(val4);
   18903             :   }
   18904        3878 :   if (obj4) {
   18905        1457 :     {
   18906             :       /* %typemap(in) char **dict */
   18907        1457 :       arg5 = NULL;
   18908        1457 :       if ( PySequence_Check( obj4 ) ) {
   18909        1453 :         int bErr = FALSE;
   18910        1453 :         arg5 = CSLFromPySequence(obj4, &bErr);
   18911        1453 :         if ( bErr )
   18912             :         {
   18913           0 :           SWIG_fail;
   18914             :         }
   18915             :       }
   18916           4 :       else if ( PyMapping_Check( obj4 ) ) {
   18917           4 :         int bErr = FALSE;
   18918           4 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   18919           4 :         if ( bErr )
   18920             :         {
   18921           0 :           SWIG_fail;
   18922             :         }
   18923             :       }
   18924             :       else {
   18925           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   18926           0 :         SWIG_fail;
   18927             :       }
   18928             :     }
   18929             :   }
   18930        3878 :   if (obj5) {
   18931          77 :     {
   18932             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   18933             :       /* callback_func typemap */
   18934             :       
   18935             :       /* In some cases 0 is passed instead of None. */
   18936             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   18937          77 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   18938             :       {
   18939           0 :         if( PyLong_AsLong(obj5) == 0 )
   18940             :         {
   18941           0 :           obj5 = Py_None;
   18942             :         }
   18943             :       }
   18944             :       
   18945          77 :       if (obj5 && obj5 != Py_None ) {
   18946          77 :         void* cbfunction = NULL;
   18947          77 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   18948             :             (void**)&cbfunction,
   18949             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   18950             :             SWIG_POINTER_EXCEPTION | 0 ));
   18951             :         
   18952          77 :         if ( cbfunction == GDALTermProgress ) {
   18953             :           arg6 = GDALTermProgress;
   18954             :         } else {
   18955          77 :           if (!PyCallable_Check(obj5)) {
   18956           1 :             PyErr_SetString( PyExc_RuntimeError,
   18957             :               "Object given is not a Python function" );
   18958           1 :             SWIG_fail;
   18959             :           }
   18960          76 :           psProgressInfo->psPyCallback = obj5;
   18961          76 :           arg6 = PyProgressProxy;
   18962             :         }
   18963             :         
   18964             :       }
   18965             :       
   18966             :     }
   18967             :   }
   18968        3877 :   if (obj6) {
   18969          14 :     {
   18970             :       /* %typemap(in) ( void* callback_data=NULL)  */
   18971          14 :       psProgressInfo->psPyCallbackData = obj6 ;
   18972             :     }
   18973             :   }
   18974        3877 :   {
   18975        3877 :     if (!arg2) {
   18976        3877 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18977             :     }
   18978             :   }
   18979        3877 :   {
   18980        3877 :     if (!arg3) {
   18981           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18982             :     }
   18983             :   }
   18984        3877 :   {
   18985        3877 :     const int bLocalUseExceptions = GetUseExceptions();
   18986        3877 :     if ( bLocalUseExceptions ) {
   18987         640 :       pushErrorHandler();
   18988             :     }
   18989        3877 :     {
   18990        3877 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   18991        3877 :       result = (GDALDatasetShadow *)GDALDriverShadow_CreateCopy(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
   18992        3877 :       SWIG_PYTHON_THREAD_END_ALLOW;
   18993             :     }
   18994        3877 :     if ( bLocalUseExceptions ) {
   18995         640 :       popErrorHandler();
   18996             :     }
   18997             : #ifndef SED_HACKS
   18998             :     if ( bLocalUseExceptions ) {
   18999             :       CPLErr eclass = CPLGetLastErrorType();
   19000             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19001             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19002             :       }
   19003             :     }
   19004             : #endif
   19005             :   }
   19006        3877 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   19007        3877 :   {
   19008             :     /* %typemap(freearg) (const char *utf8_path) */
   19009        3877 :     GDALPythonFreeCStr(arg2, bToFree2);
   19010             :   }
   19011        3877 :   {
   19012             :     /* %typemap(freearg) char **dict */
   19013        3877 :     CSLDestroy( arg5 );
   19014             :   }
   19015        3877 :   {
   19016             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   19017             :     
   19018        3877 :     CPLFree(psProgressInfo);
   19019             :     
   19020             :   }
   19021        3908 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   19022             :   return resultobj;
   19023           1 : fail:
   19024           1 :   {
   19025             :     /* %typemap(freearg) (const char *utf8_path) */
   19026           1 :     GDALPythonFreeCStr(arg2, bToFree2);
   19027             :   }
   19028           1 :   {
   19029             :     /* %typemap(freearg) char **dict */
   19030           1 :     CSLDestroy( arg5 );
   19031             :   }
   19032           1 :   {
   19033             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   19034             :     
   19035           1 :     CPLFree(psProgressInfo);
   19036             :     
   19037             :   }
   19038             :   return NULL;
   19039             : }
   19040             : 
   19041             : 
   19042        2451 : SWIGINTERN PyObject *_wrap_Driver_Delete(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19043        2451 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19044        2451 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   19045        2451 :   char *arg2 = (char *) 0 ;
   19046        2451 :   void *argp1 = 0 ;
   19047        2451 :   int res1 = 0 ;
   19048        2451 :   int bToFree2 = 0 ;
   19049        2451 :   PyObject *swig_obj[2] ;
   19050        2451 :   CPLErr result;
   19051             :   
   19052        2451 :   if (!SWIG_Python_UnpackTuple(args, "Driver_Delete", 2, 2, swig_obj)) SWIG_fail;
   19053        2451 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   19054        2451 :   if (!SWIG_IsOK(res1)) {
   19055           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Delete" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   19056             :   }
   19057        2451 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   19058        2451 :   {
   19059             :     /* %typemap(in) (const char *utf8_path) */
   19060        2451 :     if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
   19061             :     {
   19062        2318 :       arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
   19063             :     }
   19064             :     else
   19065             :     {
   19066         133 :       arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
   19067             :       
   19068             :     }
   19069        2451 :     if (arg2 == NULL)
   19070             :     {
   19071           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   19072           0 :       SWIG_fail;
   19073             :     }
   19074             :   }
   19075        2451 :   {
   19076        2451 :     if (!arg2) {
   19077        2451 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19078             :     }
   19079             :   }
   19080        2451 :   {
   19081        2451 :     const int bLocalUseExceptions = GetUseExceptions();
   19082        2451 :     if ( bLocalUseExceptions ) {
   19083        1322 :       pushErrorHandler();
   19084             :     }
   19085        2451 :     {
   19086        2451 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19087        2451 :       result = (CPLErr)GDALDriverShadow_Delete(arg1,(char const *)arg2);
   19088        2451 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19089             :     }
   19090        2451 :     if ( bLocalUseExceptions ) {
   19091        1322 :       popErrorHandler();
   19092             :     }
   19093             : #ifndef SED_HACKS
   19094             :     if ( bLocalUseExceptions ) {
   19095             :       CPLErr eclass = CPLGetLastErrorType();
   19096             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19097             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19098             :       }
   19099             :     }
   19100             : #endif
   19101             :   }
   19102        2451 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19103        2451 :   {
   19104             :     /* %typemap(freearg) (const char *utf8_path) */
   19105        2451 :     GDALPythonFreeCStr(arg2, bToFree2);
   19106             :   }
   19107        2451 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   19108             :   return resultobj;
   19109           0 : fail:
   19110           0 :   {
   19111             :     /* %typemap(freearg) (const char *utf8_path) */
   19112        2451 :     GDALPythonFreeCStr(arg2, bToFree2);
   19113             :   }
   19114             :   return NULL;
   19115             : }
   19116             : 
   19117             : 
   19118         173 : SWIGINTERN PyObject *_wrap_Driver_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19119         173 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19120         173 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   19121         173 :   char *arg2 = (char *) 0 ;
   19122         173 :   char *arg3 = (char *) 0 ;
   19123         173 :   void *argp1 = 0 ;
   19124         173 :   int res1 = 0 ;
   19125         173 :   int bToFree2 = 0 ;
   19126         173 :   int bToFree3 = 0 ;
   19127         173 :   PyObject *swig_obj[3] ;
   19128         173 :   CPLErr result;
   19129             :   
   19130         173 :   if (!SWIG_Python_UnpackTuple(args, "Driver_Rename", 3, 3, swig_obj)) SWIG_fail;
   19131         173 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   19132         173 :   if (!SWIG_IsOK(res1)) {
   19133           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Rename" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   19134             :   }
   19135         173 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   19136         173 :   {
   19137             :     /* %typemap(in) (const char *utf8_path) */
   19138         173 :     if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
   19139             :     {
   19140         171 :       arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
   19141             :     }
   19142             :     else
   19143             :     {
   19144           2 :       arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
   19145             :       
   19146             :     }
   19147         173 :     if (arg2 == NULL)
   19148             :     {
   19149           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   19150           0 :       SWIG_fail;
   19151             :     }
   19152             :   }
   19153         173 :   {
   19154             :     /* %typemap(in) (const char *utf8_path) */
   19155         173 :     if (PyUnicode_Check(swig_obj[2]) || PyBytes_Check(swig_obj[2]))
   19156             :     {
   19157         171 :       arg3 = GDALPythonObjectToCStr( swig_obj[2], &bToFree3 );
   19158             :     }
   19159             :     else
   19160             :     {
   19161           2 :       arg3 = GDALPythonPathToCStr(swig_obj[2], &bToFree3);
   19162             :       
   19163             :     }
   19164         173 :     if (arg3 == NULL)
   19165             :     {
   19166           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   19167           0 :       SWIG_fail;
   19168             :     }
   19169             :   }
   19170         173 :   {
   19171         173 :     if (!arg2) {
   19172         173 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19173             :     }
   19174             :   }
   19175         173 :   {
   19176         173 :     if (!arg3) {
   19177         173 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19178             :     }
   19179             :   }
   19180         173 :   {
   19181         173 :     const int bLocalUseExceptions = GetUseExceptions();
   19182         173 :     if ( bLocalUseExceptions ) {
   19183         173 :       pushErrorHandler();
   19184             :     }
   19185         173 :     {
   19186         173 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19187         173 :       result = (CPLErr)GDALDriverShadow_Rename(arg1,(char const *)arg2,(char const *)arg3);
   19188         173 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19189             :     }
   19190         173 :     if ( bLocalUseExceptions ) {
   19191         173 :       popErrorHandler();
   19192             :     }
   19193             : #ifndef SED_HACKS
   19194             :     if ( bLocalUseExceptions ) {
   19195             :       CPLErr eclass = CPLGetLastErrorType();
   19196             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19197             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19198             :       }
   19199             :     }
   19200             : #endif
   19201             :   }
   19202         173 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19203         173 :   {
   19204             :     /* %typemap(freearg) (const char *utf8_path) */
   19205         173 :     GDALPythonFreeCStr(arg2, bToFree2);
   19206             :   }
   19207         173 :   {
   19208             :     /* %typemap(freearg) (const char *utf8_path) */
   19209         173 :     GDALPythonFreeCStr(arg3, bToFree3);
   19210             :   }
   19211         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; } }
   19212             :   return resultobj;
   19213           0 : fail:
   19214           0 :   {
   19215             :     /* %typemap(freearg) (const char *utf8_path) */
   19216           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   19217             :   }
   19218           0 :   {
   19219             :     /* %typemap(freearg) (const char *utf8_path) */
   19220         173 :     GDALPythonFreeCStr(arg3, bToFree3);
   19221             :   }
   19222             :   return NULL;
   19223             : }
   19224             : 
   19225             : 
   19226           3 : SWIGINTERN PyObject *_wrap_Driver_CopyFiles(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19227           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19228           3 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   19229           3 :   char *arg2 = (char *) 0 ;
   19230           3 :   char *arg3 = (char *) 0 ;
   19231           3 :   void *argp1 = 0 ;
   19232           3 :   int res1 = 0 ;
   19233           3 :   int bToFree2 = 0 ;
   19234           3 :   int bToFree3 = 0 ;
   19235           3 :   PyObject *swig_obj[3] ;
   19236           3 :   CPLErr result;
   19237             :   
   19238           3 :   if (!SWIG_Python_UnpackTuple(args, "Driver_CopyFiles", 3, 3, swig_obj)) SWIG_fail;
   19239           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   19240           3 :   if (!SWIG_IsOK(res1)) {
   19241           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CopyFiles" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   19242             :   }
   19243           3 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   19244           3 :   {
   19245             :     /* %typemap(in) (const char *utf8_path) */
   19246           3 :     if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
   19247             :     {
   19248           1 :       arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
   19249             :     }
   19250             :     else
   19251             :     {
   19252           2 :       arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
   19253             :       
   19254             :     }
   19255           3 :     if (arg2 == NULL)
   19256             :     {
   19257           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   19258           0 :       SWIG_fail;
   19259             :     }
   19260             :   }
   19261           3 :   {
   19262             :     /* %typemap(in) (const char *utf8_path) */
   19263           3 :     if (PyUnicode_Check(swig_obj[2]) || PyBytes_Check(swig_obj[2]))
   19264             :     {
   19265           1 :       arg3 = GDALPythonObjectToCStr( swig_obj[2], &bToFree3 );
   19266             :     }
   19267             :     else
   19268             :     {
   19269           2 :       arg3 = GDALPythonPathToCStr(swig_obj[2], &bToFree3);
   19270             :       
   19271             :     }
   19272           3 :     if (arg3 == NULL)
   19273             :     {
   19274           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   19275           0 :       SWIG_fail;
   19276             :     }
   19277             :   }
   19278           3 :   {
   19279           3 :     if (!arg2) {
   19280           3 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19281             :     }
   19282             :   }
   19283           3 :   {
   19284           3 :     if (!arg3) {
   19285           3 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19286             :     }
   19287             :   }
   19288           3 :   {
   19289           3 :     const int bLocalUseExceptions = GetUseExceptions();
   19290           3 :     if ( bLocalUseExceptions ) {
   19291           3 :       pushErrorHandler();
   19292             :     }
   19293           3 :     {
   19294           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19295           3 :       result = (CPLErr)GDALDriverShadow_CopyFiles(arg1,(char const *)arg2,(char const *)arg3);
   19296           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19297             :     }
   19298           3 :     if ( bLocalUseExceptions ) {
   19299           3 :       popErrorHandler();
   19300             :     }
   19301             : #ifndef SED_HACKS
   19302             :     if ( bLocalUseExceptions ) {
   19303             :       CPLErr eclass = CPLGetLastErrorType();
   19304             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19305             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19306             :       }
   19307             :     }
   19308             : #endif
   19309             :   }
   19310           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19311           3 :   {
   19312             :     /* %typemap(freearg) (const char *utf8_path) */
   19313           3 :     GDALPythonFreeCStr(arg2, bToFree2);
   19314             :   }
   19315           3 :   {
   19316             :     /* %typemap(freearg) (const char *utf8_path) */
   19317           3 :     GDALPythonFreeCStr(arg3, bToFree3);
   19318             :   }
   19319           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; } }
   19320             :   return resultobj;
   19321           0 : fail:
   19322           0 :   {
   19323             :     /* %typemap(freearg) (const char *utf8_path) */
   19324           0 :     GDALPythonFreeCStr(arg2, bToFree2);
   19325             :   }
   19326           0 :   {
   19327             :     /* %typemap(freearg) (const char *utf8_path) */
   19328           3 :     GDALPythonFreeCStr(arg3, bToFree3);
   19329             :   }
   19330             :   return NULL;
   19331             : }
   19332             : 
   19333             : 
   19334           2 : SWIGINTERN PyObject *_wrap_Driver_HasOpenOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19335           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19336           2 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   19337           2 :   char *arg2 = (char *) 0 ;
   19338           2 :   void *argp1 = 0 ;
   19339           2 :   int res1 = 0 ;
   19340           2 :   int res2 ;
   19341           2 :   char *buf2 = 0 ;
   19342           2 :   int alloc2 = 0 ;
   19343           2 :   PyObject *swig_obj[2] ;
   19344           2 :   bool result;
   19345             :   
   19346           2 :   if (!SWIG_Python_UnpackTuple(args, "Driver_HasOpenOption", 2, 2, swig_obj)) SWIG_fail;
   19347           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   19348           2 :   if (!SWIG_IsOK(res1)) {
   19349           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_HasOpenOption" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   19350             :   }
   19351           2 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   19352           2 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   19353           2 :   if (!SWIG_IsOK(res2)) {
   19354           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Driver_HasOpenOption" "', argument " "2"" of type '" "char const *""'");
   19355             :   }
   19356           2 :   arg2 = reinterpret_cast< char * >(buf2);
   19357           2 :   {
   19358           2 :     const int bLocalUseExceptions = GetUseExceptions();
   19359           2 :     if ( bLocalUseExceptions ) {
   19360           0 :       pushErrorHandler();
   19361             :     }
   19362           2 :     {
   19363           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19364           2 :       result = (bool)GDALDriverShadow_HasOpenOption(arg1,(char const *)arg2);
   19365           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19366             :     }
   19367           2 :     if ( bLocalUseExceptions ) {
   19368           0 :       popErrorHandler();
   19369             :     }
   19370             : #ifndef SED_HACKS
   19371             :     if ( bLocalUseExceptions ) {
   19372             :       CPLErr eclass = CPLGetLastErrorType();
   19373             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19374             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19375             :       }
   19376             :     }
   19377             : #endif
   19378             :   }
   19379           2 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   19380           2 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   19381           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; } }
   19382             :   return resultobj;
   19383           0 : fail:
   19384           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   19385             :   return NULL;
   19386             : }
   19387             : 
   19388             : 
   19389           6 : SWIGINTERN PyObject *_wrap_Driver_TestCapability(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19390           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19391           6 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   19392           6 :   char *arg2 = (char *) 0 ;
   19393           6 :   void *argp1 = 0 ;
   19394           6 :   int res1 = 0 ;
   19395           6 :   int res2 ;
   19396           6 :   char *buf2 = 0 ;
   19397           6 :   int alloc2 = 0 ;
   19398           6 :   PyObject *swig_obj[2] ;
   19399           6 :   bool result;
   19400             :   
   19401           6 :   if (!SWIG_Python_UnpackTuple(args, "Driver_TestCapability", 2, 2, swig_obj)) SWIG_fail;
   19402           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   19403           6 :   if (!SWIG_IsOK(res1)) {
   19404           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_TestCapability" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   19405             :   }
   19406           6 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   19407           6 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   19408           6 :   if (!SWIG_IsOK(res2)) {
   19409           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Driver_TestCapability" "', argument " "2"" of type '" "char const *""'");
   19410             :   }
   19411           6 :   arg2 = reinterpret_cast< char * >(buf2);
   19412           6 :   {
   19413           6 :     const int bLocalUseExceptions = GetUseExceptions();
   19414           6 :     if ( bLocalUseExceptions ) {
   19415           4 :       pushErrorHandler();
   19416             :     }
   19417           6 :     {
   19418           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19419           6 :       result = (bool)GDALDriverShadow_TestCapability(arg1,(char const *)arg2);
   19420           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19421             :     }
   19422           6 :     if ( bLocalUseExceptions ) {
   19423           4 :       popErrorHandler();
   19424             :     }
   19425             : #ifndef SED_HACKS
   19426             :     if ( bLocalUseExceptions ) {
   19427             :       CPLErr eclass = CPLGetLastErrorType();
   19428             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19429             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19430             :       }
   19431             :     }
   19432             : #endif
   19433             :   }
   19434           6 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   19435           6 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   19436           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; } }
   19437             :   return resultobj;
   19438           0 : fail:
   19439           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   19440             :   return NULL;
   19441             : }
   19442             : 
   19443             : 
   19444          92 : SWIGINTERN PyObject *_wrap_Driver_Register(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19445          92 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19446          92 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   19447          92 :   void *argp1 = 0 ;
   19448          92 :   int res1 = 0 ;
   19449          92 :   PyObject *swig_obj[1] ;
   19450          92 :   int result;
   19451             :   
   19452          92 :   if (!args) SWIG_fail;
   19453          92 :   swig_obj[0] = args;
   19454          92 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   19455          92 :   if (!SWIG_IsOK(res1)) {
   19456           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Register" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   19457             :   }
   19458          92 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   19459          92 :   {
   19460          92 :     const int bLocalUseExceptions = GetUseExceptions();
   19461          92 :     if ( bLocalUseExceptions ) {
   19462          16 :       pushErrorHandler();
   19463             :     }
   19464          92 :     {
   19465          92 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19466          92 :       result = (int)GDALDriverShadow_Register(arg1);
   19467          92 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19468             :     }
   19469          92 :     if ( bLocalUseExceptions ) {
   19470          16 :       popErrorHandler();
   19471             :     }
   19472             : #ifndef SED_HACKS
   19473             :     if ( bLocalUseExceptions ) {
   19474             :       CPLErr eclass = CPLGetLastErrorType();
   19475             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19476             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19477             :       }
   19478             :     }
   19479             : #endif
   19480             :   }
   19481          92 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19482          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; } }
   19483             :   return resultobj;
   19484             : fail:
   19485             :   return NULL;
   19486             : }
   19487             : 
   19488             : 
   19489          92 : SWIGINTERN PyObject *_wrap_Driver_Deregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19490          92 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19491          92 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
   19492          92 :   void *argp1 = 0 ;
   19493          92 :   int res1 = 0 ;
   19494          92 :   PyObject *swig_obj[1] ;
   19495             :   
   19496          92 :   if (!args) SWIG_fail;
   19497          92 :   swig_obj[0] = args;
   19498          92 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   19499          92 :   if (!SWIG_IsOK(res1)) {
   19500           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Deregister" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
   19501             :   }
   19502          92 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
   19503          92 :   {
   19504          92 :     const int bLocalUseExceptions = GetUseExceptions();
   19505          92 :     if ( bLocalUseExceptions ) {
   19506          16 :       pushErrorHandler();
   19507             :     }
   19508          92 :     {
   19509          92 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19510          92 :       GDALDriverShadow_Deregister(arg1);
   19511          92 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19512             :     }
   19513          92 :     if ( bLocalUseExceptions ) {
   19514          16 :       popErrorHandler();
   19515             :     }
   19516             : #ifndef SED_HACKS
   19517             :     if ( bLocalUseExceptions ) {
   19518             :       CPLErr eclass = CPLGetLastErrorType();
   19519             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19520             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19521             :       }
   19522             :     }
   19523             : #endif
   19524             :   }
   19525          92 :   resultobj = SWIG_Py_Void();
   19526          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; } }
   19527             :   return resultobj;
   19528             : fail:
   19529             :   return NULL;
   19530             : }
   19531             : 
   19532             : 
   19533         277 : SWIGINTERN PyObject *Driver_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19534         277 :   PyObject *obj;
   19535         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   19536         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALDriverShadow, SWIG_NewClientData(obj));
   19537         277 :   return SWIG_Py_Void();
   19538             : }
   19539             : 
   19540           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19541           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19542           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   19543           0 :   short arg2 ;
   19544           0 :   GDALColorEntry ce1 ;
   19545           0 :   short val2 ;
   19546           0 :   int ecode2 = 0 ;
   19547           0 :   PyObject *swig_obj[2] ;
   19548             :   
   19549           0 :   if (!SWIG_Python_UnpackTuple(args, "ColorEntry_c1_set", 2, 2, swig_obj)) SWIG_fail;
   19550           0 :   {
   19551             :     /* %typemap(in) GDALColorEntry* */
   19552           0 :     ce1.c4 = 255;
   19553           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   19554           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19555           0 :       SWIG_fail;
   19556             :     }
   19557           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   19558           0 :     if ( size > 4 ) {
   19559           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   19560           0 :       SWIG_fail;
   19561             :     }
   19562           0 :     if ( size < 3 ) {
   19563           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   19564           0 :       SWIG_fail;
   19565             :     }
   19566           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   19567           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   19568           0 :       SWIG_fail;
   19569             :     }
   19570           0 :     arg1 = &ce1;
   19571             :   }
   19572           0 :   ecode2 = SWIG_AsVal_short(swig_obj[1], &val2);
   19573           0 :   if (!SWIG_IsOK(ecode2)) {
   19574           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c1_set" "', argument " "2"" of type '" "short""'");
   19575             :   } 
   19576           0 :   arg2 = static_cast< short >(val2);
   19577           0 :   {
   19578           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19579           0 :     if (arg1) (arg1)->c1 = arg2;
   19580           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   19581             :   }
   19582           0 :   resultobj = SWIG_Py_Void();
   19583           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; } }
   19584             :   return resultobj;
   19585             : fail:
   19586             :   return NULL;
   19587             : }
   19588             : 
   19589             : 
   19590           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19591           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19592           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   19593           0 :   GDALColorEntry ce1 ;
   19594           0 :   PyObject *swig_obj[1] ;
   19595           0 :   short result;
   19596             :   
   19597           0 :   if (!args) SWIG_fail;
   19598           0 :   swig_obj[0] = args;
   19599           0 :   {
   19600             :     /* %typemap(in) GDALColorEntry* */
   19601           0 :     ce1.c4 = 255;
   19602           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   19603           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19604           0 :       SWIG_fail;
   19605             :     }
   19606           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   19607           0 :     if ( size > 4 ) {
   19608           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   19609           0 :       SWIG_fail;
   19610             :     }
   19611           0 :     if ( size < 3 ) {
   19612           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   19613           0 :       SWIG_fail;
   19614             :     }
   19615           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   19616           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   19617           0 :       SWIG_fail;
   19618             :     }
   19619           0 :     arg1 = &ce1;
   19620             :   }
   19621           0 :   {
   19622           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19623           0 :     result = (short) ((arg1)->c1);
   19624           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   19625             :   }
   19626           0 :   resultobj = SWIG_From_short(static_cast< short >(result));
   19627           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; } }
   19628             :   return resultobj;
   19629             : fail:
   19630             :   return NULL;
   19631             : }
   19632             : 
   19633             : 
   19634           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c2_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19635           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19636           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   19637           0 :   short arg2 ;
   19638           0 :   GDALColorEntry ce1 ;
   19639           0 :   short val2 ;
   19640           0 :   int ecode2 = 0 ;
   19641           0 :   PyObject *swig_obj[2] ;
   19642             :   
   19643           0 :   if (!SWIG_Python_UnpackTuple(args, "ColorEntry_c2_set", 2, 2, swig_obj)) SWIG_fail;
   19644           0 :   {
   19645             :     /* %typemap(in) GDALColorEntry* */
   19646           0 :     ce1.c4 = 255;
   19647           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   19648           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19649           0 :       SWIG_fail;
   19650             :     }
   19651           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   19652           0 :     if ( size > 4 ) {
   19653           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   19654           0 :       SWIG_fail;
   19655             :     }
   19656           0 :     if ( size < 3 ) {
   19657           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   19658           0 :       SWIG_fail;
   19659             :     }
   19660           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   19661           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   19662           0 :       SWIG_fail;
   19663             :     }
   19664           0 :     arg1 = &ce1;
   19665             :   }
   19666           0 :   ecode2 = SWIG_AsVal_short(swig_obj[1], &val2);
   19667           0 :   if (!SWIG_IsOK(ecode2)) {
   19668           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c2_set" "', argument " "2"" of type '" "short""'");
   19669             :   } 
   19670           0 :   arg2 = static_cast< short >(val2);
   19671           0 :   {
   19672           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19673           0 :     if (arg1) (arg1)->c2 = arg2;
   19674           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   19675             :   }
   19676           0 :   resultobj = SWIG_Py_Void();
   19677           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; } }
   19678             :   return resultobj;
   19679             : fail:
   19680             :   return NULL;
   19681             : }
   19682             : 
   19683             : 
   19684           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c2_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19685           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19686           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   19687           0 :   GDALColorEntry ce1 ;
   19688           0 :   PyObject *swig_obj[1] ;
   19689           0 :   short result;
   19690             :   
   19691           0 :   if (!args) SWIG_fail;
   19692           0 :   swig_obj[0] = args;
   19693           0 :   {
   19694             :     /* %typemap(in) GDALColorEntry* */
   19695           0 :     ce1.c4 = 255;
   19696           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   19697           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19698           0 :       SWIG_fail;
   19699             :     }
   19700           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   19701           0 :     if ( size > 4 ) {
   19702           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   19703           0 :       SWIG_fail;
   19704             :     }
   19705           0 :     if ( size < 3 ) {
   19706           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   19707           0 :       SWIG_fail;
   19708             :     }
   19709           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   19710           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   19711           0 :       SWIG_fail;
   19712             :     }
   19713           0 :     arg1 = &ce1;
   19714             :   }
   19715           0 :   {
   19716           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19717           0 :     result = (short) ((arg1)->c2);
   19718           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   19719             :   }
   19720           0 :   resultobj = SWIG_From_short(static_cast< short >(result));
   19721           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; } }
   19722             :   return resultobj;
   19723             : fail:
   19724             :   return NULL;
   19725             : }
   19726             : 
   19727             : 
   19728           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c3_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19729           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19730           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   19731           0 :   short arg2 ;
   19732           0 :   GDALColorEntry ce1 ;
   19733           0 :   short val2 ;
   19734           0 :   int ecode2 = 0 ;
   19735           0 :   PyObject *swig_obj[2] ;
   19736             :   
   19737           0 :   if (!SWIG_Python_UnpackTuple(args, "ColorEntry_c3_set", 2, 2, swig_obj)) SWIG_fail;
   19738           0 :   {
   19739             :     /* %typemap(in) GDALColorEntry* */
   19740           0 :     ce1.c4 = 255;
   19741           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   19742           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19743           0 :       SWIG_fail;
   19744             :     }
   19745           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   19746           0 :     if ( size > 4 ) {
   19747           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   19748           0 :       SWIG_fail;
   19749             :     }
   19750           0 :     if ( size < 3 ) {
   19751           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   19752           0 :       SWIG_fail;
   19753             :     }
   19754           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   19755           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   19756           0 :       SWIG_fail;
   19757             :     }
   19758           0 :     arg1 = &ce1;
   19759             :   }
   19760           0 :   ecode2 = SWIG_AsVal_short(swig_obj[1], &val2);
   19761           0 :   if (!SWIG_IsOK(ecode2)) {
   19762           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c3_set" "', argument " "2"" of type '" "short""'");
   19763             :   } 
   19764           0 :   arg2 = static_cast< short >(val2);
   19765           0 :   {
   19766           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19767           0 :     if (arg1) (arg1)->c3 = arg2;
   19768           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   19769             :   }
   19770           0 :   resultobj = SWIG_Py_Void();
   19771           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; } }
   19772             :   return resultobj;
   19773             : fail:
   19774             :   return NULL;
   19775             : }
   19776             : 
   19777             : 
   19778           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c3_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19779           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19780           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   19781           0 :   GDALColorEntry ce1 ;
   19782           0 :   PyObject *swig_obj[1] ;
   19783           0 :   short result;
   19784             :   
   19785           0 :   if (!args) SWIG_fail;
   19786           0 :   swig_obj[0] = args;
   19787           0 :   {
   19788             :     /* %typemap(in) GDALColorEntry* */
   19789           0 :     ce1.c4 = 255;
   19790           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   19791           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19792           0 :       SWIG_fail;
   19793             :     }
   19794           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   19795           0 :     if ( size > 4 ) {
   19796           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   19797           0 :       SWIG_fail;
   19798             :     }
   19799           0 :     if ( size < 3 ) {
   19800           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   19801           0 :       SWIG_fail;
   19802             :     }
   19803           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   19804           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   19805           0 :       SWIG_fail;
   19806             :     }
   19807           0 :     arg1 = &ce1;
   19808             :   }
   19809           0 :   {
   19810           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19811           0 :     result = (short) ((arg1)->c3);
   19812           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   19813             :   }
   19814           0 :   resultobj = SWIG_From_short(static_cast< short >(result));
   19815           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; } }
   19816             :   return resultobj;
   19817             : fail:
   19818             :   return NULL;
   19819             : }
   19820             : 
   19821             : 
   19822           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c4_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19823           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19824           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   19825           0 :   short arg2 ;
   19826           0 :   GDALColorEntry ce1 ;
   19827           0 :   short val2 ;
   19828           0 :   int ecode2 = 0 ;
   19829           0 :   PyObject *swig_obj[2] ;
   19830             :   
   19831           0 :   if (!SWIG_Python_UnpackTuple(args, "ColorEntry_c4_set", 2, 2, swig_obj)) SWIG_fail;
   19832           0 :   {
   19833             :     /* %typemap(in) GDALColorEntry* */
   19834           0 :     ce1.c4 = 255;
   19835           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   19836           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19837           0 :       SWIG_fail;
   19838             :     }
   19839           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   19840           0 :     if ( size > 4 ) {
   19841           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   19842           0 :       SWIG_fail;
   19843             :     }
   19844           0 :     if ( size < 3 ) {
   19845           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   19846           0 :       SWIG_fail;
   19847             :     }
   19848           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   19849           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   19850           0 :       SWIG_fail;
   19851             :     }
   19852           0 :     arg1 = &ce1;
   19853             :   }
   19854           0 :   ecode2 = SWIG_AsVal_short(swig_obj[1], &val2);
   19855           0 :   if (!SWIG_IsOK(ecode2)) {
   19856           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c4_set" "', argument " "2"" of type '" "short""'");
   19857             :   } 
   19858           0 :   arg2 = static_cast< short >(val2);
   19859           0 :   {
   19860           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19861           0 :     if (arg1) (arg1)->c4 = arg2;
   19862           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   19863             :   }
   19864           0 :   resultobj = SWIG_Py_Void();
   19865           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; } }
   19866             :   return resultobj;
   19867             : fail:
   19868             :   return NULL;
   19869             : }
   19870             : 
   19871             : 
   19872           0 : SWIGINTERN PyObject *_wrap_ColorEntry_c4_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19873           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19874           0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
   19875           0 :   GDALColorEntry ce1 ;
   19876           0 :   PyObject *swig_obj[1] ;
   19877           0 :   short result;
   19878             :   
   19879           0 :   if (!args) SWIG_fail;
   19880           0 :   swig_obj[0] = args;
   19881           0 :   {
   19882             :     /* %typemap(in) GDALColorEntry* */
   19883           0 :     ce1.c4 = 255;
   19884           0 :     if (! PySequence_Check(swig_obj[0]) ) {
   19885           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19886           0 :       SWIG_fail;
   19887             :     }
   19888           0 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   19889           0 :     if ( size > 4 ) {
   19890           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   19891           0 :       SWIG_fail;
   19892             :     }
   19893           0 :     if ( size < 3 ) {
   19894           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   19895           0 :       SWIG_fail;
   19896             :     }
   19897           0 :     if ( !PyArg_ParseTuple( swig_obj[0],"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
   19898           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   19899           0 :       SWIG_fail;
   19900             :     }
   19901           0 :     arg1 = &ce1;
   19902             :   }
   19903           0 :   {
   19904           0 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19905           0 :     result = (short) ((arg1)->c4);
   19906           0 :     SWIG_PYTHON_THREAD_END_ALLOW;
   19907             :   }
   19908           0 :   resultobj = SWIG_From_short(static_cast< short >(result));
   19909           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; } }
   19910             :   return resultobj;
   19911             : fail:
   19912             :   return NULL;
   19913             : }
   19914             : 
   19915             : 
   19916         277 : SWIGINTERN PyObject *ColorEntry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19917         277 :   PyObject *obj;
   19918         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   19919         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALColorEntry, SWIG_NewClientData(obj));
   19920         277 :   return SWIG_Py_Void();
   19921             : }
   19922             : 
   19923          92 : SWIGINTERN PyObject *_wrap_GCP_GCPX_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19924          92 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19925          92 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   19926          92 :   double arg2 ;
   19927          92 :   void *argp1 = 0 ;
   19928          92 :   int res1 = 0 ;
   19929          92 :   double val2 ;
   19930          92 :   int ecode2 = 0 ;
   19931          92 :   PyObject *swig_obj[2] ;
   19932             :   
   19933          92 :   if (!SWIG_Python_UnpackTuple(args, "GCP_GCPX_set", 2, 2, swig_obj)) SWIG_fail;
   19934          92 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   19935          92 :   if (!SWIG_IsOK(res1)) {
   19936           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPX_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   19937             :   }
   19938          92 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   19939          92 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   19940          92 :   if (!SWIG_IsOK(ecode2)) {
   19941           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPX_set" "', argument " "2"" of type '" "double""'");
   19942             :   } 
   19943          92 :   arg2 = static_cast< double >(val2);
   19944          92 :   {
   19945          92 :     const int bLocalUseExceptions = GetUseExceptions();
   19946          92 :     if ( bLocalUseExceptions ) {
   19947          91 :       pushErrorHandler();
   19948             :     }
   19949          92 :     {
   19950          92 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19951          92 :       GDAL_GCP_GCPX_set(arg1,arg2);
   19952          92 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19953             :     }
   19954          92 :     if ( bLocalUseExceptions ) {
   19955          91 :       popErrorHandler();
   19956             :     }
   19957             : #ifndef SED_HACKS
   19958             :     if ( bLocalUseExceptions ) {
   19959             :       CPLErr eclass = CPLGetLastErrorType();
   19960             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19961             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19962             :       }
   19963             :     }
   19964             : #endif
   19965             :   }
   19966          92 :   resultobj = SWIG_Py_Void();
   19967          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; } }
   19968             :   return resultobj;
   19969             : fail:
   19970             :   return NULL;
   19971             : }
   19972             : 
   19973             : 
   19974        2205 : SWIGINTERN PyObject *_wrap_GCP_GCPX_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19975        2205 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   19976        2205 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   19977        2205 :   void *argp1 = 0 ;
   19978        2205 :   int res1 = 0 ;
   19979        2205 :   PyObject *swig_obj[1] ;
   19980        2205 :   double result;
   19981             :   
   19982        2205 :   if (!args) SWIG_fail;
   19983        2205 :   swig_obj[0] = args;
   19984        2205 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   19985        2205 :   if (!SWIG_IsOK(res1)) {
   19986           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPX_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   19987             :   }
   19988        2205 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   19989        2205 :   {
   19990        2205 :     const int bLocalUseExceptions = GetUseExceptions();
   19991        2205 :     if ( bLocalUseExceptions ) {
   19992        2182 :       pushErrorHandler();
   19993             :     }
   19994        2205 :     {
   19995        2205 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   19996        2205 :       result = (double)GDAL_GCP_GCPX_get(arg1);
   19997        2205 :       SWIG_PYTHON_THREAD_END_ALLOW;
   19998             :     }
   19999        2205 :     if ( bLocalUseExceptions ) {
   20000        2182 :       popErrorHandler();
   20001             :     }
   20002             : #ifndef SED_HACKS
   20003             :     if ( bLocalUseExceptions ) {
   20004             :       CPLErr eclass = CPLGetLastErrorType();
   20005             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20006             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20007             :       }
   20008             :     }
   20009             : #endif
   20010             :   }
   20011        2205 :   resultobj = SWIG_From_double(static_cast< double >(result));
   20012        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; } }
   20013             :   return resultobj;
   20014             : fail:
   20015             :   return NULL;
   20016             : }
   20017             : 
   20018             : 
   20019          92 : SWIGINTERN PyObject *_wrap_GCP_GCPY_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20020          92 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20021          92 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20022          92 :   double arg2 ;
   20023          92 :   void *argp1 = 0 ;
   20024          92 :   int res1 = 0 ;
   20025          92 :   double val2 ;
   20026          92 :   int ecode2 = 0 ;
   20027          92 :   PyObject *swig_obj[2] ;
   20028             :   
   20029          92 :   if (!SWIG_Python_UnpackTuple(args, "GCP_GCPY_set", 2, 2, swig_obj)) SWIG_fail;
   20030          92 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20031          92 :   if (!SWIG_IsOK(res1)) {
   20032           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPY_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20033             :   }
   20034          92 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20035          92 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   20036          92 :   if (!SWIG_IsOK(ecode2)) {
   20037           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPY_set" "', argument " "2"" of type '" "double""'");
   20038             :   } 
   20039          92 :   arg2 = static_cast< double >(val2);
   20040          92 :   {
   20041          92 :     const int bLocalUseExceptions = GetUseExceptions();
   20042          92 :     if ( bLocalUseExceptions ) {
   20043          91 :       pushErrorHandler();
   20044             :     }
   20045          92 :     {
   20046          92 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20047          92 :       GDAL_GCP_GCPY_set(arg1,arg2);
   20048          92 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20049             :     }
   20050          92 :     if ( bLocalUseExceptions ) {
   20051          91 :       popErrorHandler();
   20052             :     }
   20053             : #ifndef SED_HACKS
   20054             :     if ( bLocalUseExceptions ) {
   20055             :       CPLErr eclass = CPLGetLastErrorType();
   20056             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20057             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20058             :       }
   20059             :     }
   20060             : #endif
   20061             :   }
   20062          92 :   resultobj = SWIG_Py_Void();
   20063          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; } }
   20064             :   return resultobj;
   20065             : fail:
   20066             :   return NULL;
   20067             : }
   20068             : 
   20069             : 
   20070        2205 : SWIGINTERN PyObject *_wrap_GCP_GCPY_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20071        2205 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20072        2205 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20073        2205 :   void *argp1 = 0 ;
   20074        2205 :   int res1 = 0 ;
   20075        2205 :   PyObject *swig_obj[1] ;
   20076        2205 :   double result;
   20077             :   
   20078        2205 :   if (!args) SWIG_fail;
   20079        2205 :   swig_obj[0] = args;
   20080        2205 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20081        2205 :   if (!SWIG_IsOK(res1)) {
   20082           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPY_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20083             :   }
   20084        2205 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20085        2205 :   {
   20086        2205 :     const int bLocalUseExceptions = GetUseExceptions();
   20087        2205 :     if ( bLocalUseExceptions ) {
   20088        2182 :       pushErrorHandler();
   20089             :     }
   20090        2205 :     {
   20091        2205 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20092        2205 :       result = (double)GDAL_GCP_GCPY_get(arg1);
   20093        2205 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20094             :     }
   20095        2205 :     if ( bLocalUseExceptions ) {
   20096        2182 :       popErrorHandler();
   20097             :     }
   20098             : #ifndef SED_HACKS
   20099             :     if ( bLocalUseExceptions ) {
   20100             :       CPLErr eclass = CPLGetLastErrorType();
   20101             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20102             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20103             :       }
   20104             :     }
   20105             : #endif
   20106             :   }
   20107        2205 :   resultobj = SWIG_From_double(static_cast< double >(result));
   20108        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; } }
   20109             :   return resultobj;
   20110             : fail:
   20111             :   return NULL;
   20112             : }
   20113             : 
   20114             : 
   20115           0 : SWIGINTERN PyObject *_wrap_GCP_GCPZ_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20116           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20117           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20118           0 :   double arg2 ;
   20119           0 :   void *argp1 = 0 ;
   20120           0 :   int res1 = 0 ;
   20121           0 :   double val2 ;
   20122           0 :   int ecode2 = 0 ;
   20123           0 :   PyObject *swig_obj[2] ;
   20124             :   
   20125           0 :   if (!SWIG_Python_UnpackTuple(args, "GCP_GCPZ_set", 2, 2, swig_obj)) SWIG_fail;
   20126           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20127           0 :   if (!SWIG_IsOK(res1)) {
   20128           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPZ_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20129             :   }
   20130           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20131           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   20132           0 :   if (!SWIG_IsOK(ecode2)) {
   20133           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPZ_set" "', argument " "2"" of type '" "double""'");
   20134             :   } 
   20135           0 :   arg2 = static_cast< double >(val2);
   20136           0 :   {
   20137           0 :     const int bLocalUseExceptions = GetUseExceptions();
   20138           0 :     if ( bLocalUseExceptions ) {
   20139           0 :       pushErrorHandler();
   20140             :     }
   20141           0 :     {
   20142           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20143           0 :       GDAL_GCP_GCPZ_set(arg1,arg2);
   20144           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20145             :     }
   20146           0 :     if ( bLocalUseExceptions ) {
   20147           0 :       popErrorHandler();
   20148             :     }
   20149             : #ifndef SED_HACKS
   20150             :     if ( bLocalUseExceptions ) {
   20151             :       CPLErr eclass = CPLGetLastErrorType();
   20152             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20153             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20154             :       }
   20155             :     }
   20156             : #endif
   20157             :   }
   20158           0 :   resultobj = SWIG_Py_Void();
   20159           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; } }
   20160             :   return resultobj;
   20161             : fail:
   20162             :   return NULL;
   20163             : }
   20164             : 
   20165             : 
   20166          42 : SWIGINTERN PyObject *_wrap_GCP_GCPZ_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20167          42 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20168          42 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20169          42 :   void *argp1 = 0 ;
   20170          42 :   int res1 = 0 ;
   20171          42 :   PyObject *swig_obj[1] ;
   20172          42 :   double result;
   20173             :   
   20174          42 :   if (!args) SWIG_fail;
   20175          42 :   swig_obj[0] = args;
   20176          42 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20177          42 :   if (!SWIG_IsOK(res1)) {
   20178           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPZ_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20179             :   }
   20180          42 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20181          42 :   {
   20182          42 :     const int bLocalUseExceptions = GetUseExceptions();
   20183          42 :     if ( bLocalUseExceptions ) {
   20184          29 :       pushErrorHandler();
   20185             :     }
   20186          42 :     {
   20187          42 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20188          42 :       result = (double)GDAL_GCP_GCPZ_get(arg1);
   20189          42 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20190             :     }
   20191          42 :     if ( bLocalUseExceptions ) {
   20192          29 :       popErrorHandler();
   20193             :     }
   20194             : #ifndef SED_HACKS
   20195             :     if ( bLocalUseExceptions ) {
   20196             :       CPLErr eclass = CPLGetLastErrorType();
   20197             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20198             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20199             :       }
   20200             :     }
   20201             : #endif
   20202             :   }
   20203          42 :   resultobj = SWIG_From_double(static_cast< double >(result));
   20204          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; } }
   20205             :   return resultobj;
   20206             : fail:
   20207             :   return NULL;
   20208             : }
   20209             : 
   20210             : 
   20211         100 : SWIGINTERN PyObject *_wrap_GCP_GCPPixel_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20212         100 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20213         100 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20214         100 :   double arg2 ;
   20215         100 :   void *argp1 = 0 ;
   20216         100 :   int res1 = 0 ;
   20217         100 :   double val2 ;
   20218         100 :   int ecode2 = 0 ;
   20219         100 :   PyObject *swig_obj[2] ;
   20220             :   
   20221         100 :   if (!SWIG_Python_UnpackTuple(args, "GCP_GCPPixel_set", 2, 2, swig_obj)) SWIG_fail;
   20222         100 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20223         100 :   if (!SWIG_IsOK(res1)) {
   20224           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPPixel_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20225             :   }
   20226         100 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20227         100 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   20228         100 :   if (!SWIG_IsOK(ecode2)) {
   20229           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPPixel_set" "', argument " "2"" of type '" "double""'");
   20230             :   } 
   20231         100 :   arg2 = static_cast< double >(val2);
   20232         100 :   {
   20233         100 :     const int bLocalUseExceptions = GetUseExceptions();
   20234         100 :     if ( bLocalUseExceptions ) {
   20235          99 :       pushErrorHandler();
   20236             :     }
   20237         100 :     {
   20238         100 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20239         100 :       GDAL_GCP_GCPPixel_set(arg1,arg2);
   20240         100 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20241             :     }
   20242         100 :     if ( bLocalUseExceptions ) {
   20243          99 :       popErrorHandler();
   20244             :     }
   20245             : #ifndef SED_HACKS
   20246             :     if ( bLocalUseExceptions ) {
   20247             :       CPLErr eclass = CPLGetLastErrorType();
   20248             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20249             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20250             :       }
   20251             :     }
   20252             : #endif
   20253             :   }
   20254         100 :   resultobj = SWIG_Py_Void();
   20255         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; } }
   20256             :   return resultobj;
   20257             : fail:
   20258             :   return NULL;
   20259             : }
   20260             : 
   20261             : 
   20262        8554 : SWIGINTERN PyObject *_wrap_GCP_GCPPixel_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20263        8554 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20264        8554 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20265        8554 :   void *argp1 = 0 ;
   20266        8554 :   int res1 = 0 ;
   20267        8554 :   PyObject *swig_obj[1] ;
   20268        8554 :   double result;
   20269             :   
   20270        8554 :   if (!args) SWIG_fail;
   20271        8554 :   swig_obj[0] = args;
   20272        8554 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20273        8554 :   if (!SWIG_IsOK(res1)) {
   20274           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPPixel_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20275             :   }
   20276        8554 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20277        8554 :   {
   20278        8554 :     const int bLocalUseExceptions = GetUseExceptions();
   20279        8554 :     if ( bLocalUseExceptions ) {
   20280        8531 :       pushErrorHandler();
   20281             :     }
   20282        8554 :     {
   20283        8554 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20284        8554 :       result = (double)GDAL_GCP_GCPPixel_get(arg1);
   20285        8554 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20286             :     }
   20287        8554 :     if ( bLocalUseExceptions ) {
   20288        8531 :       popErrorHandler();
   20289             :     }
   20290             : #ifndef SED_HACKS
   20291             :     if ( bLocalUseExceptions ) {
   20292             :       CPLErr eclass = CPLGetLastErrorType();
   20293             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20294             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20295             :       }
   20296             :     }
   20297             : #endif
   20298             :   }
   20299        8554 :   resultobj = SWIG_From_double(static_cast< double >(result));
   20300        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; } }
   20301             :   return resultobj;
   20302             : fail:
   20303             :   return NULL;
   20304             : }
   20305             : 
   20306             : 
   20307         100 : SWIGINTERN PyObject *_wrap_GCP_GCPLine_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20308         100 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20309         100 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20310         100 :   double arg2 ;
   20311         100 :   void *argp1 = 0 ;
   20312         100 :   int res1 = 0 ;
   20313         100 :   double val2 ;
   20314         100 :   int ecode2 = 0 ;
   20315         100 :   PyObject *swig_obj[2] ;
   20316             :   
   20317         100 :   if (!SWIG_Python_UnpackTuple(args, "GCP_GCPLine_set", 2, 2, swig_obj)) SWIG_fail;
   20318         100 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20319         100 :   if (!SWIG_IsOK(res1)) {
   20320           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPLine_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20321             :   }
   20322         100 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20323         100 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   20324         100 :   if (!SWIG_IsOK(ecode2)) {
   20325           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPLine_set" "', argument " "2"" of type '" "double""'");
   20326             :   } 
   20327         100 :   arg2 = static_cast< double >(val2);
   20328         100 :   {
   20329         100 :     const int bLocalUseExceptions = GetUseExceptions();
   20330         100 :     if ( bLocalUseExceptions ) {
   20331          99 :       pushErrorHandler();
   20332             :     }
   20333         100 :     {
   20334         100 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20335         100 :       GDAL_GCP_GCPLine_set(arg1,arg2);
   20336         100 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20337             :     }
   20338         100 :     if ( bLocalUseExceptions ) {
   20339          99 :       popErrorHandler();
   20340             :     }
   20341             : #ifndef SED_HACKS
   20342             :     if ( bLocalUseExceptions ) {
   20343             :       CPLErr eclass = CPLGetLastErrorType();
   20344             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20345             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20346             :       }
   20347             :     }
   20348             : #endif
   20349             :   }
   20350         100 :   resultobj = SWIG_Py_Void();
   20351         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; } }
   20352             :   return resultobj;
   20353             : fail:
   20354             :   return NULL;
   20355             : }
   20356             : 
   20357             : 
   20358        8554 : SWIGINTERN PyObject *_wrap_GCP_GCPLine_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20359        8554 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20360        8554 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20361        8554 :   void *argp1 = 0 ;
   20362        8554 :   int res1 = 0 ;
   20363        8554 :   PyObject *swig_obj[1] ;
   20364        8554 :   double result;
   20365             :   
   20366        8554 :   if (!args) SWIG_fail;
   20367        8554 :   swig_obj[0] = args;
   20368        8554 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20369        8554 :   if (!SWIG_IsOK(res1)) {
   20370           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPLine_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20371             :   }
   20372        8554 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20373        8554 :   {
   20374        8554 :     const int bLocalUseExceptions = GetUseExceptions();
   20375        8554 :     if ( bLocalUseExceptions ) {
   20376        8531 :       pushErrorHandler();
   20377             :     }
   20378        8554 :     {
   20379        8554 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20380        8554 :       result = (double)GDAL_GCP_GCPLine_get(arg1);
   20381        8554 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20382             :     }
   20383        8554 :     if ( bLocalUseExceptions ) {
   20384        8531 :       popErrorHandler();
   20385             :     }
   20386             : #ifndef SED_HACKS
   20387             :     if ( bLocalUseExceptions ) {
   20388             :       CPLErr eclass = CPLGetLastErrorType();
   20389             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20390             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20391             :       }
   20392             :     }
   20393             : #endif
   20394             :   }
   20395        8554 :   resultobj = SWIG_From_double(static_cast< double >(result));
   20396        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; } }
   20397             :   return resultobj;
   20398             : fail:
   20399             :   return NULL;
   20400             : }
   20401             : 
   20402             : 
   20403           1 : SWIGINTERN PyObject *_wrap_GCP_Info_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20404           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20405           1 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20406           1 :   char *arg2 = (char *) 0 ;
   20407           1 :   void *argp1 = 0 ;
   20408           1 :   int res1 = 0 ;
   20409           1 :   int res2 ;
   20410           1 :   char *buf2 = 0 ;
   20411           1 :   int alloc2 = 0 ;
   20412           1 :   PyObject *swig_obj[2] ;
   20413             :   
   20414           1 :   if (!SWIG_Python_UnpackTuple(args, "GCP_Info_set", 2, 2, swig_obj)) SWIG_fail;
   20415           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20416           1 :   if (!SWIG_IsOK(res1)) {
   20417           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Info_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20418             :   }
   20419           1 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20420           1 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   20421           1 :   if (!SWIG_IsOK(res2)) {
   20422           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GCP_Info_set" "', argument " "2"" of type '" "char *""'");
   20423             :   }
   20424           1 :   arg2 = reinterpret_cast< char * >(buf2);
   20425           1 :   {
   20426           1 :     const int bLocalUseExceptions = GetUseExceptions();
   20427           1 :     if ( bLocalUseExceptions ) {
   20428           1 :       pushErrorHandler();
   20429             :     }
   20430           1 :     {
   20431           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20432           1 :       GDAL_GCP_Info_set(arg1,arg2);
   20433           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20434             :     }
   20435           1 :     if ( bLocalUseExceptions ) {
   20436           1 :       popErrorHandler();
   20437             :     }
   20438             : #ifndef SED_HACKS
   20439             :     if ( bLocalUseExceptions ) {
   20440             :       CPLErr eclass = CPLGetLastErrorType();
   20441             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20442             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20443             :       }
   20444             :     }
   20445             : #endif
   20446             :   }
   20447           1 :   resultobj = SWIG_Py_Void();
   20448           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   20449           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; } }
   20450             :   return resultobj;
   20451           0 : fail:
   20452           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   20453             :   return NULL;
   20454             : }
   20455             : 
   20456             : 
   20457           9 : SWIGINTERN PyObject *_wrap_GCP_Info_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20458           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20459           9 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20460           9 :   void *argp1 = 0 ;
   20461           9 :   int res1 = 0 ;
   20462           9 :   PyObject *swig_obj[1] ;
   20463           9 :   char *result = 0 ;
   20464             :   
   20465           9 :   if (!args) SWIG_fail;
   20466           9 :   swig_obj[0] = args;
   20467           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20468           9 :   if (!SWIG_IsOK(res1)) {
   20469           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Info_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20470             :   }
   20471           9 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20472           9 :   {
   20473           9 :     const int bLocalUseExceptions = GetUseExceptions();
   20474           9 :     if ( bLocalUseExceptions ) {
   20475           5 :       pushErrorHandler();
   20476             :     }
   20477           9 :     {
   20478           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20479           9 :       result = (char *)GDAL_GCP_Info_get(arg1);
   20480           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20481             :     }
   20482           9 :     if ( bLocalUseExceptions ) {
   20483           5 :       popErrorHandler();
   20484             :     }
   20485             : #ifndef SED_HACKS
   20486             :     if ( bLocalUseExceptions ) {
   20487             :       CPLErr eclass = CPLGetLastErrorType();
   20488             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20489             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20490             :       }
   20491             :     }
   20492             : #endif
   20493             :   }
   20494           9 :   resultobj = SWIG_FromCharPtr((const char *)result);
   20495           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; } }
   20496             :   return resultobj;
   20497             : fail:
   20498             :   return NULL;
   20499             : }
   20500             : 
   20501             : 
   20502           1 : SWIGINTERN PyObject *_wrap_GCP_Id_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20503           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20504           1 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20505           1 :   char *arg2 = (char *) 0 ;
   20506           1 :   void *argp1 = 0 ;
   20507           1 :   int res1 = 0 ;
   20508           1 :   int res2 ;
   20509           1 :   char *buf2 = 0 ;
   20510           1 :   int alloc2 = 0 ;
   20511           1 :   PyObject *swig_obj[2] ;
   20512             :   
   20513           1 :   if (!SWIG_Python_UnpackTuple(args, "GCP_Id_set", 2, 2, swig_obj)) SWIG_fail;
   20514           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20515           1 :   if (!SWIG_IsOK(res1)) {
   20516           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Id_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20517             :   }
   20518           1 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20519           1 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   20520           1 :   if (!SWIG_IsOK(res2)) {
   20521           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GCP_Id_set" "', argument " "2"" of type '" "char *""'");
   20522             :   }
   20523           1 :   arg2 = reinterpret_cast< char * >(buf2);
   20524           1 :   {
   20525           1 :     const int bLocalUseExceptions = GetUseExceptions();
   20526           1 :     if ( bLocalUseExceptions ) {
   20527           1 :       pushErrorHandler();
   20528             :     }
   20529           1 :     {
   20530           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20531           1 :       GDAL_GCP_Id_set(arg1,arg2);
   20532           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20533             :     }
   20534           1 :     if ( bLocalUseExceptions ) {
   20535           1 :       popErrorHandler();
   20536             :     }
   20537             : #ifndef SED_HACKS
   20538             :     if ( bLocalUseExceptions ) {
   20539             :       CPLErr eclass = CPLGetLastErrorType();
   20540             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20541             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20542             :       }
   20543             :     }
   20544             : #endif
   20545             :   }
   20546           1 :   resultobj = SWIG_Py_Void();
   20547           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   20548           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; } }
   20549             :   return resultobj;
   20550           0 : fail:
   20551           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   20552             :   return NULL;
   20553             : }
   20554             : 
   20555             : 
   20556           9 : SWIGINTERN PyObject *_wrap_GCP_Id_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20557           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20558           9 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20559           9 :   void *argp1 = 0 ;
   20560           9 :   int res1 = 0 ;
   20561           9 :   PyObject *swig_obj[1] ;
   20562           9 :   char *result = 0 ;
   20563             :   
   20564           9 :   if (!args) SWIG_fail;
   20565           9 :   swig_obj[0] = args;
   20566           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20567           9 :   if (!SWIG_IsOK(res1)) {
   20568           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Id_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20569             :   }
   20570           9 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20571           9 :   {
   20572           9 :     const int bLocalUseExceptions = GetUseExceptions();
   20573           9 :     if ( bLocalUseExceptions ) {
   20574           5 :       pushErrorHandler();
   20575             :     }
   20576           9 :     {
   20577           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20578           9 :       result = (char *)GDAL_GCP_Id_get(arg1);
   20579           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20580             :     }
   20581           9 :     if ( bLocalUseExceptions ) {
   20582           5 :       popErrorHandler();
   20583             :     }
   20584             : #ifndef SED_HACKS
   20585             :     if ( bLocalUseExceptions ) {
   20586             :       CPLErr eclass = CPLGetLastErrorType();
   20587             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20588             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20589             :       }
   20590             :     }
   20591             : #endif
   20592             :   }
   20593           9 :   resultobj = SWIG_FromCharPtr((const char *)result);
   20594           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; } }
   20595             :   return resultobj;
   20596             : fail:
   20597             :   return NULL;
   20598             : }
   20599             : 
   20600             : 
   20601         130 : SWIGINTERN PyObject *_wrap_new_GCP(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20602         130 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20603         130 :   double arg1 = (double) 0.0 ;
   20604         130 :   double arg2 = (double) 0.0 ;
   20605         130 :   double arg3 = (double) 0.0 ;
   20606         130 :   double arg4 = (double) 0.0 ;
   20607         130 :   double arg5 = (double) 0.0 ;
   20608         130 :   char *arg6 = (char *) "" ;
   20609         130 :   char *arg7 = (char *) "" ;
   20610         130 :   double val1 ;
   20611         130 :   int ecode1 = 0 ;
   20612         130 :   double val2 ;
   20613         130 :   int ecode2 = 0 ;
   20614         130 :   double val3 ;
   20615         130 :   int ecode3 = 0 ;
   20616         130 :   double val4 ;
   20617         130 :   int ecode4 = 0 ;
   20618         130 :   double val5 ;
   20619         130 :   int ecode5 = 0 ;
   20620         130 :   int res6 ;
   20621         130 :   char *buf6 = 0 ;
   20622         130 :   int alloc6 = 0 ;
   20623         130 :   int res7 ;
   20624         130 :   char *buf7 = 0 ;
   20625         130 :   int alloc7 = 0 ;
   20626         130 :   PyObject *swig_obj[7] ;
   20627         130 :   GDAL_GCP *result = 0 ;
   20628             :   
   20629         130 :   if (!SWIG_Python_UnpackTuple(args, "new_GCP", 0, 7, swig_obj)) SWIG_fail;
   20630         130 :   if (swig_obj[0]) {
   20631          38 :     ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
   20632          38 :     if (!SWIG_IsOK(ecode1)) {
   20633           0 :       SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GCP" "', argument " "1"" of type '" "double""'");
   20634             :     } 
   20635          38 :     arg1 = static_cast< double >(val1);
   20636             :   }
   20637         130 :   if (swig_obj[1]) {
   20638          38 :     ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   20639          38 :     if (!SWIG_IsOK(ecode2)) {
   20640           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GCP" "', argument " "2"" of type '" "double""'");
   20641             :     } 
   20642          38 :     arg2 = static_cast< double >(val2);
   20643             :   }
   20644         130 :   if (swig_obj[2]) {
   20645          38 :     ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   20646          38 :     if (!SWIG_IsOK(ecode3)) {
   20647           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_GCP" "', argument " "3"" of type '" "double""'");
   20648             :     } 
   20649          38 :     arg3 = static_cast< double >(val3);
   20650             :   }
   20651         130 :   if (swig_obj[3]) {
   20652          38 :     ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
   20653          38 :     if (!SWIG_IsOK(ecode4)) {
   20654           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_GCP" "', argument " "4"" of type '" "double""'");
   20655             :     } 
   20656          38 :     arg4 = static_cast< double >(val4);
   20657             :   }
   20658         130 :   if (swig_obj[4]) {
   20659          38 :     ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
   20660          38 :     if (!SWIG_IsOK(ecode5)) {
   20661           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_GCP" "', argument " "5"" of type '" "double""'");
   20662             :     } 
   20663          38 :     arg5 = static_cast< double >(val5);
   20664             :   }
   20665         130 :   if (swig_obj[5]) {
   20666           0 :     res6 = SWIG_AsCharPtrAndSize(swig_obj[5], &buf6, NULL, &alloc6);
   20667           0 :     if (!SWIG_IsOK(res6)) {
   20668           0 :       SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_GCP" "', argument " "6"" of type '" "char const *""'");
   20669             :     }
   20670           0 :     arg6 = reinterpret_cast< char * >(buf6);
   20671             :   }
   20672         130 :   if (swig_obj[6]) {
   20673           0 :     res7 = SWIG_AsCharPtrAndSize(swig_obj[6], &buf7, NULL, &alloc7);
   20674           0 :     if (!SWIG_IsOK(res7)) {
   20675           0 :       SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_GCP" "', argument " "7"" of type '" "char const *""'");
   20676             :     }
   20677           0 :     arg7 = reinterpret_cast< char * >(buf7);
   20678             :   }
   20679         130 :   {
   20680         130 :     const int bLocalUseExceptions = GetUseExceptions();
   20681         130 :     if ( bLocalUseExceptions ) {
   20682         119 :       pushErrorHandler();
   20683             :     }
   20684         130 :     {
   20685         130 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20686         130 :       result = (GDAL_GCP *)new_GDAL_GCP(arg1,arg2,arg3,arg4,arg5,(char const *)arg6,(char const *)arg7);
   20687         130 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20688             :     }
   20689         130 :     if ( bLocalUseExceptions ) {
   20690         119 :       popErrorHandler();
   20691             :     }
   20692             : #ifndef SED_HACKS
   20693             :     if ( bLocalUseExceptions ) {
   20694             :       CPLErr eclass = CPLGetLastErrorType();
   20695             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20696             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20697             :       }
   20698             :     }
   20699             : #endif
   20700             :   }
   20701         130 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_NEW |  0 );
   20702         130 :   if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
   20703         130 :   if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
   20704         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; } }
   20705             :   return resultobj;
   20706           0 : fail:
   20707           0 :   if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
   20708           0 :   if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
   20709             :   return NULL;
   20710             : }
   20711             : 
   20712             : 
   20713        3432 : SWIGINTERN PyObject *_wrap_delete_GCP(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20714        3432 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20715        3432 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20716        3432 :   void *argp1 = 0 ;
   20717        3432 :   int res1 = 0 ;
   20718        3432 :   PyObject *swig_obj[1] ;
   20719             :   
   20720        3432 :   if (!args) SWIG_fail;
   20721        3432 :   swig_obj[0] = args;
   20722        3432 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_DISOWN |  0 );
   20723        3432 :   if (!SWIG_IsOK(res1)) {
   20724           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GCP" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20725             :   }
   20726        3432 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20727        3432 :   {
   20728        3432 :     const int bLocalUseExceptions = GetUseExceptions();
   20729        3432 :     if ( bLocalUseExceptions ) {
   20730        3337 :       pushErrorHandler();
   20731             :     }
   20732        3432 :     {
   20733        3432 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20734        3432 :       delete_GDAL_GCP(arg1);
   20735        3432 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20736             :     }
   20737        3432 :     if ( bLocalUseExceptions ) {
   20738        3337 :       popErrorHandler();
   20739             :     }
   20740             : #ifndef SED_HACKS
   20741             :     if ( bLocalUseExceptions ) {
   20742             :       CPLErr eclass = CPLGetLastErrorType();
   20743             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20744             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20745             :       }
   20746             :     }
   20747             : #endif
   20748             :   }
   20749        3432 :   resultobj = SWIG_Py_Void();
   20750        3432 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   20751             :   return resultobj;
   20752             : fail:
   20753             :   return NULL;
   20754             : }
   20755             : 
   20756             : 
   20757         277 : SWIGINTERN PyObject *GCP_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20758         277 :   PyObject *obj;
   20759         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   20760         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDAL_GCP, SWIG_NewClientData(obj));
   20761         277 :   return SWIG_Py_Void();
   20762             : }
   20763             : 
   20764         130 : SWIGINTERN PyObject *GCP_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20765         130 :   return SWIG_Python_InitShadowInstance(args);
   20766             : }
   20767             : 
   20768           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPX_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20769           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20770           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20771           0 :   void *argp1 = 0 ;
   20772           0 :   int res1 = 0 ;
   20773           0 :   PyObject *swig_obj[1] ;
   20774           0 :   double result;
   20775             :   
   20776           0 :   if (!args) SWIG_fail;
   20777           0 :   swig_obj[0] = args;
   20778           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20779           0 :   if (!SWIG_IsOK(res1)) {
   20780           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPX_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20781             :   }
   20782           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20783           0 :   {
   20784           0 :     if (!arg1) {
   20785           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   20786             :     }
   20787             :   }
   20788           0 :   {
   20789           0 :     const int bLocalUseExceptions = GetUseExceptions();
   20790           0 :     if ( bLocalUseExceptions ) {
   20791           0 :       pushErrorHandler();
   20792             :     }
   20793           0 :     {
   20794           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20795           0 :       result = (double)GDAL_GCP_GCPX_get(arg1);
   20796           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20797             :     }
   20798           0 :     if ( bLocalUseExceptions ) {
   20799           0 :       popErrorHandler();
   20800             :     }
   20801             : #ifndef SED_HACKS
   20802             :     if ( bLocalUseExceptions ) {
   20803             :       CPLErr eclass = CPLGetLastErrorType();
   20804             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20805             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20806             :       }
   20807             :     }
   20808             : #endif
   20809             :   }
   20810           0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   20811           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; } }
   20812             :   return resultobj;
   20813             : fail:
   20814             :   return NULL;
   20815             : }
   20816             : 
   20817             : 
   20818           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPX_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20819           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20820           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20821           0 :   double arg2 ;
   20822           0 :   void *argp1 = 0 ;
   20823           0 :   int res1 = 0 ;
   20824           0 :   double val2 ;
   20825           0 :   int ecode2 = 0 ;
   20826           0 :   PyObject *swig_obj[2] ;
   20827             :   
   20828           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_GCPX_set", 2, 2, swig_obj)) SWIG_fail;
   20829           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20830           0 :   if (!SWIG_IsOK(res1)) {
   20831           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPX_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20832             :   }
   20833           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20834           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   20835           0 :   if (!SWIG_IsOK(ecode2)) {
   20836           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPX_set" "', argument " "2"" of type '" "double""'");
   20837             :   } 
   20838           0 :   arg2 = static_cast< double >(val2);
   20839           0 :   {
   20840           0 :     if (!arg1) {
   20841           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   20842             :     }
   20843             :   }
   20844           0 :   {
   20845           0 :     const int bLocalUseExceptions = GetUseExceptions();
   20846           0 :     if ( bLocalUseExceptions ) {
   20847           0 :       pushErrorHandler();
   20848             :     }
   20849           0 :     {
   20850           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20851           0 :       GDAL_GCP_GCPX_set(arg1,arg2);
   20852           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20853             :     }
   20854           0 :     if ( bLocalUseExceptions ) {
   20855           0 :       popErrorHandler();
   20856             :     }
   20857             : #ifndef SED_HACKS
   20858             :     if ( bLocalUseExceptions ) {
   20859             :       CPLErr eclass = CPLGetLastErrorType();
   20860             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20861             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20862             :       }
   20863             :     }
   20864             : #endif
   20865             :   }
   20866           0 :   resultobj = SWIG_Py_Void();
   20867           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; } }
   20868             :   return resultobj;
   20869             : fail:
   20870             :   return NULL;
   20871             : }
   20872             : 
   20873             : 
   20874           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPY_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20875           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20876           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20877           0 :   void *argp1 = 0 ;
   20878           0 :   int res1 = 0 ;
   20879           0 :   PyObject *swig_obj[1] ;
   20880           0 :   double result;
   20881             :   
   20882           0 :   if (!args) SWIG_fail;
   20883           0 :   swig_obj[0] = args;
   20884           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20885           0 :   if (!SWIG_IsOK(res1)) {
   20886           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPY_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20887             :   }
   20888           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20889           0 :   {
   20890           0 :     if (!arg1) {
   20891           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   20892             :     }
   20893             :   }
   20894           0 :   {
   20895           0 :     const int bLocalUseExceptions = GetUseExceptions();
   20896           0 :     if ( bLocalUseExceptions ) {
   20897           0 :       pushErrorHandler();
   20898             :     }
   20899           0 :     {
   20900           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20901           0 :       result = (double)GDAL_GCP_GCPY_get(arg1);
   20902           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20903             :     }
   20904           0 :     if ( bLocalUseExceptions ) {
   20905           0 :       popErrorHandler();
   20906             :     }
   20907             : #ifndef SED_HACKS
   20908             :     if ( bLocalUseExceptions ) {
   20909             :       CPLErr eclass = CPLGetLastErrorType();
   20910             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20911             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20912             :       }
   20913             :     }
   20914             : #endif
   20915             :   }
   20916           0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   20917           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; } }
   20918             :   return resultobj;
   20919             : fail:
   20920             :   return NULL;
   20921             : }
   20922             : 
   20923             : 
   20924           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPY_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20925           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20926           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20927           0 :   double arg2 ;
   20928           0 :   void *argp1 = 0 ;
   20929           0 :   int res1 = 0 ;
   20930           0 :   double val2 ;
   20931           0 :   int ecode2 = 0 ;
   20932           0 :   PyObject *swig_obj[2] ;
   20933             :   
   20934           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_GCPY_set", 2, 2, swig_obj)) SWIG_fail;
   20935           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20936           0 :   if (!SWIG_IsOK(res1)) {
   20937           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPY_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20938             :   }
   20939           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20940           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   20941           0 :   if (!SWIG_IsOK(ecode2)) {
   20942           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPY_set" "', argument " "2"" of type '" "double""'");
   20943             :   } 
   20944           0 :   arg2 = static_cast< double >(val2);
   20945           0 :   {
   20946           0 :     if (!arg1) {
   20947           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   20948             :     }
   20949             :   }
   20950           0 :   {
   20951           0 :     const int bLocalUseExceptions = GetUseExceptions();
   20952           0 :     if ( bLocalUseExceptions ) {
   20953           0 :       pushErrorHandler();
   20954             :     }
   20955           0 :     {
   20956           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   20957           0 :       GDAL_GCP_GCPY_set(arg1,arg2);
   20958           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   20959             :     }
   20960           0 :     if ( bLocalUseExceptions ) {
   20961           0 :       popErrorHandler();
   20962             :     }
   20963             : #ifndef SED_HACKS
   20964             :     if ( bLocalUseExceptions ) {
   20965             :       CPLErr eclass = CPLGetLastErrorType();
   20966             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20967             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20968             :       }
   20969             :     }
   20970             : #endif
   20971             :   }
   20972           0 :   resultobj = SWIG_Py_Void();
   20973           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; } }
   20974             :   return resultobj;
   20975             : fail:
   20976             :   return NULL;
   20977             : }
   20978             : 
   20979             : 
   20980           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPZ_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20981           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   20982           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   20983           0 :   void *argp1 = 0 ;
   20984           0 :   int res1 = 0 ;
   20985           0 :   PyObject *swig_obj[1] ;
   20986           0 :   double result;
   20987             :   
   20988           0 :   if (!args) SWIG_fail;
   20989           0 :   swig_obj[0] = args;
   20990           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   20991           0 :   if (!SWIG_IsOK(res1)) {
   20992           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPZ_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   20993             :   }
   20994           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   20995           0 :   {
   20996           0 :     if (!arg1) {
   20997           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   20998             :     }
   20999             :   }
   21000           0 :   {
   21001           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21002           0 :     if ( bLocalUseExceptions ) {
   21003           0 :       pushErrorHandler();
   21004             :     }
   21005           0 :     {
   21006           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21007           0 :       result = (double)GDAL_GCP_GCPZ_get(arg1);
   21008           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21009             :     }
   21010           0 :     if ( bLocalUseExceptions ) {
   21011           0 :       popErrorHandler();
   21012             :     }
   21013             : #ifndef SED_HACKS
   21014             :     if ( bLocalUseExceptions ) {
   21015             :       CPLErr eclass = CPLGetLastErrorType();
   21016             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21017             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21018             :       }
   21019             :     }
   21020             : #endif
   21021             :   }
   21022           0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   21023           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; } }
   21024             :   return resultobj;
   21025             : fail:
   21026             :   return NULL;
   21027             : }
   21028             : 
   21029             : 
   21030           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPZ_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21031           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21032           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21033           0 :   double arg2 ;
   21034           0 :   void *argp1 = 0 ;
   21035           0 :   int res1 = 0 ;
   21036           0 :   double val2 ;
   21037           0 :   int ecode2 = 0 ;
   21038           0 :   PyObject *swig_obj[2] ;
   21039             :   
   21040           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_GCPZ_set", 2, 2, swig_obj)) SWIG_fail;
   21041           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21042           0 :   if (!SWIG_IsOK(res1)) {
   21043           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPZ_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21044             :   }
   21045           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21046           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   21047           0 :   if (!SWIG_IsOK(ecode2)) {
   21048           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPZ_set" "', argument " "2"" of type '" "double""'");
   21049             :   } 
   21050           0 :   arg2 = static_cast< double >(val2);
   21051           0 :   {
   21052           0 :     if (!arg1) {
   21053           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21054             :     }
   21055             :   }
   21056           0 :   {
   21057           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21058           0 :     if ( bLocalUseExceptions ) {
   21059           0 :       pushErrorHandler();
   21060             :     }
   21061           0 :     {
   21062           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21063           0 :       GDAL_GCP_GCPZ_set(arg1,arg2);
   21064           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21065             :     }
   21066           0 :     if ( bLocalUseExceptions ) {
   21067           0 :       popErrorHandler();
   21068             :     }
   21069             : #ifndef SED_HACKS
   21070             :     if ( bLocalUseExceptions ) {
   21071             :       CPLErr eclass = CPLGetLastErrorType();
   21072             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21073             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21074             :       }
   21075             :     }
   21076             : #endif
   21077             :   }
   21078           0 :   resultobj = SWIG_Py_Void();
   21079           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; } }
   21080             :   return resultobj;
   21081             : fail:
   21082             :   return NULL;
   21083             : }
   21084             : 
   21085             : 
   21086           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPPixel_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21087           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21088           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21089           0 :   void *argp1 = 0 ;
   21090           0 :   int res1 = 0 ;
   21091           0 :   PyObject *swig_obj[1] ;
   21092           0 :   double result;
   21093             :   
   21094           0 :   if (!args) SWIG_fail;
   21095           0 :   swig_obj[0] = args;
   21096           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21097           0 :   if (!SWIG_IsOK(res1)) {
   21098           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPPixel_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21099             :   }
   21100           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21101           0 :   {
   21102           0 :     if (!arg1) {
   21103           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21104             :     }
   21105             :   }
   21106           0 :   {
   21107           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21108           0 :     if ( bLocalUseExceptions ) {
   21109           0 :       pushErrorHandler();
   21110             :     }
   21111           0 :     {
   21112           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21113           0 :       result = (double)GDAL_GCP_GCPPixel_get(arg1);
   21114           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21115             :     }
   21116           0 :     if ( bLocalUseExceptions ) {
   21117           0 :       popErrorHandler();
   21118             :     }
   21119             : #ifndef SED_HACKS
   21120             :     if ( bLocalUseExceptions ) {
   21121             :       CPLErr eclass = CPLGetLastErrorType();
   21122             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21123             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21124             :       }
   21125             :     }
   21126             : #endif
   21127             :   }
   21128           0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   21129           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; } }
   21130             :   return resultobj;
   21131             : fail:
   21132             :   return NULL;
   21133             : }
   21134             : 
   21135             : 
   21136           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPPixel_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21137           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21138           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21139           0 :   double arg2 ;
   21140           0 :   void *argp1 = 0 ;
   21141           0 :   int res1 = 0 ;
   21142           0 :   double val2 ;
   21143           0 :   int ecode2 = 0 ;
   21144           0 :   PyObject *swig_obj[2] ;
   21145             :   
   21146           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_GCPPixel_set", 2, 2, swig_obj)) SWIG_fail;
   21147           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21148           0 :   if (!SWIG_IsOK(res1)) {
   21149           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPPixel_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21150             :   }
   21151           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21152           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   21153           0 :   if (!SWIG_IsOK(ecode2)) {
   21154           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPPixel_set" "', argument " "2"" of type '" "double""'");
   21155             :   } 
   21156           0 :   arg2 = static_cast< double >(val2);
   21157           0 :   {
   21158           0 :     if (!arg1) {
   21159           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21160             :     }
   21161             :   }
   21162           0 :   {
   21163           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21164           0 :     if ( bLocalUseExceptions ) {
   21165           0 :       pushErrorHandler();
   21166             :     }
   21167           0 :     {
   21168           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21169           0 :       GDAL_GCP_GCPPixel_set(arg1,arg2);
   21170           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21171             :     }
   21172           0 :     if ( bLocalUseExceptions ) {
   21173           0 :       popErrorHandler();
   21174             :     }
   21175             : #ifndef SED_HACKS
   21176             :     if ( bLocalUseExceptions ) {
   21177             :       CPLErr eclass = CPLGetLastErrorType();
   21178             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21179             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21180             :       }
   21181             :     }
   21182             : #endif
   21183             :   }
   21184           0 :   resultobj = SWIG_Py_Void();
   21185           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; } }
   21186             :   return resultobj;
   21187             : fail:
   21188             :   return NULL;
   21189             : }
   21190             : 
   21191             : 
   21192           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPLine_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21193           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21194           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21195           0 :   void *argp1 = 0 ;
   21196           0 :   int res1 = 0 ;
   21197           0 :   PyObject *swig_obj[1] ;
   21198           0 :   double result;
   21199             :   
   21200           0 :   if (!args) SWIG_fail;
   21201           0 :   swig_obj[0] = args;
   21202           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21203           0 :   if (!SWIG_IsOK(res1)) {
   21204           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPLine_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21205             :   }
   21206           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21207           0 :   {
   21208           0 :     if (!arg1) {
   21209           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21210             :     }
   21211             :   }
   21212           0 :   {
   21213           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21214           0 :     if ( bLocalUseExceptions ) {
   21215           0 :       pushErrorHandler();
   21216             :     }
   21217           0 :     {
   21218           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21219           0 :       result = (double)GDAL_GCP_GCPLine_get(arg1);
   21220           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21221             :     }
   21222           0 :     if ( bLocalUseExceptions ) {
   21223           0 :       popErrorHandler();
   21224             :     }
   21225             : #ifndef SED_HACKS
   21226             :     if ( bLocalUseExceptions ) {
   21227             :       CPLErr eclass = CPLGetLastErrorType();
   21228             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21229             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21230             :       }
   21231             :     }
   21232             : #endif
   21233             :   }
   21234           0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   21235           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; } }
   21236             :   return resultobj;
   21237             : fail:
   21238             :   return NULL;
   21239             : }
   21240             : 
   21241             : 
   21242           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPLine_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21243           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21244           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21245           0 :   double arg2 ;
   21246           0 :   void *argp1 = 0 ;
   21247           0 :   int res1 = 0 ;
   21248           0 :   double val2 ;
   21249           0 :   int ecode2 = 0 ;
   21250           0 :   PyObject *swig_obj[2] ;
   21251             :   
   21252           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_GCPLine_set", 2, 2, swig_obj)) SWIG_fail;
   21253           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21254           0 :   if (!SWIG_IsOK(res1)) {
   21255           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPLine_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21256             :   }
   21257           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21258           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   21259           0 :   if (!SWIG_IsOK(ecode2)) {
   21260           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPLine_set" "', argument " "2"" of type '" "double""'");
   21261             :   } 
   21262           0 :   arg2 = static_cast< double >(val2);
   21263           0 :   {
   21264           0 :     if (!arg1) {
   21265           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21266             :     }
   21267             :   }
   21268           0 :   {
   21269           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21270           0 :     if ( bLocalUseExceptions ) {
   21271           0 :       pushErrorHandler();
   21272             :     }
   21273           0 :     {
   21274           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21275           0 :       GDAL_GCP_GCPLine_set(arg1,arg2);
   21276           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21277             :     }
   21278           0 :     if ( bLocalUseExceptions ) {
   21279           0 :       popErrorHandler();
   21280             :     }
   21281             : #ifndef SED_HACKS
   21282             :     if ( bLocalUseExceptions ) {
   21283             :       CPLErr eclass = CPLGetLastErrorType();
   21284             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21285             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21286             :       }
   21287             :     }
   21288             : #endif
   21289             :   }
   21290           0 :   resultobj = SWIG_Py_Void();
   21291           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; } }
   21292             :   return resultobj;
   21293             : fail:
   21294             :   return NULL;
   21295             : }
   21296             : 
   21297             : 
   21298           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_Info_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21299           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21300           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21301           0 :   void *argp1 = 0 ;
   21302           0 :   int res1 = 0 ;
   21303           0 :   PyObject *swig_obj[1] ;
   21304           0 :   char *result = 0 ;
   21305             :   
   21306           0 :   if (!args) SWIG_fail;
   21307           0 :   swig_obj[0] = args;
   21308           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21309           0 :   if (!SWIG_IsOK(res1)) {
   21310           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Info_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21311             :   }
   21312           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21313           0 :   {
   21314           0 :     if (!arg1) {
   21315           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21316             :     }
   21317             :   }
   21318           0 :   {
   21319           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21320           0 :     if ( bLocalUseExceptions ) {
   21321           0 :       pushErrorHandler();
   21322             :     }
   21323           0 :     {
   21324           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21325           0 :       result = (char *)GDAL_GCP_Info_get(arg1);
   21326           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21327             :     }
   21328           0 :     if ( bLocalUseExceptions ) {
   21329           0 :       popErrorHandler();
   21330             :     }
   21331             : #ifndef SED_HACKS
   21332             :     if ( bLocalUseExceptions ) {
   21333             :       CPLErr eclass = CPLGetLastErrorType();
   21334             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21335             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21336             :       }
   21337             :     }
   21338             : #endif
   21339             :   }
   21340           0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   21341           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; } }
   21342             :   return resultobj;
   21343             : fail:
   21344             :   return NULL;
   21345             : }
   21346             : 
   21347             : 
   21348           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_Info_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21349           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21350           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21351           0 :   char *arg2 = (char *) 0 ;
   21352           0 :   void *argp1 = 0 ;
   21353           0 :   int res1 = 0 ;
   21354           0 :   int res2 ;
   21355           0 :   char *buf2 = 0 ;
   21356           0 :   int alloc2 = 0 ;
   21357           0 :   PyObject *swig_obj[2] ;
   21358             :   
   21359           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_Info_set", 2, 2, swig_obj)) SWIG_fail;
   21360           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21361           0 :   if (!SWIG_IsOK(res1)) {
   21362           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Info_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21363             :   }
   21364           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21365           0 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   21366           0 :   if (!SWIG_IsOK(res2)) {
   21367           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GDAL_GCP_Info_set" "', argument " "2"" of type '" "char const *""'");
   21368             :   }
   21369           0 :   arg2 = reinterpret_cast< char * >(buf2);
   21370           0 :   {
   21371           0 :     if (!arg1) {
   21372           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21373             :     }
   21374             :   }
   21375           0 :   {
   21376           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21377           0 :     if ( bLocalUseExceptions ) {
   21378           0 :       pushErrorHandler();
   21379             :     }
   21380           0 :     {
   21381           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21382           0 :       GDAL_GCP_Info_set(arg1,(char const *)arg2);
   21383           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21384             :     }
   21385           0 :     if ( bLocalUseExceptions ) {
   21386           0 :       popErrorHandler();
   21387             :     }
   21388             : #ifndef SED_HACKS
   21389             :     if ( bLocalUseExceptions ) {
   21390             :       CPLErr eclass = CPLGetLastErrorType();
   21391             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21392             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21393             :       }
   21394             :     }
   21395             : #endif
   21396             :   }
   21397           0 :   resultobj = SWIG_Py_Void();
   21398           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   21399           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; } }
   21400             :   return resultobj;
   21401           0 : fail:
   21402           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   21403             :   return NULL;
   21404             : }
   21405             : 
   21406             : 
   21407           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_Id_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21408           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21409           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21410           0 :   void *argp1 = 0 ;
   21411           0 :   int res1 = 0 ;
   21412           0 :   PyObject *swig_obj[1] ;
   21413           0 :   char *result = 0 ;
   21414             :   
   21415           0 :   if (!args) SWIG_fail;
   21416           0 :   swig_obj[0] = args;
   21417           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21418           0 :   if (!SWIG_IsOK(res1)) {
   21419           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Id_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21420             :   }
   21421           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21422           0 :   {
   21423           0 :     if (!arg1) {
   21424           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21425             :     }
   21426             :   }
   21427           0 :   {
   21428           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21429           0 :     if ( bLocalUseExceptions ) {
   21430           0 :       pushErrorHandler();
   21431             :     }
   21432           0 :     {
   21433           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21434           0 :       result = (char *)GDAL_GCP_Id_get(arg1);
   21435           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21436             :     }
   21437           0 :     if ( bLocalUseExceptions ) {
   21438           0 :       popErrorHandler();
   21439             :     }
   21440             : #ifndef SED_HACKS
   21441             :     if ( bLocalUseExceptions ) {
   21442             :       CPLErr eclass = CPLGetLastErrorType();
   21443             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21444             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21445             :       }
   21446             :     }
   21447             : #endif
   21448             :   }
   21449           0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   21450           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; } }
   21451             :   return resultobj;
   21452             : fail:
   21453             :   return NULL;
   21454             : }
   21455             : 
   21456             : 
   21457           0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_Id_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21458           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21459           0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   21460           0 :   char *arg2 = (char *) 0 ;
   21461           0 :   void *argp1 = 0 ;
   21462           0 :   int res1 = 0 ;
   21463           0 :   int res2 ;
   21464           0 :   char *buf2 = 0 ;
   21465           0 :   int alloc2 = 0 ;
   21466           0 :   PyObject *swig_obj[2] ;
   21467             :   
   21468           0 :   if (!SWIG_Python_UnpackTuple(args, "GDAL_GCP_Id_set", 2, 2, swig_obj)) SWIG_fail;
   21469           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   21470           0 :   if (!SWIG_IsOK(res1)) {
   21471           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Id_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   21472             :   }
   21473           0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   21474           0 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   21475           0 :   if (!SWIG_IsOK(res2)) {
   21476           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GDAL_GCP_Id_set" "', argument " "2"" of type '" "char const *""'");
   21477             :   }
   21478           0 :   arg2 = reinterpret_cast< char * >(buf2);
   21479           0 :   {
   21480           0 :     if (!arg1) {
   21481           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   21482             :     }
   21483             :   }
   21484           0 :   {
   21485           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21486           0 :     if ( bLocalUseExceptions ) {
   21487           0 :       pushErrorHandler();
   21488             :     }
   21489           0 :     {
   21490           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21491           0 :       GDAL_GCP_Id_set(arg1,(char const *)arg2);
   21492           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21493             :     }
   21494           0 :     if ( bLocalUseExceptions ) {
   21495           0 :       popErrorHandler();
   21496             :     }
   21497             : #ifndef SED_HACKS
   21498             :     if ( bLocalUseExceptions ) {
   21499             :       CPLErr eclass = CPLGetLastErrorType();
   21500             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21501             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21502             :       }
   21503             :     }
   21504             : #endif
   21505             :   }
   21506           0 :   resultobj = SWIG_Py_Void();
   21507           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   21508           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; } }
   21509             :   return resultobj;
   21510           0 : fail:
   21511           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   21512             :   return NULL;
   21513             : }
   21514             : 
   21515             : 
   21516          10 : SWIGINTERN PyObject *_wrap_GCPsToGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21517          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21518          10 :   int arg1 ;
   21519          10 :   GDAL_GCP *arg2 = (GDAL_GCP *) 0 ;
   21520          10 :   double *arg3 ;
   21521          10 :   int arg4 = (int) 1 ;
   21522          10 :   GDAL_GCP *tmpGCPList1 ;
   21523          10 :   double argout3[6] ;
   21524          10 :   int val4 ;
   21525          10 :   int ecode4 = 0 ;
   21526          10 :   PyObject *swig_obj[2] ;
   21527          10 :   RETURN_NONE result;
   21528             :   
   21529          10 :   {
   21530             :     /* %typemap(in,numinputs=0) (double argout3[ANY]) */
   21531          10 :     memset(argout3, 0, sizeof(argout3));
   21532          10 :     arg3 = argout3;
   21533             :   }
   21534          10 :   if (!SWIG_Python_UnpackTuple(args, "GCPsToGeoTransform", 1, 2, swig_obj)) SWIG_fail;
   21535          10 :   {
   21536             :     /* %typemap(in,numinputs=1) (int nGCPs, GDAL_GCP const *pGCPs ) */
   21537             :     /* check if is List */
   21538          10 :     if ( !PySequence_Check(swig_obj[0]) ) {
   21539           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   21540           0 :       SWIG_fail;
   21541             :     }
   21542          10 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   21543          10 :     if( size > (Py_ssize_t)INT_MAX ) {
   21544           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   21545           0 :       SWIG_fail;
   21546             :     }
   21547          10 :     if( (size_t)size > SIZE_MAX / sizeof(GDAL_GCP) ) {
   21548           0 :       PyErr_SetString(PyExc_RuntimeError, "too big sequence");
   21549           0 :       SWIG_fail;
   21550             :     }
   21551          10 :     arg1 = (int)size;
   21552          10 :     tmpGCPList1 = (GDAL_GCP*) malloc(arg1*sizeof(GDAL_GCP));
   21553          10 :     if( !tmpGCPList1 ) {
   21554           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   21555           0 :       SWIG_fail;
   21556             :     }
   21557          46 :     arg2 = tmpGCPList1;
   21558          46 :     for( int i = 0; i<arg1; i++ ) {
   21559          36 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   21560          36 :       GDAL_GCP *item = 0;
   21561          36 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&item, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0 ));
   21562          36 :       if ( ! item ) {
   21563           0 :         Py_DECREF(o);
   21564           0 :         SWIG_fail;
   21565             :       }
   21566          36 :       memcpy( tmpGCPList1 + i, item, sizeof( GDAL_GCP ) );
   21567          36 :       Py_DECREF(o);
   21568             :     }
   21569             :   }
   21570          10 :   if (swig_obj[1]) {
   21571           1 :     ecode4 = SWIG_AsVal_int(swig_obj[1], &val4);
   21572           1 :     if (!SWIG_IsOK(ecode4)) {
   21573           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "GCPsToGeoTransform" "', argument " "4"" of type '" "int""'");
   21574             :     } 
   21575             :     arg4 = static_cast< int >(val4);
   21576             :   }
   21577          10 :   {
   21578          10 :     const int bLocalUseExceptions = GetUseExceptions();
   21579          10 :     if ( bLocalUseExceptions ) {
   21580          10 :       pushErrorHandler();
   21581             :     }
   21582          10 :     {
   21583          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21584          10 :       result = (RETURN_NONE)GDALGCPsToGeoTransform(arg1,(GDAL_GCP const *)arg2,arg3,arg4);
   21585          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21586             :     }
   21587          10 :     if ( bLocalUseExceptions ) {
   21588          10 :       popErrorHandler();
   21589             :     }
   21590             : #ifndef SED_HACKS
   21591             :     if ( bLocalUseExceptions ) {
   21592             :       CPLErr eclass = CPLGetLastErrorType();
   21593             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21594             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21595             :       }
   21596             :     }
   21597             : #endif
   21598             :   }
   21599             :   /*%typemap(out) IF_FALSE_RETURN_NONE */
   21600          10 :   {
   21601             :     /* %typemap(argout) (double argout[ANY]) */
   21602          10 :     PyObject *out = CreateTupleFromDoubleArray( arg3, 6 );
   21603             : #if SWIG_VERSION >= 0x040300
   21604             :     resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
   21605             : #else
   21606          10 :     resultobj = SWIG_Python_AppendOutput(resultobj,out);
   21607             : #endif
   21608             :   }
   21609          10 :   {
   21610             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   21611          10 :     free( arg2 );
   21612             :   }
   21613          10 :   {
   21614             :     /* %typemap(ret) IF_FALSE_RETURN_NONE */
   21615          10 :     if (result == 0 ) {
   21616           4 :       Py_XDECREF( resultobj );
   21617           4 :       resultobj = Py_None;
   21618           4 :       Py_INCREF(resultobj);
   21619             :     }
   21620          10 :     if (resultobj == 0) {
   21621           0 :       resultobj = Py_None;
   21622           0 :       Py_INCREF(resultobj);
   21623             :     }
   21624             :   }
   21625          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; } }
   21626             :   return resultobj;
   21627           0 : fail:
   21628           0 :   {
   21629             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   21630           0 :     free( arg2 );
   21631             :   }
   21632           0 :   return NULL;
   21633             : }
   21634             : 
   21635             : 
   21636          10 : SWIGINTERN PyObject *_wrap_GCPsToHomography(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21637          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21638          10 :   int arg1 ;
   21639          10 :   GDAL_GCP *arg2 = (GDAL_GCP *) 0 ;
   21640          10 :   double *arg3 ;
   21641          10 :   GDAL_GCP *tmpGCPList1 ;
   21642          10 :   double argout3[9] ;
   21643          10 :   PyObject *swig_obj[1] ;
   21644          10 :   RETURN_NONE result;
   21645             :   
   21646          10 :   {
   21647             :     /* %typemap(in,numinputs=0) (double argout3[ANY]) */
   21648          10 :     memset(argout3, 0, sizeof(argout3));
   21649          10 :     arg3 = argout3;
   21650             :   }
   21651          10 :   if (!args) SWIG_fail;
   21652          10 :   swig_obj[0] = args;
   21653          10 :   {
   21654             :     /* %typemap(in,numinputs=1) (int nGCPs, GDAL_GCP const *pGCPs ) */
   21655             :     /* check if is List */
   21656          10 :     if ( !PySequence_Check(swig_obj[0]) ) {
   21657           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   21658           0 :       SWIG_fail;
   21659             :     }
   21660          10 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   21661          10 :     if( size > (Py_ssize_t)INT_MAX ) {
   21662           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   21663           0 :       SWIG_fail;
   21664             :     }
   21665          10 :     if( (size_t)size > SIZE_MAX / sizeof(GDAL_GCP) ) {
   21666           0 :       PyErr_SetString(PyExc_RuntimeError, "too big sequence");
   21667           0 :       SWIG_fail;
   21668             :     }
   21669          10 :     arg1 = (int)size;
   21670          10 :     tmpGCPList1 = (GDAL_GCP*) malloc(arg1*sizeof(GDAL_GCP));
   21671          10 :     if( !tmpGCPList1 ) {
   21672           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   21673           0 :       SWIG_fail;
   21674             :     }
   21675          46 :     arg2 = tmpGCPList1;
   21676          46 :     for( int i = 0; i<arg1; i++ ) {
   21677          36 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   21678          36 :       GDAL_GCP *item = 0;
   21679          36 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&item, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0 ));
   21680          36 :       if ( ! item ) {
   21681           0 :         Py_DECREF(o);
   21682           0 :         SWIG_fail;
   21683             :       }
   21684          36 :       memcpy( tmpGCPList1 + i, item, sizeof( GDAL_GCP ) );
   21685          36 :       Py_DECREF(o);
   21686             :     }
   21687             :   }
   21688          10 :   {
   21689          10 :     const int bLocalUseExceptions = GetUseExceptions();
   21690          10 :     if ( bLocalUseExceptions ) {
   21691          10 :       pushErrorHandler();
   21692             :     }
   21693          10 :     {
   21694          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21695          10 :       result = (RETURN_NONE)GDALGCPsToHomography(arg1,(GDAL_GCP const *)arg2,arg3);
   21696          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21697             :     }
   21698          10 :     if ( bLocalUseExceptions ) {
   21699          10 :       popErrorHandler();
   21700             :     }
   21701             : #ifndef SED_HACKS
   21702             :     if ( bLocalUseExceptions ) {
   21703             :       CPLErr eclass = CPLGetLastErrorType();
   21704             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21705             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21706             :       }
   21707             :     }
   21708             : #endif
   21709             :   }
   21710             :   /*%typemap(out) IF_FALSE_RETURN_NONE */
   21711          10 :   {
   21712             :     /* %typemap(argout) (double argout[ANY]) */
   21713          10 :     PyObject *out = CreateTupleFromDoubleArray( arg3, 9 );
   21714             : #if SWIG_VERSION >= 0x040300
   21715             :     resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
   21716             : #else
   21717          10 :     resultobj = SWIG_Python_AppendOutput(resultobj,out);
   21718             : #endif
   21719             :   }
   21720          10 :   {
   21721             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   21722          10 :     free( arg2 );
   21723             :   }
   21724          10 :   {
   21725             :     /* %typemap(ret) IF_FALSE_RETURN_NONE */
   21726          10 :     if (result == 0 ) {
   21727           3 :       Py_XDECREF( resultobj );
   21728           3 :       resultobj = Py_None;
   21729           3 :       Py_INCREF(resultobj);
   21730             :     }
   21731          10 :     if (resultobj == 0) {
   21732           0 :       resultobj = Py_None;
   21733           0 :       Py_INCREF(resultobj);
   21734             :     }
   21735             :   }
   21736          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; } }
   21737             :   return resultobj;
   21738           0 : fail:
   21739           0 :   {
   21740             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   21741           0 :     free( arg2 );
   21742             :   }
   21743           0 :   return NULL;
   21744             : }
   21745             : 
   21746             : 
   21747           0 : SWIGINTERN PyObject *_wrap_delete_VirtualMem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21748           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21749           0 :   CPLVirtualMemShadow *arg1 = (CPLVirtualMemShadow *) 0 ;
   21750           0 :   void *argp1 = 0 ;
   21751           0 :   int res1 = 0 ;
   21752           0 :   PyObject *swig_obj[1] ;
   21753             :   
   21754           0 :   if (!args) SWIG_fail;
   21755           0 :   swig_obj[0] = args;
   21756           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_DISOWN |  0 );
   21757           0 :   if (!SWIG_IsOK(res1)) {
   21758           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VirtualMem" "', argument " "1"" of type '" "CPLVirtualMemShadow *""'"); 
   21759             :   }
   21760           0 :   arg1 = reinterpret_cast< CPLVirtualMemShadow * >(argp1);
   21761           0 :   {
   21762           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21763           0 :     if ( bLocalUseExceptions ) {
   21764           0 :       pushErrorHandler();
   21765             :     }
   21766           0 :     {
   21767           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21768           0 :       delete_CPLVirtualMemShadow(arg1);
   21769           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21770             :     }
   21771           0 :     if ( bLocalUseExceptions ) {
   21772           0 :       popErrorHandler();
   21773             :     }
   21774             : #ifndef SED_HACKS
   21775             :     if ( bLocalUseExceptions ) {
   21776             :       CPLErr eclass = CPLGetLastErrorType();
   21777             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21778             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21779             :       }
   21780             :     }
   21781             : #endif
   21782             :   }
   21783           0 :   resultobj = SWIG_Py_Void();
   21784           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; } }
   21785             :   return resultobj;
   21786             : fail:
   21787             :   return NULL;
   21788             : }
   21789             : 
   21790             : 
   21791           0 : SWIGINTERN PyObject *_wrap_VirtualMem_GetAddr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21792           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21793           0 :   CPLVirtualMemShadow *arg1 = (CPLVirtualMemShadow *) 0 ;
   21794           0 :   void **arg2 = (void **) 0 ;
   21795           0 :   size_t *arg3 = (size_t *) 0 ;
   21796           0 :   GDALDataType *arg4 = (GDALDataType *) 0 ;
   21797           0 :   int *arg5 = (int *) 0 ;
   21798           0 :   void *argp1 = 0 ;
   21799           0 :   int res1 = 0 ;
   21800           0 :   void *ptr2 ;
   21801           0 :   size_t nsize2 ;
   21802           0 :   GDALDataType datatype2 ;
   21803           0 :   int readonly2 ;
   21804           0 :   PyObject *swig_obj[1] ;
   21805             :   
   21806           0 :   {
   21807             :     /* %typemap(in,numinputs=0) (void** pptr, size_t* pnsize, GDALDataType* pdatatype, int* preadonly) */
   21808           0 :     arg2 = &ptr2;
   21809           0 :     arg3 = &nsize2;
   21810           0 :     arg4 = &datatype2;
   21811           0 :     arg5 = &readonly2;
   21812             :   }
   21813           0 :   if (!args) SWIG_fail;
   21814           0 :   swig_obj[0] = args;
   21815           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CPLVirtualMemShadow, 0 |  0 );
   21816           0 :   if (!SWIG_IsOK(res1)) {
   21817           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VirtualMem_GetAddr" "', argument " "1"" of type '" "CPLVirtualMemShadow *""'"); 
   21818             :   }
   21819           0 :   arg1 = reinterpret_cast< CPLVirtualMemShadow * >(argp1);
   21820           0 :   {
   21821           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21822           0 :     if ( bLocalUseExceptions ) {
   21823           0 :       pushErrorHandler();
   21824             :     }
   21825           0 :     {
   21826           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21827           0 :       CPLVirtualMemShadow_GetAddr(arg1,arg2,arg3,arg4,arg5);
   21828           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21829             :     }
   21830           0 :     if ( bLocalUseExceptions ) {
   21831           0 :       popErrorHandler();
   21832             :     }
   21833             : #ifndef SED_HACKS
   21834             :     if ( bLocalUseExceptions ) {
   21835             :       CPLErr eclass = CPLGetLastErrorType();
   21836             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21837             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21838             :       }
   21839             :     }
   21840             : #endif
   21841             :   }
   21842           0 :   resultobj = SWIG_Py_Void();
   21843           0 :   {
   21844             :     /* %typemap(argout) (void** pptr, size_t* pnsize, GDALDataType* pdatatype, int* preadonly)*/
   21845           0 :     Py_buffer *buf=(Py_buffer*)malloc(sizeof(Py_buffer));
   21846             :     
   21847           0 :     if (PyBuffer_FillInfo(buf, swig_obj[0], *(arg2), *(arg3), *(arg5), PyBUF_ND)) {
   21848             :       // error, handle
   21849             :     }
   21850           0 :     if( *(arg4) == GDT_Byte )
   21851             :     {
   21852           0 :       buf->format = (char*) "B";
   21853           0 :       buf->itemsize = 1;
   21854             :     }
   21855           0 :     else if( *(arg4) == GDT_Int16 )
   21856             :     {
   21857           0 :       buf->format = (char*) "h";
   21858           0 :       buf->itemsize = 2;
   21859             :     }
   21860           0 :     else if( *(arg4) == GDT_UInt16 )
   21861             :     {
   21862           0 :       buf->format = (char*) "H";
   21863           0 :       buf->itemsize = 2;
   21864             :     }
   21865           0 :     else if( *(arg4) == GDT_Int32 )
   21866             :     {
   21867           0 :       buf->format = (char*) "i";
   21868           0 :       buf->itemsize = 4;
   21869             :     }
   21870           0 :     else if( *(arg4) == GDT_UInt32 )
   21871             :     {
   21872           0 :       buf->format = (char*) "I";
   21873           0 :       buf->itemsize = 4;
   21874             :     }
   21875           0 :     else if( *(arg4) == GDT_Float16 )
   21876             :     {
   21877           0 :       buf->format = (char*) "f";
   21878           0 :       buf->itemsize = 2;
   21879             :     }
   21880           0 :     else if( *(arg4) == GDT_Float32 )
   21881             :     {
   21882           0 :       buf->format = (char*) "f";
   21883           0 :       buf->itemsize = 4;
   21884             :     }
   21885           0 :     else if( *(arg4) == GDT_Float64 )
   21886             :     {
   21887           0 :       buf->format = (char*) "F";
   21888           0 :       buf->itemsize = 8;
   21889             :     }
   21890             :     else
   21891             :     {
   21892           0 :       buf->format = (char*) "B";
   21893           0 :       buf->itemsize = 1;
   21894             :     }
   21895           0 :     Py_DECREF(resultobj);
   21896           0 :     resultobj = PyMemoryView_FromBuffer(buf);
   21897             :   }
   21898           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; } }
   21899             :   return resultobj;
   21900             : fail:
   21901             :   return NULL;
   21902             : }
   21903             : 
   21904             : 
   21905           0 : SWIGINTERN PyObject *_wrap_VirtualMem_Pin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21906           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21907           0 :   CPLVirtualMemShadow *arg1 = (CPLVirtualMemShadow *) 0 ;
   21908           0 :   size_t arg2 = (size_t) 0 ;
   21909           0 :   size_t arg3 = (size_t) 0 ;
   21910           0 :   int arg4 = (int) 0 ;
   21911           0 :   void *argp1 = 0 ;
   21912           0 :   int res1 = 0 ;
   21913           0 :   size_t val2 ;
   21914           0 :   int ecode2 = 0 ;
   21915           0 :   size_t val3 ;
   21916           0 :   int ecode3 = 0 ;
   21917           0 :   int val4 ;
   21918           0 :   int ecode4 = 0 ;
   21919           0 :   PyObject *swig_obj[4] ;
   21920             :   
   21921           0 :   if (!SWIG_Python_UnpackTuple(args, "VirtualMem_Pin", 1, 4, swig_obj)) SWIG_fail;
   21922           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_CPLVirtualMemShadow, 0 |  0 );
   21923           0 :   if (!SWIG_IsOK(res1)) {
   21924           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VirtualMem_Pin" "', argument " "1"" of type '" "CPLVirtualMemShadow *""'"); 
   21925             :   }
   21926           0 :   arg1 = reinterpret_cast< CPLVirtualMemShadow * >(argp1);
   21927           0 :   if (swig_obj[1]) {
   21928           0 :     ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
   21929           0 :     if (!SWIG_IsOK(ecode2)) {
   21930           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VirtualMem_Pin" "', argument " "2"" of type '" "size_t""'");
   21931             :     } 
   21932             :     arg2 = static_cast< size_t >(val2);
   21933             :   }
   21934           0 :   if (swig_obj[2]) {
   21935           0 :     ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3);
   21936           0 :     if (!SWIG_IsOK(ecode3)) {
   21937           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VirtualMem_Pin" "', argument " "3"" of type '" "size_t""'");
   21938             :     } 
   21939             :     arg3 = static_cast< size_t >(val3);
   21940             :   }
   21941           0 :   if (swig_obj[3]) {
   21942           0 :     ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   21943           0 :     if (!SWIG_IsOK(ecode4)) {
   21944           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VirtualMem_Pin" "', argument " "4"" of type '" "int""'");
   21945             :     } 
   21946             :     arg4 = static_cast< int >(val4);
   21947             :   }
   21948           0 :   {
   21949           0 :     const int bLocalUseExceptions = GetUseExceptions();
   21950           0 :     if ( bLocalUseExceptions ) {
   21951           0 :       pushErrorHandler();
   21952             :     }
   21953           0 :     {
   21954           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   21955           0 :       CPLVirtualMemShadow_Pin(arg1,arg2,arg3,arg4);
   21956           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   21957             :     }
   21958           0 :     if ( bLocalUseExceptions ) {
   21959           0 :       popErrorHandler();
   21960             :     }
   21961             : #ifndef SED_HACKS
   21962             :     if ( bLocalUseExceptions ) {
   21963             :       CPLErr eclass = CPLGetLastErrorType();
   21964             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   21965             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   21966             :       }
   21967             :     }
   21968             : #endif
   21969             :   }
   21970           0 :   resultobj = SWIG_Py_Void();
   21971           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; } }
   21972             :   return resultobj;
   21973             : fail:
   21974             :   return NULL;
   21975             : }
   21976             : 
   21977             : 
   21978         277 : SWIGINTERN PyObject *VirtualMem_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21979         277 :   PyObject *obj;
   21980         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   21981         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_CPLVirtualMemShadow, SWIG_NewClientData(obj));
   21982         277 :   return SWIG_Py_Void();
   21983             : }
   21984             : 
   21985           1 : SWIGINTERN PyObject *_wrap_delete_AsyncReader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   21986           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   21987           1 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   21988           1 :   void *argp1 = 0 ;
   21989           1 :   int res1 = 0 ;
   21990           1 :   PyObject *swig_obj[1] ;
   21991             :   
   21992           1 :   if (!args) SWIG_fail;
   21993           1 :   swig_obj[0] = args;
   21994           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, SWIG_POINTER_DISOWN |  0 );
   21995           1 :   if (!SWIG_IsOK(res1)) {
   21996           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AsyncReader" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   21997             :   }
   21998           1 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   21999           1 :   {
   22000           1 :     const int bLocalUseExceptions = GetUseExceptions();
   22001           1 :     if ( bLocalUseExceptions ) {
   22002           1 :       pushErrorHandler();
   22003             :     }
   22004           1 :     {
   22005           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22006           1 :       delete_GDALAsyncReaderShadow(arg1);
   22007           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22008             :     }
   22009           1 :     if ( bLocalUseExceptions ) {
   22010           1 :       popErrorHandler();
   22011             :     }
   22012             : #ifndef SED_HACKS
   22013             :     if ( bLocalUseExceptions ) {
   22014             :       CPLErr eclass = CPLGetLastErrorType();
   22015             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22016             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22017             :       }
   22018             :     }
   22019             : #endif
   22020             :   }
   22021           1 :   resultobj = SWIG_Py_Void();
   22022           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; } }
   22023             :   return resultobj;
   22024             : fail:
   22025             :   return NULL;
   22026             : }
   22027             : 
   22028             : 
   22029           1 : SWIGINTERN PyObject *_wrap_AsyncReader_GetNextUpdatedRegion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22030           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22031           1 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   22032           1 :   double arg2 ;
   22033           1 :   int *arg3 = (int *) 0 ;
   22034           1 :   int *arg4 = (int *) 0 ;
   22035           1 :   int *arg5 = (int *) 0 ;
   22036           1 :   int *arg6 = (int *) 0 ;
   22037           1 :   void *argp1 = 0 ;
   22038           1 :   int res1 = 0 ;
   22039           1 :   double val2 ;
   22040           1 :   int ecode2 = 0 ;
   22041           1 :   int temp3 ;
   22042           1 :   int res3 = SWIG_TMPOBJ ;
   22043           1 :   int temp4 ;
   22044           1 :   int res4 = SWIG_TMPOBJ ;
   22045           1 :   int temp5 ;
   22046           1 :   int res5 = SWIG_TMPOBJ ;
   22047           1 :   int temp6 ;
   22048           1 :   int res6 = SWIG_TMPOBJ ;
   22049           1 :   PyObject *swig_obj[2] ;
   22050           1 :   GDALAsyncStatusType result;
   22051             :   
   22052           1 :   arg3 = &temp3;
   22053           1 :   arg4 = &temp4;
   22054           1 :   arg5 = &temp5;
   22055           1 :   arg6 = &temp6;
   22056           1 :   if (!SWIG_Python_UnpackTuple(args, "AsyncReader_GetNextUpdatedRegion", 2, 2, swig_obj)) SWIG_fail;
   22057           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   22058           1 :   if (!SWIG_IsOK(res1)) {
   22059           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_GetNextUpdatedRegion" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   22060             :   }
   22061           1 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   22062           1 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   22063           1 :   if (!SWIG_IsOK(ecode2)) {
   22064           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AsyncReader_GetNextUpdatedRegion" "', argument " "2"" of type '" "double""'");
   22065             :   } 
   22066           1 :   arg2 = static_cast< double >(val2);
   22067           1 :   {
   22068           1 :     const int bLocalUseExceptions = GetUseExceptions();
   22069           1 :     if ( bLocalUseExceptions ) {
   22070           1 :       pushErrorHandler();
   22071             :     }
   22072           1 :     {
   22073           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22074           1 :       result = (GDALAsyncStatusType)GDALAsyncReaderShadow_GetNextUpdatedRegion(arg1,arg2,arg3,arg4,arg5,arg6);
   22075           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22076             :     }
   22077           1 :     if ( bLocalUseExceptions ) {
   22078           1 :       popErrorHandler();
   22079             :     }
   22080             : #ifndef SED_HACKS
   22081             :     if ( bLocalUseExceptions ) {
   22082             :       CPLErr eclass = CPLGetLastErrorType();
   22083             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22084             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22085             :       }
   22086             :     }
   22087             : #endif
   22088             :   }
   22089           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   22090           1 :   if (ReturnSame(SWIG_IsTmpObj(res3))) {
   22091           1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3)));
   22092             :   } else {
   22093           0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   22094           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags));
   22095             :   }
   22096           1 :   if (ReturnSame(SWIG_IsTmpObj(res4))) {
   22097           1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4)));
   22098             :   } else {
   22099           0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   22100           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags));
   22101             :   }
   22102           1 :   if (ReturnSame(SWIG_IsTmpObj(res5))) {
   22103           1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5)));
   22104             :   } else {
   22105           0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   22106           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags));
   22107             :   }
   22108           1 :   if (ReturnSame(SWIG_IsTmpObj(res6))) {
   22109           1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6)));
   22110             :   } else {
   22111           0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   22112           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags));
   22113             :   }
   22114           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; } }
   22115             :   return resultobj;
   22116             : fail:
   22117             :   return NULL;
   22118             : }
   22119             : 
   22120             : 
   22121           1 : SWIGINTERN PyObject *_wrap_AsyncReader_GetBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22122           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22123           1 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   22124           1 :   void **arg2 = (void **) 0 ;
   22125           1 :   void *argp1 = 0 ;
   22126           1 :   int res1 = 0 ;
   22127           1 :   void *pyObject2 = NULL ;
   22128           1 :   PyObject *swig_obj[1] ;
   22129             :   
   22130           1 :   {
   22131             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject2 = NULL ) */
   22132           1 :     arg2 = &pyObject2;
   22133             :   }
   22134           1 :   if (!args) SWIG_fail;
   22135           1 :   swig_obj[0] = args;
   22136           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   22137           1 :   if (!SWIG_IsOK(res1)) {
   22138           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_GetBuffer" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   22139             :   }
   22140           1 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   22141           1 :   {
   22142           1 :     const int bLocalUseExceptions = GetUseExceptions();
   22143           1 :     if ( bLocalUseExceptions ) {
   22144           1 :       pushErrorHandler();
   22145             :     }
   22146           1 :     {
   22147           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22148           1 :       GDALAsyncReaderShadow_GetBuffer(arg1,arg2);
   22149           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22150             :     }
   22151           1 :     if ( bLocalUseExceptions ) {
   22152           1 :       popErrorHandler();
   22153             :     }
   22154             : #ifndef SED_HACKS
   22155             :     if ( bLocalUseExceptions ) {
   22156             :       CPLErr eclass = CPLGetLastErrorType();
   22157             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22158             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22159             :       }
   22160             :     }
   22161             : #endif
   22162             :   }
   22163           1 :   resultobj = SWIG_Py_Void();
   22164           1 :   {
   22165             :     /* %typemap(argout) ( void **outPythonObject ) */
   22166           1 :     Py_XDECREF(resultobj);
   22167           1 :     if (*arg2)
   22168             :     {
   22169             :       resultobj = (PyObject*)*arg2;
   22170             :     }
   22171             :     else
   22172             :     {
   22173           0 :       resultobj = Py_None;
   22174           0 :       Py_INCREF(resultobj);
   22175             :     }
   22176             :   }
   22177           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; } }
   22178             :   return resultobj;
   22179             : fail:
   22180             :   return NULL;
   22181             : }
   22182             : 
   22183             : 
   22184           0 : SWIGINTERN PyObject *_wrap_AsyncReader_LockBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22185           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22186           0 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   22187           0 :   double arg2 ;
   22188           0 :   void *argp1 = 0 ;
   22189           0 :   int res1 = 0 ;
   22190           0 :   double val2 ;
   22191           0 :   int ecode2 = 0 ;
   22192           0 :   PyObject *swig_obj[2] ;
   22193           0 :   int result;
   22194             :   
   22195           0 :   if (!SWIG_Python_UnpackTuple(args, "AsyncReader_LockBuffer", 2, 2, swig_obj)) SWIG_fail;
   22196           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   22197           0 :   if (!SWIG_IsOK(res1)) {
   22198           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_LockBuffer" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   22199             :   }
   22200           0 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   22201           0 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   22202           0 :   if (!SWIG_IsOK(ecode2)) {
   22203           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AsyncReader_LockBuffer" "', argument " "2"" of type '" "double""'");
   22204             :   } 
   22205           0 :   arg2 = static_cast< double >(val2);
   22206           0 :   {
   22207           0 :     const int bLocalUseExceptions = GetUseExceptions();
   22208           0 :     if ( bLocalUseExceptions ) {
   22209           0 :       pushErrorHandler();
   22210             :     }
   22211           0 :     {
   22212           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22213           0 :       result = (int)GDALAsyncReaderShadow_LockBuffer(arg1,arg2);
   22214           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22215             :     }
   22216           0 :     if ( bLocalUseExceptions ) {
   22217           0 :       popErrorHandler();
   22218             :     }
   22219             : #ifndef SED_HACKS
   22220             :     if ( bLocalUseExceptions ) {
   22221             :       CPLErr eclass = CPLGetLastErrorType();
   22222             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22223             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22224             :       }
   22225             :     }
   22226             : #endif
   22227             :   }
   22228           0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   22229           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; } }
   22230             :   return resultobj;
   22231             : fail:
   22232             :   return NULL;
   22233             : }
   22234             : 
   22235             : 
   22236           0 : SWIGINTERN PyObject *_wrap_AsyncReader_UnlockBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22237           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22238           0 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   22239           0 :   void *argp1 = 0 ;
   22240           0 :   int res1 = 0 ;
   22241           0 :   PyObject *swig_obj[1] ;
   22242             :   
   22243           0 :   if (!args) SWIG_fail;
   22244           0 :   swig_obj[0] = args;
   22245           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   22246           0 :   if (!SWIG_IsOK(res1)) {
   22247           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_UnlockBuffer" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   22248             :   }
   22249           0 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   22250           0 :   {
   22251           0 :     const int bLocalUseExceptions = GetUseExceptions();
   22252           0 :     if ( bLocalUseExceptions ) {
   22253           0 :       pushErrorHandler();
   22254             :     }
   22255           0 :     {
   22256           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22257           0 :       GDALAsyncReaderShadow_UnlockBuffer(arg1);
   22258           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22259             :     }
   22260           0 :     if ( bLocalUseExceptions ) {
   22261           0 :       popErrorHandler();
   22262             :     }
   22263             : #ifndef SED_HACKS
   22264             :     if ( bLocalUseExceptions ) {
   22265             :       CPLErr eclass = CPLGetLastErrorType();
   22266             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22267             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22268             :       }
   22269             :     }
   22270             : #endif
   22271             :   }
   22272           0 :   resultobj = SWIG_Py_Void();
   22273           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; } }
   22274             :   return resultobj;
   22275             : fail:
   22276             :   return NULL;
   22277             : }
   22278             : 
   22279             : 
   22280         277 : SWIGINTERN PyObject *AsyncReader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22281         277 :   PyObject *obj;
   22282         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   22283         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALAsyncReaderShadow, SWIG_NewClientData(obj));
   22284         277 :   return SWIG_Py_Void();
   22285             : }
   22286             : 
   22287       19826 : SWIGINTERN PyObject *_wrap_Dataset_RasterXSize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22288       19826 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22289       19826 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22290       19826 :   void *argp1 = 0 ;
   22291       19826 :   int res1 = 0 ;
   22292       19826 :   PyObject *swig_obj[1] ;
   22293       19826 :   int result;
   22294             :   
   22295       19826 :   if (!args) SWIG_fail;
   22296       19826 :   swig_obj[0] = args;
   22297       19826 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22298       19826 :   if (!SWIG_IsOK(res1)) {
   22299           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_RasterXSize_get" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22300             :   }
   22301       19826 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22302       19826 :   {
   22303       19826 :     const int bLocalUseExceptions = GetUseExceptions();
   22304       19826 :     if ( bLocalUseExceptions ) {
   22305       16831 :       pushErrorHandler();
   22306             :     }
   22307       19826 :     {
   22308       19826 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22309       19826 :       result = (int)GDALDatasetShadow_RasterXSize_get(arg1);
   22310       19826 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22311             :     }
   22312       19826 :     if ( bLocalUseExceptions ) {
   22313       16831 :       popErrorHandler();
   22314             :     }
   22315             : #ifndef SED_HACKS
   22316             :     if ( bLocalUseExceptions ) {
   22317             :       CPLErr eclass = CPLGetLastErrorType();
   22318             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22319             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22320             :       }
   22321             :     }
   22322             : #endif
   22323             :   }
   22324       19826 :   resultobj = SWIG_From_int(static_cast< int >(result));
   22325       19826 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22326             :   return resultobj;
   22327             : fail:
   22328             :   return NULL;
   22329             : }
   22330             : 
   22331             : 
   22332       20085 : SWIGINTERN PyObject *_wrap_Dataset_RasterYSize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22333       20085 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22334       20085 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22335       20085 :   void *argp1 = 0 ;
   22336       20085 :   int res1 = 0 ;
   22337       20085 :   PyObject *swig_obj[1] ;
   22338       20085 :   int result;
   22339             :   
   22340       20085 :   if (!args) SWIG_fail;
   22341       20085 :   swig_obj[0] = args;
   22342       20085 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22343       20085 :   if (!SWIG_IsOK(res1)) {
   22344           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_RasterYSize_get" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22345             :   }
   22346       20085 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22347       20085 :   {
   22348       20085 :     const int bLocalUseExceptions = GetUseExceptions();
   22349       20085 :     if ( bLocalUseExceptions ) {
   22350       17273 :       pushErrorHandler();
   22351             :     }
   22352       20085 :     {
   22353       20085 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22354       20085 :       result = (int)GDALDatasetShadow_RasterYSize_get(arg1);
   22355       20085 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22356             :     }
   22357       20085 :     if ( bLocalUseExceptions ) {
   22358       17273 :       popErrorHandler();
   22359             :     }
   22360             : #ifndef SED_HACKS
   22361             :     if ( bLocalUseExceptions ) {
   22362             :       CPLErr eclass = CPLGetLastErrorType();
   22363             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22364             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22365             :       }
   22366             :     }
   22367             : #endif
   22368             :   }
   22369       20085 :   resultobj = SWIG_From_int(static_cast< int >(result));
   22370       20085 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22371             :   return resultobj;
   22372             : fail:
   22373             :   return NULL;
   22374             : }
   22375             : 
   22376             : 
   22377      354863 : SWIGINTERN PyObject *_wrap_Dataset_RasterCount_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22378      354863 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22379      354863 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22380      354863 :   void *argp1 = 0 ;
   22381      354863 :   int res1 = 0 ;
   22382      354863 :   PyObject *swig_obj[1] ;
   22383      354863 :   int result;
   22384             :   
   22385      354863 :   if (!args) SWIG_fail;
   22386      354863 :   swig_obj[0] = args;
   22387      354863 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22388      354863 :   if (!SWIG_IsOK(res1)) {
   22389           2 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_RasterCount_get" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22390             :   }
   22391      354862 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22392      354862 :   {
   22393      354862 :     const int bLocalUseExceptions = GetUseExceptions();
   22394      354862 :     if ( bLocalUseExceptions ) {
   22395      339443 :       pushErrorHandler();
   22396             :     }
   22397      354862 :     {
   22398      354862 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22399      354862 :       result = (int)GDALDatasetShadow_RasterCount_get(arg1);
   22400      354862 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22401             :     }
   22402      354862 :     if ( bLocalUseExceptions ) {
   22403      339443 :       popErrorHandler();
   22404             :     }
   22405             : #ifndef SED_HACKS
   22406             :     if ( bLocalUseExceptions ) {
   22407             :       CPLErr eclass = CPLGetLastErrorType();
   22408             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22409             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22410             :       }
   22411             :     }
   22412             : #endif
   22413             :   }
   22414      354862 :   resultobj = SWIG_From_int(static_cast< int >(result));
   22415      354863 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22416             :   return resultobj;
   22417             : fail:
   22418             :   return NULL;
   22419             : }
   22420             : 
   22421             : 
   22422       54940 : SWIGINTERN PyObject *_wrap_delete_Dataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22423       54940 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22424       54940 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22425       54940 :   void *argp1 = 0 ;
   22426       54940 :   int res1 = 0 ;
   22427       54940 :   PyObject *swig_obj[1] ;
   22428             :   
   22429       54940 :   if (!args) SWIG_fail;
   22430       54940 :   swig_obj[0] = args;
   22431       54940 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_DISOWN |  0 );
   22432       54940 :   if (!SWIG_IsOK(res1)) {
   22433           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Dataset" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22434             :   }
   22435       54940 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22436       54940 :   {
   22437       54940 :     const int bLocalUseExceptions = GetUseExceptions();
   22438       54940 :     if ( bLocalUseExceptions ) {
   22439       23769 :       pushErrorHandler();
   22440             :     }
   22441       54940 :     {
   22442       54940 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22443       54940 :       delete_GDALDatasetShadow(arg1);
   22444       54940 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22445             :     }
   22446       54940 :     if ( bLocalUseExceptions ) {
   22447       23769 :       popErrorHandler();
   22448             :     }
   22449             : #ifndef SED_HACKS
   22450             :     if ( bLocalUseExceptions ) {
   22451             :       CPLErr eclass = CPLGetLastErrorType();
   22452             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22453             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22454             :       }
   22455             :     }
   22456             : #endif
   22457             :   }
   22458       54940 :   resultobj = SWIG_Py_Void();
   22459       54940 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22460             :   return resultobj;
   22461             : fail:
   22462             :   return NULL;
   22463             : }
   22464             : 
   22465             : 
   22466           4 : SWIGINTERN PyObject *_wrap_Dataset_MarkSuppressOnClose(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22467           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22468           4 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22469           4 :   void *argp1 = 0 ;
   22470           4 :   int res1 = 0 ;
   22471           4 :   PyObject *swig_obj[1] ;
   22472             :   
   22473           4 :   if (!args) SWIG_fail;
   22474           4 :   swig_obj[0] = args;
   22475           4 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22476           4 :   if (!SWIG_IsOK(res1)) {
   22477           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_MarkSuppressOnClose" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22478             :   }
   22479           4 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22480           4 :   {
   22481           4 :     const int bLocalUseExceptions = GetUseExceptions();
   22482           4 :     if ( bLocalUseExceptions ) {
   22483           0 :       pushErrorHandler();
   22484             :     }
   22485           4 :     {
   22486           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22487           4 :       GDALDatasetShadow_MarkSuppressOnClose(arg1);
   22488           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22489             :     }
   22490           4 :     if ( bLocalUseExceptions ) {
   22491           0 :       popErrorHandler();
   22492             :     }
   22493             : #ifndef SED_HACKS
   22494             :     if ( bLocalUseExceptions ) {
   22495             :       CPLErr eclass = CPLGetLastErrorType();
   22496             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22497             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22498             :       }
   22499             :     }
   22500             : #endif
   22501             :   }
   22502           4 :   resultobj = SWIG_Py_Void();
   22503           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; } }
   22504             :   return resultobj;
   22505             : fail:
   22506             :   return NULL;
   22507             : }
   22508             : 
   22509             : 
   22510        3684 : SWIGINTERN PyObject *_wrap_Dataset_Close(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22511        3684 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22512        3684 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22513        3684 :   void *argp1 = 0 ;
   22514        3684 :   int res1 = 0 ;
   22515        3684 :   PyObject *swig_obj[1] ;
   22516        3684 :   CPLErr result;
   22517             :   
   22518        3684 :   if (!args) SWIG_fail;
   22519        3684 :   swig_obj[0] = args;
   22520        3684 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22521        3684 :   if (!SWIG_IsOK(res1)) {
   22522           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_Close" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22523             :   }
   22524        3684 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22525        3684 :   {
   22526        3684 :     const int bLocalUseExceptions = GetUseExceptions();
   22527        3684 :     if ( bLocalUseExceptions ) {
   22528        1136 :       pushErrorHandler();
   22529             :     }
   22530        3684 :     {
   22531        3684 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22532        3684 :       result = (CPLErr)GDALDatasetShadow_Close(arg1);
   22533        3684 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22534             :     }
   22535        3684 :     if ( bLocalUseExceptions ) {
   22536        1136 :       popErrorHandler();
   22537             :     }
   22538             : #ifndef SED_HACKS
   22539             :     if ( bLocalUseExceptions ) {
   22540             :       CPLErr eclass = CPLGetLastErrorType();
   22541             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22542             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22543             :       }
   22544             :     }
   22545             : #endif
   22546             :   }
   22547        3684 :   resultobj = SWIG_From_int(static_cast< int >(result));
   22548        3696 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22549             :   return resultobj;
   22550             : fail:
   22551             :   return NULL;
   22552             : }
   22553             : 
   22554             : 
   22555        1327 : SWIGINTERN PyObject *_wrap_Dataset_GetDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22556        1327 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22557        1327 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22558        1327 :   void *argp1 = 0 ;
   22559        1327 :   int res1 = 0 ;
   22560        1327 :   PyObject *swig_obj[1] ;
   22561        1327 :   GDALDriverShadow *result = 0 ;
   22562             :   
   22563        1327 :   if (!args) SWIG_fail;
   22564        1327 :   swig_obj[0] = args;
   22565        1327 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22566        1327 :   if (!SWIG_IsOK(res1)) {
   22567           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetDriver" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22568             :   }
   22569        1327 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22570        1327 :   {
   22571        1327 :     const int bLocalUseExceptions = GetUseExceptions();
   22572        1327 :     if ( bLocalUseExceptions ) {
   22573         819 :       pushErrorHandler();
   22574             :     }
   22575        1327 :     {
   22576        1327 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22577        1327 :       result = (GDALDriverShadow *)GDALDatasetShadow_GetDriver(arg1);
   22578        1327 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22579             :     }
   22580        1327 :     if ( bLocalUseExceptions ) {
   22581         819 :       popErrorHandler();
   22582             :     }
   22583             : #ifndef SED_HACKS
   22584             :     if ( bLocalUseExceptions ) {
   22585             :       CPLErr eclass = CPLGetLastErrorType();
   22586             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22587             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22588             :       }
   22589             :     }
   22590             : #endif
   22591             :   }
   22592        1327 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   22593        1327 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22594             :   return resultobj;
   22595             : fail:
   22596             :   return NULL;
   22597             : }
   22598             : 
   22599             : 
   22600      358942 : SWIGINTERN PyObject *_wrap_Dataset_GetRasterBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22601      358942 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22602      358942 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22603      358942 :   int arg2 ;
   22604      358942 :   void *argp1 = 0 ;
   22605      358942 :   int res1 = 0 ;
   22606      358942 :   int val2 ;
   22607      358942 :   int ecode2 = 0 ;
   22608      358942 :   PyObject *swig_obj[2] ;
   22609      358942 :   GDALRasterBandShadow *result = 0 ;
   22610             :   
   22611      358942 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetRasterBand", 2, 2, swig_obj)) SWIG_fail;
   22612      358942 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22613      358942 :   if (!SWIG_IsOK(res1)) {
   22614           8 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetRasterBand" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22615             :   }
   22616      358938 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22617      358938 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   22618      358938 :   if (!SWIG_IsOK(ecode2)) {
   22619           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetRasterBand" "', argument " "2"" of type '" "int""'");
   22620             :   } 
   22621      358938 :   arg2 = static_cast< int >(val2);
   22622      358938 :   {
   22623      358938 :     const int bLocalUseExceptions = GetUseExceptions();
   22624      358938 :     if ( bLocalUseExceptions ) {
   22625      233131 :       pushErrorHandler();
   22626             :     }
   22627      358938 :     {
   22628      358938 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22629      358938 :       result = (GDALRasterBandShadow *)GDALDatasetShadow_GetRasterBand(arg1,arg2);
   22630      358938 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22631             :     }
   22632      358938 :     if ( bLocalUseExceptions ) {
   22633      233131 :       popErrorHandler();
   22634             :     }
   22635             : #ifndef SED_HACKS
   22636             :     if ( bLocalUseExceptions ) {
   22637             :       CPLErr eclass = CPLGetLastErrorType();
   22638             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22639             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22640             :       }
   22641             :     }
   22642             : #endif
   22643             :   }
   22644      358938 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   22645      358942 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22646             :   return resultobj;
   22647             : fail:
   22648             :   return NULL;
   22649             : }
   22650             : 
   22651             : 
   22652           5 : SWIGINTERN PyObject *_wrap_Dataset_IsThreadSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22653           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22654           5 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22655           5 :   int arg2 ;
   22656           5 :   void *argp1 = 0 ;
   22657           5 :   int res1 = 0 ;
   22658           5 :   int val2 ;
   22659           5 :   int ecode2 = 0 ;
   22660           5 :   PyObject *swig_obj[2] ;
   22661           5 :   bool result;
   22662             :   
   22663           5 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_IsThreadSafe", 2, 2, swig_obj)) SWIG_fail;
   22664           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22665           5 :   if (!SWIG_IsOK(res1)) {
   22666           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_IsThreadSafe" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22667             :   }
   22668           5 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22669           5 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   22670           5 :   if (!SWIG_IsOK(ecode2)) {
   22671           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_IsThreadSafe" "', argument " "2"" of type '" "int""'");
   22672             :   } 
   22673           5 :   arg2 = static_cast< int >(val2);
   22674           5 :   {
   22675           5 :     const int bLocalUseExceptions = GetUseExceptions();
   22676           5 :     if ( bLocalUseExceptions ) {
   22677           5 :       pushErrorHandler();
   22678             :     }
   22679           5 :     {
   22680           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22681           5 :       result = (bool)GDALDatasetShadow_IsThreadSafe(arg1,arg2);
   22682           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22683             :     }
   22684           5 :     if ( bLocalUseExceptions ) {
   22685           5 :       popErrorHandler();
   22686             :     }
   22687             : #ifndef SED_HACKS
   22688             :     if ( bLocalUseExceptions ) {
   22689             :       CPLErr eclass = CPLGetLastErrorType();
   22690             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22691             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22692             :       }
   22693             :     }
   22694             : #endif
   22695             :   }
   22696           5 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   22697           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; } }
   22698             :   return resultobj;
   22699             : fail:
   22700             :   return NULL;
   22701             : }
   22702             : 
   22703             : 
   22704           8 : SWIGINTERN PyObject *_wrap_Dataset_GetThreadSafeDataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22705           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22706           8 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22707           8 :   int arg2 ;
   22708           8 :   void *argp1 = 0 ;
   22709           8 :   int res1 = 0 ;
   22710           8 :   int val2 ;
   22711           8 :   int ecode2 = 0 ;
   22712           8 :   PyObject *swig_obj[2] ;
   22713           8 :   GDALDatasetShadow *result = 0 ;
   22714             :   
   22715           8 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetThreadSafeDataset", 2, 2, swig_obj)) SWIG_fail;
   22716           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22717           8 :   if (!SWIG_IsOK(res1)) {
   22718           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetThreadSafeDataset" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22719             :   }
   22720           8 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22721           8 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   22722           8 :   if (!SWIG_IsOK(ecode2)) {
   22723           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetThreadSafeDataset" "', argument " "2"" of type '" "int""'");
   22724             :   } 
   22725           8 :   arg2 = static_cast< int >(val2);
   22726           8 :   {
   22727           8 :     const int bLocalUseExceptions = GetUseExceptions();
   22728           8 :     if ( bLocalUseExceptions ) {
   22729           8 :       pushErrorHandler();
   22730             :     }
   22731           8 :     {
   22732           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22733           8 :       result = (GDALDatasetShadow *)GDALDatasetShadow_GetThreadSafeDataset(arg1,arg2);
   22734           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22735             :     }
   22736           8 :     if ( bLocalUseExceptions ) {
   22737           8 :       popErrorHandler();
   22738             :     }
   22739             : #ifndef SED_HACKS
   22740             :     if ( bLocalUseExceptions ) {
   22741             :       CPLErr eclass = CPLGetLastErrorType();
   22742             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22743             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22744             :       }
   22745             :     }
   22746             : #endif
   22747             :   }
   22748           8 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   22749           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; } }
   22750             :   return resultobj;
   22751             : fail:
   22752             :   return NULL;
   22753             : }
   22754             : 
   22755             : 
   22756        1177 : SWIGINTERN PyObject *_wrap_Dataset_GetRootGroup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22757        1177 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22758        1177 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22759        1177 :   void *argp1 = 0 ;
   22760        1177 :   int res1 = 0 ;
   22761        1177 :   PyObject *swig_obj[1] ;
   22762        1177 :   GDALGroupHS *result = 0 ;
   22763             :   
   22764        1177 :   if (!args) SWIG_fail;
   22765        1177 :   swig_obj[0] = args;
   22766        1177 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22767        1177 :   if (!SWIG_IsOK(res1)) {
   22768           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetRootGroup" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22769             :   }
   22770        1177 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22771        1177 :   {
   22772        1177 :     const int bLocalUseExceptions = GetUseExceptions();
   22773        1177 :     if ( bLocalUseExceptions ) {
   22774         336 :       pushErrorHandler();
   22775             :     }
   22776        1177 :     {
   22777        1177 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22778        1177 :       result = (GDALGroupHS *)GDALDatasetShadow_GetRootGroup(arg1);
   22779        1177 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22780             :     }
   22781        1177 :     if ( bLocalUseExceptions ) {
   22782         336 :       popErrorHandler();
   22783             :     }
   22784             : #ifndef SED_HACKS
   22785             :     if ( bLocalUseExceptions ) {
   22786             :       CPLErr eclass = CPLGetLastErrorType();
   22787             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22788             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22789             :       }
   22790             :     }
   22791             : #endif
   22792             :   }
   22793        1177 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_OWN |  0 );
   22794        1177 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22795             :   return resultobj;
   22796             : fail:
   22797             :   return NULL;
   22798             : }
   22799             : 
   22800             : 
   22801         447 : SWIGINTERN PyObject *_wrap_Dataset_GetProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22802         447 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22803         447 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22804         447 :   void *argp1 = 0 ;
   22805         447 :   int res1 = 0 ;
   22806         447 :   PyObject *swig_obj[1] ;
   22807         447 :   char *result = 0 ;
   22808             :   
   22809         447 :   if (!args) SWIG_fail;
   22810         447 :   swig_obj[0] = args;
   22811         447 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22812         447 :   if (!SWIG_IsOK(res1)) {
   22813           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetProjection" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22814             :   }
   22815         447 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22816         447 :   {
   22817         447 :     const int bLocalUseExceptions = GetUseExceptions();
   22818         447 :     if ( bLocalUseExceptions ) {
   22819         398 :       pushErrorHandler();
   22820             :     }
   22821         447 :     {
   22822         447 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22823         447 :       result = (char *)GDALDatasetShadow_GetProjection(arg1);
   22824         447 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22825             :     }
   22826         447 :     if ( bLocalUseExceptions ) {
   22827         398 :       popErrorHandler();
   22828             :     }
   22829             : #ifndef SED_HACKS
   22830             :     if ( bLocalUseExceptions ) {
   22831             :       CPLErr eclass = CPLGetLastErrorType();
   22832             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22833             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22834             :       }
   22835             :     }
   22836             : #endif
   22837             :   }
   22838         447 :   resultobj = SWIG_FromCharPtr((const char *)result);
   22839         447 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22840             :   return resultobj;
   22841             : fail:
   22842             :   return NULL;
   22843             : }
   22844             : 
   22845             : 
   22846         863 : SWIGINTERN PyObject *_wrap_Dataset_GetProjectionRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22847         863 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22848         863 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22849         863 :   void *argp1 = 0 ;
   22850         863 :   int res1 = 0 ;
   22851         863 :   PyObject *swig_obj[1] ;
   22852         863 :   char *result = 0 ;
   22853             :   
   22854         863 :   if (!args) SWIG_fail;
   22855         863 :   swig_obj[0] = args;
   22856         863 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22857         863 :   if (!SWIG_IsOK(res1)) {
   22858           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetProjectionRef" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22859             :   }
   22860         863 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22861         863 :   {
   22862         863 :     const int bLocalUseExceptions = GetUseExceptions();
   22863         863 :     if ( bLocalUseExceptions ) {
   22864         625 :       pushErrorHandler();
   22865             :     }
   22866         863 :     {
   22867         863 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22868         863 :       result = (char *)GDALDatasetShadow_GetProjectionRef(arg1);
   22869         863 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22870             :     }
   22871         863 :     if ( bLocalUseExceptions ) {
   22872         625 :       popErrorHandler();
   22873             :     }
   22874             : #ifndef SED_HACKS
   22875             :     if ( bLocalUseExceptions ) {
   22876             :       CPLErr eclass = CPLGetLastErrorType();
   22877             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22878             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22879             :       }
   22880             :     }
   22881             : #endif
   22882             :   }
   22883         863 :   resultobj = SWIG_FromCharPtr((const char *)result);
   22884         863 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   22885             :   return resultobj;
   22886             : fail:
   22887             :   return NULL;
   22888             : }
   22889             : 
   22890             : 
   22891          14 : SWIGINTERN PyObject *_wrap_Dataset_GetRefCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22892          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22893          14 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22894          14 :   void *argp1 = 0 ;
   22895          14 :   int res1 = 0 ;
   22896          14 :   PyObject *swig_obj[1] ;
   22897          14 :   int result;
   22898             :   
   22899          14 :   if (!args) SWIG_fail;
   22900          14 :   swig_obj[0] = args;
   22901          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22902          14 :   if (!SWIG_IsOK(res1)) {
   22903           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetRefCount" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22904             :   }
   22905          14 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22906          14 :   {
   22907          14 :     const int bLocalUseExceptions = GetUseExceptions();
   22908          14 :     if ( bLocalUseExceptions ) {
   22909           6 :       pushErrorHandler();
   22910             :     }
   22911          14 :     {
   22912          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22913          14 :       result = (int)GDALDatasetShadow_GetRefCount(arg1);
   22914          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22915             :     }
   22916          14 :     if ( bLocalUseExceptions ) {
   22917           6 :       popErrorHandler();
   22918             :     }
   22919             : #ifndef SED_HACKS
   22920             :     if ( bLocalUseExceptions ) {
   22921             :       CPLErr eclass = CPLGetLastErrorType();
   22922             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22923             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22924             :       }
   22925             :     }
   22926             : #endif
   22927             :   }
   22928          14 :   resultobj = SWIG_From_int(static_cast< int >(result));
   22929          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; } }
   22930             :   return resultobj;
   22931             : fail:
   22932             :   return NULL;
   22933             : }
   22934             : 
   22935             : 
   22936           0 : SWIGINTERN PyObject *_wrap_Dataset_GetSummaryRefCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22937           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22938           0 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22939           0 :   void *argp1 = 0 ;
   22940           0 :   int res1 = 0 ;
   22941           0 :   PyObject *swig_obj[1] ;
   22942           0 :   int result;
   22943             :   
   22944           0 :   if (!args) SWIG_fail;
   22945           0 :   swig_obj[0] = args;
   22946           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22947           0 :   if (!SWIG_IsOK(res1)) {
   22948           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetSummaryRefCount" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22949             :   }
   22950           0 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22951           0 :   {
   22952           0 :     const int bLocalUseExceptions = GetUseExceptions();
   22953           0 :     if ( bLocalUseExceptions ) {
   22954           0 :       pushErrorHandler();
   22955             :     }
   22956           0 :     {
   22957           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   22958           0 :       result = (int)GDALDatasetShadow_GetSummaryRefCount(arg1);
   22959           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   22960             :     }
   22961           0 :     if ( bLocalUseExceptions ) {
   22962           0 :       popErrorHandler();
   22963             :     }
   22964             : #ifndef SED_HACKS
   22965             :     if ( bLocalUseExceptions ) {
   22966             :       CPLErr eclass = CPLGetLastErrorType();
   22967             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   22968             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   22969             :       }
   22970             :     }
   22971             : #endif
   22972             :   }
   22973           0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   22974           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; } }
   22975             :   return resultobj;
   22976             : fail:
   22977             :   return NULL;
   22978             : }
   22979             : 
   22980             : 
   22981        1209 : SWIGINTERN PyObject *_wrap_Dataset_GetSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   22982        1209 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   22983        1209 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   22984        1209 :   void *argp1 = 0 ;
   22985        1209 :   int res1 = 0 ;
   22986        1209 :   PyObject *swig_obj[1] ;
   22987        1209 :   OSRSpatialReferenceShadow *result = 0 ;
   22988             :   
   22989        1209 :   if (!args) SWIG_fail;
   22990        1209 :   swig_obj[0] = args;
   22991        1209 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   22992        1209 :   if (!SWIG_IsOK(res1)) {
   22993           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetSpatialRef" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   22994             :   }
   22995        1209 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   22996        1209 :   {
   22997        1209 :     const int bLocalUseExceptions = GetUseExceptions();
   22998        1209 :     if ( bLocalUseExceptions ) {
   22999         949 :       pushErrorHandler();
   23000             :     }
   23001        1209 :     {
   23002        1209 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23003        1209 :       result = (OSRSpatialReferenceShadow *)GDALDatasetShadow_GetSpatialRef(arg1);
   23004        1209 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23005             :     }
   23006        1209 :     if ( bLocalUseExceptions ) {
   23007         949 :       popErrorHandler();
   23008             :     }
   23009             : #ifndef SED_HACKS
   23010             :     if ( bLocalUseExceptions ) {
   23011             :       CPLErr eclass = CPLGetLastErrorType();
   23012             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23013             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23014             :       }
   23015             :     }
   23016             : #endif
   23017             :   }
   23018        1209 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN |  0 );
   23019        1209 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23020             :   return resultobj;
   23021             : fail:
   23022             :   return NULL;
   23023             : }
   23024             : 
   23025             : 
   23026        1624 : SWIGINTERN PyObject *_wrap_Dataset_SetProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23027        1624 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23028        1624 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23029        1624 :   char *arg2 = (char *) 0 ;
   23030        1624 :   void *argp1 = 0 ;
   23031        1624 :   int res1 = 0 ;
   23032        1624 :   int res2 ;
   23033        1624 :   char *buf2 = 0 ;
   23034        1624 :   int alloc2 = 0 ;
   23035        1624 :   PyObject *swig_obj[2] ;
   23036        1624 :   CPLErr result;
   23037             :   
   23038        1624 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_SetProjection", 2, 2, swig_obj)) SWIG_fail;
   23039        1624 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23040        1624 :   if (!SWIG_IsOK(res1)) {
   23041           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_SetProjection" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23042             :   }
   23043        1624 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23044        1624 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   23045        1624 :   if (!SWIG_IsOK(res2)) {
   23046           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_SetProjection" "', argument " "2"" of type '" "char const *""'");
   23047             :   }
   23048        1624 :   arg2 = reinterpret_cast< char * >(buf2);
   23049        1624 :   {
   23050        1624 :     if (!arg2) {
   23051           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   23052             :     }
   23053             :   }
   23054        1624 :   {
   23055        1624 :     const int bLocalUseExceptions = GetUseExceptions();
   23056        1624 :     if ( bLocalUseExceptions ) {
   23057         742 :       pushErrorHandler();
   23058             :     }
   23059        1624 :     {
   23060        1624 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23061        1624 :       result = (CPLErr)GDALDatasetShadow_SetProjection(arg1,(char const *)arg2);
   23062        1624 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23063             :     }
   23064        1624 :     if ( bLocalUseExceptions ) {
   23065         742 :       popErrorHandler();
   23066             :     }
   23067             : #ifndef SED_HACKS
   23068             :     if ( bLocalUseExceptions ) {
   23069             :       CPLErr eclass = CPLGetLastErrorType();
   23070             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23071             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23072             :       }
   23073             :     }
   23074             : #endif
   23075             :   }
   23076        1624 :   resultobj = SWIG_From_int(static_cast< int >(result));
   23077        1624 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   23078        1624 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23079             :   return resultobj;
   23080           0 : fail:
   23081           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   23082             :   return NULL;
   23083             : }
   23084             : 
   23085             : 
   23086         281 : SWIGINTERN PyObject *_wrap_Dataset_SetSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23087         281 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23088         281 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23089         281 :   OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
   23090         281 :   void *argp1 = 0 ;
   23091         281 :   int res1 = 0 ;
   23092         281 :   void *argp2 = 0 ;
   23093         281 :   int res2 = 0 ;
   23094         281 :   PyObject *swig_obj[2] ;
   23095         281 :   CPLErr result;
   23096             :   
   23097         281 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_SetSpatialRef", 2, 2, swig_obj)) SWIG_fail;
   23098         281 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23099         281 :   if (!SWIG_IsOK(res1)) {
   23100           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_SetSpatialRef" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23101             :   }
   23102         281 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23103         281 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   23104         281 :   if (!SWIG_IsOK(res2)) {
   23105           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_SetSpatialRef" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'"); 
   23106             :   }
   23107         281 :   arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
   23108         281 :   {
   23109         281 :     const int bLocalUseExceptions = GetUseExceptions();
   23110         281 :     if ( bLocalUseExceptions ) {
   23111         143 :       pushErrorHandler();
   23112             :     }
   23113         281 :     {
   23114         281 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23115         281 :       result = (CPLErr)GDALDatasetShadow_SetSpatialRef(arg1,arg2);
   23116         281 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23117             :     }
   23118         281 :     if ( bLocalUseExceptions ) {
   23119         143 :       popErrorHandler();
   23120             :     }
   23121             : #ifndef SED_HACKS
   23122             :     if ( bLocalUseExceptions ) {
   23123             :       CPLErr eclass = CPLGetLastErrorType();
   23124             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23125             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23126             :       }
   23127             :     }
   23128             : #endif
   23129             :   }
   23130         281 :   resultobj = SWIG_From_int(static_cast< int >(result));
   23131         281 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23132             :   return resultobj;
   23133             : fail:
   23134             :   return NULL;
   23135             : }
   23136             : 
   23137             : 
   23138        3922 : SWIGINTERN PyObject *_wrap_Dataset_GetGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   23139        3922 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23140        3922 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23141        3922 :   double *arg2 ;
   23142        3922 :   int *arg3 = (int *) 0 ;
   23143        3922 :   int *arg4 = (int *) 0 ;
   23144        3922 :   void *argp1 = 0 ;
   23145        3922 :   int res1 = 0 ;
   23146        3922 :   double argout2[6] ;
   23147        3922 :   int isvalid2 ;
   23148        3922 :   int val4 ;
   23149        3922 :   PyObject * obj0 = 0 ;
   23150        3922 :   PyObject * obj1 = 0 ;
   23151        3922 :   char * kwnames[] = {
   23152             :     (char *)"self",  (char *)"can_return_null",  NULL 
   23153             :   };
   23154             :   
   23155        3922 :   {
   23156             :     /* %typemap(in,numinputs=0) (double argout2[6], int* isvalid2) */
   23157        3922 :     arg2 = argout2;
   23158        3922 :     arg3 = &isvalid2;
   23159             :   }
   23160        3922 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Dataset_GetGeoTransform", kwnames, &obj0, &obj1)) SWIG_fail;
   23161        3922 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23162        3922 :   if (!SWIG_IsOK(res1)) {
   23163           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGeoTransform" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23164             :   }
   23165        3922 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23166        3922 :   if (obj1) {
   23167         403 :     {
   23168             :       /* %typemap(in) (int *optional_##int) */
   23169         403 :       if ( obj1 == Py_None ) {
   23170             :         arg4 = 0;
   23171             :       }
   23172         403 :       else if ( PyArg_Parse( obj1,"i" ,&val4 ) ) {
   23173             :         arg4 = (int *) &val4;
   23174             :       }
   23175             :       else {
   23176           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   23177           0 :         SWIG_fail;
   23178             :       }
   23179             :     }
   23180             :   }
   23181        3922 :   {
   23182        3922 :     const int bLocalUseExceptions = GetUseExceptions();
   23183        3922 :     if ( bLocalUseExceptions ) {
   23184        2622 :       pushErrorHandler();
   23185             :     }
   23186        3922 :     {
   23187        3922 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23188        3922 :       GDALDatasetShadow_GetGeoTransform(arg1,arg2,arg3,arg4);
   23189        3922 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23190             :     }
   23191        3922 :     if ( bLocalUseExceptions ) {
   23192        2622 :       popErrorHandler();
   23193             :     }
   23194             : #ifndef SED_HACKS
   23195             :     if ( bLocalUseExceptions ) {
   23196             :       CPLErr eclass = CPLGetLastErrorType();
   23197             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23198             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23199             :       }
   23200             :     }
   23201             : #endif
   23202             :   }
   23203        3922 :   resultobj = SWIG_Py_Void();
   23204        3922 :   {
   23205             :     /* %typemap(argout) (double argout[6], int* isvalid)  */
   23206        3922 :     PyObject *r;
   23207        3922 :     if ( !*arg3 ) {
   23208         125 :       Py_INCREF(Py_None);
   23209         125 :       r = Py_None;
   23210             :     }
   23211             :     else {
   23212        3797 :       r = CreateTupleFromDoubleArray(arg2, 6);
   23213             :     }
   23214             : #if 0x040001 >= 0x040300
   23215             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   23216             : #else
   23217        3922 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   23218             : #endif
   23219             :   }
   23220        3922 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23221             :   return resultobj;
   23222             : fail:
   23223             :   return NULL;
   23224             : }
   23225             : 
   23226             : 
   23227        2858 : SWIGINTERN PyObject *_wrap_Dataset_SetGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23228        2858 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23229        2858 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23230        2858 :   double *arg2 ;
   23231        2858 :   void *argp1 = 0 ;
   23232        2858 :   int res1 = 0 ;
   23233        2858 :   double argin2[6] ;
   23234        2858 :   PyObject *swig_obj[2] ;
   23235        2858 :   CPLErr result;
   23236             :   
   23237        2858 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_SetGeoTransform", 2, 2, swig_obj)) SWIG_fail;
   23238        2858 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23239        2858 :   if (!SWIG_IsOK(res1)) {
   23240           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_SetGeoTransform" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23241             :   }
   23242        2858 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23243        2858 :   {
   23244             :     /* %typemap(in) (double argin2[ANY]) */
   23245        2858 :     arg2 = argin2;
   23246        2858 :     if (! PySequence_Check(swig_obj[1]) ) {
   23247           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   23248           0 :       SWIG_fail;
   23249             :     }
   23250        2858 :     Py_ssize_t seq_size = PySequence_Size(swig_obj[1]);
   23251        2858 :     if ( seq_size != 6 ) {
   23252           0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   23253           0 :       SWIG_fail;
   23254             :     }
   23255       20006 :     for (unsigned int i=0; i<6; i++) {
   23256       17148 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   23257       17148 :       double val;
   23258       17148 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   23259           0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   23260           0 :         Py_DECREF(o);
   23261           0 :         SWIG_fail;
   23262             :       }
   23263       17148 :       arg2[i] =  val;
   23264       17148 :       Py_DECREF(o);
   23265             :     }
   23266             :   }
   23267        2858 :   {
   23268        2858 :     const int bLocalUseExceptions = GetUseExceptions();
   23269        2858 :     if ( bLocalUseExceptions ) {
   23270        1706 :       pushErrorHandler();
   23271             :     }
   23272        2858 :     {
   23273        2858 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23274        2858 :       result = (CPLErr)GDALDatasetShadow_SetGeoTransform(arg1,arg2);
   23275        2858 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23276             :     }
   23277        2858 :     if ( bLocalUseExceptions ) {
   23278        1706 :       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        2858 :   resultobj = SWIG_From_int(static_cast< int >(result));
   23290        2858 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23291             :   return resultobj;
   23292             : fail:
   23293             :   return NULL;
   23294             : }
   23295             : 
   23296             : 
   23297          10 : SWIGINTERN PyObject *_wrap_Dataset_GetExtent(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   23298          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23299          10 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23300          10 :   double *arg2 ;
   23301          10 :   int *arg3 = (int *) 0 ;
   23302          10 :   OSRSpatialReferenceShadow *arg4 = (OSRSpatialReferenceShadow *) NULL ;
   23303          10 :   void *argp1 = 0 ;
   23304          10 :   int res1 = 0 ;
   23305          10 :   double argout2[4] ;
   23306          10 :   int isvalid2 ;
   23307          10 :   void *argp4 = 0 ;
   23308          10 :   int res4 = 0 ;
   23309          10 :   PyObject * obj0 = 0 ;
   23310          10 :   PyObject * obj1 = 0 ;
   23311          10 :   char * kwnames[] = {
   23312             :     (char *)"self",  (char *)"srs",  NULL 
   23313             :   };
   23314             :   
   23315          10 :   {
   23316             :     /* %typemap(in,numinputs=0) (double argout2[4], int* isvalid2) */
   23317          10 :     arg2 = argout2;
   23318          10 :     arg3 = &isvalid2;
   23319             :   }
   23320          10 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Dataset_GetExtent", kwnames, &obj0, &obj1)) SWIG_fail;
   23321          10 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23322          10 :   if (!SWIG_IsOK(res1)) {
   23323           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetExtent" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23324             :   }
   23325          10 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23326          10 :   if (obj1) {
   23327           2 :     res4 = SWIG_ConvertPtr(obj1, &argp4,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   23328           2 :     if (!SWIG_IsOK(res4)) {
   23329           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Dataset_GetExtent" "', argument " "4"" of type '" "OSRSpatialReferenceShadow *""'"); 
   23330             :     }
   23331           2 :     arg4 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp4);
   23332             :   }
   23333          10 :   {
   23334          10 :     const int bLocalUseExceptions = GetUseExceptions();
   23335          10 :     if ( bLocalUseExceptions ) {
   23336           2 :       pushErrorHandler();
   23337             :     }
   23338          10 :     {
   23339          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23340          10 :       GDALDatasetShadow_GetExtent(arg1,arg2,arg3,arg4);
   23341          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23342             :     }
   23343          10 :     if ( bLocalUseExceptions ) {
   23344           2 :       popErrorHandler();
   23345             :     }
   23346             : #ifndef SED_HACKS
   23347             :     if ( bLocalUseExceptions ) {
   23348             :       CPLErr eclass = CPLGetLastErrorType();
   23349             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23350             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23351             :       }
   23352             :     }
   23353             : #endif
   23354             :   }
   23355          10 :   resultobj = SWIG_Py_Void();
   23356          10 :   {
   23357             :     /* %typemap(argout) (double argout[4], int* isvalid)  */
   23358          10 :     PyObject *r;
   23359          10 :     if ( !*arg3 ) {
   23360           3 :       Py_INCREF(Py_None);
   23361           3 :       r = Py_None;
   23362             :     }
   23363             :     else {
   23364           7 :       r = CreateTupleFromDoubleArray(arg2, 4);
   23365             :     }
   23366             : #if 0x040001 >= 0x040300
   23367             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   23368             : #else
   23369          10 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   23370             : #endif
   23371             :   }
   23372          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; } }
   23373             :   return resultobj;
   23374             : fail:
   23375             :   return NULL;
   23376             : }
   23377             : 
   23378             : 
   23379           4 : SWIGINTERN PyObject *_wrap_Dataset_GetExtentWGS84LongLat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23380           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23381           4 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23382           4 :   double *arg2 ;
   23383           4 :   int *arg3 = (int *) 0 ;
   23384           4 :   void *argp1 = 0 ;
   23385           4 :   int res1 = 0 ;
   23386           4 :   double argout2[4] ;
   23387           4 :   int isvalid2 ;
   23388           4 :   PyObject *swig_obj[1] ;
   23389             :   
   23390           4 :   {
   23391             :     /* %typemap(in,numinputs=0) (double argout2[4], int* isvalid2) */
   23392           4 :     arg2 = argout2;
   23393           4 :     arg3 = &isvalid2;
   23394             :   }
   23395           4 :   if (!args) SWIG_fail;
   23396           4 :   swig_obj[0] = args;
   23397           4 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23398           4 :   if (!SWIG_IsOK(res1)) {
   23399           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetExtentWGS84LongLat" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23400             :   }
   23401           4 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23402           4 :   {
   23403           4 :     const int bLocalUseExceptions = GetUseExceptions();
   23404           4 :     if ( bLocalUseExceptions ) {
   23405           2 :       pushErrorHandler();
   23406             :     }
   23407           4 :     {
   23408           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23409           4 :       GDALDatasetShadow_GetExtentWGS84LongLat(arg1,arg2,arg3);
   23410           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23411             :     }
   23412           4 :     if ( bLocalUseExceptions ) {
   23413           2 :       popErrorHandler();
   23414             :     }
   23415             : #ifndef SED_HACKS
   23416             :     if ( bLocalUseExceptions ) {
   23417             :       CPLErr eclass = CPLGetLastErrorType();
   23418             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23419             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23420             :       }
   23421             :     }
   23422             : #endif
   23423             :   }
   23424           4 :   resultobj = SWIG_Py_Void();
   23425           4 :   {
   23426             :     /* %typemap(argout) (double argout[4], int* isvalid)  */
   23427           4 :     PyObject *r;
   23428           4 :     if ( !*arg3 ) {
   23429           2 :       Py_INCREF(Py_None);
   23430           2 :       r = Py_None;
   23431             :     }
   23432             :     else {
   23433           2 :       r = CreateTupleFromDoubleArray(arg2, 4);
   23434             :     }
   23435             : #if 0x040001 >= 0x040300
   23436             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   23437             : #else
   23438           4 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   23439             : #endif
   23440             :   }
   23441           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; } }
   23442             :   return resultobj;
   23443             : fail:
   23444             :   return NULL;
   23445             : }
   23446             : 
   23447             : 
   23448         670 : SWIGINTERN PyObject *_wrap_Dataset_BuildOverviews(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   23449         670 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23450         670 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23451         670 :   char *arg2 = (char *) "NEAREST" ;
   23452         670 :   int arg3 = (int) 0 ;
   23453         670 :   int *arg4 = (int *) 0 ;
   23454         670 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   23455         670 :   void *arg6 = (void *) NULL ;
   23456         670 :   char **arg7 = (char **) NULL ;
   23457         670 :   void *argp1 = 0 ;
   23458         670 :   int res1 = 0 ;
   23459         670 :   int res2 ;
   23460         670 :   char *buf2 = 0 ;
   23461         670 :   int alloc2 = 0 ;
   23462         670 :   PyObject * obj0 = 0 ;
   23463         670 :   PyObject * obj1 = 0 ;
   23464         670 :   PyObject * obj2 = 0 ;
   23465         670 :   PyObject * obj3 = 0 ;
   23466         670 :   PyObject * obj4 = 0 ;
   23467         670 :   PyObject * obj5 = 0 ;
   23468         670 :   char * kwnames[] = {
   23469             :     (char *)"self",  (char *)"resampling",  (char *)"overviewlist",  (char *)"callback",  (char *)"callback_data",  (char *)"options",  NULL 
   23470             :   };
   23471         670 :   int result;
   23472             :   
   23473             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   23474         670 :   PyProgressData *psProgressInfo;
   23475         670 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   23476         670 :   psProgressInfo->nLastReported = -1;
   23477         670 :   psProgressInfo->psPyCallback = NULL;
   23478         670 :   psProgressInfo->psPyCallbackData = NULL;
   23479         670 :   arg6 = psProgressInfo;
   23480         670 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOOO:Dataset_BuildOverviews", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
   23481         670 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23482         670 :   if (!SWIG_IsOK(res1)) {
   23483           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_BuildOverviews" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23484             :   }
   23485         670 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23486         670 :   if (obj1) {
   23487         619 :     res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   23488         619 :     if (!SWIG_IsOK(res2)) {
   23489           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_BuildOverviews" "', argument " "2"" of type '" "char const *""'");
   23490             :     }
   23491         619 :     arg2 = reinterpret_cast< char * >(buf2);
   23492             :   }
   23493         670 :   if (obj2) {
   23494         670 :     {
   23495             :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   23496         670 :       arg4 = CreateCIntListFromSequence(obj2, &arg3);
   23497         670 :       if( arg3 < 0 ) {
   23498           0 :         SWIG_fail;
   23499             :       }
   23500             :     }
   23501             :   }
   23502         670 :   if (obj3) {
   23503           2 :     {
   23504             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   23505             :       /* callback_func typemap */
   23506             :       
   23507             :       /* In some cases 0 is passed instead of None. */
   23508             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   23509           2 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   23510             :       {
   23511           0 :         if( PyLong_AsLong(obj3) == 0 )
   23512             :         {
   23513           0 :           obj3 = Py_None;
   23514             :         }
   23515             :       }
   23516             :       
   23517           2 :       if (obj3 && obj3 != Py_None ) {
   23518           2 :         void* cbfunction = NULL;
   23519           2 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   23520             :             (void**)&cbfunction,
   23521             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   23522             :             SWIG_POINTER_EXCEPTION | 0 ));
   23523             :         
   23524           2 :         if ( cbfunction == GDALTermProgress ) {
   23525             :           arg5 = GDALTermProgress;
   23526             :         } else {
   23527           2 :           if (!PyCallable_Check(obj3)) {
   23528           0 :             PyErr_SetString( PyExc_RuntimeError,
   23529             :               "Object given is not a Python function" );
   23530           0 :             SWIG_fail;
   23531             :           }
   23532           2 :           psProgressInfo->psPyCallback = obj3;
   23533           2 :           arg5 = PyProgressProxy;
   23534             :         }
   23535             :         
   23536             :       }
   23537             :       
   23538             :     }
   23539             :   }
   23540         670 :   if (obj4) {
   23541           2 :     {
   23542             :       /* %typemap(in) ( void* callback_data=NULL)  */
   23543           2 :       psProgressInfo->psPyCallbackData = obj4 ;
   23544             :     }
   23545             :   }
   23546         670 :   if (obj5) {
   23547          14 :     {
   23548             :       /* %typemap(in) char **dict */
   23549          14 :       arg7 = NULL;
   23550          14 :       if ( PySequence_Check( obj5 ) ) {
   23551          14 :         int bErr = FALSE;
   23552          14 :         arg7 = CSLFromPySequence(obj5, &bErr);
   23553          14 :         if ( bErr )
   23554             :         {
   23555           0 :           SWIG_fail;
   23556             :         }
   23557             :       }
   23558           0 :       else if ( PyMapping_Check( obj5 ) ) {
   23559           0 :         int bErr = FALSE;
   23560           0 :         arg7 = CSLFromPyMapping(obj5, &bErr);
   23561           0 :         if ( bErr )
   23562             :         {
   23563           0 :           SWIG_fail;
   23564             :         }
   23565             :       }
   23566             :       else {
   23567           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   23568           0 :         SWIG_fail;
   23569             :       }
   23570             :     }
   23571             :   }
   23572         670 :   {
   23573         670 :     const int bLocalUseExceptions = GetUseExceptions();
   23574         670 :     if ( bLocalUseExceptions ) {
   23575         255 :       pushErrorHandler();
   23576             :     }
   23577         670 :     {
   23578         670 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23579         670 :       result = (int)GDALDatasetShadow_BuildOverviews(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
   23580         670 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23581             :     }
   23582         670 :     if ( bLocalUseExceptions ) {
   23583         255 :       popErrorHandler();
   23584             :     }
   23585             : #ifndef SED_HACKS
   23586             :     if ( bLocalUseExceptions ) {
   23587             :       CPLErr eclass = CPLGetLastErrorType();
   23588             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23589             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23590             :       }
   23591             :     }
   23592             : #endif
   23593             :   }
   23594         670 :   resultobj = SWIG_From_int(static_cast< int >(result));
   23595         670 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   23596         670 :   {
   23597             :     /* %typemap(freearg) (int nList, int* pList) */
   23598         670 :     free(arg4);
   23599             :   }
   23600         670 :   {
   23601             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   23602             :     
   23603         670 :     CPLFree(psProgressInfo);
   23604             :     
   23605             :   }
   23606         670 :   {
   23607             :     /* %typemap(freearg) char **dict */
   23608         670 :     CSLDestroy( arg7 );
   23609             :   }
   23610         684 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23611             :   return resultobj;
   23612           0 : fail:
   23613           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   23614           0 :   {
   23615             :     /* %typemap(freearg) (int nList, int* pList) */
   23616           0 :     free(arg4);
   23617             :   }
   23618           0 :   {
   23619             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   23620             :     
   23621           0 :     CPLFree(psProgressInfo);
   23622             :     
   23623             :   }
   23624           0 :   {
   23625             :     /* %typemap(freearg) char **dict */
   23626           0 :     CSLDestroy( arg7 );
   23627             :   }
   23628             :   return NULL;
   23629             : }
   23630             : 
   23631             : 
   23632         118 : SWIGINTERN PyObject *_wrap_Dataset_GetGCPCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23633         118 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23634         118 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23635         118 :   void *argp1 = 0 ;
   23636         118 :   int res1 = 0 ;
   23637         118 :   PyObject *swig_obj[1] ;
   23638         118 :   int result;
   23639             :   
   23640         118 :   if (!args) SWIG_fail;
   23641         118 :   swig_obj[0] = args;
   23642         118 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23643         118 :   if (!SWIG_IsOK(res1)) {
   23644           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGCPCount" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23645             :   }
   23646         118 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23647         118 :   {
   23648         118 :     const int bLocalUseExceptions = GetUseExceptions();
   23649         118 :     if ( bLocalUseExceptions ) {
   23650          68 :       pushErrorHandler();
   23651             :     }
   23652         118 :     {
   23653         118 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23654         118 :       result = (int)GDALDatasetShadow_GetGCPCount(arg1);
   23655         118 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23656             :     }
   23657         118 :     if ( bLocalUseExceptions ) {
   23658          68 :       popErrorHandler();
   23659             :     }
   23660             : #ifndef SED_HACKS
   23661             :     if ( bLocalUseExceptions ) {
   23662             :       CPLErr eclass = CPLGetLastErrorType();
   23663             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23664             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23665             :       }
   23666             :     }
   23667             : #endif
   23668             :   }
   23669         118 :   resultobj = SWIG_From_int(static_cast< int >(result));
   23670         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; } }
   23671             :   return resultobj;
   23672             : fail:
   23673             :   return NULL;
   23674             : }
   23675             : 
   23676             : 
   23677         455 : SWIGINTERN PyObject *_wrap_Dataset_GetGCPProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23678         455 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23679         455 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23680         455 :   void *argp1 = 0 ;
   23681         455 :   int res1 = 0 ;
   23682         455 :   PyObject *swig_obj[1] ;
   23683         455 :   char *result = 0 ;
   23684             :   
   23685         455 :   if (!args) SWIG_fail;
   23686         455 :   swig_obj[0] = args;
   23687         455 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23688         455 :   if (!SWIG_IsOK(res1)) {
   23689           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGCPProjection" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23690             :   }
   23691         455 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23692         455 :   {
   23693         455 :     const int bLocalUseExceptions = GetUseExceptions();
   23694         455 :     if ( bLocalUseExceptions ) {
   23695         436 :       pushErrorHandler();
   23696             :     }
   23697         455 :     {
   23698         455 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23699         455 :       result = (char *)GDALDatasetShadow_GetGCPProjection(arg1);
   23700         455 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23701             :     }
   23702         455 :     if ( bLocalUseExceptions ) {
   23703         436 :       popErrorHandler();
   23704             :     }
   23705             : #ifndef SED_HACKS
   23706             :     if ( bLocalUseExceptions ) {
   23707             :       CPLErr eclass = CPLGetLastErrorType();
   23708             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23709             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23710             :       }
   23711             :     }
   23712             : #endif
   23713             :   }
   23714         455 :   resultobj = SWIG_FromCharPtr((const char *)result);
   23715         455 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23716             :   return resultobj;
   23717             : fail:
   23718             :   return NULL;
   23719             : }
   23720             : 
   23721             : 
   23722         426 : SWIGINTERN PyObject *_wrap_Dataset_GetGCPSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23723         426 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23724         426 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23725         426 :   void *argp1 = 0 ;
   23726         426 :   int res1 = 0 ;
   23727         426 :   PyObject *swig_obj[1] ;
   23728         426 :   OSRSpatialReferenceShadow *result = 0 ;
   23729             :   
   23730         426 :   if (!args) SWIG_fail;
   23731         426 :   swig_obj[0] = args;
   23732         426 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23733         426 :   if (!SWIG_IsOK(res1)) {
   23734           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGCPSpatialRef" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23735             :   }
   23736         426 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23737         426 :   {
   23738         426 :     const int bLocalUseExceptions = GetUseExceptions();
   23739         426 :     if ( bLocalUseExceptions ) {
   23740         412 :       pushErrorHandler();
   23741             :     }
   23742         426 :     {
   23743         426 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23744         426 :       result = (OSRSpatialReferenceShadow *)GDALDatasetShadow_GetGCPSpatialRef(arg1);
   23745         426 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23746             :     }
   23747         426 :     if ( bLocalUseExceptions ) {
   23748         412 :       popErrorHandler();
   23749             :     }
   23750             : #ifndef SED_HACKS
   23751             :     if ( bLocalUseExceptions ) {
   23752             :       CPLErr eclass = CPLGetLastErrorType();
   23753             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23754             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23755             :       }
   23756             :     }
   23757             : #endif
   23758             :   }
   23759         426 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN |  0 );
   23760         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; } }
   23761             :   return resultobj;
   23762             : fail:
   23763             :   return NULL;
   23764             : }
   23765             : 
   23766             : 
   23767         530 : SWIGINTERN PyObject *_wrap_Dataset_GetGCPs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23768         530 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23769         530 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23770         530 :   int *arg2 = (int *) 0 ;
   23771         530 :   GDAL_GCP **arg3 = (GDAL_GCP **) 0 ;
   23772         530 :   void *argp1 = 0 ;
   23773         530 :   int res1 = 0 ;
   23774         530 :   int nGCPs2 = 0 ;
   23775         530 :   GDAL_GCP *pGCPs2 = 0 ;
   23776         530 :   PyObject *swig_obj[1] ;
   23777             :   
   23778         530 :   {
   23779             :     /* %typemap(in,numinputs=0) (int *nGCPs2, GDAL_GCP const **pGCPs2 ) */
   23780         530 :     arg2 = &nGCPs2;
   23781         530 :     arg3 = &pGCPs2;
   23782             :   }
   23783         530 :   if (!args) SWIG_fail;
   23784         530 :   swig_obj[0] = args;
   23785         530 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23786         530 :   if (!SWIG_IsOK(res1)) {
   23787           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGCPs" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23788             :   }
   23789         530 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23790         530 :   {
   23791         530 :     const int bLocalUseExceptions = GetUseExceptions();
   23792         530 :     if ( bLocalUseExceptions ) {
   23793         495 :       pushErrorHandler();
   23794             :     }
   23795         530 :     {
   23796         530 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23797         530 :       GDALDatasetShadow_GetGCPs(arg1,arg2,(GDAL_GCP const **)arg3);
   23798         530 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23799             :     }
   23800         530 :     if ( bLocalUseExceptions ) {
   23801         495 :       popErrorHandler();
   23802             :     }
   23803             : #ifndef SED_HACKS
   23804             :     if ( bLocalUseExceptions ) {
   23805             :       CPLErr eclass = CPLGetLastErrorType();
   23806             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23807             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23808             :       }
   23809             :     }
   23810             : #endif
   23811             :   }
   23812         530 :   resultobj = SWIG_Py_Void();
   23813         530 :   {
   23814             :     /* %typemap(argout) (int *nGCPs, GDAL_GCP const **pGCPs ) */
   23815         530 :     PyObject *dict = PyTuple_New( *arg2 );
   23816        3832 :     for( int i = 0; i < *arg2; i++ ) {
   23817        6604 :       GDAL_GCP *o = new_GDAL_GCP( (*arg3)[i].dfGCPX,
   23818             :         (*arg3)[i].dfGCPY,
   23819             :         (*arg3)[i].dfGCPZ,
   23820             :         (*arg3)[i].dfGCPPixel,
   23821             :         (*arg3)[i].dfGCPLine,
   23822        3302 :         (*arg3)[i].pszInfo,
   23823        3302 :         (*arg3)[i].pszId );
   23824             :       
   23825        3302 :       PyTuple_SetItem(dict, i,
   23826             :         SWIG_NewPointerObj((void*)o,SWIGTYPE_p_GDAL_GCP,1) );
   23827             :     }
   23828         530 :     Py_DECREF(resultobj);
   23829         530 :     resultobj = dict;
   23830             :   }
   23831         530 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   23832             :   return resultobj;
   23833             : fail:
   23834             :   return NULL;
   23835             : }
   23836             : 
   23837             : 
   23838          29 : SWIGINTERN PyObject *_wrap_Dataset__SetGCPs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23839          29 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23840          29 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23841          29 :   int arg2 ;
   23842          29 :   GDAL_GCP *arg3 = (GDAL_GCP *) 0 ;
   23843          29 :   char *arg4 = (char *) 0 ;
   23844          29 :   void *argp1 = 0 ;
   23845          29 :   int res1 = 0 ;
   23846          29 :   GDAL_GCP *tmpGCPList2 ;
   23847          29 :   int res4 ;
   23848          29 :   char *buf4 = 0 ;
   23849          29 :   int alloc4 = 0 ;
   23850          29 :   PyObject *swig_obj[3] ;
   23851          29 :   CPLErr result;
   23852             :   
   23853          29 :   if (!SWIG_Python_UnpackTuple(args, "Dataset__SetGCPs", 3, 3, swig_obj)) SWIG_fail;
   23854          29 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23855          29 :   if (!SWIG_IsOK(res1)) {
   23856           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset__SetGCPs" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23857             :   }
   23858          29 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23859          29 :   {
   23860             :     /* %typemap(in,numinputs=1) (int nGCPs, GDAL_GCP const *pGCPs ) */
   23861             :     /* check if is List */
   23862          29 :     if ( !PySequence_Check(swig_obj[1]) ) {
   23863           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   23864           0 :       SWIG_fail;
   23865             :     }
   23866          29 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   23867          29 :     if( size > (Py_ssize_t)INT_MAX ) {
   23868           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   23869           0 :       SWIG_fail;
   23870             :     }
   23871          29 :     if( (size_t)size > SIZE_MAX / sizeof(GDAL_GCP) ) {
   23872           0 :       PyErr_SetString(PyExc_RuntimeError, "too big sequence");
   23873           0 :       SWIG_fail;
   23874             :     }
   23875          29 :     arg2 = (int)size;
   23876          29 :     tmpGCPList2 = (GDAL_GCP*) malloc(arg2*sizeof(GDAL_GCP));
   23877          29 :     if( !tmpGCPList2 ) {
   23878           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   23879           0 :       SWIG_fail;
   23880             :     }
   23881          96 :     arg3 = tmpGCPList2;
   23882          96 :     for( int i = 0; i<arg2; i++ ) {
   23883          67 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   23884          67 :       GDAL_GCP *item = 0;
   23885          67 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&item, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0 ));
   23886          67 :       if ( ! item ) {
   23887           0 :         Py_DECREF(o);
   23888           0 :         SWIG_fail;
   23889             :       }
   23890          67 :       memcpy( tmpGCPList2 + i, item, sizeof( GDAL_GCP ) );
   23891          67 :       Py_DECREF(o);
   23892             :     }
   23893             :   }
   23894          29 :   res4 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf4, NULL, &alloc4);
   23895          29 :   if (!SWIG_IsOK(res4)) {
   23896           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Dataset__SetGCPs" "', argument " "4"" of type '" "char const *""'");
   23897             :   }
   23898          29 :   arg4 = reinterpret_cast< char * >(buf4);
   23899          29 :   {
   23900          29 :     const int bLocalUseExceptions = GetUseExceptions();
   23901          29 :     if ( bLocalUseExceptions ) {
   23902          14 :       pushErrorHandler();
   23903             :     }
   23904          29 :     {
   23905          29 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   23906          29 :       result = (CPLErr)GDALDatasetShadow_SetGCPs(arg1,arg2,(GDAL_GCP const *)arg3,(char const *)arg4);
   23907          29 :       SWIG_PYTHON_THREAD_END_ALLOW;
   23908             :     }
   23909          29 :     if ( bLocalUseExceptions ) {
   23910          14 :       popErrorHandler();
   23911             :     }
   23912             : #ifndef SED_HACKS
   23913             :     if ( bLocalUseExceptions ) {
   23914             :       CPLErr eclass = CPLGetLastErrorType();
   23915             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   23916             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   23917             :       }
   23918             :     }
   23919             : #endif
   23920             :   }
   23921          29 :   resultobj = SWIG_From_int(static_cast< int >(result));
   23922          29 :   {
   23923             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   23924          29 :     free( arg3 );
   23925             :   }
   23926          29 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   23927          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; } }
   23928             :   return resultobj;
   23929           0 : fail:
   23930           0 :   {
   23931             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   23932           0 :     free( arg3 );
   23933             :   }
   23934           0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   23935             :   return NULL;
   23936             : }
   23937             : 
   23938             : 
   23939           9 : SWIGINTERN PyObject *_wrap_Dataset__SetGCPs2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   23940           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   23941           9 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   23942           9 :   int arg2 ;
   23943           9 :   GDAL_GCP *arg3 = (GDAL_GCP *) 0 ;
   23944           9 :   OSRSpatialReferenceShadow *arg4 = (OSRSpatialReferenceShadow *) 0 ;
   23945           9 :   void *argp1 = 0 ;
   23946           9 :   int res1 = 0 ;
   23947           9 :   GDAL_GCP *tmpGCPList2 ;
   23948           9 :   void *argp4 = 0 ;
   23949           9 :   int res4 = 0 ;
   23950           9 :   PyObject *swig_obj[3] ;
   23951           9 :   CPLErr result;
   23952             :   
   23953           9 :   if (!SWIG_Python_UnpackTuple(args, "Dataset__SetGCPs2", 3, 3, swig_obj)) SWIG_fail;
   23954           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   23955           9 :   if (!SWIG_IsOK(res1)) {
   23956           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset__SetGCPs2" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   23957             :   }
   23958           9 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   23959           9 :   {
   23960             :     /* %typemap(in,numinputs=1) (int nGCPs, GDAL_GCP const *pGCPs ) */
   23961             :     /* check if is List */
   23962           9 :     if ( !PySequence_Check(swig_obj[1]) ) {
   23963           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   23964           0 :       SWIG_fail;
   23965             :     }
   23966           9 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   23967           9 :     if( size > (Py_ssize_t)INT_MAX ) {
   23968           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   23969           0 :       SWIG_fail;
   23970             :     }
   23971           9 :     if( (size_t)size > SIZE_MAX / sizeof(GDAL_GCP) ) {
   23972           0 :       PyErr_SetString(PyExc_RuntimeError, "too big sequence");
   23973           0 :       SWIG_fail;
   23974             :     }
   23975           9 :     arg2 = (int)size;
   23976           9 :     tmpGCPList2 = (GDAL_GCP*) malloc(arg2*sizeof(GDAL_GCP));
   23977           9 :     if( !tmpGCPList2 ) {
   23978           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   23979           0 :       SWIG_fail;
   23980             :     }
   23981       21871 :     arg3 = tmpGCPList2;
   23982       21871 :     for( int i = 0; i<arg2; i++ ) {
   23983       21862 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   23984       21862 :       GDAL_GCP *item = 0;
   23985       21862 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&item, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0 ));
   23986       21862 :       if ( ! item ) {
   23987           0 :         Py_DECREF(o);
   23988           0 :         SWIG_fail;
   23989             :       }
   23990       21862 :       memcpy( tmpGCPList2 + i, item, sizeof( GDAL_GCP ) );
   23991       21862 :       Py_DECREF(o);
   23992             :     }
   23993             :   }
   23994           9 :   res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   23995           9 :   if (!SWIG_IsOK(res4)) {
   23996           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Dataset__SetGCPs2" "', argument " "4"" of type '" "OSRSpatialReferenceShadow *""'"); 
   23997             :   }
   23998           9 :   arg4 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp4);
   23999           9 :   {
   24000           9 :     const int bLocalUseExceptions = GetUseExceptions();
   24001           9 :     if ( bLocalUseExceptions ) {
   24002           1 :       pushErrorHandler();
   24003             :     }
   24004           9 :     {
   24005           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24006           9 :       result = (CPLErr)GDALDatasetShadow_SetGCPs2(arg1,arg2,(GDAL_GCP const *)arg3,arg4);
   24007           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24008             :     }
   24009           9 :     if ( bLocalUseExceptions ) {
   24010           1 :       popErrorHandler();
   24011             :     }
   24012             : #ifndef SED_HACKS
   24013             :     if ( bLocalUseExceptions ) {
   24014             :       CPLErr eclass = CPLGetLastErrorType();
   24015             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24016             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24017             :       }
   24018             :     }
   24019             : #endif
   24020             :   }
   24021           9 :   resultobj = SWIG_From_int(static_cast< int >(result));
   24022           9 :   {
   24023             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   24024           9 :     free( arg3 );
   24025             :   }
   24026           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; } }
   24027             :   return resultobj;
   24028           0 : fail:
   24029           0 :   {
   24030             :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   24031           0 :     free( arg3 );
   24032             :   }
   24033           0 :   return NULL;
   24034             : }
   24035             : 
   24036             : 
   24037        1622 : SWIGINTERN PyObject *_wrap_Dataset_FlushCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   24038        1622 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24039        1622 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24040        1622 :   void *argp1 = 0 ;
   24041        1622 :   int res1 = 0 ;
   24042        1622 :   PyObject *swig_obj[1] ;
   24043        1622 :   CPLErr result;
   24044             :   
   24045        1622 :   if (!args) SWIG_fail;
   24046        1622 :   swig_obj[0] = args;
   24047        1622 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24048        1622 :   if (!SWIG_IsOK(res1)) {
   24049           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_FlushCache" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24050             :   }
   24051        1622 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24052        1622 :   {
   24053        1622 :     const int bLocalUseExceptions = GetUseExceptions();
   24054        1622 :     if ( bLocalUseExceptions ) {
   24055         398 :       pushErrorHandler();
   24056             :     }
   24057        1622 :     {
   24058        1622 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24059        1622 :       result = (CPLErr)GDALDatasetShadow_FlushCache(arg1);
   24060        1622 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24061             :     }
   24062        1622 :     if ( bLocalUseExceptions ) {
   24063         398 :       popErrorHandler();
   24064             :     }
   24065             : #ifndef SED_HACKS
   24066             :     if ( bLocalUseExceptions ) {
   24067             :       CPLErr eclass = CPLGetLastErrorType();
   24068             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24069             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24070             :       }
   24071             :     }
   24072             : #endif
   24073             :   }
   24074        1622 :   resultobj = SWIG_From_int(static_cast< int >(result));
   24075        1624 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   24076             :   return resultobj;
   24077             : fail:
   24078             :   return NULL;
   24079             : }
   24080             : 
   24081             : 
   24082          30 : SWIGINTERN PyObject *_wrap_Dataset_AddBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   24083          30 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24084          30 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24085          30 :   GDALDataType arg2 = (GDALDataType) GDT_Byte ;
   24086          30 :   char **arg3 = (char **) 0 ;
   24087          30 :   void *argp1 = 0 ;
   24088          30 :   int res1 = 0 ;
   24089          30 :   PyObject * obj0 = 0 ;
   24090          30 :   PyObject * obj1 = 0 ;
   24091          30 :   PyObject * obj2 = 0 ;
   24092          30 :   char * kwnames[] = {
   24093             :     (char *)"self",  (char *)"datatype",  (char *)"options",  NULL 
   24094             :   };
   24095          30 :   CPLErr result;
   24096             :   
   24097          30 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OO:Dataset_AddBand", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   24098          30 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24099          30 :   if (!SWIG_IsOK(res1)) {
   24100           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AddBand" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24101             :   }
   24102          30 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24103          30 :   if (obj1) {
   24104          24 :     {
   24105             :       // %typemap(in) GDALDataType
   24106          24 :       int val = 0;
   24107          24 :       int ecode = SWIG_AsVal_int(obj1, &val);
   24108          24 :       if (!SWIG_IsOK(ecode)) {
   24109           0 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   24110             :       }
   24111          24 :       if( val < GDT_Unknown || val >= GDT_TypeCount )
   24112             :       {
   24113           0 :         SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   24114             :       }
   24115             :       arg2 = static_cast<GDALDataType>(val);
   24116             :     }
   24117             :   }
   24118          30 :   if (obj2) {
   24119          15 :     {
   24120             :       /* %typemap(in) char **dict */
   24121          15 :       arg3 = NULL;
   24122          15 :       if ( PySequence_Check( obj2 ) ) {
   24123          15 :         int bErr = FALSE;
   24124          15 :         arg3 = CSLFromPySequence(obj2, &bErr);
   24125          15 :         if ( bErr )
   24126             :         {
   24127           0 :           SWIG_fail;
   24128             :         }
   24129             :       }
   24130           0 :       else if ( PyMapping_Check( obj2 ) ) {
   24131           0 :         int bErr = FALSE;
   24132           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   24133           0 :         if ( bErr )
   24134             :         {
   24135           0 :           SWIG_fail;
   24136             :         }
   24137             :       }
   24138             :       else {
   24139           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   24140           0 :         SWIG_fail;
   24141             :       }
   24142             :     }
   24143             :   }
   24144          30 :   {
   24145          30 :     const int bLocalUseExceptions = GetUseExceptions();
   24146          30 :     if ( bLocalUseExceptions ) {
   24147          20 :       pushErrorHandler();
   24148             :     }
   24149          30 :     {
   24150          30 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24151          30 :       result = (CPLErr)GDALDatasetShadow_AddBand(arg1,arg2,arg3);
   24152          30 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24153             :     }
   24154          30 :     if ( bLocalUseExceptions ) {
   24155          20 :       popErrorHandler();
   24156             :     }
   24157             : #ifndef SED_HACKS
   24158             :     if ( bLocalUseExceptions ) {
   24159             :       CPLErr eclass = CPLGetLastErrorType();
   24160             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24161             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24162             :       }
   24163             :     }
   24164             : #endif
   24165             :   }
   24166          30 :   resultobj = SWIG_From_int(static_cast< int >(result));
   24167          30 :   {
   24168             :     /* %typemap(freearg) char **dict */
   24169          30 :     CSLDestroy( arg3 );
   24170             :   }
   24171          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; } }
   24172             :   return resultobj;
   24173           0 : fail:
   24174           0 :   {
   24175             :     /* %typemap(freearg) char **dict */
   24176           0 :     CSLDestroy( arg3 );
   24177             :   }
   24178             :   return NULL;
   24179             : }
   24180             : 
   24181             : 
   24182          54 : SWIGINTERN PyObject *_wrap_Dataset_CreateMaskBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   24183          54 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24184          54 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24185          54 :   int arg2 ;
   24186          54 :   void *argp1 = 0 ;
   24187          54 :   int res1 = 0 ;
   24188          54 :   int val2 ;
   24189          54 :   int ecode2 = 0 ;
   24190          54 :   PyObject *swig_obj[2] ;
   24191          54 :   CPLErr result;
   24192             :   
   24193          54 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_CreateMaskBand", 2, 2, swig_obj)) SWIG_fail;
   24194          54 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24195          54 :   if (!SWIG_IsOK(res1)) {
   24196           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_CreateMaskBand" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24197             :   }
   24198          54 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24199          54 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   24200          54 :   if (!SWIG_IsOK(ecode2)) {
   24201           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_CreateMaskBand" "', argument " "2"" of type '" "int""'");
   24202             :   } 
   24203          54 :   arg2 = static_cast< int >(val2);
   24204          54 :   {
   24205          54 :     const int bLocalUseExceptions = GetUseExceptions();
   24206          54 :     if ( bLocalUseExceptions ) {
   24207          16 :       pushErrorHandler();
   24208             :     }
   24209          54 :     {
   24210          54 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24211          54 :       result = (CPLErr)GDALDatasetShadow_CreateMaskBand(arg1,arg2);
   24212          54 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24213             :     }
   24214          54 :     if ( bLocalUseExceptions ) {
   24215          16 :       popErrorHandler();
   24216             :     }
   24217             : #ifndef SED_HACKS
   24218             :     if ( bLocalUseExceptions ) {
   24219             :       CPLErr eclass = CPLGetLastErrorType();
   24220             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24221             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24222             :       }
   24223             :     }
   24224             : #endif
   24225             :   }
   24226          54 :   resultobj = SWIG_From_int(static_cast< int >(result));
   24227          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; } }
   24228             :   return resultobj;
   24229             : fail:
   24230             :   return NULL;
   24231             : }
   24232             : 
   24233             : 
   24234         458 : SWIGINTERN PyObject *_wrap_Dataset_GetFileList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   24235         458 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24236         458 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24237         458 :   void *argp1 = 0 ;
   24238         458 :   int res1 = 0 ;
   24239         458 :   PyObject *swig_obj[1] ;
   24240         458 :   char **result = 0 ;
   24241             :   
   24242         458 :   if (!args) SWIG_fail;
   24243         458 :   swig_obj[0] = args;
   24244         458 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24245         458 :   if (!SWIG_IsOK(res1)) {
   24246           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetFileList" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24247             :   }
   24248         458 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24249         458 :   {
   24250         458 :     const int bLocalUseExceptions = GetUseExceptions();
   24251         458 :     if ( bLocalUseExceptions ) {
   24252         313 :       pushErrorHandler();
   24253             :     }
   24254         458 :     {
   24255         458 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24256         458 :       result = (char **)GDALDatasetShadow_GetFileList(arg1);
   24257         458 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24258             :     }
   24259         458 :     if ( bLocalUseExceptions ) {
   24260         313 :       popErrorHandler();
   24261             :     }
   24262             : #ifndef SED_HACKS
   24263             :     if ( bLocalUseExceptions ) {
   24264             :       CPLErr eclass = CPLGetLastErrorType();
   24265             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24266             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24267             :       }
   24268             :     }
   24269             : #endif
   24270             :   }
   24271         458 :   {
   24272             :     /* %typemap(out) char **CSL -> ( string ) */
   24273         458 :     bool bErr = false;
   24274         458 :     resultobj = CSLToList(result, &bErr);
   24275         458 :     CSLDestroy(result);
   24276         458 :     if( bErr ) {
   24277           0 :       SWIG_fail;
   24278             :     }
   24279             :   }
   24280         460 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   24281             :   return resultobj;
   24282             : fail:
   24283             :   return NULL;
   24284             : }
   24285             : 
   24286             : 
   24287      176161 : SWIGINTERN PyObject *_wrap_Dataset_WriteRaster(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   24288      176161 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24289      176161 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24290      176161 :   int arg2 ;
   24291      176161 :   int arg3 ;
   24292      176161 :   int arg4 ;
   24293      176161 :   int arg5 ;
   24294      176161 :   GIntBig arg6 ;
   24295      176161 :   char *arg7 = (char *) 0 ;
   24296      176161 :   int *arg8 = (int *) 0 ;
   24297      176161 :   int *arg9 = (int *) 0 ;
   24298      176161 :   GDALDataType *arg10 = (GDALDataType *) 0 ;
   24299      176161 :   int arg11 = (int) 0 ;
   24300      176161 :   int *arg12 = (int *) 0 ;
   24301      176161 :   GIntBig *arg13 = (GIntBig *) 0 ;
   24302      176161 :   GIntBig *arg14 = (GIntBig *) 0 ;
   24303      176161 :   GIntBig *arg15 = (GIntBig *) 0 ;
   24304      176161 :   void *argp1 = 0 ;
   24305      176161 :   int res1 = 0 ;
   24306      176161 :   int val2 ;
   24307      176161 :   int ecode2 = 0 ;
   24308      176161 :   int val3 ;
   24309      176161 :   int ecode3 = 0 ;
   24310      176161 :   int val4 ;
   24311      176161 :   int ecode4 = 0 ;
   24312      176161 :   int val5 ;
   24313      176161 :   int ecode5 = 0 ;
   24314      176161 :   int alloc6 = 0 ;
   24315      176161 :   bool viewIsValid6 = false ;
   24316      176161 :   Py_buffer view6 ;
   24317      176161 :   int val8 ;
   24318      176161 :   int val9 ;
   24319      176161 :   GDALDataType val10 ;
   24320      176161 :   GIntBig val13 ;
   24321      176161 :   GIntBig val14 ;
   24322      176161 :   GIntBig val15 ;
   24323      176161 :   PyObject * obj0 = 0 ;
   24324      176161 :   PyObject * obj1 = 0 ;
   24325      176161 :   PyObject * obj2 = 0 ;
   24326      176161 :   PyObject * obj3 = 0 ;
   24327      176161 :   PyObject * obj4 = 0 ;
   24328      176161 :   PyObject * obj5 = 0 ;
   24329      176161 :   PyObject * obj6 = 0 ;
   24330      176161 :   PyObject * obj7 = 0 ;
   24331      176161 :   PyObject * obj8 = 0 ;
   24332      176161 :   PyObject * obj9 = 0 ;
   24333      176161 :   PyObject * obj10 = 0 ;
   24334      176161 :   PyObject * obj11 = 0 ;
   24335      176161 :   PyObject * obj12 = 0 ;
   24336      176161 :   char * kwnames[] = {
   24337             :     (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 
   24338             :   };
   24339      176161 :   CPLErr result;
   24340             :   
   24341      176161 :   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;
   24342      176161 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24343      176161 :   if (!SWIG_IsOK(res1)) {
   24344           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_WriteRaster" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24345             :   }
   24346      176161 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24347      176161 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   24348      176161 :   if (!SWIG_IsOK(ecode2)) {
   24349           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_WriteRaster" "', argument " "2"" of type '" "int""'");
   24350             :   } 
   24351      176161 :   arg2 = static_cast< int >(val2);
   24352      176161 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   24353      176161 :   if (!SWIG_IsOK(ecode3)) {
   24354           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_WriteRaster" "', argument " "3"" of type '" "int""'");
   24355             :   } 
   24356      176161 :   arg3 = static_cast< int >(val3);
   24357      176161 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   24358      176161 :   if (!SWIG_IsOK(ecode4)) {
   24359           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_WriteRaster" "', argument " "4"" of type '" "int""'");
   24360             :   } 
   24361      176161 :   arg4 = static_cast< int >(val4);
   24362      176161 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   24363      176161 :   if (!SWIG_IsOK(ecode5)) {
   24364           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_WriteRaster" "', argument " "5"" of type '" "int""'");
   24365             :   } 
   24366      176161 :   arg5 = static_cast< int >(val5);
   24367      176161 :   {
   24368             :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   24369      176161 :     char* ptr = NULL;
   24370      176161 :     if( !GetBufferAsCharPtrGIntBigSize(obj5, &arg6, &ptr, &alloc6, &viewIsValid6, &view6) ) {
   24371           1 :       SWIG_fail;
   24372             :     }
   24373      176160 :     arg7 = (char *)ptr;
   24374             :   }
   24375      176160 :   if (obj6) {
   24376      176160 :     {
   24377             :       /* %typemap(in) (int *optional_##int) */
   24378      176160 :       if ( obj6 == Py_None ) {
   24379             :         arg8 = 0;
   24380             :       }
   24381      176160 :       else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
   24382             :         arg8 = (int *) &val8;
   24383             :       }
   24384             :       else {
   24385           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   24386           0 :         SWIG_fail;
   24387             :       }
   24388             :     }
   24389             :   }
   24390      176160 :   if (obj7) {
   24391      176160 :     {
   24392             :       /* %typemap(in) (int *optional_##int) */
   24393      176160 :       if ( obj7 == Py_None ) {
   24394             :         arg9 = 0;
   24395             :       }
   24396      176160 :       else if ( PyArg_Parse( obj7,"i" ,&val9 ) ) {
   24397             :         arg9 = (int *) &val9;
   24398             :       }
   24399             :       else {
   24400           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   24401           0 :         SWIG_fail;
   24402             :       }
   24403             :     }
   24404             :   }
   24405      176160 :   if (obj8) {
   24406      176160 :     {
   24407             :       /* %typemap(in) (GDALDataType *optional_GDALDataType) */
   24408      176160 :       int intval = 0;
   24409      176160 :       if ( obj8 == Py_None ) {
   24410             :         arg10 = NULL;
   24411             :       }
   24412      352320 :       else if ( SWIG_IsOK(SWIG_AsVal_int(obj8, &intval)) ) {
   24413      176160 :         if( intval < GDT_Unknown || intval >= GDT_TypeCount )
   24414             :         {
   24415           0 :           SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   24416             :         }
   24417      176160 :         val10 = static_cast<GDALDataType>(intval);
   24418      176160 :         arg10 = &val10;
   24419             :       }
   24420             :       else {
   24421           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   24422           0 :         SWIG_fail;
   24423             :       }
   24424             :     }
   24425             :   }
   24426      176160 :   if (obj9) {
   24427      176160 :     {
   24428             :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   24429      176160 :       arg12 = CreateCIntListFromSequence(obj9, &arg11);
   24430      176160 :       if( arg11 < 0 ) {
   24431           0 :         SWIG_fail;
   24432             :       }
   24433             :     }
   24434             :   }
   24435      176160 :   if (obj10) {
   24436      176160 :     {
   24437             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   24438      176160 :       if ( obj10 == Py_None ) {
   24439             :         arg13 = 0;
   24440             :       }
   24441          24 :       else if ( PyArg_Parse( obj10,"L" ,&val13 ) ) {
   24442             :         arg13 = (GIntBig *) &val13;
   24443             :       }
   24444             :       else {
   24445           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   24446           0 :         SWIG_fail;
   24447             :       }
   24448             :     }
   24449             :   }
   24450      176160 :   if (obj11) {
   24451      176160 :     {
   24452             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   24453      176160 :       if ( obj11 == Py_None ) {
   24454             :         arg14 = 0;
   24455             :       }
   24456          12 :       else if ( PyArg_Parse( obj11,"L" ,&val14 ) ) {
   24457             :         arg14 = (GIntBig *) &val14;
   24458             :       }
   24459             :       else {
   24460           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   24461           0 :         SWIG_fail;
   24462             :       }
   24463             :     }
   24464             :   }
   24465      176160 :   if (obj12) {
   24466      176160 :     {
   24467             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   24468      176160 :       if ( obj12 == Py_None ) {
   24469             :         arg15 = 0;
   24470             :       }
   24471          24 :       else if ( PyArg_Parse( obj12,"L" ,&val15 ) ) {
   24472             :         arg15 = (GIntBig *) &val15;
   24473             :       }
   24474             :       else {
   24475           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   24476           0 :         SWIG_fail;
   24477             :       }
   24478             :     }
   24479             :   }
   24480      176160 :   {
   24481      176160 :     const int bLocalUseExceptions = GetUseExceptions();
   24482      176160 :     if ( bLocalUseExceptions ) {
   24483      172109 :       pushErrorHandler();
   24484             :     }
   24485      176160 :     {
   24486      176160 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24487      176160 :       result = (CPLErr)GDALDatasetShadow_WriteRaster(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
   24488      176160 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24489             :     }
   24490      176160 :     if ( bLocalUseExceptions ) {
   24491      172109 :       popErrorHandler();
   24492             :     }
   24493             : #ifndef SED_HACKS
   24494             :     if ( bLocalUseExceptions ) {
   24495             :       CPLErr eclass = CPLGetLastErrorType();
   24496             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24497             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24498             :       }
   24499             :     }
   24500             : #endif
   24501             :   }
   24502      176160 :   resultobj = SWIG_From_int(static_cast< int >(result));
   24503      176160 :   {
   24504             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   24505      176160 :     if( viewIsValid6 ) {
   24506      175150 :       PyBuffer_Release(&view6);
   24507             :     }
   24508        1010 :     else if (ReturnSame(alloc6) == SWIG_NEWOBJ ) {
   24509        1010 :       delete[] arg7;
   24510             :     }
   24511             :   }
   24512      176160 :   {
   24513             :     /* %typemap(freearg) (int nList, int* pList) */
   24514      176160 :     free(arg12);
   24515             :   }
   24516      176163 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   24517             :   return resultobj;
   24518           1 : fail:
   24519           1 :   {
   24520             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   24521           1 :     if( viewIsValid6 ) {
   24522           0 :       PyBuffer_Release(&view6);
   24523             :     }
   24524           1 :     else if (ReturnSame(alloc6) == SWIG_NEWOBJ ) {
   24525           0 :       delete[] arg7;
   24526             :     }
   24527             :   }
   24528           1 :   {
   24529             :     /* %typemap(freearg) (int nList, int* pList) */
   24530           1 :     free(arg12);
   24531             :   }
   24532           1 :   return NULL;
   24533             : }
   24534             : 
   24535             : 
   24536           1 : SWIGINTERN PyObject *_wrap_Dataset_AdviseRead(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   24537           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24538           1 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24539           1 :   int arg2 ;
   24540           1 :   int arg3 ;
   24541           1 :   int arg4 ;
   24542           1 :   int arg5 ;
   24543           1 :   int *arg6 = (int *) 0 ;
   24544           1 :   int *arg7 = (int *) 0 ;
   24545           1 :   GDALDataType *arg8 = (GDALDataType *) 0 ;
   24546           1 :   int arg9 = (int) 0 ;
   24547           1 :   int *arg10 = (int *) 0 ;
   24548           1 :   char **arg11 = (char **) NULL ;
   24549           1 :   void *argp1 = 0 ;
   24550           1 :   int res1 = 0 ;
   24551           1 :   int val2 ;
   24552           1 :   int ecode2 = 0 ;
   24553           1 :   int val3 ;
   24554           1 :   int ecode3 = 0 ;
   24555           1 :   int val4 ;
   24556           1 :   int ecode4 = 0 ;
   24557           1 :   int val5 ;
   24558           1 :   int ecode5 = 0 ;
   24559           1 :   void *argp6 = 0 ;
   24560           1 :   int res6 = 0 ;
   24561           1 :   void *argp7 = 0 ;
   24562           1 :   int res7 = 0 ;
   24563           1 :   int val8 ;
   24564           1 :   PyObject *swig_obj[10] ;
   24565           1 :   CPLErr result;
   24566             :   
   24567           1 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_AdviseRead", 5, 10, swig_obj)) SWIG_fail;
   24568           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24569           1 :   if (!SWIG_IsOK(res1)) {
   24570           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AdviseRead" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24571             :   }
   24572           1 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24573           1 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   24574           1 :   if (!SWIG_IsOK(ecode2)) {
   24575           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_AdviseRead" "', argument " "2"" of type '" "int""'");
   24576             :   } 
   24577           1 :   arg2 = static_cast< int >(val2);
   24578           1 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   24579           1 :   if (!SWIG_IsOK(ecode3)) {
   24580           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_AdviseRead" "', argument " "3"" of type '" "int""'");
   24581             :   } 
   24582           1 :   arg3 = static_cast< int >(val3);
   24583           1 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   24584           1 :   if (!SWIG_IsOK(ecode4)) {
   24585           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_AdviseRead" "', argument " "4"" of type '" "int""'");
   24586             :   } 
   24587           1 :   arg4 = static_cast< int >(val4);
   24588           1 :   ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
   24589           1 :   if (!SWIG_IsOK(ecode5)) {
   24590           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_AdviseRead" "', argument " "5"" of type '" "int""'");
   24591             :   } 
   24592           1 :   arg5 = static_cast< int >(val5);
   24593           1 :   if (swig_obj[5]) {
   24594           0 :     res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_int, 0 |  0 );
   24595           0 :     if (!SWIG_IsOK(res6)) {
   24596           0 :       SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Dataset_AdviseRead" "', argument " "6"" of type '" "int *""'"); 
   24597             :     }
   24598           0 :     arg6 = reinterpret_cast< int * >(argp6);
   24599             :   }
   24600           1 :   if (swig_obj[6]) {
   24601           0 :     res7 = SWIG_ConvertPtr(swig_obj[6], &argp7,SWIGTYPE_p_int, 0 |  0 );
   24602           0 :     if (!SWIG_IsOK(res7)) {
   24603           0 :       SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "Dataset_AdviseRead" "', argument " "7"" of type '" "int *""'"); 
   24604             :     }
   24605           0 :     arg7 = reinterpret_cast< int * >(argp7);
   24606             :   }
   24607           1 :   if (swig_obj[7]) {
   24608           0 :     {
   24609             :       /* %typemap(in) (int *optional_##int) */
   24610           0 :       if ( swig_obj[7] == Py_None ) {
   24611             :         arg8 = 0;
   24612             :       }
   24613           0 :       else if ( PyArg_Parse( swig_obj[7],"i" ,&val8 ) ) {
   24614             :         arg8 = (GDALDataType *) &val8;
   24615             :       }
   24616             :       else {
   24617           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   24618           0 :         SWIG_fail;
   24619             :       }
   24620             :     }
   24621             :   }
   24622           1 :   if (swig_obj[8]) {
   24623           0 :     {
   24624             :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   24625           0 :       arg10 = CreateCIntListFromSequence(swig_obj[8], &arg9);
   24626           0 :       if( arg9 < 0 ) {
   24627           0 :         SWIG_fail;
   24628             :       }
   24629             :     }
   24630             :   }
   24631           1 :   if (swig_obj[9]) {
   24632           0 :     {
   24633             :       /* %typemap(in) char **dict */
   24634           0 :       arg11 = NULL;
   24635           0 :       if ( PySequence_Check( swig_obj[9] ) ) {
   24636           0 :         int bErr = FALSE;
   24637           0 :         arg11 = CSLFromPySequence(swig_obj[9], &bErr);
   24638           0 :         if ( bErr )
   24639             :         {
   24640           0 :           SWIG_fail;
   24641             :         }
   24642             :       }
   24643           0 :       else if ( PyMapping_Check( swig_obj[9] ) ) {
   24644           0 :         int bErr = FALSE;
   24645           0 :         arg11 = CSLFromPyMapping(swig_obj[9], &bErr);
   24646           0 :         if ( bErr )
   24647             :         {
   24648           0 :           SWIG_fail;
   24649             :         }
   24650             :       }
   24651             :       else {
   24652           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   24653           0 :         SWIG_fail;
   24654             :       }
   24655             :     }
   24656             :   }
   24657           1 :   {
   24658           1 :     const int bLocalUseExceptions = GetUseExceptions();
   24659           1 :     if ( bLocalUseExceptions ) {
   24660           0 :       pushErrorHandler();
   24661             :     }
   24662           1 :     {
   24663           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24664           1 :       result = (CPLErr)GDALDatasetShadow_AdviseRead(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
   24665           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24666             :     }
   24667           1 :     if ( bLocalUseExceptions ) {
   24668           0 :       popErrorHandler();
   24669             :     }
   24670             : #ifndef SED_HACKS
   24671             :     if ( bLocalUseExceptions ) {
   24672             :       CPLErr eclass = CPLGetLastErrorType();
   24673             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24674             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24675             :       }
   24676             :     }
   24677             : #endif
   24678             :   }
   24679           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   24680           1 :   {
   24681             :     /* %typemap(freearg) (int nList, int* pList) */
   24682           1 :     free(arg10);
   24683             :   }
   24684           1 :   {
   24685             :     /* %typemap(freearg) char **dict */
   24686           1 :     CSLDestroy( arg11 );
   24687             :   }
   24688           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; } }
   24689             :   return resultobj;
   24690           0 : fail:
   24691           0 :   {
   24692             :     /* %typemap(freearg) (int nList, int* pList) */
   24693           0 :     free(arg10);
   24694             :   }
   24695           0 :   {
   24696             :     /* %typemap(freearg) char **dict */
   24697           0 :     CSLDestroy( arg11 );
   24698             :   }
   24699             :   return NULL;
   24700             : }
   24701             : 
   24702             : 
   24703           2 : SWIGINTERN PyObject *_wrap_Dataset_BeginAsyncReader(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   24704           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24705           2 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24706           2 :   int arg2 ;
   24707           2 :   int arg3 ;
   24708           2 :   int arg4 ;
   24709           2 :   int arg5 ;
   24710           2 :   size_t arg6 ;
   24711           2 :   char *arg7 = (char *) 0 ;
   24712           2 :   void *arg8 = (void *) 0 ;
   24713           2 :   int arg9 ;
   24714           2 :   int arg10 ;
   24715           2 :   GDALDataType arg11 = (GDALDataType) (GDALDataType) 0 ;
   24716           2 :   int arg12 = (int) 0 ;
   24717           2 :   int *arg13 = (int *) 0 ;
   24718           2 :   int arg14 = (int) 0 ;
   24719           2 :   int arg15 = (int) 0 ;
   24720           2 :   int arg16 = (int) 0 ;
   24721           2 :   char **arg17 = (char **) 0 ;
   24722           2 :   void *argp1 = 0 ;
   24723           2 :   int res1 = 0 ;
   24724           2 :   int val2 ;
   24725           2 :   int ecode2 = 0 ;
   24726           2 :   int val3 ;
   24727           2 :   int ecode3 = 0 ;
   24728           2 :   int val4 ;
   24729           2 :   int ecode4 = 0 ;
   24730           2 :   int val5 ;
   24731           2 :   int ecode5 = 0 ;
   24732           2 :   int val9 ;
   24733           2 :   int ecode9 = 0 ;
   24734           2 :   int val10 ;
   24735           2 :   int ecode10 = 0 ;
   24736           2 :   int val14 ;
   24737           2 :   int ecode14 = 0 ;
   24738           2 :   int val15 ;
   24739           2 :   int ecode15 = 0 ;
   24740           2 :   int val16 ;
   24741           2 :   int ecode16 = 0 ;
   24742           2 :   PyObject * obj0 = 0 ;
   24743           2 :   PyObject * obj1 = 0 ;
   24744           2 :   PyObject * obj2 = 0 ;
   24745           2 :   PyObject * obj3 = 0 ;
   24746           2 :   PyObject * obj4 = 0 ;
   24747           2 :   PyObject * obj5 = 0 ;
   24748           2 :   PyObject * obj6 = 0 ;
   24749           2 :   PyObject * obj7 = 0 ;
   24750           2 :   PyObject * obj8 = 0 ;
   24751           2 :   PyObject * obj9 = 0 ;
   24752           2 :   PyObject * obj10 = 0 ;
   24753           2 :   PyObject * obj11 = 0 ;
   24754           2 :   PyObject * obj12 = 0 ;
   24755           2 :   PyObject * obj13 = 0 ;
   24756           2 :   char * kwnames[] = {
   24757             :     (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 
   24758             :   };
   24759           2 :   GDALAsyncReaderShadow *result = 0 ;
   24760             :   
   24761           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;
   24762           2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24763           2 :   if (!SWIG_IsOK(res1)) {
   24764           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_BeginAsyncReader" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24765             :   }
   24766           2 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24767           2 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   24768           2 :   if (!SWIG_IsOK(ecode2)) {
   24769           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_BeginAsyncReader" "', argument " "2"" of type '" "int""'");
   24770             :   } 
   24771           2 :   arg2 = static_cast< int >(val2);
   24772           2 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   24773           2 :   if (!SWIG_IsOK(ecode3)) {
   24774           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_BeginAsyncReader" "', argument " "3"" of type '" "int""'");
   24775             :   } 
   24776           2 :   arg3 = static_cast< int >(val3);
   24777           2 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   24778           2 :   if (!SWIG_IsOK(ecode4)) {
   24779           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_BeginAsyncReader" "', argument " "4"" of type '" "int""'");
   24780             :   } 
   24781           2 :   arg4 = static_cast< int >(val4);
   24782           2 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   24783           2 :   if (!SWIG_IsOK(ecode5)) {
   24784           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_BeginAsyncReader" "', argument " "5"" of type '" "int""'");
   24785             :   } 
   24786           2 :   arg5 = static_cast< int >(val5);
   24787           2 :   {
   24788             :     /* %typemap(in,numinputs=1) (size_t nLenKeepObject, char *pBufKeepObject, void* pyObject) */
   24789           2 :     if (PyBytes_Check(obj5))
   24790             :     {
   24791           2 :       Py_ssize_t safeLen = 0;
   24792           2 :       PyBytes_AsStringAndSize(obj5, (char**) &arg7, &safeLen);
   24793           2 :       arg6 = safeLen;
   24794           2 :       arg8 = obj5;
   24795             :     }
   24796             :     else
   24797             :     {
   24798           0 :       PyErr_SetString(PyExc_TypeError, "not a bytes");
   24799           0 :       SWIG_fail;
   24800             :     }
   24801             :   }
   24802           2 :   ecode9 = SWIG_AsVal_int(obj6, &val9);
   24803           2 :   if (!SWIG_IsOK(ecode9)) {
   24804           0 :     SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "Dataset_BeginAsyncReader" "', argument " "9"" of type '" "int""'");
   24805             :   } 
   24806           2 :   arg9 = static_cast< int >(val9);
   24807           2 :   ecode10 = SWIG_AsVal_int(obj7, &val10);
   24808           2 :   if (!SWIG_IsOK(ecode10)) {
   24809           0 :     SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "Dataset_BeginAsyncReader" "', argument " "10"" of type '" "int""'");
   24810             :   } 
   24811           2 :   arg10 = static_cast< int >(val10);
   24812           2 :   if (obj8) {
   24813           2 :     {
   24814             :       // %typemap(in) GDALDataType
   24815           2 :       int val = 0;
   24816           2 :       int ecode = SWIG_AsVal_int(obj8, &val);
   24817           2 :       if (!SWIG_IsOK(ecode)) {
   24818           0 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   24819             :       }
   24820           2 :       if( val < GDT_Unknown || val >= GDT_TypeCount )
   24821             :       {
   24822           0 :         SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   24823             :       }
   24824             :       arg11 = static_cast<GDALDataType>(val);
   24825             :     }
   24826             :   }
   24827           2 :   if (obj9) {
   24828           2 :     {
   24829             :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   24830           2 :       arg13 = CreateCIntListFromSequence(obj9, &arg12);
   24831           2 :       if( arg12 < 0 ) {
   24832           0 :         SWIG_fail;
   24833             :       }
   24834             :     }
   24835             :   }
   24836           2 :   if (obj10) {
   24837           2 :     ecode14 = SWIG_AsVal_int(obj10, &val14);
   24838           2 :     if (!SWIG_IsOK(ecode14)) {
   24839           0 :       SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "Dataset_BeginAsyncReader" "', argument " "14"" of type '" "int""'");
   24840             :     } 
   24841             :     arg14 = static_cast< int >(val14);
   24842             :   }
   24843           2 :   if (obj11) {
   24844           2 :     ecode15 = SWIG_AsVal_int(obj11, &val15);
   24845           2 :     if (!SWIG_IsOK(ecode15)) {
   24846           0 :       SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "Dataset_BeginAsyncReader" "', argument " "15"" of type '" "int""'");
   24847             :     } 
   24848             :     arg15 = static_cast< int >(val15);
   24849             :   }
   24850           2 :   if (obj12) {
   24851           2 :     ecode16 = SWIG_AsVal_int(obj12, &val16);
   24852           2 :     if (!SWIG_IsOK(ecode16)) {
   24853           0 :       SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "Dataset_BeginAsyncReader" "', argument " "16"" of type '" "int""'");
   24854             :     } 
   24855             :     arg16 = static_cast< int >(val16);
   24856             :   }
   24857           2 :   if (obj13) {
   24858           2 :     {
   24859             :       /* %typemap(in) char **dict */
   24860           2 :       arg17 = NULL;
   24861           2 :       if ( PySequence_Check( obj13 ) ) {
   24862           2 :         int bErr = FALSE;
   24863           2 :         arg17 = CSLFromPySequence(obj13, &bErr);
   24864           2 :         if ( bErr )
   24865             :         {
   24866           0 :           SWIG_fail;
   24867             :         }
   24868             :       }
   24869           0 :       else if ( PyMapping_Check( obj13 ) ) {
   24870           0 :         int bErr = FALSE;
   24871           0 :         arg17 = CSLFromPyMapping(obj13, &bErr);
   24872           0 :         if ( bErr )
   24873             :         {
   24874           0 :           SWIG_fail;
   24875             :         }
   24876             :       }
   24877             :       else {
   24878           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   24879           0 :         SWIG_fail;
   24880             :       }
   24881             :     }
   24882             :   }
   24883           2 :   {
   24884           2 :     const int bLocalUseExceptions = GetUseExceptions();
   24885           2 :     if ( bLocalUseExceptions ) {
   24886           2 :       pushErrorHandler();
   24887             :     }
   24888           2 :     {
   24889           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24890           2 :       result = (GDALAsyncReaderShadow *)GDALDatasetShadow_BeginAsyncReader(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17);
   24891           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24892             :     }
   24893           2 :     if ( bLocalUseExceptions ) {
   24894           2 :       popErrorHandler();
   24895             :     }
   24896             : #ifndef SED_HACKS
   24897             :     if ( bLocalUseExceptions ) {
   24898             :       CPLErr eclass = CPLGetLastErrorType();
   24899             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24900             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24901             :       }
   24902             :     }
   24903             : #endif
   24904             :   }
   24905           2 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAsyncReaderShadow, SWIG_POINTER_OWN |  0 );
   24906           2 :   {
   24907             :     /* %typemap(freearg) (int nList, int* pList) */
   24908           2 :     free(arg13);
   24909             :   }
   24910           2 :   {
   24911             :     /* %typemap(freearg) char **dict */
   24912           2 :     CSLDestroy( arg17 );
   24913             :   }
   24914           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; } }
   24915             :   return resultobj;
   24916           0 : fail:
   24917           0 :   {
   24918             :     /* %typemap(freearg) (int nList, int* pList) */
   24919           0 :     free(arg13);
   24920             :   }
   24921           0 :   {
   24922             :     /* %typemap(freearg) char **dict */
   24923           0 :     CSLDestroy( arg17 );
   24924             :   }
   24925             :   return NULL;
   24926             : }
   24927             : 
   24928             : 
   24929           1 : SWIGINTERN PyObject *_wrap_Dataset_EndAsyncReader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   24930           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24931           1 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24932           1 :   GDALAsyncReaderShadow *arg2 = (GDALAsyncReaderShadow *) 0 ;
   24933           1 :   void *argp1 = 0 ;
   24934           1 :   int res1 = 0 ;
   24935           1 :   void *argp2 = 0 ;
   24936           1 :   int res2 = 0 ;
   24937           1 :   PyObject *swig_obj[2] ;
   24938             :   
   24939           1 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_EndAsyncReader", 2, 2, swig_obj)) SWIG_fail;
   24940           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   24941           1 :   if (!SWIG_IsOK(res1)) {
   24942           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_EndAsyncReader" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   24943             :   }
   24944           1 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   24945           1 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   24946           1 :   if (!SWIG_IsOK(res2)) {
   24947           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_EndAsyncReader" "', argument " "2"" of type '" "GDALAsyncReaderShadow *""'"); 
   24948             :   }
   24949           1 :   arg2 = reinterpret_cast< GDALAsyncReaderShadow * >(argp2);
   24950           1 :   {
   24951           1 :     const int bLocalUseExceptions = GetUseExceptions();
   24952           1 :     if ( bLocalUseExceptions ) {
   24953           1 :       pushErrorHandler();
   24954             :     }
   24955           1 :     {
   24956           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   24957           1 :       GDALDatasetShadow_EndAsyncReader(arg1,arg2);
   24958           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   24959             :     }
   24960           1 :     if ( bLocalUseExceptions ) {
   24961           1 :       popErrorHandler();
   24962             :     }
   24963             : #ifndef SED_HACKS
   24964             :     if ( bLocalUseExceptions ) {
   24965             :       CPLErr eclass = CPLGetLastErrorType();
   24966             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   24967             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   24968             :       }
   24969             :     }
   24970             : #endif
   24971             :   }
   24972           1 :   resultobj = SWIG_Py_Void();
   24973           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; } }
   24974             :   return resultobj;
   24975             : fail:
   24976             :   return NULL;
   24977             : }
   24978             : 
   24979             : 
   24980           3 : SWIGINTERN PyObject *_wrap_Dataset_GetVirtualMem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   24981           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   24982           3 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   24983           3 :   GDALRWFlag arg2 ;
   24984           3 :   int arg3 ;
   24985           3 :   int arg4 ;
   24986           3 :   int arg5 ;
   24987           3 :   int arg6 ;
   24988           3 :   int arg7 ;
   24989           3 :   int arg8 ;
   24990           3 :   GDALDataType arg9 ;
   24991           3 :   int arg10 ;
   24992           3 :   int *arg11 = (int *) 0 ;
   24993           3 :   int arg12 ;
   24994           3 :   size_t arg13 ;
   24995           3 :   size_t arg14 ;
   24996           3 :   char **arg15 = (char **) NULL ;
   24997           3 :   void *argp1 = 0 ;
   24998           3 :   int res1 = 0 ;
   24999           3 :   int val2 ;
   25000           3 :   int ecode2 = 0 ;
   25001           3 :   int val3 ;
   25002           3 :   int ecode3 = 0 ;
   25003           3 :   int val4 ;
   25004           3 :   int ecode4 = 0 ;
   25005           3 :   int val5 ;
   25006           3 :   int ecode5 = 0 ;
   25007           3 :   int val6 ;
   25008           3 :   int ecode6 = 0 ;
   25009           3 :   int val7 ;
   25010           3 :   int ecode7 = 0 ;
   25011           3 :   int val8 ;
   25012           3 :   int ecode8 = 0 ;
   25013           3 :   int val12 ;
   25014           3 :   int ecode12 = 0 ;
   25015           3 :   size_t val13 ;
   25016           3 :   int ecode13 = 0 ;
   25017           3 :   size_t val14 ;
   25018           3 :   int ecode14 = 0 ;
   25019           3 :   PyObject * obj0 = 0 ;
   25020           3 :   PyObject * obj1 = 0 ;
   25021           3 :   PyObject * obj2 = 0 ;
   25022           3 :   PyObject * obj3 = 0 ;
   25023           3 :   PyObject * obj4 = 0 ;
   25024           3 :   PyObject * obj5 = 0 ;
   25025           3 :   PyObject * obj6 = 0 ;
   25026           3 :   PyObject * obj7 = 0 ;
   25027           3 :   PyObject * obj8 = 0 ;
   25028           3 :   PyObject * obj9 = 0 ;
   25029           3 :   PyObject * obj10 = 0 ;
   25030           3 :   PyObject * obj11 = 0 ;
   25031           3 :   PyObject * obj12 = 0 ;
   25032           3 :   PyObject * obj13 = 0 ;
   25033           3 :   char * kwnames[] = {
   25034             :     (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 
   25035             :   };
   25036           3 :   CPLVirtualMemShadow *result = 0 ;
   25037             :   
   25038           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;
   25039           3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25040           3 :   if (!SWIG_IsOK(res1)) {
   25041           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetVirtualMem" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25042             :   }
   25043           3 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25044           3 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   25045           3 :   if (!SWIG_IsOK(ecode2)) {
   25046           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetVirtualMem" "', argument " "2"" of type '" "GDALRWFlag""'");
   25047             :   } 
   25048           3 :   arg2 = static_cast< GDALRWFlag >(val2);
   25049           3 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   25050           3 :   if (!SWIG_IsOK(ecode3)) {
   25051           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_GetVirtualMem" "', argument " "3"" of type '" "int""'");
   25052             :   } 
   25053           3 :   arg3 = static_cast< int >(val3);
   25054           3 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   25055           3 :   if (!SWIG_IsOK(ecode4)) {
   25056           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_GetVirtualMem" "', argument " "4"" of type '" "int""'");
   25057             :   } 
   25058           3 :   arg4 = static_cast< int >(val4);
   25059           3 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   25060           3 :   if (!SWIG_IsOK(ecode5)) {
   25061           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_GetVirtualMem" "', argument " "5"" of type '" "int""'");
   25062             :   } 
   25063           3 :   arg5 = static_cast< int >(val5);
   25064           3 :   ecode6 = SWIG_AsVal_int(obj5, &val6);
   25065           3 :   if (!SWIG_IsOK(ecode6)) {
   25066           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Dataset_GetVirtualMem" "', argument " "6"" of type '" "int""'");
   25067             :   } 
   25068           3 :   arg6 = static_cast< int >(val6);
   25069           3 :   ecode7 = SWIG_AsVal_int(obj6, &val7);
   25070           3 :   if (!SWIG_IsOK(ecode7)) {
   25071           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Dataset_GetVirtualMem" "', argument " "7"" of type '" "int""'");
   25072             :   } 
   25073           3 :   arg7 = static_cast< int >(val7);
   25074           3 :   ecode8 = SWIG_AsVal_int(obj7, &val8);
   25075           3 :   if (!SWIG_IsOK(ecode8)) {
   25076           0 :     SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Dataset_GetVirtualMem" "', argument " "8"" of type '" "int""'");
   25077             :   } 
   25078           3 :   arg8 = static_cast< int >(val8);
   25079           3 :   {
   25080             :     // %typemap(in) GDALDataType
   25081           3 :     int val = 0;
   25082           3 :     int ecode = SWIG_AsVal_int(obj8, &val);
   25083           3 :     if (!SWIG_IsOK(ecode)) {
   25084           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   25085             :     }
   25086           3 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   25087             :     {
   25088           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   25089             :     }
   25090           3 :     arg9 = static_cast<GDALDataType>(val);
   25091             :   }
   25092           3 :   {
   25093             :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   25094           3 :     arg11 = CreateCIntListFromSequence(obj9, &arg10);
   25095           3 :     if( arg10 < 0 ) {
   25096           0 :       SWIG_fail;
   25097             :     }
   25098             :   }
   25099           3 :   ecode12 = SWIG_AsVal_int(obj10, &val12);
   25100           3 :   if (!SWIG_IsOK(ecode12)) {
   25101           0 :     SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "Dataset_GetVirtualMem" "', argument " "12"" of type '" "int""'");
   25102             :   } 
   25103           3 :   arg12 = static_cast< int >(val12);
   25104           3 :   ecode13 = SWIG_AsVal_size_t(obj11, &val13);
   25105           3 :   if (!SWIG_IsOK(ecode13)) {
   25106           0 :     SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "Dataset_GetVirtualMem" "', argument " "13"" of type '" "size_t""'");
   25107             :   } 
   25108           3 :   arg13 = static_cast< size_t >(val13);
   25109           3 :   ecode14 = SWIG_AsVal_size_t(obj12, &val14);
   25110           3 :   if (!SWIG_IsOK(ecode14)) {
   25111           0 :     SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "Dataset_GetVirtualMem" "', argument " "14"" of type '" "size_t""'");
   25112             :   } 
   25113           3 :   arg14 = static_cast< size_t >(val14);
   25114           3 :   if (obj13) {
   25115           0 :     {
   25116             :       /* %typemap(in) char **dict */
   25117           0 :       arg15 = NULL;
   25118           0 :       if ( PySequence_Check( obj13 ) ) {
   25119           0 :         int bErr = FALSE;
   25120           0 :         arg15 = CSLFromPySequence(obj13, &bErr);
   25121           0 :         if ( bErr )
   25122             :         {
   25123           0 :           SWIG_fail;
   25124             :         }
   25125             :       }
   25126           0 :       else if ( PyMapping_Check( obj13 ) ) {
   25127           0 :         int bErr = FALSE;
   25128           0 :         arg15 = CSLFromPyMapping(obj13, &bErr);
   25129           0 :         if ( bErr )
   25130             :         {
   25131           0 :           SWIG_fail;
   25132             :         }
   25133             :       }
   25134             :       else {
   25135           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   25136           0 :         SWIG_fail;
   25137             :       }
   25138             :     }
   25139             :   }
   25140           3 :   {
   25141           3 :     const int bLocalUseExceptions = GetUseExceptions();
   25142           3 :     if ( bLocalUseExceptions ) {
   25143           3 :       pushErrorHandler();
   25144             :     }
   25145           3 :     {
   25146           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25147           3 :       result = (CPLVirtualMemShadow *)GDALDatasetShadow_GetVirtualMem(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
   25148           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25149             :     }
   25150           3 :     if ( bLocalUseExceptions ) {
   25151           3 :       popErrorHandler();
   25152             :     }
   25153             : #ifndef SED_HACKS
   25154             :     if ( bLocalUseExceptions ) {
   25155             :       CPLErr eclass = CPLGetLastErrorType();
   25156             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25157             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25158             :       }
   25159             :     }
   25160             : #endif
   25161             :   }
   25162           3 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_OWN |  0 );
   25163           3 :   {
   25164             :     /* %typemap(freearg) (int nList, int* pList) */
   25165           3 :     free(arg11);
   25166             :   }
   25167           3 :   {
   25168             :     /* %typemap(freearg) char **dict */
   25169           3 :     CSLDestroy( arg15 );
   25170             :   }
   25171           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; } }
   25172             :   return resultobj;
   25173           0 : fail:
   25174           0 :   {
   25175             :     /* %typemap(freearg) (int nList, int* pList) */
   25176           0 :     free(arg11);
   25177             :   }
   25178           0 :   {
   25179             :     /* %typemap(freearg) char **dict */
   25180           0 :     CSLDestroy( arg15 );
   25181             :   }
   25182             :   return NULL;
   25183             : }
   25184             : 
   25185             : 
   25186           3 : SWIGINTERN PyObject *_wrap_Dataset_GetTiledVirtualMem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   25187           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25188           3 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25189           3 :   GDALRWFlag arg2 ;
   25190           3 :   int arg3 ;
   25191           3 :   int arg4 ;
   25192           3 :   int arg5 ;
   25193           3 :   int arg6 ;
   25194           3 :   int arg7 ;
   25195           3 :   int arg8 ;
   25196           3 :   GDALDataType arg9 ;
   25197           3 :   int arg10 ;
   25198           3 :   int *arg11 = (int *) 0 ;
   25199           3 :   GDALTileOrganization arg12 ;
   25200           3 :   size_t arg13 ;
   25201           3 :   char **arg14 = (char **) NULL ;
   25202           3 :   void *argp1 = 0 ;
   25203           3 :   int res1 = 0 ;
   25204           3 :   int val2 ;
   25205           3 :   int ecode2 = 0 ;
   25206           3 :   int val3 ;
   25207           3 :   int ecode3 = 0 ;
   25208           3 :   int val4 ;
   25209           3 :   int ecode4 = 0 ;
   25210           3 :   int val5 ;
   25211           3 :   int ecode5 = 0 ;
   25212           3 :   int val6 ;
   25213           3 :   int ecode6 = 0 ;
   25214           3 :   int val7 ;
   25215           3 :   int ecode7 = 0 ;
   25216           3 :   int val8 ;
   25217           3 :   int ecode8 = 0 ;
   25218           3 :   int val12 ;
   25219           3 :   int ecode12 = 0 ;
   25220           3 :   size_t val13 ;
   25221           3 :   int ecode13 = 0 ;
   25222           3 :   PyObject * obj0 = 0 ;
   25223           3 :   PyObject * obj1 = 0 ;
   25224           3 :   PyObject * obj2 = 0 ;
   25225           3 :   PyObject * obj3 = 0 ;
   25226           3 :   PyObject * obj4 = 0 ;
   25227           3 :   PyObject * obj5 = 0 ;
   25228           3 :   PyObject * obj6 = 0 ;
   25229           3 :   PyObject * obj7 = 0 ;
   25230           3 :   PyObject * obj8 = 0 ;
   25231           3 :   PyObject * obj9 = 0 ;
   25232           3 :   PyObject * obj10 = 0 ;
   25233           3 :   PyObject * obj11 = 0 ;
   25234           3 :   PyObject * obj12 = 0 ;
   25235           3 :   char * kwnames[] = {
   25236             :     (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 
   25237             :   };
   25238           3 :   CPLVirtualMemShadow *result = 0 ;
   25239             :   
   25240           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;
   25241           3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25242           3 :   if (!SWIG_IsOK(res1)) {
   25243           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25244             :   }
   25245           3 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25246           3 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   25247           3 :   if (!SWIG_IsOK(ecode2)) {
   25248           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "2"" of type '" "GDALRWFlag""'");
   25249             :   } 
   25250           3 :   arg2 = static_cast< GDALRWFlag >(val2);
   25251           3 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   25252           3 :   if (!SWIG_IsOK(ecode3)) {
   25253           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "3"" of type '" "int""'");
   25254             :   } 
   25255           3 :   arg3 = static_cast< int >(val3);
   25256           3 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   25257           3 :   if (!SWIG_IsOK(ecode4)) {
   25258           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "4"" of type '" "int""'");
   25259             :   } 
   25260           3 :   arg4 = static_cast< int >(val4);
   25261           3 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   25262           3 :   if (!SWIG_IsOK(ecode5)) {
   25263           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "5"" of type '" "int""'");
   25264             :   } 
   25265           3 :   arg5 = static_cast< int >(val5);
   25266           3 :   ecode6 = SWIG_AsVal_int(obj5, &val6);
   25267           3 :   if (!SWIG_IsOK(ecode6)) {
   25268           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "6"" of type '" "int""'");
   25269             :   } 
   25270           3 :   arg6 = static_cast< int >(val6);
   25271           3 :   ecode7 = SWIG_AsVal_int(obj6, &val7);
   25272           3 :   if (!SWIG_IsOK(ecode7)) {
   25273           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "7"" of type '" "int""'");
   25274             :   } 
   25275           3 :   arg7 = static_cast< int >(val7);
   25276           3 :   ecode8 = SWIG_AsVal_int(obj7, &val8);
   25277           3 :   if (!SWIG_IsOK(ecode8)) {
   25278           0 :     SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "8"" of type '" "int""'");
   25279             :   } 
   25280           3 :   arg8 = static_cast< int >(val8);
   25281           3 :   {
   25282             :     // %typemap(in) GDALDataType
   25283           3 :     int val = 0;
   25284           3 :     int ecode = SWIG_AsVal_int(obj8, &val);
   25285           3 :     if (!SWIG_IsOK(ecode)) {
   25286           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   25287             :     }
   25288           3 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   25289             :     {
   25290           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   25291             :     }
   25292           3 :     arg9 = static_cast<GDALDataType>(val);
   25293             :   }
   25294           3 :   {
   25295             :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   25296           3 :     arg11 = CreateCIntListFromSequence(obj9, &arg10);
   25297           3 :     if( arg10 < 0 ) {
   25298           0 :       SWIG_fail;
   25299             :     }
   25300             :   }
   25301           3 :   ecode12 = SWIG_AsVal_int(obj10, &val12);
   25302           3 :   if (!SWIG_IsOK(ecode12)) {
   25303           0 :     SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "12"" of type '" "GDALTileOrganization""'");
   25304             :   } 
   25305           3 :   arg12 = static_cast< GDALTileOrganization >(val12);
   25306           3 :   ecode13 = SWIG_AsVal_size_t(obj11, &val13);
   25307           3 :   if (!SWIG_IsOK(ecode13)) {
   25308           0 :     SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "Dataset_GetTiledVirtualMem" "', argument " "13"" of type '" "size_t""'");
   25309             :   } 
   25310           3 :   arg13 = static_cast< size_t >(val13);
   25311           3 :   if (obj12) {
   25312           0 :     {
   25313             :       /* %typemap(in) char **dict */
   25314           0 :       arg14 = NULL;
   25315           0 :       if ( PySequence_Check( obj12 ) ) {
   25316           0 :         int bErr = FALSE;
   25317           0 :         arg14 = CSLFromPySequence(obj12, &bErr);
   25318           0 :         if ( bErr )
   25319             :         {
   25320           0 :           SWIG_fail;
   25321             :         }
   25322             :       }
   25323           0 :       else if ( PyMapping_Check( obj12 ) ) {
   25324           0 :         int bErr = FALSE;
   25325           0 :         arg14 = CSLFromPyMapping(obj12, &bErr);
   25326           0 :         if ( bErr )
   25327             :         {
   25328           0 :           SWIG_fail;
   25329             :         }
   25330             :       }
   25331             :       else {
   25332           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   25333           0 :         SWIG_fail;
   25334             :       }
   25335             :     }
   25336             :   }
   25337           3 :   {
   25338           3 :     const int bLocalUseExceptions = GetUseExceptions();
   25339           3 :     if ( bLocalUseExceptions ) {
   25340           3 :       pushErrorHandler();
   25341             :     }
   25342           3 :     {
   25343           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25344           3 :       result = (CPLVirtualMemShadow *)GDALDatasetShadow_GetTiledVirtualMem(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14);
   25345           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25346             :     }
   25347           3 :     if ( bLocalUseExceptions ) {
   25348           3 :       popErrorHandler();
   25349             :     }
   25350             : #ifndef SED_HACKS
   25351             :     if ( bLocalUseExceptions ) {
   25352             :       CPLErr eclass = CPLGetLastErrorType();
   25353             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25354             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25355             :       }
   25356             :     }
   25357             : #endif
   25358             :   }
   25359           3 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_OWN |  0 );
   25360           3 :   {
   25361             :     /* %typemap(freearg) (int nList, int* pList) */
   25362           3 :     free(arg11);
   25363             :   }
   25364           3 :   {
   25365             :     /* %typemap(freearg) char **dict */
   25366           3 :     CSLDestroy( arg14 );
   25367             :   }
   25368           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; } }
   25369             :   return resultobj;
   25370           0 : fail:
   25371           0 :   {
   25372             :     /* %typemap(freearg) (int nList, int* pList) */
   25373           0 :     free(arg11);
   25374             :   }
   25375           0 :   {
   25376             :     /* %typemap(freearg) char **dict */
   25377           0 :     CSLDestroy( arg14 );
   25378             :   }
   25379             :   return NULL;
   25380             : }
   25381             : 
   25382             : 
   25383        5893 : SWIGINTERN PyObject *_wrap_Dataset_CreateLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   25384        5893 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25385        5893 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25386        5893 :   char *arg2 = (char *) 0 ;
   25387        5893 :   OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) NULL ;
   25388        5893 :   OGRwkbGeometryType arg4 = (OGRwkbGeometryType) wkbUnknown ;
   25389        5893 :   char **arg5 = (char **) 0 ;
   25390        5893 :   void *argp1 = 0 ;
   25391        5893 :   int res1 = 0 ;
   25392        5893 :   int res2 ;
   25393        5893 :   char *buf2 = 0 ;
   25394        5893 :   int alloc2 = 0 ;
   25395        5893 :   void *argp3 = 0 ;
   25396        5893 :   int res3 = 0 ;
   25397        5893 :   int val4 ;
   25398        5893 :   int ecode4 = 0 ;
   25399        5893 :   PyObject * obj0 = 0 ;
   25400        5893 :   PyObject * obj1 = 0 ;
   25401        5893 :   PyObject * obj2 = 0 ;
   25402        5893 :   PyObject * obj3 = 0 ;
   25403        5893 :   PyObject * obj4 = 0 ;
   25404        5893 :   char * kwnames[] = {
   25405             :     (char *)"self",  (char *)"name",  (char *)"srs",  (char *)"geom_type",  (char *)"options",  NULL 
   25406             :   };
   25407        5893 :   OGRLayerShadow *result = 0 ;
   25408             :   
   25409        5893 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:Dataset_CreateLayer", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   25410        5893 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25411        5893 :   if (!SWIG_IsOK(res1)) {
   25412           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_CreateLayer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25413             :   }
   25414        5893 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25415        5893 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   25416        5893 :   if (!SWIG_IsOK(res2)) {
   25417           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_CreateLayer" "', argument " "2"" of type '" "char const *""'");
   25418             :   }
   25419        5893 :   arg2 = reinterpret_cast< char * >(buf2);
   25420        5893 :   if (obj2) {
   25421        1165 :     res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   25422        1165 :     if (!SWIG_IsOK(res3)) {
   25423           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Dataset_CreateLayer" "', argument " "3"" of type '" "OSRSpatialReferenceShadow *""'"); 
   25424             :     }
   25425        1165 :     arg3 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp3);
   25426             :   }
   25427        5893 :   if (obj3) {
   25428        1669 :     ecode4 = SWIG_AsVal_int(obj3, &val4);
   25429        1669 :     if (!SWIG_IsOK(ecode4)) {
   25430           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_CreateLayer" "', argument " "4"" of type '" "OGRwkbGeometryType""'");
   25431             :     } 
   25432        1669 :     arg4 = static_cast< OGRwkbGeometryType >(val4);
   25433             :   }
   25434        5893 :   if (obj4) {
   25435        1181 :     {
   25436             :       /* %typemap(in) char **dict */
   25437        1181 :       arg5 = NULL;
   25438        1181 :       if ( PySequence_Check( obj4 ) ) {
   25439        1149 :         int bErr = FALSE;
   25440        1149 :         arg5 = CSLFromPySequence(obj4, &bErr);
   25441        1149 :         if ( bErr )
   25442             :         {
   25443           0 :           SWIG_fail;
   25444             :         }
   25445             :       }
   25446          32 :       else if ( PyMapping_Check( obj4 ) ) {
   25447          32 :         int bErr = FALSE;
   25448          32 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   25449          32 :         if ( bErr )
   25450             :         {
   25451           0 :           SWIG_fail;
   25452             :         }
   25453             :       }
   25454             :       else {
   25455           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   25456           0 :         SWIG_fail;
   25457             :       }
   25458             :     }
   25459             :   }
   25460        5893 :   {
   25461        5893 :     const int bLocalUseExceptions = GetUseExceptions();
   25462        5893 :     if ( bLocalUseExceptions ) {
   25463        1832 :       pushErrorHandler();
   25464             :     }
   25465        5893 :     {
   25466        5893 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25467        5893 :       result = (OGRLayerShadow *)GDALDatasetShadow_CreateLayer(arg1,(char const *)arg2,arg3,arg4,arg5);
   25468        5893 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25469             :     }
   25470        5893 :     if ( bLocalUseExceptions ) {
   25471        1832 :       popErrorHandler();
   25472             :     }
   25473             : #ifndef SED_HACKS
   25474             :     if ( bLocalUseExceptions ) {
   25475             :       CPLErr eclass = CPLGetLastErrorType();
   25476             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25477             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25478             :       }
   25479             :     }
   25480             : #endif
   25481             :   }
   25482        5893 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   25483        5893 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   25484        5893 :   {
   25485             :     /* %typemap(freearg) char **dict */
   25486        5893 :     CSLDestroy( arg5 );
   25487             :   }
   25488        5945 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   25489             :   return resultobj;
   25490           0 : fail:
   25491           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   25492           0 :   {
   25493             :     /* %typemap(freearg) char **dict */
   25494           0 :     CSLDestroy( arg5 );
   25495             :   }
   25496             :   return NULL;
   25497             : }
   25498             : 
   25499             : 
   25500          14 : SWIGINTERN PyObject *_wrap_Dataset_CreateLayerFromGeomFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   25501          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25502          14 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25503          14 :   char *arg2 = (char *) 0 ;
   25504          14 :   OGRGeomFieldDefnShadow *arg3 = (OGRGeomFieldDefnShadow *) 0 ;
   25505          14 :   char **arg4 = (char **) 0 ;
   25506          14 :   void *argp1 = 0 ;
   25507          14 :   int res1 = 0 ;
   25508          14 :   int res2 ;
   25509          14 :   char *buf2 = 0 ;
   25510          14 :   int alloc2 = 0 ;
   25511          14 :   void *argp3 = 0 ;
   25512          14 :   int res3 = 0 ;
   25513          14 :   PyObject *swig_obj[4] ;
   25514          14 :   OGRLayerShadow *result = 0 ;
   25515             :   
   25516          14 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_CreateLayerFromGeomFieldDefn", 3, 4, swig_obj)) SWIG_fail;
   25517          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25518          14 :   if (!SWIG_IsOK(res1)) {
   25519           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_CreateLayerFromGeomFieldDefn" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25520             :   }
   25521          14 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25522          14 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   25523          14 :   if (!SWIG_IsOK(res2)) {
   25524           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_CreateLayerFromGeomFieldDefn" "', argument " "2"" of type '" "char const *""'");
   25525             :   }
   25526          14 :   arg2 = reinterpret_cast< char * >(buf2);
   25527          14 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 |  0 );
   25528          14 :   if (!SWIG_IsOK(res3)) {
   25529           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Dataset_CreateLayerFromGeomFieldDefn" "', argument " "3"" of type '" "OGRGeomFieldDefnShadow *""'"); 
   25530             :   }
   25531          14 :   arg3 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp3);
   25532          14 :   if (swig_obj[3]) {
   25533           7 :     {
   25534             :       /* %typemap(in) char **dict */
   25535           7 :       arg4 = NULL;
   25536           7 :       if ( PySequence_Check( swig_obj[3] ) ) {
   25537           7 :         int bErr = FALSE;
   25538           7 :         arg4 = CSLFromPySequence(swig_obj[3], &bErr);
   25539           7 :         if ( bErr )
   25540             :         {
   25541           0 :           SWIG_fail;
   25542             :         }
   25543             :       }
   25544           0 :       else if ( PyMapping_Check( swig_obj[3] ) ) {
   25545           0 :         int bErr = FALSE;
   25546           0 :         arg4 = CSLFromPyMapping(swig_obj[3], &bErr);
   25547           0 :         if ( bErr )
   25548             :         {
   25549           0 :           SWIG_fail;
   25550             :         }
   25551             :       }
   25552             :       else {
   25553           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   25554           0 :         SWIG_fail;
   25555             :       }
   25556             :     }
   25557             :   }
   25558          14 :   {
   25559          14 :     const int bLocalUseExceptions = GetUseExceptions();
   25560          14 :     if ( bLocalUseExceptions ) {
   25561           9 :       pushErrorHandler();
   25562             :     }
   25563          14 :     {
   25564          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25565          14 :       result = (OGRLayerShadow *)GDALDatasetShadow_CreateLayerFromGeomFieldDefn(arg1,(char const *)arg2,arg3,arg4);
   25566          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25567             :     }
   25568          14 :     if ( bLocalUseExceptions ) {
   25569           9 :       popErrorHandler();
   25570             :     }
   25571             : #ifndef SED_HACKS
   25572             :     if ( bLocalUseExceptions ) {
   25573             :       CPLErr eclass = CPLGetLastErrorType();
   25574             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25575             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25576             :       }
   25577             :     }
   25578             : #endif
   25579             :   }
   25580          14 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   25581          14 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   25582          14 :   {
   25583             :     /* %typemap(freearg) char **dict */
   25584          14 :     CSLDestroy( arg4 );
   25585             :   }
   25586          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; } }
   25587             :   return resultobj;
   25588           0 : fail:
   25589           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   25590           0 :   {
   25591             :     /* %typemap(freearg) char **dict */
   25592           0 :     CSLDestroy( arg4 );
   25593             :   }
   25594             :   return NULL;
   25595             : }
   25596             : 
   25597             : 
   25598          14 : SWIGINTERN PyObject *_wrap_Dataset_CopyLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   25599          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25600          14 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25601          14 :   OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
   25602          14 :   char *arg3 = (char *) 0 ;
   25603          14 :   char **arg4 = (char **) 0 ;
   25604          14 :   void *argp1 = 0 ;
   25605          14 :   int res1 = 0 ;
   25606          14 :   void *argp2 = 0 ;
   25607          14 :   int res2 = 0 ;
   25608          14 :   int res3 ;
   25609          14 :   char *buf3 = 0 ;
   25610          14 :   int alloc3 = 0 ;
   25611          14 :   PyObject * obj0 = 0 ;
   25612          14 :   PyObject * obj1 = 0 ;
   25613          14 :   PyObject * obj2 = 0 ;
   25614          14 :   PyObject * obj3 = 0 ;
   25615          14 :   char * kwnames[] = {
   25616             :     (char *)"self",  (char *)"src_layer",  (char *)"new_name",  (char *)"options",  NULL 
   25617             :   };
   25618          14 :   OGRLayerShadow *result = 0 ;
   25619             :   
   25620          14 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|O:Dataset_CopyLayer", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
   25621          14 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25622          14 :   if (!SWIG_IsOK(res1)) {
   25623           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_CopyLayer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25624             :   }
   25625          14 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25626          14 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   25627          14 :   if (!SWIG_IsOK(res2)) {
   25628           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_CopyLayer" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
   25629             :   }
   25630          14 :   arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
   25631          14 :   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   25632          14 :   if (!SWIG_IsOK(res3)) {
   25633           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Dataset_CopyLayer" "', argument " "3"" of type '" "char const *""'");
   25634             :   }
   25635          14 :   arg3 = reinterpret_cast< char * >(buf3);
   25636          14 :   if (obj3) {
   25637           4 :     {
   25638             :       /* %typemap(in) char **dict */
   25639           4 :       arg4 = NULL;
   25640           4 :       if ( PySequence_Check( obj3 ) ) {
   25641           4 :         int bErr = FALSE;
   25642           4 :         arg4 = CSLFromPySequence(obj3, &bErr);
   25643           4 :         if ( bErr )
   25644             :         {
   25645           0 :           SWIG_fail;
   25646             :         }
   25647             :       }
   25648           0 :       else if ( PyMapping_Check( obj3 ) ) {
   25649           0 :         int bErr = FALSE;
   25650           0 :         arg4 = CSLFromPyMapping(obj3, &bErr);
   25651           0 :         if ( bErr )
   25652             :         {
   25653           0 :           SWIG_fail;
   25654             :         }
   25655             :       }
   25656             :       else {
   25657           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   25658           0 :         SWIG_fail;
   25659             :       }
   25660             :     }
   25661             :   }
   25662          14 :   {
   25663          14 :     if (!arg2) {
   25664           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   25665             :     }
   25666             :   }
   25667          14 :   {
   25668          14 :     const int bLocalUseExceptions = GetUseExceptions();
   25669          14 :     if ( bLocalUseExceptions ) {
   25670          10 :       pushErrorHandler();
   25671             :     }
   25672          14 :     {
   25673          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25674          14 :       result = (OGRLayerShadow *)GDALDatasetShadow_CopyLayer(arg1,arg2,(char const *)arg3,arg4);
   25675          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25676             :     }
   25677          14 :     if ( bLocalUseExceptions ) {
   25678          10 :       popErrorHandler();
   25679             :     }
   25680             : #ifndef SED_HACKS
   25681             :     if ( bLocalUseExceptions ) {
   25682             :       CPLErr eclass = CPLGetLastErrorType();
   25683             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25684             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25685             :       }
   25686             :     }
   25687             : #endif
   25688             :   }
   25689          14 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   25690          14 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   25691          14 :   {
   25692             :     /* %typemap(freearg) char **dict */
   25693          14 :     CSLDestroy( arg4 );
   25694             :   }
   25695          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; } }
   25696             :   return resultobj;
   25697           0 : fail:
   25698           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   25699           0 :   {
   25700             :     /* %typemap(freearg) char **dict */
   25701           0 :     CSLDestroy( arg4 );
   25702             :   }
   25703             :   return NULL;
   25704             : }
   25705             : 
   25706             : 
   25707          40 : SWIGINTERN PyObject *_wrap_Dataset_DeleteLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   25708          40 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25709          40 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25710          40 :   int arg2 ;
   25711          40 :   void *argp1 = 0 ;
   25712          40 :   int res1 = 0 ;
   25713          40 :   int val2 ;
   25714          40 :   int ecode2 = 0 ;
   25715          40 :   PyObject *swig_obj[2] ;
   25716          40 :   OGRErr result;
   25717             :   
   25718          40 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_DeleteLayer", 2, 2, swig_obj)) SWIG_fail;
   25719          40 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25720          40 :   if (!SWIG_IsOK(res1)) {
   25721           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_DeleteLayer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25722             :   }
   25723          40 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25724          40 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   25725          40 :   if (!SWIG_IsOK(ecode2)) {
   25726           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_DeleteLayer" "', argument " "2"" of type '" "int""'");
   25727             :   } 
   25728          40 :   arg2 = static_cast< int >(val2);
   25729          40 :   {
   25730          40 :     const int bLocalUseExceptions = GetUseExceptions();
   25731          40 :     if ( bLocalUseExceptions ) {
   25732           6 :       pushErrorHandler();
   25733             :     }
   25734          40 :     {
   25735          40 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25736          40 :       result = (OGRErr)GDALDatasetShadow_DeleteLayer(arg1,arg2);
   25737          40 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25738             :     }
   25739          40 :     if ( bLocalUseExceptions ) {
   25740           6 :       popErrorHandler();
   25741             :     }
   25742             : #ifndef SED_HACKS
   25743             :     if ( bLocalUseExceptions ) {
   25744             :       CPLErr eclass = CPLGetLastErrorType();
   25745             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25746             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25747             :       }
   25748             :     }
   25749             : #endif
   25750             :   }
   25751          40 :   {
   25752             :     /* %typemap(out) OGRErr */
   25753          58 :     if ( result != 0 && GetUseExceptions()) {
   25754           2 :       const char* pszMessage = CPLGetLastErrorMsg();
   25755           2 :       if( pszMessage[0] != '\0' )
   25756           2 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   25757             :       else
   25758           0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   25759           2 :       SWIG_fail;
   25760             :     }
   25761             :   }
   25762          38 :   {
   25763             :     /* %typemap(ret) OGRErr */
   25764          38 :     if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
   25765          38 :       resultobj = PyInt_FromLong( result );
   25766             :     }
   25767             :   }
   25768          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; } }
   25769             :   return resultobj;
   25770             : fail:
   25771             :   return NULL;
   25772             : }
   25773             : 
   25774             : 
   25775          91 : SWIGINTERN PyObject *_wrap_Dataset_IsLayerPrivate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   25776          91 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25777          91 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25778          91 :   int arg2 ;
   25779          91 :   void *argp1 = 0 ;
   25780          91 :   int res1 = 0 ;
   25781          91 :   int val2 ;
   25782          91 :   int ecode2 = 0 ;
   25783          91 :   PyObject *swig_obj[2] ;
   25784          91 :   bool result;
   25785             :   
   25786          91 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_IsLayerPrivate", 2, 2, swig_obj)) SWIG_fail;
   25787          91 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25788          91 :   if (!SWIG_IsOK(res1)) {
   25789           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_IsLayerPrivate" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25790             :   }
   25791          91 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25792          91 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   25793          91 :   if (!SWIG_IsOK(ecode2)) {
   25794           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_IsLayerPrivate" "', argument " "2"" of type '" "int""'");
   25795             :   } 
   25796          91 :   arg2 = static_cast< int >(val2);
   25797          91 :   {
   25798          91 :     const int bLocalUseExceptions = GetUseExceptions();
   25799          91 :     if ( bLocalUseExceptions ) {
   25800          85 :       pushErrorHandler();
   25801             :     }
   25802          91 :     {
   25803          91 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25804          91 :       result = (bool)GDALDatasetShadow_IsLayerPrivate(arg1,arg2);
   25805          91 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25806             :     }
   25807          91 :     if ( bLocalUseExceptions ) {
   25808          85 :       popErrorHandler();
   25809             :     }
   25810             : #ifndef SED_HACKS
   25811             :     if ( bLocalUseExceptions ) {
   25812             :       CPLErr eclass = CPLGetLastErrorType();
   25813             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25814             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25815             :       }
   25816             :     }
   25817             : #endif
   25818             :   }
   25819          91 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   25820          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; } }
   25821             :   return resultobj;
   25822             : fail:
   25823             :   return NULL;
   25824             : }
   25825             : 
   25826             : 
   25827        1917 : SWIGINTERN PyObject *_wrap_Dataset_GetNextFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   25828        1917 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   25829        1917 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   25830        1917 :   bool arg2 = (bool) true ;
   25831        1917 :   bool arg3 = (bool) false ;
   25832        1917 :   OGRLayerShadow **arg4 = (OGRLayerShadow **) NULL ;
   25833        1917 :   double *arg5 = (double *) NULL ;
   25834        1917 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   25835        1917 :   void *arg7 = (void *) NULL ;
   25836        1917 :   void *argp1 = 0 ;
   25837        1917 :   int res1 = 0 ;
   25838        1917 :   bool val2 ;
   25839        1917 :   int ecode2 = 0 ;
   25840        1917 :   bool val3 ;
   25841        1917 :   int ecode3 = 0 ;
   25842        1917 :   OGRLayerShadow *poBelongingLayer4 = NULL ;
   25843        1917 :   double dfProgressPct4 = 0 ;
   25844        1917 :   PyObject * obj0 = 0 ;
   25845        1917 :   PyObject * obj1 = 0 ;
   25846        1917 :   PyObject * obj2 = 0 ;
   25847        1917 :   PyObject * obj3 = 0 ;
   25848        1917 :   PyObject * obj4 = 0 ;
   25849        1917 :   char * kwnames[] = {
   25850             :     (char *)"self",  (char *)"include_layer",  (char *)"include_pct",  (char *)"callback",  (char *)"callback_data",  NULL 
   25851             :   };
   25852        1917 :   OGRFeatureShadow *result = 0 ;
   25853             :   
   25854             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   25855        1917 :   PyProgressData *psProgressInfo;
   25856        1917 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   25857        1917 :   psProgressInfo->nLastReported = -1;
   25858        1917 :   psProgressInfo->psPyCallback = NULL;
   25859        1917 :   psProgressInfo->psPyCallbackData = NULL;
   25860        1917 :   arg7 = psProgressInfo;
   25861        1917 :   {
   25862             :     /* %typemap(in) (OGRLayerShadow** ppoBelongingLayer, double* pdfProgressPct)  */
   25863        1917 :     arg4 = &poBelongingLayer4;
   25864        1917 :     arg5 = &dfProgressPct4;
   25865             :   }
   25866        1917 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOO:Dataset_GetNextFeature", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   25867        1917 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   25868        1917 :   if (!SWIG_IsOK(res1)) {
   25869           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetNextFeature" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   25870             :   }
   25871        1917 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   25872        1917 :   if (obj1) {
   25873           6 :     ecode2 = SWIG_AsVal_bool(obj1, &val2);
   25874           6 :     if (!SWIG_IsOK(ecode2)) {
   25875           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetNextFeature" "', argument " "2"" of type '" "bool""'");
   25876             :     } 
   25877             :     arg2 = static_cast< bool >(val2);
   25878             :   }
   25879        1917 :   if (obj2) {
   25880          76 :     ecode3 = SWIG_AsVal_bool(obj2, &val3);
   25881          76 :     if (!SWIG_IsOK(ecode3)) {
   25882           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_GetNextFeature" "', argument " "3"" of type '" "bool""'");
   25883             :     } 
   25884             :     arg3 = static_cast< bool >(val3);
   25885             :   }
   25886        1917 :   if (obj3) {
   25887           2 :     {
   25888             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   25889             :       /* callback_func typemap */
   25890             :       
   25891             :       /* In some cases 0 is passed instead of None. */
   25892             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   25893           2 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   25894             :       {
   25895           0 :         if( PyLong_AsLong(obj3) == 0 )
   25896             :         {
   25897           0 :           obj3 = Py_None;
   25898             :         }
   25899             :       }
   25900             :       
   25901           2 :       if (obj3 && obj3 != Py_None ) {
   25902           2 :         void* cbfunction = NULL;
   25903           2 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   25904             :             (void**)&cbfunction,
   25905             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   25906             :             SWIG_POINTER_EXCEPTION | 0 ));
   25907             :         
   25908           2 :         if ( cbfunction == GDALTermProgress ) {
   25909             :           arg6 = GDALTermProgress;
   25910             :         } else {
   25911           2 :           if (!PyCallable_Check(obj3)) {
   25912           0 :             PyErr_SetString( PyExc_RuntimeError,
   25913             :               "Object given is not a Python function" );
   25914           0 :             SWIG_fail;
   25915             :           }
   25916           2 :           psProgressInfo->psPyCallback = obj3;
   25917           2 :           arg6 = PyProgressProxy;
   25918             :         }
   25919             :         
   25920             :       }
   25921             :       
   25922             :     }
   25923             :   }
   25924        1917 :   if (obj4) {
   25925           1 :     {
   25926             :       /* %typemap(in) ( void* callback_data=NULL)  */
   25927           1 :       psProgressInfo->psPyCallbackData = obj4 ;
   25928             :     }
   25929             :   }
   25930        1917 :   {
   25931             :     /* %typemap(check) (OGRLayerShadow** ppoBelongingLayer, double* pdfProgressPct)  */
   25932        1917 :     if( !arg3 )
   25933        1841 :     arg5 = NULL;
   25934             :   }
   25935        1917 :   {
   25936        1917 :     const int bLocalUseExceptions = GetUseExceptions();
   25937        1917 :     if ( bLocalUseExceptions ) {
   25938         104 :       pushErrorHandler();
   25939             :     }
   25940        1917 :     {
   25941        1917 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   25942        1917 :       result = (OGRFeatureShadow *)GDALDatasetShadow_GetNextFeature(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   25943        1917 :       SWIG_PYTHON_THREAD_END_ALLOW;
   25944             :     }
   25945        1917 :     if ( bLocalUseExceptions ) {
   25946         104 :       popErrorHandler();
   25947             :     }
   25948             : #ifndef SED_HACKS
   25949             :     if ( bLocalUseExceptions ) {
   25950             :       CPLErr eclass = CPLGetLastErrorType();
   25951             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   25952             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   25953             :       }
   25954             :     }
   25955             : #endif
   25956             :   }
   25957        1917 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_OWN |  0 );
   25958        1917 :   {
   25959             :     /* %typemap(argout) (OGRLayerShadow** ppoBelongingLayer, double* pdfProgressPct)  */
   25960             :     
   25961        1917 :     if( arg2 )
   25962             :     {
   25963        1911 :       if( resultobj == Py_None )
   25964             :       {
   25965          35 :         resultobj = PyList_New(1);
   25966          35 :         PyList_SetItem(resultobj, 0, Py_None);
   25967             :       }
   25968             :       
   25969        1911 :       PyObject* r;
   25970        1911 :       if ( !*arg4 ) {
   25971          35 :         r = Py_None;
   25972          35 :         Py_INCREF(Py_None);
   25973             :       }
   25974             :       else {
   25975        1876 :         r = SWIG_NewPointerObj(SWIG_as_voidptr( *arg4), SWIGTYPE_p_OGRLayerShadow, 0 );
   25976             :       }
   25977             : #if SWIG_VERSION >= 0x040300
   25978             :       resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   25979             : #else
   25980        1911 :       resultobj = SWIG_Python_AppendOutput(resultobj,r);
   25981             : #endif
   25982             :     }
   25983             :     
   25984        1917 :     if( arg3 )
   25985             :     {
   25986          76 :       if( resultobj == Py_None )
   25987             :       {
   25988           2 :         resultobj = PyList_New(1);
   25989           2 :         PyList_SetItem(resultobj, 0, Py_None);
   25990             :       }
   25991          76 :       PyObject* r = PyFloat_FromDouble( *arg5);
   25992             : #if SWIG_VERSION >= 0x040300
   25993             :       resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   25994             : #else
   25995          76 :       resultobj = SWIG_Python_AppendOutput(resultobj,r);
   25996             : #endif
   25997             :     }
   25998             :     
   25999             :   }
   26000        1917 :   {
   26001             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   26002             :     
   26003        1917 :     CPLFree(psProgressInfo);
   26004             :     
   26005             :   }
   26006        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; } }
   26007             :   return resultobj;
   26008           0 : fail:
   26009           0 :   {
   26010             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   26011             :     
   26012           0 :     CPLFree(psProgressInfo);
   26013             :     
   26014             :   }
   26015             :   return NULL;
   26016             : }
   26017             : 
   26018             : 
   26019         122 : SWIGINTERN PyObject *_wrap_Dataset_TestCapability(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26020         122 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26021         122 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26022         122 :   char *arg2 = (char *) 0 ;
   26023         122 :   void *argp1 = 0 ;
   26024         122 :   int res1 = 0 ;
   26025         122 :   int res2 ;
   26026         122 :   char *buf2 = 0 ;
   26027         122 :   int alloc2 = 0 ;
   26028         122 :   PyObject *swig_obj[2] ;
   26029         122 :   bool result;
   26030             :   
   26031         122 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_TestCapability", 2, 2, swig_obj)) SWIG_fail;
   26032         122 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26033         122 :   if (!SWIG_IsOK(res1)) {
   26034           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_TestCapability" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26035             :   }
   26036         122 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26037         122 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   26038         122 :   if (!SWIG_IsOK(res2)) {
   26039           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_TestCapability" "', argument " "2"" of type '" "char const *""'");
   26040             :   }
   26041         122 :   arg2 = reinterpret_cast< char * >(buf2);
   26042         122 :   {
   26043         122 :     const int bLocalUseExceptions = GetUseExceptions();
   26044         122 :     if ( bLocalUseExceptions ) {
   26045          50 :       pushErrorHandler();
   26046             :     }
   26047         122 :     {
   26048         122 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26049         122 :       result = (bool)GDALDatasetShadow_TestCapability(arg1,(char const *)arg2);
   26050         122 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26051             :     }
   26052         122 :     if ( bLocalUseExceptions ) {
   26053          50 :       popErrorHandler();
   26054             :     }
   26055             : #ifndef SED_HACKS
   26056             :     if ( bLocalUseExceptions ) {
   26057             :       CPLErr eclass = CPLGetLastErrorType();
   26058             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26059             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26060             :       }
   26061             :     }
   26062             : #endif
   26063             :   }
   26064         122 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   26065         122 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   26066         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; } }
   26067             :   return resultobj;
   26068           0 : fail:
   26069           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   26070             :   return NULL;
   26071             : }
   26072             : 
   26073             : 
   26074        9993 : SWIGINTERN PyObject *_wrap_Dataset_ExecuteSQL(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   26075        9993 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26076        9993 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26077        9993 :   char *arg2 = (char *) 0 ;
   26078        9993 :   OGRGeometryShadow *arg3 = (OGRGeometryShadow *) NULL ;
   26079        9993 :   char *arg4 = (char *) "" ;
   26080        9993 :   void *argp1 = 0 ;
   26081        9993 :   int res1 = 0 ;
   26082        9993 :   int res2 ;
   26083        9993 :   char *buf2 = 0 ;
   26084        9993 :   int alloc2 = 0 ;
   26085        9993 :   void *argp3 = 0 ;
   26086        9993 :   int res3 = 0 ;
   26087        9993 :   int res4 ;
   26088        9993 :   char *buf4 = 0 ;
   26089        9993 :   int alloc4 = 0 ;
   26090        9993 :   PyObject * obj0 = 0 ;
   26091        9993 :   PyObject * obj1 = 0 ;
   26092        9993 :   PyObject * obj2 = 0 ;
   26093        9993 :   PyObject * obj3 = 0 ;
   26094        9993 :   char * kwnames[] = {
   26095             :     (char *)"self",  (char *)"statement",  (char *)"spatialFilter",  (char *)"dialect",  NULL 
   26096             :   };
   26097        9993 :   OGRLayerShadow *result = 0 ;
   26098             :   
   26099        9993 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OO:Dataset_ExecuteSQL", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
   26100        9993 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26101        9993 :   if (!SWIG_IsOK(res1)) {
   26102           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_ExecuteSQL" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26103             :   }
   26104        9993 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26105        9993 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   26106        9993 :   if (!SWIG_IsOK(res2)) {
   26107           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_ExecuteSQL" "', argument " "2"" of type '" "char const *""'");
   26108             :   }
   26109        9993 :   arg2 = reinterpret_cast< char * >(buf2);
   26110        9993 :   if (obj2) {
   26111        9993 :     res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
   26112        9993 :     if (!SWIG_IsOK(res3)) {
   26113           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Dataset_ExecuteSQL" "', argument " "3"" of type '" "OGRGeometryShadow *""'"); 
   26114             :     }
   26115        9993 :     arg3 = reinterpret_cast< OGRGeometryShadow * >(argp3);
   26116             :   }
   26117        9993 :   if (obj3) {
   26118        9993 :     res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
   26119        9993 :     if (!SWIG_IsOK(res4)) {
   26120           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Dataset_ExecuteSQL" "', argument " "4"" of type '" "char const *""'");
   26121             :     }
   26122        9993 :     arg4 = reinterpret_cast< char * >(buf4);
   26123             :   }
   26124        9993 :   {
   26125        9993 :     if (!arg2) {
   26126         131 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   26127             :     }
   26128             :   }
   26129        9862 :   {
   26130        9862 :     const int bLocalUseExceptions = GetUseExceptions();
   26131        9862 :     if ( bLocalUseExceptions ) {
   26132           0 :       pushErrorHandler();
   26133             :     }
   26134        9862 :     {
   26135        9862 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26136        9862 :       result = (OGRLayerShadow *)GDALDatasetShadow_ExecuteSQL(arg1,(char const *)arg2,arg3,(char const *)arg4);
   26137        9862 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26138             :     }
   26139        9862 :     if ( bLocalUseExceptions ) {
   26140           0 :       popErrorHandler();
   26141             :     }
   26142             : #ifndef SED_HACKS
   26143             :     if ( bLocalUseExceptions ) {
   26144             :       CPLErr eclass = CPLGetLastErrorType();
   26145             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26146             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26147             :       }
   26148             :     }
   26149             : #endif
   26150             :   }
   26151        9862 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   26152        9862 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   26153        9862 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   26154        9993 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   26155             :   return resultobj;
   26156         131 : fail:
   26157         131 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   26158         131 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   26159             :   return NULL;
   26160             : }
   26161             : 
   26162             : 
   26163        2818 : SWIGINTERN PyObject *_wrap_Dataset_ReleaseResultSet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26164        2818 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26165        2818 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26166        2818 :   OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
   26167        2818 :   void *argp1 = 0 ;
   26168        2818 :   int res1 = 0 ;
   26169        2818 :   int res2 = 0 ;
   26170        2818 :   PyObject *swig_obj[2] ;
   26171             :   
   26172        2818 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_ReleaseResultSet", 2, 2, swig_obj)) SWIG_fail;
   26173        2818 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26174        2818 :   if (!SWIG_IsOK(res1)) {
   26175           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_ReleaseResultSet" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26176             :   }
   26177        2818 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26178        2818 :   res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&arg2), SWIGTYPE_p_OGRLayerShadow, SWIG_POINTER_DISOWN |  0 );
   26179        2818 :   if (!SWIG_IsOK(res2)) {
   26180           4 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_ReleaseResultSet" "', argument " "2"" of type '" "OGRLayerShadow *""'");
   26181             :   }
   26182        2816 :   {
   26183        2816 :     const int bLocalUseExceptions = GetUseExceptions();
   26184        2816 :     if ( bLocalUseExceptions ) {
   26185         781 :       pushErrorHandler();
   26186             :     }
   26187        2816 :     {
   26188        2816 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26189        2816 :       GDALDatasetShadow_ReleaseResultSet(arg1,arg2);
   26190        2816 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26191             :     }
   26192        2816 :     if ( bLocalUseExceptions ) {
   26193         781 :       popErrorHandler();
   26194             :     }
   26195             : #ifndef SED_HACKS
   26196             :     if ( bLocalUseExceptions ) {
   26197             :       CPLErr eclass = CPLGetLastErrorType();
   26198             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26199             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26200             :       }
   26201             :     }
   26202             : #endif
   26203             :   }
   26204        2816 :   resultobj = SWIG_Py_Void();
   26205        2818 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   26206             :   return resultobj;
   26207             : fail:
   26208             :   return NULL;
   26209             : }
   26210             : 
   26211             : 
   26212           6 : SWIGINTERN PyObject *_wrap_Dataset_GetStyleTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26213           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26214           6 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26215           6 :   void *argp1 = 0 ;
   26216           6 :   int res1 = 0 ;
   26217           6 :   PyObject *swig_obj[1] ;
   26218           6 :   OGRStyleTableShadow *result = 0 ;
   26219             :   
   26220           6 :   if (!args) SWIG_fail;
   26221           6 :   swig_obj[0] = args;
   26222           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26223           6 :   if (!SWIG_IsOK(res1)) {
   26224           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetStyleTable" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26225             :   }
   26226           6 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26227           6 :   {
   26228           6 :     const int bLocalUseExceptions = GetUseExceptions();
   26229           6 :     if ( bLocalUseExceptions ) {
   26230           5 :       pushErrorHandler();
   26231             :     }
   26232           6 :     {
   26233           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26234           6 :       result = (OGRStyleTableShadow *)GDALDatasetShadow_GetStyleTable(arg1);
   26235           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26236             :     }
   26237           6 :     if ( bLocalUseExceptions ) {
   26238           5 :       popErrorHandler();
   26239             :     }
   26240             : #ifndef SED_HACKS
   26241             :     if ( bLocalUseExceptions ) {
   26242             :       CPLErr eclass = CPLGetLastErrorType();
   26243             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26244             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26245             :       }
   26246             :     }
   26247             : #endif
   26248             :   }
   26249           6 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRStyleTableShadow, 0 |  0 );
   26250           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; } }
   26251             :   return resultobj;
   26252             : fail:
   26253             :   return NULL;
   26254             : }
   26255             : 
   26256             : 
   26257           7 : SWIGINTERN PyObject *_wrap_Dataset_SetStyleTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26258           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26259           7 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26260           7 :   OGRStyleTableShadow *arg2 = (OGRStyleTableShadow *) 0 ;
   26261           7 :   void *argp1 = 0 ;
   26262           7 :   int res1 = 0 ;
   26263           7 :   void *argp2 = 0 ;
   26264           7 :   int res2 = 0 ;
   26265           7 :   PyObject *swig_obj[2] ;
   26266             :   
   26267           7 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_SetStyleTable", 2, 2, swig_obj)) SWIG_fail;
   26268           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26269           7 :   if (!SWIG_IsOK(res1)) {
   26270           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_SetStyleTable" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26271             :   }
   26272           7 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26273           7 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRStyleTableShadow, 0 |  0 );
   26274           7 :   if (!SWIG_IsOK(res2)) {
   26275           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_SetStyleTable" "', argument " "2"" of type '" "OGRStyleTableShadow *""'"); 
   26276             :   }
   26277           7 :   arg2 = reinterpret_cast< OGRStyleTableShadow * >(argp2);
   26278           7 :   {
   26279           7 :     const int bLocalUseExceptions = GetUseExceptions();
   26280           7 :     if ( bLocalUseExceptions ) {
   26281           6 :       pushErrorHandler();
   26282             :     }
   26283           7 :     {
   26284           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26285           7 :       GDALDatasetShadow_SetStyleTable(arg1,arg2);
   26286           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26287             :     }
   26288           7 :     if ( bLocalUseExceptions ) {
   26289           6 :       popErrorHandler();
   26290             :     }
   26291             : #ifndef SED_HACKS
   26292             :     if ( bLocalUseExceptions ) {
   26293             :       CPLErr eclass = CPLGetLastErrorType();
   26294             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26295             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26296             :       }
   26297             :     }
   26298             : #endif
   26299             :   }
   26300           7 :   resultobj = SWIG_Py_Void();
   26301           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; } }
   26302             :   return resultobj;
   26303             : fail:
   26304             :   return NULL;
   26305             : }
   26306             : 
   26307             : 
   26308        9159 : SWIGINTERN PyObject *_wrap_Dataset_GetLayerByIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26309        9159 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26310        9159 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26311        9159 :   int arg2 = (int) 0 ;
   26312        9159 :   void *argp1 = 0 ;
   26313        9159 :   int res1 = 0 ;
   26314        9159 :   int val2 ;
   26315        9159 :   int ecode2 = 0 ;
   26316        9159 :   PyObject *swig_obj[2] ;
   26317        9159 :   OGRLayerShadow *result = 0 ;
   26318             :   
   26319        9159 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetLayerByIndex", 1, 2, swig_obj)) SWIG_fail;
   26320        9159 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26321        9159 :   if (!SWIG_IsOK(res1)) {
   26322          14 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetLayerByIndex" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26323             :   }
   26324        9152 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26325        9152 :   if (swig_obj[1]) {
   26326        9152 :     ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   26327        9152 :     if (!SWIG_IsOK(ecode2)) {
   26328           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetLayerByIndex" "', argument " "2"" of type '" "int""'");
   26329             :     } 
   26330             :     arg2 = static_cast< int >(val2);
   26331             :   }
   26332        9152 :   {
   26333        9152 :     const int bLocalUseExceptions = GetUseExceptions();
   26334        9152 :     if ( bLocalUseExceptions ) {
   26335        5146 :       pushErrorHandler();
   26336             :     }
   26337        9152 :     {
   26338        9152 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26339        9152 :       result = (OGRLayerShadow *)GDALDatasetShadow_GetLayerByIndex(arg1,arg2);
   26340        9152 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26341             :     }
   26342        9152 :     if ( bLocalUseExceptions ) {
   26343        5146 :       popErrorHandler();
   26344             :     }
   26345             : #ifndef SED_HACKS
   26346             :     if ( bLocalUseExceptions ) {
   26347             :       CPLErr eclass = CPLGetLastErrorType();
   26348             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26349             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26350             :       }
   26351             :     }
   26352             : #endif
   26353             :   }
   26354        9152 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   26355        9159 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   26356             :   return resultobj;
   26357             : fail:
   26358             :   return NULL;
   26359             : }
   26360             : 
   26361             : 
   26362        2730 : SWIGINTERN PyObject *_wrap_Dataset_GetLayerByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26363        2730 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26364        2730 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26365        2730 :   char *arg2 = (char *) 0 ;
   26366        2730 :   void *argp1 = 0 ;
   26367        2730 :   int res1 = 0 ;
   26368        2730 :   int res2 ;
   26369        2730 :   char *buf2 = 0 ;
   26370        2730 :   int alloc2 = 0 ;
   26371        2730 :   PyObject *swig_obj[2] ;
   26372        2730 :   OGRLayerShadow *result = 0 ;
   26373             :   
   26374        2730 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetLayerByName", 2, 2, swig_obj)) SWIG_fail;
   26375        2730 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26376        2730 :   if (!SWIG_IsOK(res1)) {
   26377           2 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetLayerByName" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26378             :   }
   26379        2729 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26380        2729 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   26381        2729 :   if (!SWIG_IsOK(res2)) {
   26382           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_GetLayerByName" "', argument " "2"" of type '" "char const *""'");
   26383             :   }
   26384        2729 :   arg2 = reinterpret_cast< char * >(buf2);
   26385        2729 :   {
   26386        2729 :     const int bLocalUseExceptions = GetUseExceptions();
   26387        2729 :     if ( bLocalUseExceptions ) {
   26388         426 :       pushErrorHandler();
   26389             :     }
   26390        2729 :     {
   26391        2729 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26392        2729 :       result = (OGRLayerShadow *)GDALDatasetShadow_GetLayerByName(arg1,(char const *)arg2);
   26393        2729 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26394             :     }
   26395        2729 :     if ( bLocalUseExceptions ) {
   26396         426 :       popErrorHandler();
   26397             :     }
   26398             : #ifndef SED_HACKS
   26399             :     if ( bLocalUseExceptions ) {
   26400             :       CPLErr eclass = CPLGetLastErrorType();
   26401             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26402             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26403             :       }
   26404             :     }
   26405             : #endif
   26406             :   }
   26407        2729 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   26408        2729 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   26409        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; } }
   26410             :   return resultobj;
   26411           1 : fail:
   26412           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   26413             :   return NULL;
   26414             : }
   26415             : 
   26416             : 
   26417          14 : SWIGINTERN PyObject *_wrap_Dataset_ResetReading(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26418          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26419          14 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26420          14 :   void *argp1 = 0 ;
   26421          14 :   int res1 = 0 ;
   26422          14 :   PyObject *swig_obj[1] ;
   26423             :   
   26424          14 :   if (!args) SWIG_fail;
   26425          14 :   swig_obj[0] = args;
   26426          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26427          14 :   if (!SWIG_IsOK(res1)) {
   26428           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_ResetReading" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26429             :   }
   26430          14 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26431          14 :   {
   26432          14 :     const int bLocalUseExceptions = GetUseExceptions();
   26433          14 :     if ( bLocalUseExceptions ) {
   26434           9 :       pushErrorHandler();
   26435             :     }
   26436          14 :     {
   26437          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26438          14 :       GDALDatasetShadow_ResetReading(arg1);
   26439          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26440             :     }
   26441          14 :     if ( bLocalUseExceptions ) {
   26442           9 :       popErrorHandler();
   26443             :     }
   26444             : #ifndef SED_HACKS
   26445             :     if ( bLocalUseExceptions ) {
   26446             :       CPLErr eclass = CPLGetLastErrorType();
   26447             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26448             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26449             :       }
   26450             :     }
   26451             : #endif
   26452             :   }
   26453          14 :   resultobj = SWIG_Py_Void();
   26454          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; } }
   26455             :   return resultobj;
   26456             : fail:
   26457             :   return NULL;
   26458             : }
   26459             : 
   26460             : 
   26461        1431 : SWIGINTERN PyObject *_wrap_Dataset_GetLayerCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26462        1431 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26463        1431 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26464        1431 :   void *argp1 = 0 ;
   26465        1431 :   int res1 = 0 ;
   26466        1431 :   PyObject *swig_obj[1] ;
   26467        1431 :   int result;
   26468             :   
   26469        1431 :   if (!args) SWIG_fail;
   26470        1431 :   swig_obj[0] = args;
   26471        1431 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26472        1431 :   if (!SWIG_IsOK(res1)) {
   26473           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetLayerCount" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26474             :   }
   26475        1431 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26476        1431 :   {
   26477        1431 :     const int bLocalUseExceptions = GetUseExceptions();
   26478        1431 :     if ( bLocalUseExceptions ) {
   26479         456 :       pushErrorHandler();
   26480             :     }
   26481        1431 :     {
   26482        1431 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26483        1431 :       result = (int)GDALDatasetShadow_GetLayerCount(arg1);
   26484        1431 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26485             :     }
   26486        1431 :     if ( bLocalUseExceptions ) {
   26487         456 :       popErrorHandler();
   26488             :     }
   26489             : #ifndef SED_HACKS
   26490             :     if ( bLocalUseExceptions ) {
   26491             :       CPLErr eclass = CPLGetLastErrorType();
   26492             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26493             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26494             :       }
   26495             :     }
   26496             : #endif
   26497             :   }
   26498        1431 :   resultobj = SWIG_From_int(static_cast< int >(result));
   26499        1431 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   26500             :   return resultobj;
   26501             : fail:
   26502             :   return NULL;
   26503             : }
   26504             : 
   26505             : 
   26506           6 : SWIGINTERN PyObject *_wrap_Dataset_AbortSQL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26507           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26508           6 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26509           6 :   void *argp1 = 0 ;
   26510           6 :   int res1 = 0 ;
   26511           6 :   PyObject *swig_obj[1] ;
   26512           6 :   OGRErr result;
   26513             :   
   26514           6 :   if (!args) SWIG_fail;
   26515           6 :   swig_obj[0] = args;
   26516           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26517           6 :   if (!SWIG_IsOK(res1)) {
   26518           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AbortSQL" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26519             :   }
   26520           6 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26521           6 :   {
   26522           6 :     const int bLocalUseExceptions = GetUseExceptions();
   26523           6 :     if ( bLocalUseExceptions ) {
   26524           6 :       pushErrorHandler();
   26525             :     }
   26526           6 :     {
   26527           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26528           6 :       result = (OGRErr)GDALDatasetShadow_AbortSQL(arg1);
   26529           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26530             :     }
   26531           6 :     if ( bLocalUseExceptions ) {
   26532           6 :       popErrorHandler();
   26533             :     }
   26534             : #ifndef SED_HACKS
   26535             :     if ( bLocalUseExceptions ) {
   26536             :       CPLErr eclass = CPLGetLastErrorType();
   26537             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26538             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26539             :       }
   26540             :     }
   26541             : #endif
   26542             :   }
   26543           6 :   {
   26544             :     /* %typemap(out) OGRErr */
   26545           6 :     if ( result != 0 && GetUseExceptions()) {
   26546           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   26547           0 :       if( pszMessage[0] != '\0' )
   26548           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   26549             :       else
   26550           0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   26551           0 :       SWIG_fail;
   26552             :     }
   26553             :   }
   26554           6 :   {
   26555             :     /* %typemap(ret) OGRErr */
   26556           6 :     if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
   26557           6 :       resultobj = PyInt_FromLong( result );
   26558             :     }
   26559             :   }
   26560           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; } }
   26561             :   return resultobj;
   26562             : fail:
   26563             :   return NULL;
   26564             : }
   26565             : 
   26566             : 
   26567         105 : SWIGINTERN PyObject *_wrap_Dataset_StartTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   26568         105 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26569         105 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26570         105 :   int arg2 = (int) FALSE ;
   26571         105 :   void *argp1 = 0 ;
   26572         105 :   int res1 = 0 ;
   26573         105 :   int val2 ;
   26574         105 :   int ecode2 = 0 ;
   26575         105 :   PyObject * obj0 = 0 ;
   26576         105 :   PyObject * obj1 = 0 ;
   26577         105 :   char * kwnames[] = {
   26578             :     (char *)"self",  (char *)"force",  NULL 
   26579             :   };
   26580         105 :   OGRErr result;
   26581             :   
   26582         105 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Dataset_StartTransaction", kwnames, &obj0, &obj1)) SWIG_fail;
   26583         105 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26584         105 :   if (!SWIG_IsOK(res1)) {
   26585           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_StartTransaction" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26586             :   }
   26587         105 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26588         105 :   if (obj1) {
   26589          17 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   26590          17 :     if (!SWIG_IsOK(ecode2)) {
   26591           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_StartTransaction" "', argument " "2"" of type '" "int""'");
   26592             :     } 
   26593             :     arg2 = static_cast< int >(val2);
   26594             :   }
   26595         105 :   {
   26596         105 :     const int bLocalUseExceptions = GetUseExceptions();
   26597         105 :     if ( bLocalUseExceptions ) {
   26598           0 :       pushErrorHandler();
   26599             :     }
   26600         105 :     {
   26601         105 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26602         105 :       result = (OGRErr)GDALDatasetShadow_StartTransaction(arg1,arg2);
   26603         105 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26604             :     }
   26605         105 :     if ( bLocalUseExceptions ) {
   26606           0 :       popErrorHandler();
   26607             :     }
   26608             : #ifndef SED_HACKS
   26609             :     if ( bLocalUseExceptions ) {
   26610             :       CPLErr eclass = CPLGetLastErrorType();
   26611             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26612             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26613             :       }
   26614             :     }
   26615             : #endif
   26616             :   }
   26617         105 :   {
   26618             :     /* %typemap(out) OGRErr */
   26619         119 :     if ( result != 0 && GetUseExceptions()) {
   26620           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   26621           0 :       if( pszMessage[0] != '\0' )
   26622           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   26623             :       else
   26624           0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   26625           0 :       SWIG_fail;
   26626             :     }
   26627             :   }
   26628         105 :   {
   26629             :     /* %typemap(ret) OGRErr */
   26630         105 :     if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
   26631         105 :       resultobj = PyInt_FromLong( result );
   26632             :     }
   26633             :   }
   26634         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; } }
   26635             :   return resultobj;
   26636             : fail:
   26637             :   return NULL;
   26638             : }
   26639             : 
   26640             : 
   26641          76 : SWIGINTERN PyObject *_wrap_Dataset_CommitTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26642          76 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26643          76 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26644          76 :   void *argp1 = 0 ;
   26645          76 :   int res1 = 0 ;
   26646          76 :   PyObject *swig_obj[1] ;
   26647          76 :   OGRErr result;
   26648             :   
   26649          76 :   if (!args) SWIG_fail;
   26650          76 :   swig_obj[0] = args;
   26651          76 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26652          76 :   if (!SWIG_IsOK(res1)) {
   26653           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_CommitTransaction" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26654             :   }
   26655          76 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26656          76 :   {
   26657          76 :     const int bLocalUseExceptions = GetUseExceptions();
   26658          76 :     if ( bLocalUseExceptions ) {
   26659           0 :       pushErrorHandler();
   26660             :     }
   26661          76 :     {
   26662          76 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26663          76 :       result = (OGRErr)GDALDatasetShadow_CommitTransaction(arg1);
   26664          76 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26665             :     }
   26666          76 :     if ( bLocalUseExceptions ) {
   26667           0 :       popErrorHandler();
   26668             :     }
   26669             : #ifndef SED_HACKS
   26670             :     if ( bLocalUseExceptions ) {
   26671             :       CPLErr eclass = CPLGetLastErrorType();
   26672             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26673             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26674             :       }
   26675             :     }
   26676             : #endif
   26677             :   }
   26678          76 :   {
   26679             :     /* %typemap(out) OGRErr */
   26680          85 :     if ( result != 0 && GetUseExceptions()) {
   26681           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   26682           0 :       if( pszMessage[0] != '\0' )
   26683           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   26684             :       else
   26685           0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   26686           0 :       SWIG_fail;
   26687             :     }
   26688             :   }
   26689          76 :   {
   26690             :     /* %typemap(ret) OGRErr */
   26691          76 :     if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
   26692          76 :       resultobj = PyInt_FromLong( result );
   26693             :     }
   26694             :   }
   26695          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; } }
   26696             :   return resultobj;
   26697             : fail:
   26698             :   return NULL;
   26699             : }
   26700             : 
   26701             : 
   26702          44 : SWIGINTERN PyObject *_wrap_Dataset_RollbackTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26703          44 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26704          44 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26705          44 :   void *argp1 = 0 ;
   26706          44 :   int res1 = 0 ;
   26707          44 :   PyObject *swig_obj[1] ;
   26708          44 :   OGRErr result;
   26709             :   
   26710          44 :   if (!args) SWIG_fail;
   26711          44 :   swig_obj[0] = args;
   26712          44 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26713          44 :   if (!SWIG_IsOK(res1)) {
   26714           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_RollbackTransaction" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26715             :   }
   26716          44 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26717          44 :   {
   26718          44 :     const int bLocalUseExceptions = GetUseExceptions();
   26719          44 :     if ( bLocalUseExceptions ) {
   26720           0 :       pushErrorHandler();
   26721             :     }
   26722          44 :     {
   26723          44 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26724          44 :       result = (OGRErr)GDALDatasetShadow_RollbackTransaction(arg1);
   26725          44 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26726             :     }
   26727          44 :     if ( bLocalUseExceptions ) {
   26728           0 :       popErrorHandler();
   26729             :     }
   26730             : #ifndef SED_HACKS
   26731             :     if ( bLocalUseExceptions ) {
   26732             :       CPLErr eclass = CPLGetLastErrorType();
   26733             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26734             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26735             :       }
   26736             :     }
   26737             : #endif
   26738             :   }
   26739          44 :   {
   26740             :     /* %typemap(out) OGRErr */
   26741          54 :     if ( result != 0 && GetUseExceptions()) {
   26742           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   26743           0 :       if( pszMessage[0] != '\0' )
   26744           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   26745             :       else
   26746           0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   26747           0 :       SWIG_fail;
   26748             :     }
   26749             :   }
   26750          44 :   {
   26751             :     /* %typemap(ret) OGRErr */
   26752          44 :     if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
   26753          44 :       resultobj = PyInt_FromLong( result );
   26754             :     }
   26755             :   }
   26756          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; } }
   26757             :   return resultobj;
   26758             : fail:
   26759             :   return NULL;
   26760             : }
   26761             : 
   26762             : 
   26763           2 : SWIGINTERN PyObject *_wrap_Dataset_ClearStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26764           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26765           2 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26766           2 :   void *argp1 = 0 ;
   26767           2 :   int res1 = 0 ;
   26768           2 :   PyObject *swig_obj[1] ;
   26769             :   
   26770           2 :   if (!args) SWIG_fail;
   26771           2 :   swig_obj[0] = args;
   26772           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26773           2 :   if (!SWIG_IsOK(res1)) {
   26774           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_ClearStatistics" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26775             :   }
   26776           2 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26777           2 :   {
   26778           2 :     const int bLocalUseExceptions = GetUseExceptions();
   26779           2 :     if ( bLocalUseExceptions ) {
   26780           1 :       pushErrorHandler();
   26781             :     }
   26782           2 :     {
   26783           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26784           2 :       GDALDatasetShadow_ClearStatistics(arg1);
   26785           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26786             :     }
   26787           2 :     if ( bLocalUseExceptions ) {
   26788           1 :       popErrorHandler();
   26789             :     }
   26790             : #ifndef SED_HACKS
   26791             :     if ( bLocalUseExceptions ) {
   26792             :       CPLErr eclass = CPLGetLastErrorType();
   26793             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26794             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26795             :       }
   26796             :     }
   26797             : #endif
   26798             :   }
   26799           2 :   resultobj = SWIG_Py_Void();
   26800           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; } }
   26801             :   return resultobj;
   26802             : fail:
   26803             :   return NULL;
   26804             : }
   26805             : 
   26806             : 
   26807          32 : SWIGINTERN PyObject *_wrap_Dataset_GetFieldDomainNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26808          32 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26809          32 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26810          32 :   char **arg2 = (char **) 0 ;
   26811          32 :   void *argp1 = 0 ;
   26812          32 :   int res1 = 0 ;
   26813          32 :   PyObject *swig_obj[2] ;
   26814          32 :   char **result = 0 ;
   26815             :   
   26816          32 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetFieldDomainNames", 1, 2, swig_obj)) SWIG_fail;
   26817          32 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26818          32 :   if (!SWIG_IsOK(res1)) {
   26819           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetFieldDomainNames" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26820             :   }
   26821          32 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26822          32 :   if (swig_obj[1]) {
   26823           0 :     {
   26824             :       /* %typemap(in) char **dict */
   26825           0 :       arg2 = NULL;
   26826           0 :       if ( PySequence_Check( swig_obj[1] ) ) {
   26827           0 :         int bErr = FALSE;
   26828           0 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   26829           0 :         if ( bErr )
   26830             :         {
   26831           0 :           SWIG_fail;
   26832             :         }
   26833             :       }
   26834           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   26835           0 :         int bErr = FALSE;
   26836           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   26837           0 :         if ( bErr )
   26838             :         {
   26839           0 :           SWIG_fail;
   26840             :         }
   26841             :       }
   26842             :       else {
   26843           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   26844           0 :         SWIG_fail;
   26845             :       }
   26846             :     }
   26847             :   }
   26848          32 :   {
   26849          32 :     const int bLocalUseExceptions = GetUseExceptions();
   26850          32 :     if ( bLocalUseExceptions ) {
   26851          24 :       pushErrorHandler();
   26852             :     }
   26853          32 :     {
   26854          32 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26855          32 :       result = (char **)GDALDatasetShadow_GetFieldDomainNames(arg1,arg2);
   26856          32 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26857             :     }
   26858          32 :     if ( bLocalUseExceptions ) {
   26859          24 :       popErrorHandler();
   26860             :     }
   26861             : #ifndef SED_HACKS
   26862             :     if ( bLocalUseExceptions ) {
   26863             :       CPLErr eclass = CPLGetLastErrorType();
   26864             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26865             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26866             :       }
   26867             :     }
   26868             : #endif
   26869             :   }
   26870          32 :   {
   26871             :     /* %typemap(out) char **CSL -> ( string ) */
   26872          32 :     bool bErr = false;
   26873          32 :     resultobj = CSLToList(result, &bErr);
   26874          32 :     CSLDestroy(result);
   26875          32 :     if( bErr ) {
   26876           0 :       SWIG_fail;
   26877             :     }
   26878             :   }
   26879          32 :   {
   26880             :     /* %typemap(freearg) char **dict */
   26881          32 :     CSLDestroy( arg2 );
   26882             :   }
   26883          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; } }
   26884             :   return resultobj;
   26885           0 : fail:
   26886           0 :   {
   26887             :     /* %typemap(freearg) char **dict */
   26888           0 :     CSLDestroy( arg2 );
   26889             :   }
   26890             :   return NULL;
   26891             : }
   26892             : 
   26893             : 
   26894         115 : SWIGINTERN PyObject *_wrap_Dataset_GetFieldDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26895         115 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26896         115 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26897         115 :   char *arg2 = (char *) 0 ;
   26898         115 :   void *argp1 = 0 ;
   26899         115 :   int res1 = 0 ;
   26900         115 :   int res2 ;
   26901         115 :   char *buf2 = 0 ;
   26902         115 :   int alloc2 = 0 ;
   26903         115 :   PyObject *swig_obj[2] ;
   26904         115 :   OGRFieldDomainShadow *result = 0 ;
   26905             :   
   26906         115 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetFieldDomain", 2, 2, swig_obj)) SWIG_fail;
   26907         115 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26908         115 :   if (!SWIG_IsOK(res1)) {
   26909           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetFieldDomain" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26910             :   }
   26911         115 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26912         115 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   26913         115 :   if (!SWIG_IsOK(res2)) {
   26914           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_GetFieldDomain" "', argument " "2"" of type '" "char const *""'");
   26915             :   }
   26916         115 :   arg2 = reinterpret_cast< char * >(buf2);
   26917         115 :   {
   26918         115 :     if (!arg2) {
   26919           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   26920             :     }
   26921             :   }
   26922         114 :   {
   26923         114 :     const int bLocalUseExceptions = GetUseExceptions();
   26924         114 :     if ( bLocalUseExceptions ) {
   26925          82 :       pushErrorHandler();
   26926             :     }
   26927         114 :     {
   26928         114 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26929         114 :       result = (OGRFieldDomainShadow *)GDALDatasetShadow_GetFieldDomain(arg1,(char const *)arg2);
   26930         114 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26931             :     }
   26932         114 :     if ( bLocalUseExceptions ) {
   26933          82 :       popErrorHandler();
   26934             :     }
   26935             : #ifndef SED_HACKS
   26936             :     if ( bLocalUseExceptions ) {
   26937             :       CPLErr eclass = CPLGetLastErrorType();
   26938             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26939             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26940             :       }
   26941             :     }
   26942             : #endif
   26943             :   }
   26944         114 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
   26945         114 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   26946         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; } }
   26947             :   return resultobj;
   26948           1 : fail:
   26949           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   26950             :   return NULL;
   26951             : }
   26952             : 
   26953             : 
   26954          38 : SWIGINTERN PyObject *_wrap_Dataset_AddFieldDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   26955          38 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   26956          38 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   26957          38 :   OGRFieldDomainShadow *arg2 = (OGRFieldDomainShadow *) 0 ;
   26958          38 :   void *argp1 = 0 ;
   26959          38 :   int res1 = 0 ;
   26960          38 :   void *argp2 = 0 ;
   26961          38 :   int res2 = 0 ;
   26962          38 :   PyObject *swig_obj[2] ;
   26963          38 :   bool result;
   26964             :   
   26965          38 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_AddFieldDomain", 2, 2, swig_obj)) SWIG_fail;
   26966          38 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   26967          38 :   if (!SWIG_IsOK(res1)) {
   26968           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AddFieldDomain" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   26969             :   }
   26970          38 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   26971          38 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
   26972          38 :   if (!SWIG_IsOK(res2)) {
   26973           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_AddFieldDomain" "', argument " "2"" of type '" "OGRFieldDomainShadow *""'"); 
   26974             :   }
   26975          38 :   arg2 = reinterpret_cast< OGRFieldDomainShadow * >(argp2);
   26976          38 :   {
   26977          38 :     if (!arg2) {
   26978           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   26979             :     }
   26980             :   }
   26981          37 :   {
   26982          37 :     const int bLocalUseExceptions = GetUseExceptions();
   26983          37 :     if ( bLocalUseExceptions ) {
   26984          19 :       pushErrorHandler();
   26985             :     }
   26986          37 :     {
   26987          37 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   26988          37 :       result = (bool)GDALDatasetShadow_AddFieldDomain(arg1,arg2);
   26989          37 :       SWIG_PYTHON_THREAD_END_ALLOW;
   26990             :     }
   26991          37 :     if ( bLocalUseExceptions ) {
   26992          19 :       popErrorHandler();
   26993             :     }
   26994             : #ifndef SED_HACKS
   26995             :     if ( bLocalUseExceptions ) {
   26996             :       CPLErr eclass = CPLGetLastErrorType();
   26997             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   26998             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   26999             :       }
   27000             :     }
   27001             : #endif
   27002             :   }
   27003          37 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   27004          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; } }
   27005             :   return resultobj;
   27006             : fail:
   27007             :   return NULL;
   27008             : }
   27009             : 
   27010             : 
   27011           8 : SWIGINTERN PyObject *_wrap_Dataset_DeleteFieldDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27012           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27013           8 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   27014           8 :   char *arg2 = (char *) 0 ;
   27015           8 :   void *argp1 = 0 ;
   27016           8 :   int res1 = 0 ;
   27017           8 :   int res2 ;
   27018           8 :   char *buf2 = 0 ;
   27019           8 :   int alloc2 = 0 ;
   27020           8 :   PyObject *swig_obj[2] ;
   27021           8 :   bool result;
   27022             :   
   27023           8 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_DeleteFieldDomain", 2, 2, swig_obj)) SWIG_fail;
   27024           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   27025           8 :   if (!SWIG_IsOK(res1)) {
   27026           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_DeleteFieldDomain" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   27027             :   }
   27028           8 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   27029           8 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   27030           8 :   if (!SWIG_IsOK(res2)) {
   27031           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_DeleteFieldDomain" "', argument " "2"" of type '" "char const *""'");
   27032             :   }
   27033           8 :   arg2 = reinterpret_cast< char * >(buf2);
   27034           8 :   {
   27035           8 :     if (!arg2) {
   27036           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   27037             :     }
   27038             :   }
   27039           8 :   {
   27040           8 :     const int bLocalUseExceptions = GetUseExceptions();
   27041           8 :     if ( bLocalUseExceptions ) {
   27042           8 :       pushErrorHandler();
   27043             :     }
   27044           8 :     {
   27045           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27046           8 :       result = (bool)GDALDatasetShadow_DeleteFieldDomain(arg1,(char const *)arg2);
   27047           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27048             :     }
   27049           8 :     if ( bLocalUseExceptions ) {
   27050           8 :       popErrorHandler();
   27051             :     }
   27052             : #ifndef SED_HACKS
   27053             :     if ( bLocalUseExceptions ) {
   27054             :       CPLErr eclass = CPLGetLastErrorType();
   27055             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27056             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27057             :       }
   27058             :     }
   27059             : #endif
   27060             :   }
   27061           8 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   27062           8 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27063           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; } }
   27064             :   return resultobj;
   27065           0 : fail:
   27066           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27067             :   return NULL;
   27068             : }
   27069             : 
   27070             : 
   27071           4 : SWIGINTERN PyObject *_wrap_Dataset_UpdateFieldDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27072           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27073           4 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   27074           4 :   OGRFieldDomainShadow *arg2 = (OGRFieldDomainShadow *) 0 ;
   27075           4 :   void *argp1 = 0 ;
   27076           4 :   int res1 = 0 ;
   27077           4 :   void *argp2 = 0 ;
   27078           4 :   int res2 = 0 ;
   27079           4 :   PyObject *swig_obj[2] ;
   27080           4 :   bool result;
   27081             :   
   27082           4 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_UpdateFieldDomain", 2, 2, swig_obj)) SWIG_fail;
   27083           4 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   27084           4 :   if (!SWIG_IsOK(res1)) {
   27085           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_UpdateFieldDomain" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   27086             :   }
   27087           4 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   27088           4 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
   27089           4 :   if (!SWIG_IsOK(res2)) {
   27090           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_UpdateFieldDomain" "', argument " "2"" of type '" "OGRFieldDomainShadow *""'"); 
   27091             :   }
   27092           4 :   arg2 = reinterpret_cast< OGRFieldDomainShadow * >(argp2);
   27093           4 :   {
   27094           4 :     if (!arg2) {
   27095           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   27096             :     }
   27097             :   }
   27098           4 :   {
   27099           4 :     const int bLocalUseExceptions = GetUseExceptions();
   27100           4 :     if ( bLocalUseExceptions ) {
   27101           4 :       pushErrorHandler();
   27102             :     }
   27103           4 :     {
   27104           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27105           4 :       result = (bool)GDALDatasetShadow_UpdateFieldDomain(arg1,arg2);
   27106           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27107             :     }
   27108           4 :     if ( bLocalUseExceptions ) {
   27109           4 :       popErrorHandler();
   27110             :     }
   27111             : #ifndef SED_HACKS
   27112             :     if ( bLocalUseExceptions ) {
   27113             :       CPLErr eclass = CPLGetLastErrorType();
   27114             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27115             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27116             :       }
   27117             :     }
   27118             : #endif
   27119             :   }
   27120           4 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   27121           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; } }
   27122             :   return resultobj;
   27123             : fail:
   27124             :   return NULL;
   27125             : }
   27126             : 
   27127             : 
   27128          46 : SWIGINTERN PyObject *_wrap_Dataset_GetRelationshipNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27129          46 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27130          46 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   27131          46 :   char **arg2 = (char **) 0 ;
   27132          46 :   void *argp1 = 0 ;
   27133          46 :   int res1 = 0 ;
   27134          46 :   PyObject *swig_obj[2] ;
   27135          46 :   char **result = 0 ;
   27136             :   
   27137          46 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetRelationshipNames", 1, 2, swig_obj)) SWIG_fail;
   27138          46 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   27139          46 :   if (!SWIG_IsOK(res1)) {
   27140           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetRelationshipNames" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   27141             :   }
   27142          46 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   27143          46 :   if (swig_obj[1]) {
   27144           0 :     {
   27145             :       /* %typemap(in) char **dict */
   27146           0 :       arg2 = NULL;
   27147           0 :       if ( PySequence_Check( swig_obj[1] ) ) {
   27148           0 :         int bErr = FALSE;
   27149           0 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   27150           0 :         if ( bErr )
   27151             :         {
   27152           0 :           SWIG_fail;
   27153             :         }
   27154             :       }
   27155           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   27156           0 :         int bErr = FALSE;
   27157           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   27158           0 :         if ( bErr )
   27159             :         {
   27160           0 :           SWIG_fail;
   27161             :         }
   27162             :       }
   27163             :       else {
   27164           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   27165           0 :         SWIG_fail;
   27166             :       }
   27167             :     }
   27168             :   }
   27169          46 :   {
   27170          46 :     const int bLocalUseExceptions = GetUseExceptions();
   27171          46 :     if ( bLocalUseExceptions ) {
   27172           7 :       pushErrorHandler();
   27173             :     }
   27174          46 :     {
   27175          46 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27176          46 :       result = (char **)GDALDatasetShadow_GetRelationshipNames(arg1,arg2);
   27177          46 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27178             :     }
   27179          46 :     if ( bLocalUseExceptions ) {
   27180           7 :       popErrorHandler();
   27181             :     }
   27182             : #ifndef SED_HACKS
   27183             :     if ( bLocalUseExceptions ) {
   27184             :       CPLErr eclass = CPLGetLastErrorType();
   27185             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27186             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27187             :       }
   27188             :     }
   27189             : #endif
   27190             :   }
   27191          46 :   {
   27192             :     /* %typemap(out) char **CSL -> ( string ) */
   27193          46 :     bool bErr = false;
   27194          46 :     resultobj = CSLToList(result, &bErr);
   27195          46 :     CSLDestroy(result);
   27196          46 :     if( bErr ) {
   27197           0 :       SWIG_fail;
   27198             :     }
   27199             :   }
   27200          46 :   {
   27201             :     /* %typemap(freearg) char **dict */
   27202          46 :     CSLDestroy( arg2 );
   27203             :   }
   27204          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; } }
   27205             :   return resultobj;
   27206           0 : fail:
   27207           0 :   {
   27208             :     /* %typemap(freearg) char **dict */
   27209           0 :     CSLDestroy( arg2 );
   27210             :   }
   27211             :   return NULL;
   27212             : }
   27213             : 
   27214             : 
   27215          52 : SWIGINTERN PyObject *_wrap_Dataset_GetRelationship(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27216          52 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27217          52 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   27218          52 :   char *arg2 = (char *) 0 ;
   27219          52 :   void *argp1 = 0 ;
   27220          52 :   int res1 = 0 ;
   27221          52 :   int res2 ;
   27222          52 :   char *buf2 = 0 ;
   27223          52 :   int alloc2 = 0 ;
   27224          52 :   PyObject *swig_obj[2] ;
   27225          52 :   GDALRelationshipShadow *result = 0 ;
   27226             :   
   27227          52 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_GetRelationship", 2, 2, swig_obj)) SWIG_fail;
   27228          52 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   27229          52 :   if (!SWIG_IsOK(res1)) {
   27230           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetRelationship" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   27231             :   }
   27232          52 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   27233          52 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   27234          52 :   if (!SWIG_IsOK(res2)) {
   27235           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_GetRelationship" "', argument " "2"" of type '" "char const *""'");
   27236             :   }
   27237          52 :   arg2 = reinterpret_cast< char * >(buf2);
   27238          52 :   {
   27239          52 :     if (!arg2) {
   27240           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   27241             :     }
   27242             :   }
   27243          52 :   {
   27244          52 :     const int bLocalUseExceptions = GetUseExceptions();
   27245          52 :     if ( bLocalUseExceptions ) {
   27246          10 :       pushErrorHandler();
   27247             :     }
   27248          52 :     {
   27249          52 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27250          52 :       result = (GDALRelationshipShadow *)GDALDatasetShadow_GetRelationship(arg1,(char const *)arg2);
   27251          52 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27252             :     }
   27253          52 :     if ( bLocalUseExceptions ) {
   27254          10 :       popErrorHandler();
   27255             :     }
   27256             : #ifndef SED_HACKS
   27257             :     if ( bLocalUseExceptions ) {
   27258             :       CPLErr eclass = CPLGetLastErrorType();
   27259             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27260             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27261             :       }
   27262             :     }
   27263             : #endif
   27264             :   }
   27265          52 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   27266          52 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27267          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; } }
   27268             :   return resultobj;
   27269           0 : fail:
   27270           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27271             :   return NULL;
   27272             : }
   27273             : 
   27274             : 
   27275          42 : SWIGINTERN PyObject *_wrap_Dataset_AddRelationship(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27276          42 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27277          42 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   27278          42 :   GDALRelationshipShadow *arg2 = (GDALRelationshipShadow *) 0 ;
   27279          42 :   void *argp1 = 0 ;
   27280          42 :   int res1 = 0 ;
   27281          42 :   void *argp2 = 0 ;
   27282          42 :   int res2 = 0 ;
   27283          42 :   PyObject *swig_obj[2] ;
   27284          42 :   bool result;
   27285             :   
   27286          42 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_AddRelationship", 2, 2, swig_obj)) SWIG_fail;
   27287          42 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   27288          42 :   if (!SWIG_IsOK(res1)) {
   27289           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AddRelationship" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   27290             :   }
   27291          42 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   27292          42 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   27293          42 :   if (!SWIG_IsOK(res2)) {
   27294           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_AddRelationship" "', argument " "2"" of type '" "GDALRelationshipShadow *""'"); 
   27295             :   }
   27296          42 :   arg2 = reinterpret_cast< GDALRelationshipShadow * >(argp2);
   27297          42 :   {
   27298          42 :     if (!arg2) {
   27299           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   27300             :     }
   27301             :   }
   27302          42 :   {
   27303          42 :     const int bLocalUseExceptions = GetUseExceptions();
   27304          42 :     if ( bLocalUseExceptions ) {
   27305           0 :       pushErrorHandler();
   27306             :     }
   27307          42 :     {
   27308          42 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27309          42 :       result = (bool)GDALDatasetShadow_AddRelationship(arg1,arg2);
   27310          42 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27311             :     }
   27312          42 :     if ( bLocalUseExceptions ) {
   27313           0 :       popErrorHandler();
   27314             :     }
   27315             : #ifndef SED_HACKS
   27316             :     if ( bLocalUseExceptions ) {
   27317             :       CPLErr eclass = CPLGetLastErrorType();
   27318             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27319             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27320             :       }
   27321             :     }
   27322             : #endif
   27323             :   }
   27324          42 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   27325          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; } }
   27326             :   return resultobj;
   27327             : fail:
   27328             :   return NULL;
   27329             : }
   27330             : 
   27331             : 
   27332           6 : SWIGINTERN PyObject *_wrap_Dataset_DeleteRelationship(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27333           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27334           6 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   27335           6 :   char *arg2 = (char *) 0 ;
   27336           6 :   void *argp1 = 0 ;
   27337           6 :   int res1 = 0 ;
   27338           6 :   int res2 ;
   27339           6 :   char *buf2 = 0 ;
   27340           6 :   int alloc2 = 0 ;
   27341           6 :   PyObject *swig_obj[2] ;
   27342           6 :   bool result;
   27343             :   
   27344           6 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_DeleteRelationship", 2, 2, swig_obj)) SWIG_fail;
   27345           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   27346           6 :   if (!SWIG_IsOK(res1)) {
   27347           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_DeleteRelationship" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   27348             :   }
   27349           6 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   27350           6 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   27351           6 :   if (!SWIG_IsOK(res2)) {
   27352           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_DeleteRelationship" "', argument " "2"" of type '" "char const *""'");
   27353             :   }
   27354           6 :   arg2 = reinterpret_cast< char * >(buf2);
   27355           6 :   {
   27356           6 :     if (!arg2) {
   27357           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   27358             :     }
   27359             :   }
   27360           6 :   {
   27361           6 :     const int bLocalUseExceptions = GetUseExceptions();
   27362           6 :     if ( bLocalUseExceptions ) {
   27363           0 :       pushErrorHandler();
   27364             :     }
   27365           6 :     {
   27366           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27367           6 :       result = (bool)GDALDatasetShadow_DeleteRelationship(arg1,(char const *)arg2);
   27368           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27369             :     }
   27370           6 :     if ( bLocalUseExceptions ) {
   27371           0 :       popErrorHandler();
   27372             :     }
   27373             : #ifndef SED_HACKS
   27374             :     if ( bLocalUseExceptions ) {
   27375             :       CPLErr eclass = CPLGetLastErrorType();
   27376             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27377             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27378             :       }
   27379             :     }
   27380             : #endif
   27381             :   }
   27382           6 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   27383           6 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27384           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; } }
   27385             :   return resultobj;
   27386           0 : fail:
   27387           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   27388             :   return NULL;
   27389             : }
   27390             : 
   27391             : 
   27392           9 : SWIGINTERN PyObject *_wrap_Dataset_UpdateRelationship(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27393           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27394           9 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   27395           9 :   GDALRelationshipShadow *arg2 = (GDALRelationshipShadow *) 0 ;
   27396           9 :   void *argp1 = 0 ;
   27397           9 :   int res1 = 0 ;
   27398           9 :   void *argp2 = 0 ;
   27399           9 :   int res2 = 0 ;
   27400           9 :   PyObject *swig_obj[2] ;
   27401           9 :   bool result;
   27402             :   
   27403           9 :   if (!SWIG_Python_UnpackTuple(args, "Dataset_UpdateRelationship", 2, 2, swig_obj)) SWIG_fail;
   27404           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   27405           9 :   if (!SWIG_IsOK(res1)) {
   27406           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_UpdateRelationship" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   27407             :   }
   27408           9 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   27409           9 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   27410           9 :   if (!SWIG_IsOK(res2)) {
   27411           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_UpdateRelationship" "', argument " "2"" of type '" "GDALRelationshipShadow *""'"); 
   27412             :   }
   27413           9 :   arg2 = reinterpret_cast< GDALRelationshipShadow * >(argp2);
   27414           9 :   {
   27415           9 :     if (!arg2) {
   27416           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   27417             :     }
   27418             :   }
   27419           9 :   {
   27420           9 :     const int bLocalUseExceptions = GetUseExceptions();
   27421           9 :     if ( bLocalUseExceptions ) {
   27422           0 :       pushErrorHandler();
   27423             :     }
   27424           9 :     {
   27425           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27426           9 :       result = (bool)GDALDatasetShadow_UpdateRelationship(arg1,arg2);
   27427           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27428             :     }
   27429           9 :     if ( bLocalUseExceptions ) {
   27430           0 :       popErrorHandler();
   27431             :     }
   27432             : #ifndef SED_HACKS
   27433             :     if ( bLocalUseExceptions ) {
   27434             :       CPLErr eclass = CPLGetLastErrorType();
   27435             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27436             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27437             :       }
   27438             :     }
   27439             : #endif
   27440             :   }
   27441           9 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   27442           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; } }
   27443             :   return resultobj;
   27444             : fail:
   27445             :   return NULL;
   27446             : }
   27447             : 
   27448             : 
   27449      176555 : SWIGINTERN PyObject *_wrap_Dataset_ReadRaster1(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   27450      176555 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27451      176555 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   27452      176555 :   double arg2 ;
   27453      176555 :   double arg3 ;
   27454      176555 :   double arg4 ;
   27455      176555 :   double arg5 ;
   27456      176555 :   void **arg6 = (void **) 0 ;
   27457      176555 :   int *arg7 = (int *) 0 ;
   27458      176555 :   int *arg8 = (int *) 0 ;
   27459      176555 :   GDALDataType *arg9 = (GDALDataType *) 0 ;
   27460      176555 :   int arg10 = (int) 0 ;
   27461      176555 :   int *arg11 = (int *) 0 ;
   27462      176555 :   GIntBig *arg12 = (GIntBig *) 0 ;
   27463      176555 :   GIntBig *arg13 = (GIntBig *) 0 ;
   27464      176555 :   GIntBig *arg14 = (GIntBig *) 0 ;
   27465      176555 :   GDALRIOResampleAlg arg15 = (GDALRIOResampleAlg) GRIORA_NearestNeighbour ;
   27466      176555 :   GDALProgressFunc arg16 = (GDALProgressFunc) NULL ;
   27467      176555 :   void *arg17 = (void *) NULL ;
   27468      176555 :   void *arg18 = (void *) NULL ;
   27469      176555 :   void *argp1 = 0 ;
   27470      176555 :   int res1 = 0 ;
   27471      176555 :   double val2 ;
   27472      176555 :   int ecode2 = 0 ;
   27473      176555 :   double val3 ;
   27474      176555 :   int ecode3 = 0 ;
   27475      176555 :   double val4 ;
   27476      176555 :   int ecode4 = 0 ;
   27477      176555 :   double val5 ;
   27478      176555 :   int ecode5 = 0 ;
   27479      176555 :   void *pyObject6 = NULL ;
   27480      176555 :   int val7 ;
   27481      176555 :   int val8 ;
   27482      176555 :   GDALDataType val9 ;
   27483      176555 :   GIntBig val12 ;
   27484      176555 :   GIntBig val13 ;
   27485      176555 :   GIntBig val14 ;
   27486      176555 :   PyObject * obj0 = 0 ;
   27487      176555 :   PyObject * obj1 = 0 ;
   27488      176555 :   PyObject * obj2 = 0 ;
   27489      176555 :   PyObject * obj3 = 0 ;
   27490      176555 :   PyObject * obj4 = 0 ;
   27491      176555 :   PyObject * obj5 = 0 ;
   27492      176555 :   PyObject * obj6 = 0 ;
   27493      176555 :   PyObject * obj7 = 0 ;
   27494      176555 :   PyObject * obj8 = 0 ;
   27495      176555 :   PyObject * obj9 = 0 ;
   27496      176555 :   PyObject * obj10 = 0 ;
   27497      176555 :   PyObject * obj11 = 0 ;
   27498      176555 :   PyObject * obj12 = 0 ;
   27499      176555 :   PyObject * obj13 = 0 ;
   27500      176555 :   PyObject * obj14 = 0 ;
   27501      176555 :   PyObject * obj15 = 0 ;
   27502      176555 :   char * kwnames[] = {
   27503             :     (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 
   27504             :   };
   27505      176555 :   CPLErr result;
   27506             :   
   27507             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   27508      176555 :   PyProgressData *psProgressInfo;
   27509      176555 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   27510      176555 :   psProgressInfo->nLastReported = -1;
   27511      176555 :   psProgressInfo->psPyCallback = NULL;
   27512      176555 :   psProgressInfo->psPyCallbackData = NULL;
   27513      176555 :   arg17 = psProgressInfo;
   27514      176555 :   {
   27515             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject6 = NULL ) */
   27516      176555 :     arg6 = &pyObject6;
   27517             :   }
   27518      176555 :   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;
   27519      176555 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   27520      176555 :   if (!SWIG_IsOK(res1)) {
   27521           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_ReadRaster1" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   27522             :   }
   27523      176555 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   27524      176555 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   27525      176555 :   if (!SWIG_IsOK(ecode2)) {
   27526           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_ReadRaster1" "', argument " "2"" of type '" "double""'");
   27527             :   } 
   27528      176555 :   arg2 = static_cast< double >(val2);
   27529      176555 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   27530      176555 :   if (!SWIG_IsOK(ecode3)) {
   27531           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_ReadRaster1" "', argument " "3"" of type '" "double""'");
   27532             :   } 
   27533      176555 :   arg3 = static_cast< double >(val3);
   27534      176555 :   ecode4 = SWIG_AsVal_double(obj3, &val4);
   27535      176555 :   if (!SWIG_IsOK(ecode4)) {
   27536           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_ReadRaster1" "', argument " "4"" of type '" "double""'");
   27537             :   } 
   27538      176555 :   arg4 = static_cast< double >(val4);
   27539      176555 :   ecode5 = SWIG_AsVal_double(obj4, &val5);
   27540      176555 :   if (!SWIG_IsOK(ecode5)) {
   27541           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_ReadRaster1" "', argument " "5"" of type '" "double""'");
   27542             :   } 
   27543      176555 :   arg5 = static_cast< double >(val5);
   27544      176555 :   if (obj5) {
   27545      176555 :     {
   27546             :       /* %typemap(in) (int *optional_##int) */
   27547      176555 :       if ( obj5 == Py_None ) {
   27548             :         arg7 = 0;
   27549             :       }
   27550      176555 :       else if ( PyArg_Parse( obj5,"i" ,&val7 ) ) {
   27551             :         arg7 = (int *) &val7;
   27552             :       }
   27553             :       else {
   27554           2 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   27555           2 :         SWIG_fail;
   27556             :       }
   27557             :     }
   27558             :   }
   27559      176553 :   if (obj6) {
   27560      176553 :     {
   27561             :       /* %typemap(in) (int *optional_##int) */
   27562      176553 :       if ( obj6 == Py_None ) {
   27563             :         arg8 = 0;
   27564             :       }
   27565      176553 :       else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
   27566             :         arg8 = (int *) &val8;
   27567             :       }
   27568             :       else {
   27569           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   27570           0 :         SWIG_fail;
   27571             :       }
   27572             :     }
   27573             :   }
   27574      176553 :   if (obj7) {
   27575      176553 :     {
   27576             :       /* %typemap(in) (GDALDataType *optional_GDALDataType) */
   27577      176553 :       int intval = 0;
   27578      176553 :       if ( obj7 == Py_None ) {
   27579             :         arg9 = NULL;
   27580             :       }
   27581      353106 :       else if ( SWIG_IsOK(SWIG_AsVal_int(obj7, &intval)) ) {
   27582      176553 :         if( intval < GDT_Unknown || intval >= GDT_TypeCount )
   27583             :         {
   27584           0 :           SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   27585             :         }
   27586      176553 :         val9 = static_cast<GDALDataType>(intval);
   27587      176553 :         arg9 = &val9;
   27588             :       }
   27589             :       else {
   27590           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   27591           0 :         SWIG_fail;
   27592             :       }
   27593             :     }
   27594             :   }
   27595      176553 :   if (obj8) {
   27596      176553 :     {
   27597             :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   27598      176553 :       arg11 = CreateCIntListFromSequence(obj8, &arg10);
   27599      176553 :       if( arg10 < 0 ) {
   27600           0 :         SWIG_fail;
   27601             :       }
   27602             :     }
   27603             :   }
   27604      176553 :   if (obj9) {
   27605      176553 :     {
   27606             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   27607      176553 :       if ( obj9 == Py_None ) {
   27608             :         arg12 = 0;
   27609             :       }
   27610        1099 :       else if ( PyArg_Parse( obj9,"L" ,&val12 ) ) {
   27611             :         arg12 = (GIntBig *) &val12;
   27612             :       }
   27613             :       else {
   27614           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   27615           0 :         SWIG_fail;
   27616             :       }
   27617             :     }
   27618             :   }
   27619      176553 :   if (obj10) {
   27620      176553 :     {
   27621             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   27622      176553 :       if ( obj10 == Py_None ) {
   27623             :         arg13 = 0;
   27624             :       }
   27625          27 :       else if ( PyArg_Parse( obj10,"L" ,&val13 ) ) {
   27626             :         arg13 = (GIntBig *) &val13;
   27627             :       }
   27628             :       else {
   27629           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   27630           0 :         SWIG_fail;
   27631             :       }
   27632             :     }
   27633             :   }
   27634      176553 :   if (obj11) {
   27635      176553 :     {
   27636             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   27637      176553 :       if ( obj11 == Py_None ) {
   27638             :         arg14 = 0;
   27639             :       }
   27640        1077 :       else if ( PyArg_Parse( obj11,"L" ,&val14 ) ) {
   27641             :         arg14 = (GIntBig *) &val14;
   27642             :       }
   27643             :       else {
   27644           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   27645           0 :         SWIG_fail;
   27646             :       }
   27647             :     }
   27648             :   }
   27649      176553 :   if (obj12) {
   27650      176553 :     {
   27651             :       // %typemap(in) GDALRIOResampleAlg
   27652      176553 :       int val = 0;
   27653      176553 :       int ecode = SWIG_AsVal_int(obj12, &val);
   27654      176553 :       if (!SWIG_IsOK(ecode)) {
   27655           1 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALRIOResampleAlg");
   27656             :       }
   27657      176552 :       if( val < 0 ||
   27658      176551 :         ( val >= static_cast<int>(GRIORA_RESERVED_START) &&
   27659      176550 :           val <= static_cast<int>(GRIORA_RESERVED_END) ) ||
   27660             :         val > static_cast<int>(GRIORA_LAST) )
   27661             :       {
   27662           2 :         SWIG_exception_fail(SWIG_ValueError, "Invalid value for resample_alg");
   27663             :       }
   27664             :       arg15 = static_cast< GDALRIOResampleAlg >(val);
   27665             :     }
   27666             :   }
   27667      176550 :   if (obj13) {
   27668      176550 :     {
   27669             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   27670             :       /* callback_func typemap */
   27671             :       
   27672             :       /* In some cases 0 is passed instead of None. */
   27673             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   27674      176550 :       if ( PyLong_Check(obj13) || PyInt_Check(obj13) )
   27675             :       {
   27676           0 :         if( PyLong_AsLong(obj13) == 0 )
   27677             :         {
   27678           0 :           obj13 = Py_None;
   27679             :         }
   27680             :       }
   27681             :       
   27682      176550 :       if (obj13 && obj13 != Py_None ) {
   27683          19 :         void* cbfunction = NULL;
   27684          19 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj13,
   27685             :             (void**)&cbfunction,
   27686             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   27687             :             SWIG_POINTER_EXCEPTION | 0 ));
   27688             :         
   27689          19 :         if ( cbfunction == GDALTermProgress ) {
   27690             :           arg16 = GDALTermProgress;
   27691             :         } else {
   27692          19 :           if (!PyCallable_Check(obj13)) {
   27693           0 :             PyErr_SetString( PyExc_RuntimeError,
   27694             :               "Object given is not a Python function" );
   27695           0 :             SWIG_fail;
   27696             :           }
   27697          19 :           psProgressInfo->psPyCallback = obj13;
   27698          19 :           arg16 = PyProgressProxy;
   27699             :         }
   27700             :         
   27701             :       }
   27702             :       
   27703             :     }
   27704             :   }
   27705      176550 :   if (obj14) {
   27706      176550 :     {
   27707             :       /* %typemap(in) ( void* callback_data=NULL)  */
   27708      176550 :       psProgressInfo->psPyCallbackData = obj14 ;
   27709             :     }
   27710             :   }
   27711      176550 :   if (obj15) {
   27712      176550 :     {
   27713             :       /* %typemap(in) ( void *inPythonObject ) */
   27714      176550 :       arg18 = obj15;
   27715             :     }
   27716             :   }
   27717      176550 :   {
   27718      176550 :     const int bLocalUseExceptions = GetUseExceptions();
   27719      176550 :     if ( bLocalUseExceptions ) {
   27720      169564 :       pushErrorHandler();
   27721             :     }
   27722      176550 :     {
   27723      176550 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27724      176550 :       result = (CPLErr)GDALDatasetShadow_ReadRaster1(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
   27725      176550 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27726             :     }
   27727      176550 :     if ( bLocalUseExceptions ) {
   27728      169564 :       popErrorHandler();
   27729             :     }
   27730             : #ifndef SED_HACKS
   27731             :     if ( bLocalUseExceptions ) {
   27732             :       CPLErr eclass = CPLGetLastErrorType();
   27733             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27734             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27735             :       }
   27736             :     }
   27737             : #endif
   27738             :   }
   27739      176550 :   resultobj = SWIG_From_int(static_cast< int >(result));
   27740      176550 :   {
   27741             :     /* %typemap(argout) ( void **outPythonObject ) */
   27742      176550 :     Py_XDECREF(resultobj);
   27743      176550 :     if (*arg6)
   27744             :     {
   27745             :       resultobj = (PyObject*)*arg6;
   27746             :     }
   27747             :     else
   27748             :     {
   27749        1310 :       resultobj = Py_None;
   27750        1310 :       Py_INCREF(resultobj);
   27751             :     }
   27752             :   }
   27753      176550 :   {
   27754             :     /* %typemap(freearg) (int nList, int* pList) */
   27755      176550 :     free(arg11);
   27756             :   }
   27757      176550 :   {
   27758             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   27759             :     
   27760      176550 :     CPLFree(psProgressInfo);
   27761             :     
   27762             :   }
   27763      176817 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   27764             :   return resultobj;
   27765           5 : fail:
   27766           5 :   {
   27767             :     /* %typemap(freearg) (int nList, int* pList) */
   27768           5 :     free(arg11);
   27769             :   }
   27770           5 :   {
   27771             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   27772             :     
   27773           5 :     CPLFree(psProgressInfo);
   27774             :     
   27775             :   }
   27776             :   return NULL;
   27777             : }
   27778             : 
   27779             : 
   27780         277 : SWIGINTERN PyObject *Dataset_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27781         277 :   PyObject *obj;
   27782         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   27783         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALDatasetShadow, SWIG_NewClientData(obj));
   27784         277 :   return SWIG_Py_Void();
   27785             : }
   27786             : 
   27787          10 : SWIGINTERN PyObject *_wrap_new_RasterAttributeTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27788          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27789          10 :   GDALRasterAttributeTableShadow *result = 0 ;
   27790             :   
   27791          10 :   if (!SWIG_Python_UnpackTuple(args, "new_RasterAttributeTable", 0, 0, 0)) SWIG_fail;
   27792          10 :   {
   27793          10 :     const int bLocalUseExceptions = GetUseExceptions();
   27794          10 :     if ( bLocalUseExceptions ) {
   27795          10 :       pushErrorHandler();
   27796             :     }
   27797          10 :     {
   27798          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27799          10 :       result = (GDALRasterAttributeTableShadow *)new_GDALRasterAttributeTableShadow();
   27800          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27801             :     }
   27802          10 :     if ( bLocalUseExceptions ) {
   27803          10 :       popErrorHandler();
   27804             :     }
   27805             : #ifndef SED_HACKS
   27806             :     if ( bLocalUseExceptions ) {
   27807             :       CPLErr eclass = CPLGetLastErrorType();
   27808             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27809             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27810             :       }
   27811             :     }
   27812             : #endif
   27813             :   }
   27814          10 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_POINTER_NEW |  0 );
   27815          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; } }
   27816             :   return resultobj;
   27817           0 : fail:
   27818           0 :   return NULL;
   27819             : }
   27820             : 
   27821             : 
   27822          17 : SWIGINTERN PyObject *_wrap_delete_RasterAttributeTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27823          17 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27824          17 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   27825          17 :   void *argp1 = 0 ;
   27826          17 :   int res1 = 0 ;
   27827          17 :   PyObject *swig_obj[1] ;
   27828             :   
   27829          17 :   if (!args) SWIG_fail;
   27830          17 :   swig_obj[0] = args;
   27831          17 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_POINTER_DISOWN |  0 );
   27832          17 :   if (!SWIG_IsOK(res1)) {
   27833           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RasterAttributeTable" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   27834             :   }
   27835          17 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   27836          17 :   {
   27837          17 :     const int bLocalUseExceptions = GetUseExceptions();
   27838          17 :     if ( bLocalUseExceptions ) {
   27839          17 :       pushErrorHandler();
   27840             :     }
   27841          17 :     {
   27842          17 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27843          17 :       delete_GDALRasterAttributeTableShadow(arg1);
   27844          17 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27845             :     }
   27846          17 :     if ( bLocalUseExceptions ) {
   27847          17 :       popErrorHandler();
   27848             :     }
   27849             : #ifndef SED_HACKS
   27850             :     if ( bLocalUseExceptions ) {
   27851             :       CPLErr eclass = CPLGetLastErrorType();
   27852             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27853             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27854             :       }
   27855             :     }
   27856             : #endif
   27857             :   }
   27858          17 :   resultobj = SWIG_Py_Void();
   27859          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; } }
   27860             :   return resultobj;
   27861             : fail:
   27862             :   return NULL;
   27863             : }
   27864             : 
   27865             : 
   27866           5 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27867           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27868           5 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   27869           5 :   void *argp1 = 0 ;
   27870           5 :   int res1 = 0 ;
   27871           5 :   PyObject *swig_obj[1] ;
   27872           5 :   GDALRasterAttributeTableShadow *result = 0 ;
   27873             :   
   27874           5 :   if (!args) SWIG_fail;
   27875           5 :   swig_obj[0] = args;
   27876           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   27877           5 :   if (!SWIG_IsOK(res1)) {
   27878           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_Clone" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   27879             :   }
   27880           5 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   27881           5 :   {
   27882           5 :     const int bLocalUseExceptions = GetUseExceptions();
   27883           5 :     if ( bLocalUseExceptions ) {
   27884           5 :       pushErrorHandler();
   27885             :     }
   27886           5 :     {
   27887           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27888           5 :       result = (GDALRasterAttributeTableShadow *)GDALRasterAttributeTableShadow_Clone(arg1);
   27889           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27890             :     }
   27891           5 :     if ( bLocalUseExceptions ) {
   27892           5 :       popErrorHandler();
   27893             :     }
   27894             : #ifndef SED_HACKS
   27895             :     if ( bLocalUseExceptions ) {
   27896             :       CPLErr eclass = CPLGetLastErrorType();
   27897             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27898             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27899             :       }
   27900             :     }
   27901             : #endif
   27902             :   }
   27903           5 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_POINTER_OWN |  0 );
   27904           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; } }
   27905             :   return resultobj;
   27906             : fail:
   27907             :   return NULL;
   27908             : }
   27909             : 
   27910             : 
   27911          37 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetColumnCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27912          37 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27913          37 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   27914          37 :   void *argp1 = 0 ;
   27915          37 :   int res1 = 0 ;
   27916          37 :   PyObject *swig_obj[1] ;
   27917          37 :   int result;
   27918             :   
   27919          37 :   if (!args) SWIG_fail;
   27920          37 :   swig_obj[0] = args;
   27921          37 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   27922          37 :   if (!SWIG_IsOK(res1)) {
   27923           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetColumnCount" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   27924             :   }
   27925          37 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   27926          37 :   {
   27927          37 :     const int bLocalUseExceptions = GetUseExceptions();
   27928          37 :     if ( bLocalUseExceptions ) {
   27929          36 :       pushErrorHandler();
   27930             :     }
   27931          37 :     {
   27932          37 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27933          37 :       result = (int)GDALRasterAttributeTableShadow_GetColumnCount(arg1);
   27934          37 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27935             :     }
   27936          37 :     if ( bLocalUseExceptions ) {
   27937          36 :       popErrorHandler();
   27938             :     }
   27939             : #ifndef SED_HACKS
   27940             :     if ( bLocalUseExceptions ) {
   27941             :       CPLErr eclass = CPLGetLastErrorType();
   27942             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27943             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27944             :       }
   27945             :     }
   27946             : #endif
   27947             :   }
   27948          37 :   resultobj = SWIG_From_int(static_cast< int >(result));
   27949          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; } }
   27950             :   return resultobj;
   27951             : fail:
   27952             :   return NULL;
   27953             : }
   27954             : 
   27955             : 
   27956          60 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetNameOfCol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   27957          60 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   27958          60 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   27959          60 :   int arg2 ;
   27960          60 :   void *argp1 = 0 ;
   27961          60 :   int res1 = 0 ;
   27962          60 :   int val2 ;
   27963          60 :   int ecode2 = 0 ;
   27964          60 :   PyObject *swig_obj[2] ;
   27965          60 :   char *result = 0 ;
   27966             :   
   27967          60 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetNameOfCol", 2, 2, swig_obj)) SWIG_fail;
   27968          60 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   27969          60 :   if (!SWIG_IsOK(res1)) {
   27970           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetNameOfCol" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   27971             :   }
   27972          60 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   27973          60 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   27974          60 :   if (!SWIG_IsOK(ecode2)) {
   27975           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetNameOfCol" "', argument " "2"" of type '" "int""'");
   27976             :   } 
   27977          60 :   arg2 = static_cast< int >(val2);
   27978          60 :   {
   27979          60 :     const int bLocalUseExceptions = GetUseExceptions();
   27980          60 :     if ( bLocalUseExceptions ) {
   27981          57 :       pushErrorHandler();
   27982             :     }
   27983          60 :     {
   27984          60 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   27985          60 :       result = (char *)GDALRasterAttributeTableShadow_GetNameOfCol(arg1,arg2);
   27986          60 :       SWIG_PYTHON_THREAD_END_ALLOW;
   27987             :     }
   27988          60 :     if ( bLocalUseExceptions ) {
   27989          57 :       popErrorHandler();
   27990             :     }
   27991             : #ifndef SED_HACKS
   27992             :     if ( bLocalUseExceptions ) {
   27993             :       CPLErr eclass = CPLGetLastErrorType();
   27994             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   27995             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   27996             :       }
   27997             :     }
   27998             : #endif
   27999             :   }
   28000          60 :   resultobj = SWIG_FromCharPtr((const char *)result);
   28001          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; } }
   28002             :   return resultobj;
   28003             : fail:
   28004             :   return NULL;
   28005             : }
   28006             : 
   28007             : 
   28008          61 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetUsageOfCol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28009          61 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28010          61 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28011          61 :   int arg2 ;
   28012          61 :   void *argp1 = 0 ;
   28013          61 :   int res1 = 0 ;
   28014          61 :   int val2 ;
   28015          61 :   int ecode2 = 0 ;
   28016          61 :   PyObject *swig_obj[2] ;
   28017          61 :   GDALRATFieldUsage result;
   28018             :   
   28019          61 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetUsageOfCol", 2, 2, swig_obj)) SWIG_fail;
   28020          61 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28021          61 :   if (!SWIG_IsOK(res1)) {
   28022           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetUsageOfCol" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28023             :   }
   28024          61 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28025          61 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28026          61 :   if (!SWIG_IsOK(ecode2)) {
   28027           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetUsageOfCol" "', argument " "2"" of type '" "int""'");
   28028             :   } 
   28029          61 :   arg2 = static_cast< int >(val2);
   28030          61 :   {
   28031          61 :     const int bLocalUseExceptions = GetUseExceptions();
   28032          61 :     if ( bLocalUseExceptions ) {
   28033          61 :       pushErrorHandler();
   28034             :     }
   28035          61 :     {
   28036          61 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28037          61 :       result = (GDALRATFieldUsage)GDALRasterAttributeTableShadow_GetUsageOfCol(arg1,arg2);
   28038          61 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28039             :     }
   28040          61 :     if ( bLocalUseExceptions ) {
   28041          61 :       popErrorHandler();
   28042             :     }
   28043             : #ifndef SED_HACKS
   28044             :     if ( bLocalUseExceptions ) {
   28045             :       CPLErr eclass = CPLGetLastErrorType();
   28046             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28047             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28048             :       }
   28049             :     }
   28050             : #endif
   28051             :   }
   28052          61 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28053          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; } }
   28054             :   return resultobj;
   28055             : fail:
   28056             :   return NULL;
   28057             : }
   28058             : 
   28059             : 
   28060          66 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetTypeOfCol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28061          66 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28062          66 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28063          66 :   int arg2 ;
   28064          66 :   void *argp1 = 0 ;
   28065          66 :   int res1 = 0 ;
   28066          66 :   int val2 ;
   28067          66 :   int ecode2 = 0 ;
   28068          66 :   PyObject *swig_obj[2] ;
   28069          66 :   GDALRATFieldType result;
   28070             :   
   28071          66 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetTypeOfCol", 2, 2, swig_obj)) SWIG_fail;
   28072          66 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28073          66 :   if (!SWIG_IsOK(res1)) {
   28074           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetTypeOfCol" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28075             :   }
   28076          66 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28077          66 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28078          66 :   if (!SWIG_IsOK(ecode2)) {
   28079           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetTypeOfCol" "', argument " "2"" of type '" "int""'");
   28080             :   } 
   28081          66 :   arg2 = static_cast< int >(val2);
   28082          66 :   {
   28083          66 :     const int bLocalUseExceptions = GetUseExceptions();
   28084          66 :     if ( bLocalUseExceptions ) {
   28085          63 :       pushErrorHandler();
   28086             :     }
   28087          66 :     {
   28088          66 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28089          66 :       result = (GDALRATFieldType)GDALRasterAttributeTableShadow_GetTypeOfCol(arg1,arg2);
   28090          66 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28091             :     }
   28092          66 :     if ( bLocalUseExceptions ) {
   28093          63 :       popErrorHandler();
   28094             :     }
   28095             : #ifndef SED_HACKS
   28096             :     if ( bLocalUseExceptions ) {
   28097             :       CPLErr eclass = CPLGetLastErrorType();
   28098             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28099             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28100             :       }
   28101             :     }
   28102             : #endif
   28103             :   }
   28104          66 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28105          66 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   28106             :   return resultobj;
   28107             : fail:
   28108             :   return NULL;
   28109             : }
   28110             : 
   28111             : 
   28112          13 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetColOfUsage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28113          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28114          13 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28115          13 :   GDALRATFieldUsage arg2 ;
   28116          13 :   void *argp1 = 0 ;
   28117          13 :   int res1 = 0 ;
   28118          13 :   int val2 ;
   28119          13 :   int ecode2 = 0 ;
   28120          13 :   PyObject *swig_obj[2] ;
   28121          13 :   int result;
   28122             :   
   28123          13 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetColOfUsage", 2, 2, swig_obj)) SWIG_fail;
   28124          13 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28125          13 :   if (!SWIG_IsOK(res1)) {
   28126           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetColOfUsage" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28127             :   }
   28128          13 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28129          13 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28130          13 :   if (!SWIG_IsOK(ecode2)) {
   28131           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetColOfUsage" "', argument " "2"" of type '" "GDALRATFieldUsage""'");
   28132             :   } 
   28133          13 :   arg2 = static_cast< GDALRATFieldUsage >(val2);
   28134          13 :   {
   28135          13 :     const int bLocalUseExceptions = GetUseExceptions();
   28136          13 :     if ( bLocalUseExceptions ) {
   28137          13 :       pushErrorHandler();
   28138             :     }
   28139          13 :     {
   28140          13 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28141          13 :       result = (int)GDALRasterAttributeTableShadow_GetColOfUsage(arg1,arg2);
   28142          13 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28143             :     }
   28144          13 :     if ( bLocalUseExceptions ) {
   28145          13 :       popErrorHandler();
   28146             :     }
   28147             : #ifndef SED_HACKS
   28148             :     if ( bLocalUseExceptions ) {
   28149             :       CPLErr eclass = CPLGetLastErrorType();
   28150             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28151             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28152             :       }
   28153             :     }
   28154             : #endif
   28155             :   }
   28156          13 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28157          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; } }
   28158             :   return resultobj;
   28159             : fail:
   28160             :   return NULL;
   28161             : }
   28162             : 
   28163             : 
   28164          45 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetRowCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28165          45 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28166          45 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28167          45 :   void *argp1 = 0 ;
   28168          45 :   int res1 = 0 ;
   28169          45 :   PyObject *swig_obj[1] ;
   28170          45 :   int result;
   28171             :   
   28172          45 :   if (!args) SWIG_fail;
   28173          45 :   swig_obj[0] = args;
   28174          45 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28175          45 :   if (!SWIG_IsOK(res1)) {
   28176           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetRowCount" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28177             :   }
   28178          45 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28179          45 :   {
   28180          45 :     const int bLocalUseExceptions = GetUseExceptions();
   28181          45 :     if ( bLocalUseExceptions ) {
   28182          44 :       pushErrorHandler();
   28183             :     }
   28184          45 :     {
   28185          45 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28186          45 :       result = (int)GDALRasterAttributeTableShadow_GetRowCount(arg1);
   28187          45 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28188             :     }
   28189          45 :     if ( bLocalUseExceptions ) {
   28190          44 :       popErrorHandler();
   28191             :     }
   28192             : #ifndef SED_HACKS
   28193             :     if ( bLocalUseExceptions ) {
   28194             :       CPLErr eclass = CPLGetLastErrorType();
   28195             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28196             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28197             :       }
   28198             :     }
   28199             : #endif
   28200             :   }
   28201          45 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28202          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; } }
   28203             :   return resultobj;
   28204             : fail:
   28205             :   return NULL;
   28206             : }
   28207             : 
   28208             : 
   28209          50 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetValueAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28210          50 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28211          50 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28212          50 :   int arg2 ;
   28213          50 :   int arg3 ;
   28214          50 :   void *argp1 = 0 ;
   28215          50 :   int res1 = 0 ;
   28216          50 :   int val2 ;
   28217          50 :   int ecode2 = 0 ;
   28218          50 :   int val3 ;
   28219          50 :   int ecode3 = 0 ;
   28220          50 :   PyObject *swig_obj[3] ;
   28221          50 :   char *result = 0 ;
   28222             :   
   28223          50 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetValueAsString", 3, 3, swig_obj)) SWIG_fail;
   28224          50 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28225          50 :   if (!SWIG_IsOK(res1)) {
   28226           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetValueAsString" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28227             :   }
   28228          50 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28229          50 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28230          50 :   if (!SWIG_IsOK(ecode2)) {
   28231           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetValueAsString" "', argument " "2"" of type '" "int""'");
   28232             :   } 
   28233          50 :   arg2 = static_cast< int >(val2);
   28234          50 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   28235          50 :   if (!SWIG_IsOK(ecode3)) {
   28236           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_GetValueAsString" "', argument " "3"" of type '" "int""'");
   28237             :   } 
   28238          50 :   arg3 = static_cast< int >(val3);
   28239          50 :   {
   28240          50 :     const int bLocalUseExceptions = GetUseExceptions();
   28241          50 :     if ( bLocalUseExceptions ) {
   28242          49 :       pushErrorHandler();
   28243             :     }
   28244          50 :     {
   28245          50 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28246          50 :       result = (char *)GDALRasterAttributeTableShadow_GetValueAsString(arg1,arg2,arg3);
   28247          50 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28248             :     }
   28249          50 :     if ( bLocalUseExceptions ) {
   28250          49 :       popErrorHandler();
   28251             :     }
   28252             : #ifndef SED_HACKS
   28253             :     if ( bLocalUseExceptions ) {
   28254             :       CPLErr eclass = CPLGetLastErrorType();
   28255             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28256             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28257             :       }
   28258             :     }
   28259             : #endif
   28260             :   }
   28261          50 :   resultobj = SWIG_FromCharPtr((const char *)result);
   28262          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; } }
   28263             :   return resultobj;
   28264             : fail:
   28265             :   return NULL;
   28266             : }
   28267             : 
   28268             : 
   28269          72 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetValueAsInt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28270          72 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28271          72 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28272          72 :   int arg2 ;
   28273          72 :   int arg3 ;
   28274          72 :   void *argp1 = 0 ;
   28275          72 :   int res1 = 0 ;
   28276          72 :   int val2 ;
   28277          72 :   int ecode2 = 0 ;
   28278          72 :   int val3 ;
   28279          72 :   int ecode3 = 0 ;
   28280          72 :   PyObject *swig_obj[3] ;
   28281          72 :   int result;
   28282             :   
   28283          72 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetValueAsInt", 3, 3, swig_obj)) SWIG_fail;
   28284          72 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28285          72 :   if (!SWIG_IsOK(res1)) {
   28286           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetValueAsInt" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28287             :   }
   28288          72 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28289          72 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28290          72 :   if (!SWIG_IsOK(ecode2)) {
   28291           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetValueAsInt" "', argument " "2"" of type '" "int""'");
   28292             :   } 
   28293          72 :   arg2 = static_cast< int >(val2);
   28294          72 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   28295          72 :   if (!SWIG_IsOK(ecode3)) {
   28296           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_GetValueAsInt" "', argument " "3"" of type '" "int""'");
   28297             :   } 
   28298          72 :   arg3 = static_cast< int >(val3);
   28299          72 :   {
   28300          72 :     const int bLocalUseExceptions = GetUseExceptions();
   28301          72 :     if ( bLocalUseExceptions ) {
   28302          70 :       pushErrorHandler();
   28303             :     }
   28304          72 :     {
   28305          72 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28306          72 :       result = (int)GDALRasterAttributeTableShadow_GetValueAsInt(arg1,arg2,arg3);
   28307          72 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28308             :     }
   28309          72 :     if ( bLocalUseExceptions ) {
   28310          70 :       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          72 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28322          80 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   28323             :   return resultobj;
   28324             : fail:
   28325             :   return NULL;
   28326             : }
   28327             : 
   28328             : 
   28329          38 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetValueAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28330          38 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28331          38 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28332          38 :   int arg2 ;
   28333          38 :   int arg3 ;
   28334          38 :   void *argp1 = 0 ;
   28335          38 :   int res1 = 0 ;
   28336          38 :   int val2 ;
   28337          38 :   int ecode2 = 0 ;
   28338          38 :   int val3 ;
   28339          38 :   int ecode3 = 0 ;
   28340          38 :   PyObject *swig_obj[3] ;
   28341          38 :   double result;
   28342             :   
   28343          38 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetValueAsDouble", 3, 3, swig_obj)) SWIG_fail;
   28344          38 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28345          38 :   if (!SWIG_IsOK(res1)) {
   28346           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetValueAsDouble" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28347             :   }
   28348          38 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28349          38 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28350          38 :   if (!SWIG_IsOK(ecode2)) {
   28351           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetValueAsDouble" "', argument " "2"" of type '" "int""'");
   28352             :   } 
   28353          38 :   arg2 = static_cast< int >(val2);
   28354          38 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   28355          38 :   if (!SWIG_IsOK(ecode3)) {
   28356           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_GetValueAsDouble" "', argument " "3"" of type '" "int""'");
   28357             :   } 
   28358          38 :   arg3 = static_cast< int >(val3);
   28359          38 :   {
   28360          38 :     const int bLocalUseExceptions = GetUseExceptions();
   28361          38 :     if ( bLocalUseExceptions ) {
   28362          37 :       pushErrorHandler();
   28363             :     }
   28364          38 :     {
   28365          38 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28366          38 :       result = (double)GDALRasterAttributeTableShadow_GetValueAsDouble(arg1,arg2,arg3);
   28367          38 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28368             :     }
   28369          38 :     if ( bLocalUseExceptions ) {
   28370          37 :       popErrorHandler();
   28371             :     }
   28372             : #ifndef SED_HACKS
   28373             :     if ( bLocalUseExceptions ) {
   28374             :       CPLErr eclass = CPLGetLastErrorType();
   28375             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28376             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28377             :       }
   28378             :     }
   28379             : #endif
   28380             :   }
   28381          38 :   resultobj = SWIG_From_double(static_cast< double >(result));
   28382          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; } }
   28383             :   return resultobj;
   28384             : fail:
   28385             :   return NULL;
   28386             : }
   28387             : 
   28388             : 
   28389           6 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_ReadValuesIOAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28390           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28391           6 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28392           6 :   int arg2 ;
   28393           6 :   int arg3 ;
   28394           6 :   int arg4 ;
   28395           6 :   char **arg5 = (char **) 0 ;
   28396           6 :   void *argp1 = 0 ;
   28397           6 :   int res1 = 0 ;
   28398           6 :   int val2 ;
   28399           6 :   int ecode2 = 0 ;
   28400           6 :   int val3 ;
   28401           6 :   int ecode3 = 0 ;
   28402           6 :   int iLength4 ;
   28403           6 :   PyObject *swig_obj[4] ;
   28404           6 :   CPLErr result;
   28405             :   
   28406           6 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_ReadValuesIOAsString", 4, 4, swig_obj)) SWIG_fail;
   28407           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28408           6 :   if (!SWIG_IsOK(res1)) {
   28409           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_ReadValuesIOAsString" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28410             :   }
   28411           6 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28412           6 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28413           6 :   if (!SWIG_IsOK(ecode2)) {
   28414           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_ReadValuesIOAsString" "', argument " "2"" of type '" "int""'");
   28415             :   } 
   28416           6 :   arg2 = static_cast< int >(val2);
   28417           6 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   28418           6 :   if (!SWIG_IsOK(ecode3)) {
   28419           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_ReadValuesIOAsString" "', argument " "3"" of type '" "int""'");
   28420             :   } 
   28421           6 :   arg3 = static_cast< int >(val3);
   28422           6 :   {
   28423             :     /* %typemap(in,numinputs=1) (int iLength4, char **ppszData) (int iLength4) */
   28424           6 :     if ( !PyArg_Parse(swig_obj[3],"i",&iLength4) )
   28425             :     {
   28426           0 :       PyErr_SetString(PyExc_TypeError, "not a integer");
   28427           0 :       SWIG_fail;
   28428             :     }
   28429           6 :     if( iLength4 <= 0 || iLength4 > INT_MAX - 1 )
   28430             :     {
   28431           1 :       PyErr_SetString(PyExc_TypeError, "invalid length");
   28432           1 :       SWIG_fail;
   28433             :     }
   28434           5 :     arg4 = iLength4;
   28435           5 :     arg5 = (char**)VSICalloc(iLength4 + 1, sizeof(char*));
   28436           5 :     if( !arg5 )
   28437             :     {
   28438           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   28439           0 :       SWIG_fail;
   28440             :     }
   28441             :   }
   28442           5 :   {
   28443           5 :     const int bLocalUseExceptions = GetUseExceptions();
   28444           5 :     if ( bLocalUseExceptions ) {
   28445           5 :       pushErrorHandler();
   28446             :     }
   28447           5 :     {
   28448           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28449           5 :       result = (CPLErr)GDALRasterAttributeTableShadow_ReadValuesIOAsString(arg1,arg2,arg3,arg4,arg5);
   28450           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28451             :     }
   28452           5 :     if ( bLocalUseExceptions ) {
   28453           5 :       popErrorHandler();
   28454             :     }
   28455             : #ifndef SED_HACKS
   28456             :     if ( bLocalUseExceptions ) {
   28457             :       CPLErr eclass = CPLGetLastErrorType();
   28458             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28459             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28460             :       }
   28461             :     }
   28462             : #endif
   28463             :   }
   28464           5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28465           5 :   {
   28466             :     /* %typemap(argout) (int iLength, char **ppszData) */
   28467           5 :     Py_DECREF(resultobj);
   28468           5 :     PyObject *out = PyList_New( arg4 );
   28469           5 :     if( !out ) {
   28470           0 :       SWIG_fail;
   28471             :     }
   28472          13 :     for( int i=0; i<arg4; i++ ) {
   28473           8 :       if( arg5[i] )
   28474             :       {
   28475           2 :         PyObject *val = GDALPythonObjectFromCStr( arg5[i] );
   28476           2 :         PyList_SetItem( out, i, val );
   28477             :       }
   28478             :       else
   28479             :       {
   28480           6 :         Py_INCREF(Py_None);
   28481           6 :         PyList_SetItem( out, i, Py_None );
   28482             :       }
   28483             :     }
   28484           5 :     resultobj = out;
   28485             :   }
   28486           5 :   {
   28487             :     /* %typemap(freearg) (int iLength, char **ppszData) */
   28488           5 :     CSLDestroy(arg5);
   28489             :   }
   28490          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; } }
   28491             :   return resultobj;
   28492           1 : fail:
   28493           1 :   {
   28494             :     /* %typemap(freearg) (int iLength, char **ppszData) */
   28495           1 :     CSLDestroy(arg5);
   28496             :   }
   28497             :   return NULL;
   28498             : }
   28499             : 
   28500             : 
   28501           6 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_ReadValuesIOAsInteger(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28502           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28503           6 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28504           6 :   int arg2 ;
   28505           6 :   int arg3 ;
   28506           6 :   int arg4 ;
   28507           6 :   int *arg5 = (int *) 0 ;
   28508           6 :   void *argp1 = 0 ;
   28509           6 :   int res1 = 0 ;
   28510           6 :   int val2 ;
   28511           6 :   int ecode2 = 0 ;
   28512           6 :   int val3 ;
   28513           6 :   int ecode3 = 0 ;
   28514           6 :   int iLength4 ;
   28515           6 :   PyObject *swig_obj[4] ;
   28516           6 :   CPLErr result;
   28517             :   
   28518           6 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_ReadValuesIOAsInteger", 4, 4, swig_obj)) SWIG_fail;
   28519           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28520           6 :   if (!SWIG_IsOK(res1)) {
   28521           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_ReadValuesIOAsInteger" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28522             :   }
   28523           6 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28524           6 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28525           6 :   if (!SWIG_IsOK(ecode2)) {
   28526           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_ReadValuesIOAsInteger" "', argument " "2"" of type '" "int""'");
   28527             :   } 
   28528           6 :   arg2 = static_cast< int >(val2);
   28529           6 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   28530           6 :   if (!SWIG_IsOK(ecode3)) {
   28531           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_ReadValuesIOAsInteger" "', argument " "3"" of type '" "int""'");
   28532             :   } 
   28533           6 :   arg3 = static_cast< int >(val3);
   28534           6 :   {
   28535             :     /* %typemap(in,numinputs=1) (int iLength4, int *pnData) (int iLength4) */
   28536           6 :     if ( !PyArg_Parse(swig_obj[3],"i",&iLength4) ) {
   28537           0 :       PyErr_SetString(PyExc_TypeError, "not a integer");
   28538           0 :       SWIG_fail;
   28539             :     }
   28540           6 :     if( iLength4 <= 0 )
   28541             :     {
   28542           1 :       PyErr_SetString(PyExc_TypeError, "invalid length");
   28543           1 :       SWIG_fail;
   28544             :     }
   28545           5 :     arg4 = iLength4;
   28546           5 :     arg5 = (int*)VSICalloc(iLength4, sizeof(int));
   28547           5 :     if( !arg5 )
   28548             :     {
   28549           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   28550           0 :       SWIG_fail;
   28551             :     }
   28552             :   }
   28553           5 :   {
   28554           5 :     const int bLocalUseExceptions = GetUseExceptions();
   28555           5 :     if ( bLocalUseExceptions ) {
   28556           5 :       pushErrorHandler();
   28557             :     }
   28558           5 :     {
   28559           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28560           5 :       result = (CPLErr)GDALRasterAttributeTableShadow_ReadValuesIOAsInteger(arg1,arg2,arg3,arg4,arg5);
   28561           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28562             :     }
   28563           5 :     if ( bLocalUseExceptions ) {
   28564           5 :       popErrorHandler();
   28565             :     }
   28566             : #ifndef SED_HACKS
   28567             :     if ( bLocalUseExceptions ) {
   28568             :       CPLErr eclass = CPLGetLastErrorType();
   28569             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28570             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28571             :       }
   28572             :     }
   28573             : #endif
   28574             :   }
   28575           5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28576           5 :   {
   28577             :     /* %typemap(argout) (int iLength, int *pnData) */
   28578           5 :     Py_DECREF(resultobj);
   28579           5 :     PyObject *out = PyList_New( arg4 );
   28580           5 :     if( !out ) {
   28581           0 :       SWIG_fail;
   28582             :     }
   28583          13 :     for( int i=0; i<arg4; i++ ) {
   28584           8 :       PyObject *val = PyLong_FromLong( (arg5)[i] );
   28585           8 :       PyList_SetItem( out, i, val );
   28586             :     }
   28587           5 :     resultobj = out;
   28588             :   }
   28589           5 :   {
   28590             :     /* %typemap(freearg) (int iLength, int *pnData) */
   28591           5 :     CPLFree(arg5);
   28592             :   }
   28593          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; } }
   28594             :   return resultobj;
   28595           1 : fail:
   28596           1 :   {
   28597             :     /* %typemap(freearg) (int iLength, int *pnData) */
   28598           1 :     CPLFree(arg5);
   28599             :   }
   28600             :   return NULL;
   28601             : }
   28602             : 
   28603             : 
   28604           6 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_ReadValuesIOAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28605           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28606           6 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28607           6 :   int arg2 ;
   28608           6 :   int arg3 ;
   28609           6 :   int arg4 ;
   28610           6 :   double *arg5 = (double *) 0 ;
   28611           6 :   void *argp1 = 0 ;
   28612           6 :   int res1 = 0 ;
   28613           6 :   int val2 ;
   28614           6 :   int ecode2 = 0 ;
   28615           6 :   int val3 ;
   28616           6 :   int ecode3 = 0 ;
   28617           6 :   int iLength4 ;
   28618           6 :   PyObject *swig_obj[4] ;
   28619           6 :   CPLErr result;
   28620             :   
   28621           6 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_ReadValuesIOAsDouble", 4, 4, swig_obj)) SWIG_fail;
   28622           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28623           6 :   if (!SWIG_IsOK(res1)) {
   28624           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_ReadValuesIOAsDouble" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28625             :   }
   28626           6 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28627           6 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28628           6 :   if (!SWIG_IsOK(ecode2)) {
   28629           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_ReadValuesIOAsDouble" "', argument " "2"" of type '" "int""'");
   28630             :   } 
   28631           6 :   arg2 = static_cast< int >(val2);
   28632           6 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   28633           6 :   if (!SWIG_IsOK(ecode3)) {
   28634           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_ReadValuesIOAsDouble" "', argument " "3"" of type '" "int""'");
   28635             :   } 
   28636           6 :   arg3 = static_cast< int >(val3);
   28637           6 :   {
   28638             :     /* %typemap(in,numinputs=1) (int iLength4, double *pdfData) (int iLength4) */
   28639           6 :     if ( !PyArg_Parse(swig_obj[3],"i",&iLength4) ) {
   28640           0 :       PyErr_SetString(PyExc_TypeError, "not a integer");
   28641           0 :       SWIG_fail;
   28642             :     }
   28643           6 :     if( iLength4 <= 0 )
   28644             :     {
   28645           1 :       PyErr_SetString(PyExc_TypeError, "invalid length");
   28646           1 :       SWIG_fail;
   28647             :     }
   28648           5 :     arg4 = iLength4;
   28649           5 :     arg5 = (double*)CPLCalloc(iLength4, sizeof(double));
   28650           5 :     if( !arg5 )
   28651             :     {
   28652           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   28653           0 :       SWIG_fail;
   28654             :     }
   28655             :   }
   28656           5 :   {
   28657           5 :     const int bLocalUseExceptions = GetUseExceptions();
   28658           5 :     if ( bLocalUseExceptions ) {
   28659           5 :       pushErrorHandler();
   28660             :     }
   28661           5 :     {
   28662           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28663           5 :       result = (CPLErr)GDALRasterAttributeTableShadow_ReadValuesIOAsDouble(arg1,arg2,arg3,arg4,arg5);
   28664           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28665             :     }
   28666           5 :     if ( bLocalUseExceptions ) {
   28667           5 :       popErrorHandler();
   28668             :     }
   28669             : #ifndef SED_HACKS
   28670             :     if ( bLocalUseExceptions ) {
   28671             :       CPLErr eclass = CPLGetLastErrorType();
   28672             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28673             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28674             :       }
   28675             :     }
   28676             : #endif
   28677             :   }
   28678           5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   28679           5 :   {
   28680             :     /* %typemap(argout) (int iLength, double *pdfData)  */
   28681           5 :     Py_DECREF(resultobj);
   28682           5 :     PyObject *out = PyList_New( arg4 );
   28683           5 :     if( !out ) {
   28684           0 :       SWIG_fail;
   28685             :     }
   28686          13 :     for( int i=0; i<arg4; i++ ) {
   28687           8 :       PyObject *val = PyFloat_FromDouble( (arg5)[i] );
   28688           8 :       PyList_SetItem( out, i, val );
   28689             :     }
   28690           5 :     resultobj = out;
   28691             :   }
   28692           5 :   {
   28693             :     /* %typemap(freearg) (int iLength, double *pdfData) */
   28694           5 :     CPLFree(arg5);
   28695             :   }
   28696          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; } }
   28697             :   return resultobj;
   28698           1 : fail:
   28699           1 :   {
   28700             :     /* %typemap(freearg) (int iLength, double *pdfData) */
   28701           1 :     CPLFree(arg5);
   28702             :   }
   28703             :   return NULL;
   28704             : }
   28705             : 
   28706             : 
   28707          27 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetValueAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28708          27 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28709          27 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28710          27 :   int arg2 ;
   28711          27 :   int arg3 ;
   28712          27 :   char *arg4 = (char *) 0 ;
   28713          27 :   void *argp1 = 0 ;
   28714          27 :   int res1 = 0 ;
   28715          27 :   int val2 ;
   28716          27 :   int ecode2 = 0 ;
   28717          27 :   int val3 ;
   28718          27 :   int ecode3 = 0 ;
   28719          27 :   PyObject *str4 = 0 ;
   28720          27 :   int bToFree4 = 0 ;
   28721          27 :   PyObject *swig_obj[4] ;
   28722             :   
   28723          27 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetValueAsString", 4, 4, swig_obj)) SWIG_fail;
   28724          27 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28725          27 :   if (!SWIG_IsOK(res1)) {
   28726           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetValueAsString" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28727             :   }
   28728          27 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28729          27 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28730          27 :   if (!SWIG_IsOK(ecode2)) {
   28731           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetValueAsString" "', argument " "2"" of type '" "int""'");
   28732             :   } 
   28733          27 :   arg2 = static_cast< int >(val2);
   28734          27 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   28735          27 :   if (!SWIG_IsOK(ecode3)) {
   28736           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetValueAsString" "', argument " "3"" of type '" "int""'");
   28737             :   } 
   28738          27 :   arg3 = static_cast< int >(val3);
   28739          27 :   {
   28740             :     /* %typemap(in) (tostring argin) */
   28741          27 :     str4 = PyObject_Str( swig_obj[3] );
   28742          27 :     if ( str4 == 0 ) {
   28743           0 :       PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
   28744           0 :       SWIG_fail;
   28745             :     }
   28746             :     
   28747          27 :     arg4 = GDALPythonObjectToCStr(str4, &bToFree4);
   28748             :   }
   28749          27 :   {
   28750          27 :     const int bLocalUseExceptions = GetUseExceptions();
   28751          27 :     if ( bLocalUseExceptions ) {
   28752          27 :       pushErrorHandler();
   28753             :     }
   28754          27 :     {
   28755          27 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28756          27 :       GDALRasterAttributeTableShadow_SetValueAsString(arg1,arg2,arg3,(char const *)arg4);
   28757          27 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28758             :     }
   28759          27 :     if ( bLocalUseExceptions ) {
   28760          27 :       popErrorHandler();
   28761             :     }
   28762             : #ifndef SED_HACKS
   28763             :     if ( bLocalUseExceptions ) {
   28764             :       CPLErr eclass = CPLGetLastErrorType();
   28765             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28766             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28767             :       }
   28768             :     }
   28769             : #endif
   28770             :   }
   28771          27 :   resultobj = SWIG_Py_Void();
   28772          27 :   {
   28773             :     /* %typemap(freearg) (tostring argin) */
   28774          27 :     if ( str4 != NULL)
   28775             :     {
   28776          27 :       Py_DECREF(str4);
   28777             :     }
   28778          27 :     GDALPythonFreeCStr(arg4, bToFree4);
   28779             :   }
   28780          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; } }
   28781             :   return resultobj;
   28782           0 : fail:
   28783           0 :   {
   28784             :     /* %typemap(freearg) (tostring argin) */
   28785           0 :     if ( str4 != NULL)
   28786             :     {
   28787           0 :       Py_DECREF(str4);
   28788             :     }
   28789          27 :     GDALPythonFreeCStr(arg4, bToFree4);
   28790             :   }
   28791             :   return NULL;
   28792             : }
   28793             : 
   28794             : 
   28795          39 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetValueAsInt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28796          39 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28797          39 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28798          39 :   int arg2 ;
   28799          39 :   int arg3 ;
   28800          39 :   int arg4 ;
   28801          39 :   void *argp1 = 0 ;
   28802          39 :   int res1 = 0 ;
   28803          39 :   int val2 ;
   28804          39 :   int ecode2 = 0 ;
   28805          39 :   int val3 ;
   28806          39 :   int ecode3 = 0 ;
   28807          39 :   int val4 ;
   28808          39 :   int ecode4 = 0 ;
   28809          39 :   PyObject *swig_obj[4] ;
   28810             :   
   28811          39 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetValueAsInt", 4, 4, swig_obj)) SWIG_fail;
   28812          39 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28813          39 :   if (!SWIG_IsOK(res1)) {
   28814           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28815             :   }
   28816          39 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28817          39 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28818          39 :   if (!SWIG_IsOK(ecode2)) {
   28819           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "2"" of type '" "int""'");
   28820             :   } 
   28821          39 :   arg2 = static_cast< int >(val2);
   28822          39 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   28823          39 :   if (!SWIG_IsOK(ecode3)) {
   28824           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "3"" of type '" "int""'");
   28825             :   } 
   28826          39 :   arg3 = static_cast< int >(val3);
   28827          39 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   28828          39 :   if (!SWIG_IsOK(ecode4)) {
   28829           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "4"" of type '" "int""'");
   28830             :   } 
   28831          39 :   arg4 = static_cast< int >(val4);
   28832          39 :   {
   28833          39 :     const int bLocalUseExceptions = GetUseExceptions();
   28834          39 :     if ( bLocalUseExceptions ) {
   28835          39 :       pushErrorHandler();
   28836             :     }
   28837          39 :     {
   28838          39 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28839          39 :       GDALRasterAttributeTableShadow_SetValueAsInt(arg1,arg2,arg3,arg4);
   28840          39 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28841             :     }
   28842          39 :     if ( bLocalUseExceptions ) {
   28843          39 :       popErrorHandler();
   28844             :     }
   28845             : #ifndef SED_HACKS
   28846             :     if ( bLocalUseExceptions ) {
   28847             :       CPLErr eclass = CPLGetLastErrorType();
   28848             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28849             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28850             :       }
   28851             :     }
   28852             : #endif
   28853             :   }
   28854          39 :   resultobj = SWIG_Py_Void();
   28855          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; } }
   28856             :   return resultobj;
   28857             : fail:
   28858             :   return NULL;
   28859             : }
   28860             : 
   28861             : 
   28862          25 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetValueAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28863          25 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28864          25 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28865          25 :   int arg2 ;
   28866          25 :   int arg3 ;
   28867          25 :   double arg4 ;
   28868          25 :   void *argp1 = 0 ;
   28869          25 :   int res1 = 0 ;
   28870          25 :   int val2 ;
   28871          25 :   int ecode2 = 0 ;
   28872          25 :   int val3 ;
   28873          25 :   int ecode3 = 0 ;
   28874          25 :   double val4 ;
   28875          25 :   int ecode4 = 0 ;
   28876          25 :   PyObject *swig_obj[4] ;
   28877             :   
   28878          25 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetValueAsDouble", 4, 4, swig_obj)) SWIG_fail;
   28879          25 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28880          25 :   if (!SWIG_IsOK(res1)) {
   28881           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28882             :   }
   28883          25 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28884          25 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28885          25 :   if (!SWIG_IsOK(ecode2)) {
   28886           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "2"" of type '" "int""'");
   28887             :   } 
   28888          25 :   arg2 = static_cast< int >(val2);
   28889          25 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   28890          25 :   if (!SWIG_IsOK(ecode3)) {
   28891           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "3"" of type '" "int""'");
   28892             :   } 
   28893          25 :   arg3 = static_cast< int >(val3);
   28894          25 :   ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
   28895          25 :   if (!SWIG_IsOK(ecode4)) {
   28896           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "4"" of type '" "double""'");
   28897             :   } 
   28898          25 :   arg4 = static_cast< double >(val4);
   28899          25 :   {
   28900          25 :     const int bLocalUseExceptions = GetUseExceptions();
   28901          25 :     if ( bLocalUseExceptions ) {
   28902          25 :       pushErrorHandler();
   28903             :     }
   28904          25 :     {
   28905          25 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28906          25 :       GDALRasterAttributeTableShadow_SetValueAsDouble(arg1,arg2,arg3,arg4);
   28907          25 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28908             :     }
   28909          25 :     if ( bLocalUseExceptions ) {
   28910          25 :       popErrorHandler();
   28911             :     }
   28912             : #ifndef SED_HACKS
   28913             :     if ( bLocalUseExceptions ) {
   28914             :       CPLErr eclass = CPLGetLastErrorType();
   28915             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28916             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28917             :       }
   28918             :     }
   28919             : #endif
   28920             :   }
   28921          25 :   resultobj = SWIG_Py_Void();
   28922          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; } }
   28923             :   return resultobj;
   28924             : fail:
   28925             :   return NULL;
   28926             : }
   28927             : 
   28928             : 
   28929           5 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetRowCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28930           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28931           5 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28932           5 :   int arg2 ;
   28933           5 :   void *argp1 = 0 ;
   28934           5 :   int res1 = 0 ;
   28935           5 :   int val2 ;
   28936           5 :   int ecode2 = 0 ;
   28937           5 :   PyObject *swig_obj[2] ;
   28938             :   
   28939           5 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetRowCount", 2, 2, swig_obj)) SWIG_fail;
   28940           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   28941           5 :   if (!SWIG_IsOK(res1)) {
   28942           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetRowCount" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   28943             :   }
   28944           5 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   28945           5 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   28946           5 :   if (!SWIG_IsOK(ecode2)) {
   28947           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetRowCount" "', argument " "2"" of type '" "int""'");
   28948             :   } 
   28949           5 :   arg2 = static_cast< int >(val2);
   28950           5 :   {
   28951           5 :     const int bLocalUseExceptions = GetUseExceptions();
   28952           5 :     if ( bLocalUseExceptions ) {
   28953           5 :       pushErrorHandler();
   28954             :     }
   28955           5 :     {
   28956           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   28957           5 :       GDALRasterAttributeTableShadow_SetRowCount(arg1,arg2);
   28958           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   28959             :     }
   28960           5 :     if ( bLocalUseExceptions ) {
   28961           5 :       popErrorHandler();
   28962             :     }
   28963             : #ifndef SED_HACKS
   28964             :     if ( bLocalUseExceptions ) {
   28965             :       CPLErr eclass = CPLGetLastErrorType();
   28966             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   28967             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   28968             :       }
   28969             :     }
   28970             : #endif
   28971             :   }
   28972           5 :   resultobj = SWIG_Py_Void();
   28973           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; } }
   28974             :   return resultobj;
   28975             : fail:
   28976             :   return NULL;
   28977             : }
   28978             : 
   28979             : 
   28980          25 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_CreateColumn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   28981          25 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   28982          25 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   28983          25 :   char *arg2 = (char *) 0 ;
   28984          25 :   GDALRATFieldType arg3 ;
   28985          25 :   GDALRATFieldUsage arg4 ;
   28986          25 :   void *argp1 = 0 ;
   28987          25 :   int res1 = 0 ;
   28988          25 :   int res2 ;
   28989          25 :   char *buf2 = 0 ;
   28990          25 :   int alloc2 = 0 ;
   28991          25 :   int val3 ;
   28992          25 :   int ecode3 = 0 ;
   28993          25 :   int val4 ;
   28994          25 :   int ecode4 = 0 ;
   28995          25 :   PyObject *swig_obj[4] ;
   28996          25 :   int result;
   28997             :   
   28998          25 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_CreateColumn", 4, 4, swig_obj)) SWIG_fail;
   28999          25 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   29000          25 :   if (!SWIG_IsOK(res1)) {
   29001           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   29002             :   }
   29003          25 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   29004          25 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   29005          25 :   if (!SWIG_IsOK(res2)) {
   29006           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "2"" of type '" "char const *""'");
   29007             :   }
   29008          25 :   arg2 = reinterpret_cast< char * >(buf2);
   29009          25 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   29010          25 :   if (!SWIG_IsOK(ecode3)) {
   29011           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "3"" of type '" "GDALRATFieldType""'");
   29012             :   } 
   29013          25 :   arg3 = static_cast< GDALRATFieldType >(val3);
   29014          25 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   29015          25 :   if (!SWIG_IsOK(ecode4)) {
   29016           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "4"" of type '" "GDALRATFieldUsage""'");
   29017             :   } 
   29018          25 :   arg4 = static_cast< GDALRATFieldUsage >(val4);
   29019          25 :   {
   29020          25 :     const int bLocalUseExceptions = GetUseExceptions();
   29021          25 :     if ( bLocalUseExceptions ) {
   29022          25 :       pushErrorHandler();
   29023             :     }
   29024          25 :     {
   29025          25 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29026          25 :       result = (int)GDALRasterAttributeTableShadow_CreateColumn(arg1,(char const *)arg2,arg3,arg4);
   29027          25 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29028             :     }
   29029          25 :     if ( bLocalUseExceptions ) {
   29030          25 :       popErrorHandler();
   29031             :     }
   29032             : #ifndef SED_HACKS
   29033             :     if ( bLocalUseExceptions ) {
   29034             :       CPLErr eclass = CPLGetLastErrorType();
   29035             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29036             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29037             :       }
   29038             :     }
   29039             : #endif
   29040             :   }
   29041          25 :   resultobj = SWIG_From_int(static_cast< int >(result));
   29042          25 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   29043          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; } }
   29044             :   return resultobj;
   29045           0 : fail:
   29046           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   29047             :   return NULL;
   29048             : }
   29049             : 
   29050             : 
   29051           1 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetLinearBinning(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29052           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29053           1 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   29054           1 :   double *arg2 = (double *) 0 ;
   29055           1 :   double *arg3 = (double *) 0 ;
   29056           1 :   void *argp1 = 0 ;
   29057           1 :   int res1 = 0 ;
   29058           1 :   double temp2 ;
   29059           1 :   int res2 = SWIG_TMPOBJ ;
   29060           1 :   double temp3 ;
   29061           1 :   int res3 = SWIG_TMPOBJ ;
   29062           1 :   PyObject *swig_obj[1] ;
   29063           1 :   bool result;
   29064             :   
   29065           1 :   arg2 = &temp2;
   29066           1 :   arg3 = &temp3;
   29067           1 :   if (!args) SWIG_fail;
   29068           1 :   swig_obj[0] = args;
   29069           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   29070           1 :   if (!SWIG_IsOK(res1)) {
   29071           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetLinearBinning" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   29072             :   }
   29073           1 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   29074           1 :   {
   29075           1 :     const int bLocalUseExceptions = GetUseExceptions();
   29076           1 :     if ( bLocalUseExceptions ) {
   29077           1 :       pushErrorHandler();
   29078             :     }
   29079           1 :     {
   29080           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29081           1 :       result = (bool)GDALRasterAttributeTableShadow_GetLinearBinning(arg1,arg2,arg3);
   29082           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29083             :     }
   29084           1 :     if ( bLocalUseExceptions ) {
   29085           1 :       popErrorHandler();
   29086             :     }
   29087             : #ifndef SED_HACKS
   29088             :     if ( bLocalUseExceptions ) {
   29089             :       CPLErr eclass = CPLGetLastErrorType();
   29090             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29091             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29092             :       }
   29093             :     }
   29094             : #endif
   29095             :   }
   29096           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   29097           1 :   if (ReturnSame(SWIG_IsTmpObj(res2))) {
   29098           1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2)));
   29099             :   } else {
   29100           0 :     int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   29101           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags));
   29102             :   }
   29103           1 :   if (ReturnSame(SWIG_IsTmpObj(res3))) {
   29104           1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
   29105             :   } else {
   29106           0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   29107           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
   29108             :   }
   29109           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; } }
   29110             :   return resultobj;
   29111             : fail:
   29112             :   return NULL;
   29113             : }
   29114             : 
   29115             : 
   29116           1 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetLinearBinning(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29117           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29118           1 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   29119           1 :   double arg2 ;
   29120           1 :   double arg3 ;
   29121           1 :   void *argp1 = 0 ;
   29122           1 :   int res1 = 0 ;
   29123           1 :   double val2 ;
   29124           1 :   int ecode2 = 0 ;
   29125           1 :   double val3 ;
   29126           1 :   int ecode3 = 0 ;
   29127           1 :   PyObject *swig_obj[3] ;
   29128           1 :   int result;
   29129             :   
   29130           1 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetLinearBinning", 3, 3, swig_obj)) SWIG_fail;
   29131           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   29132           1 :   if (!SWIG_IsOK(res1)) {
   29133           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetLinearBinning" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   29134             :   }
   29135           1 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   29136           1 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   29137           1 :   if (!SWIG_IsOK(ecode2)) {
   29138           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetLinearBinning" "', argument " "2"" of type '" "double""'");
   29139             :   } 
   29140           1 :   arg2 = static_cast< double >(val2);
   29141           1 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   29142           1 :   if (!SWIG_IsOK(ecode3)) {
   29143           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetLinearBinning" "', argument " "3"" of type '" "double""'");
   29144             :   } 
   29145           1 :   arg3 = static_cast< double >(val3);
   29146           1 :   {
   29147           1 :     const int bLocalUseExceptions = GetUseExceptions();
   29148           1 :     if ( bLocalUseExceptions ) {
   29149           1 :       pushErrorHandler();
   29150             :     }
   29151           1 :     {
   29152           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29153           1 :       result = (int)GDALRasterAttributeTableShadow_SetLinearBinning(arg1,arg2,arg3);
   29154           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29155             :     }
   29156           1 :     if ( bLocalUseExceptions ) {
   29157           1 :       popErrorHandler();
   29158             :     }
   29159             : #ifndef SED_HACKS
   29160             :     if ( bLocalUseExceptions ) {
   29161             :       CPLErr eclass = CPLGetLastErrorType();
   29162             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29163             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29164             :       }
   29165             :     }
   29166             : #endif
   29167             :   }
   29168           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   29169           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; } }
   29170             :   return resultobj;
   29171             : fail:
   29172             :   return NULL;
   29173             : }
   29174             : 
   29175             : 
   29176           3 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetRowOfValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29177           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29178           3 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   29179           3 :   double arg2 ;
   29180           3 :   void *argp1 = 0 ;
   29181           3 :   int res1 = 0 ;
   29182           3 :   double val2 ;
   29183           3 :   int ecode2 = 0 ;
   29184           3 :   PyObject *swig_obj[2] ;
   29185           3 :   int result;
   29186             :   
   29187           3 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_GetRowOfValue", 2, 2, swig_obj)) SWIG_fail;
   29188           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   29189           3 :   if (!SWIG_IsOK(res1)) {
   29190           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetRowOfValue" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   29191             :   }
   29192           3 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   29193           3 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   29194           3 :   if (!SWIG_IsOK(ecode2)) {
   29195           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetRowOfValue" "', argument " "2"" of type '" "double""'");
   29196             :   } 
   29197           3 :   arg2 = static_cast< double >(val2);
   29198           3 :   {
   29199           3 :     const int bLocalUseExceptions = GetUseExceptions();
   29200           3 :     if ( bLocalUseExceptions ) {
   29201           3 :       pushErrorHandler();
   29202             :     }
   29203           3 :     {
   29204           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29205           3 :       result = (int)GDALRasterAttributeTableShadow_GetRowOfValue(arg1,arg2);
   29206           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29207             :     }
   29208           3 :     if ( bLocalUseExceptions ) {
   29209           3 :       popErrorHandler();
   29210             :     }
   29211             : #ifndef SED_HACKS
   29212             :     if ( bLocalUseExceptions ) {
   29213             :       CPLErr eclass = CPLGetLastErrorType();
   29214             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29215             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29216             :       }
   29217             :     }
   29218             : #endif
   29219             :   }
   29220           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   29221           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; } }
   29222             :   return resultobj;
   29223             : fail:
   29224             :   return NULL;
   29225             : }
   29226             : 
   29227             : 
   29228           2 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_ChangesAreWrittenToFile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29229           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29230           2 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   29231           2 :   void *argp1 = 0 ;
   29232           2 :   int res1 = 0 ;
   29233           2 :   PyObject *swig_obj[1] ;
   29234           2 :   int result;
   29235             :   
   29236           2 :   if (!args) SWIG_fail;
   29237           2 :   swig_obj[0] = args;
   29238           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   29239           2 :   if (!SWIG_IsOK(res1)) {
   29240           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_ChangesAreWrittenToFile" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   29241             :   }
   29242           2 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   29243           2 :   {
   29244           2 :     const int bLocalUseExceptions = GetUseExceptions();
   29245           2 :     if ( bLocalUseExceptions ) {
   29246           2 :       pushErrorHandler();
   29247             :     }
   29248           2 :     {
   29249           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29250           2 :       result = (int)GDALRasterAttributeTableShadow_ChangesAreWrittenToFile(arg1);
   29251           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29252             :     }
   29253           2 :     if ( bLocalUseExceptions ) {
   29254           2 :       popErrorHandler();
   29255             :     }
   29256             : #ifndef SED_HACKS
   29257             :     if ( bLocalUseExceptions ) {
   29258             :       CPLErr eclass = CPLGetLastErrorType();
   29259             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29260             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29261             :       }
   29262             :     }
   29263             : #endif
   29264             :   }
   29265           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   29266           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; } }
   29267             :   return resultobj;
   29268             : fail:
   29269             :   return NULL;
   29270             : }
   29271             : 
   29272             : 
   29273           0 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_DumpReadable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29274           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29275           0 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   29276           0 :   void *argp1 = 0 ;
   29277           0 :   int res1 = 0 ;
   29278           0 :   PyObject *swig_obj[1] ;
   29279             :   
   29280           0 :   if (!args) SWIG_fail;
   29281           0 :   swig_obj[0] = args;
   29282           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   29283           0 :   if (!SWIG_IsOK(res1)) {
   29284           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_DumpReadable" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   29285             :   }
   29286           0 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   29287           0 :   {
   29288           0 :     const int bLocalUseExceptions = GetUseExceptions();
   29289           0 :     if ( bLocalUseExceptions ) {
   29290           0 :       pushErrorHandler();
   29291             :     }
   29292           0 :     {
   29293           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29294           0 :       GDALRasterAttributeTableShadow_DumpReadable(arg1);
   29295           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29296             :     }
   29297           0 :     if ( bLocalUseExceptions ) {
   29298           0 :       popErrorHandler();
   29299             :     }
   29300             : #ifndef SED_HACKS
   29301             :     if ( bLocalUseExceptions ) {
   29302             :       CPLErr eclass = CPLGetLastErrorType();
   29303             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29304             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29305             :       }
   29306             :     }
   29307             : #endif
   29308             :   }
   29309           0 :   resultobj = SWIG_Py_Void();
   29310           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; } }
   29311             :   return resultobj;
   29312             : fail:
   29313             :   return NULL;
   29314             : }
   29315             : 
   29316             : 
   29317           3 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetTableType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29318           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29319           3 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   29320           3 :   GDALRATTableType arg2 ;
   29321           3 :   void *argp1 = 0 ;
   29322           3 :   int res1 = 0 ;
   29323           3 :   int val2 ;
   29324           3 :   int ecode2 = 0 ;
   29325           3 :   PyObject *swig_obj[2] ;
   29326             :   
   29327           3 :   if (!SWIG_Python_UnpackTuple(args, "RasterAttributeTable_SetTableType", 2, 2, swig_obj)) SWIG_fail;
   29328           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   29329           3 :   if (!SWIG_IsOK(res1)) {
   29330           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetTableType" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   29331             :   }
   29332           3 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   29333           3 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   29334           3 :   if (!SWIG_IsOK(ecode2)) {
   29335           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetTableType" "', argument " "2"" of type '" "GDALRATTableType""'");
   29336             :   } 
   29337           3 :   arg2 = static_cast< GDALRATTableType >(val2);
   29338           3 :   {
   29339           3 :     const int bLocalUseExceptions = GetUseExceptions();
   29340           3 :     if ( bLocalUseExceptions ) {
   29341           3 :       pushErrorHandler();
   29342             :     }
   29343           3 :     {
   29344           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29345           3 :       GDALRasterAttributeTableShadow_SetTableType(arg1,arg2);
   29346           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29347             :     }
   29348           3 :     if ( bLocalUseExceptions ) {
   29349           3 :       popErrorHandler();
   29350             :     }
   29351             : #ifndef SED_HACKS
   29352             :     if ( bLocalUseExceptions ) {
   29353             :       CPLErr eclass = CPLGetLastErrorType();
   29354             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29355             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29356             :       }
   29357             :     }
   29358             : #endif
   29359             :   }
   29360           3 :   resultobj = SWIG_Py_Void();
   29361           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; } }
   29362             :   return resultobj;
   29363             : fail:
   29364             :   return NULL;
   29365             : }
   29366             : 
   29367             : 
   29368          10 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetTableType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29369          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29370          10 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   29371          10 :   void *argp1 = 0 ;
   29372          10 :   int res1 = 0 ;
   29373          10 :   PyObject *swig_obj[1] ;
   29374          10 :   GDALRATTableType result;
   29375             :   
   29376          10 :   if (!args) SWIG_fail;
   29377          10 :   swig_obj[0] = args;
   29378          10 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   29379          10 :   if (!SWIG_IsOK(res1)) {
   29380           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetTableType" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   29381             :   }
   29382          10 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   29383          10 :   {
   29384          10 :     const int bLocalUseExceptions = GetUseExceptions();
   29385          10 :     if ( bLocalUseExceptions ) {
   29386          10 :       pushErrorHandler();
   29387             :     }
   29388          10 :     {
   29389          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29390          10 :       result = (GDALRATTableType)GDALRasterAttributeTableShadow_GetTableType(arg1);
   29391          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29392             :     }
   29393          10 :     if ( bLocalUseExceptions ) {
   29394          10 :       popErrorHandler();
   29395             :     }
   29396             : #ifndef SED_HACKS
   29397             :     if ( bLocalUseExceptions ) {
   29398             :       CPLErr eclass = CPLGetLastErrorType();
   29399             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29400             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29401             :       }
   29402             :     }
   29403             : #endif
   29404             :   }
   29405          10 :   resultobj = SWIG_From_int(static_cast< int >(result));
   29406          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; } }
   29407             :   return resultobj;
   29408             : fail:
   29409             :   return NULL;
   29410             : }
   29411             : 
   29412             : 
   29413           1 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_RemoveStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29414           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29415           1 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   29416           1 :   void *argp1 = 0 ;
   29417           1 :   int res1 = 0 ;
   29418           1 :   PyObject *swig_obj[1] ;
   29419             :   
   29420           1 :   if (!args) SWIG_fail;
   29421           1 :   swig_obj[0] = args;
   29422           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   29423           1 :   if (!SWIG_IsOK(res1)) {
   29424           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_RemoveStatistics" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   29425             :   }
   29426           1 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   29427           1 :   {
   29428           1 :     const int bLocalUseExceptions = GetUseExceptions();
   29429           1 :     if ( bLocalUseExceptions ) {
   29430           1 :       pushErrorHandler();
   29431             :     }
   29432           1 :     {
   29433           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29434           1 :       GDALRasterAttributeTableShadow_RemoveStatistics(arg1);
   29435           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29436             :     }
   29437           1 :     if ( bLocalUseExceptions ) {
   29438           1 :       popErrorHandler();
   29439             :     }
   29440             : #ifndef SED_HACKS
   29441             :     if ( bLocalUseExceptions ) {
   29442             :       CPLErr eclass = CPLGetLastErrorType();
   29443             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29444             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29445             :       }
   29446             :     }
   29447             : #endif
   29448             :   }
   29449           1 :   resultobj = SWIG_Py_Void();
   29450           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; } }
   29451             :   return resultobj;
   29452             : fail:
   29453             :   return NULL;
   29454             : }
   29455             : 
   29456             : 
   29457         277 : SWIGINTERN PyObject *RasterAttributeTable_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29458         277 :   PyObject *obj;
   29459         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   29460         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_NewClientData(obj));
   29461         277 :   return SWIG_Py_Void();
   29462             : }
   29463             : 
   29464          10 : SWIGINTERN PyObject *RasterAttributeTable_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29465          10 :   return SWIG_Python_InitShadowInstance(args);
   29466             : }
   29467             : 
   29468        1447 : SWIGINTERN PyObject *_wrap_delete_Group(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29469        1447 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29470        1447 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   29471        1447 :   void *argp1 = 0 ;
   29472        1447 :   int res1 = 0 ;
   29473        1447 :   PyObject *swig_obj[1] ;
   29474             :   
   29475        1447 :   if (!args) SWIG_fail;
   29476        1447 :   swig_obj[0] = args;
   29477        1447 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_DISOWN |  0 );
   29478        1447 :   if (!SWIG_IsOK(res1)) {
   29479           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Group" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   29480             :   }
   29481        1447 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   29482        1447 :   {
   29483        1447 :     const int bLocalUseExceptions = GetUseExceptions();
   29484        1447 :     if ( bLocalUseExceptions ) {
   29485         515 :       pushErrorHandler();
   29486             :     }
   29487        1447 :     {
   29488        1447 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29489        1447 :       delete_GDALGroupHS(arg1);
   29490        1447 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29491             :     }
   29492        1447 :     if ( bLocalUseExceptions ) {
   29493         515 :       popErrorHandler();
   29494             :     }
   29495             : #ifndef SED_HACKS
   29496             :     if ( bLocalUseExceptions ) {
   29497             :       CPLErr eclass = CPLGetLastErrorType();
   29498             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29499             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29500             :       }
   29501             :     }
   29502             : #endif
   29503             :   }
   29504        1447 :   resultobj = SWIG_Py_Void();
   29505        1447 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   29506             :   return resultobj;
   29507             : fail:
   29508             :   return NULL;
   29509             : }
   29510             : 
   29511             : 
   29512          95 : SWIGINTERN PyObject *_wrap_Group_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29513          95 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29514          95 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   29515          95 :   void *argp1 = 0 ;
   29516          95 :   int res1 = 0 ;
   29517          95 :   PyObject *swig_obj[1] ;
   29518          95 :   char *result = 0 ;
   29519             :   
   29520          95 :   if (!args) SWIG_fail;
   29521          95 :   swig_obj[0] = args;
   29522          95 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   29523          95 :   if (!SWIG_IsOK(res1)) {
   29524           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetName" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   29525             :   }
   29526          95 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   29527          95 :   {
   29528          95 :     const int bLocalUseExceptions = GetUseExceptions();
   29529          95 :     if ( bLocalUseExceptions ) {
   29530          17 :       pushErrorHandler();
   29531             :     }
   29532          95 :     {
   29533          95 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29534          95 :       result = (char *)GDALGroupHS_GetName(arg1);
   29535          95 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29536             :     }
   29537          95 :     if ( bLocalUseExceptions ) {
   29538          17 :       popErrorHandler();
   29539             :     }
   29540             : #ifndef SED_HACKS
   29541             :     if ( bLocalUseExceptions ) {
   29542             :       CPLErr eclass = CPLGetLastErrorType();
   29543             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29544             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29545             :       }
   29546             :     }
   29547             : #endif
   29548             :   }
   29549          95 :   resultobj = SWIG_FromCharPtr((const char *)result);
   29550          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; } }
   29551             :   return resultobj;
   29552             : fail:
   29553             :   return NULL;
   29554             : }
   29555             : 
   29556             : 
   29557          47 : SWIGINTERN PyObject *_wrap_Group_GetFullName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29558          47 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29559          47 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   29560          47 :   void *argp1 = 0 ;
   29561          47 :   int res1 = 0 ;
   29562          47 :   PyObject *swig_obj[1] ;
   29563          47 :   char *result = 0 ;
   29564             :   
   29565          47 :   if (!args) SWIG_fail;
   29566          47 :   swig_obj[0] = args;
   29567          47 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   29568          47 :   if (!SWIG_IsOK(res1)) {
   29569           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetFullName" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   29570             :   }
   29571          47 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   29572          47 :   {
   29573          47 :     const int bLocalUseExceptions = GetUseExceptions();
   29574          47 :     if ( bLocalUseExceptions ) {
   29575          17 :       pushErrorHandler();
   29576             :     }
   29577          47 :     {
   29578          47 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29579          47 :       result = (char *)GDALGroupHS_GetFullName(arg1);
   29580          47 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29581             :     }
   29582          47 :     if ( bLocalUseExceptions ) {
   29583          17 :       popErrorHandler();
   29584             :     }
   29585             : #ifndef SED_HACKS
   29586             :     if ( bLocalUseExceptions ) {
   29587             :       CPLErr eclass = CPLGetLastErrorType();
   29588             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29589             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29590             :       }
   29591             :     }
   29592             : #endif
   29593             :   }
   29594          47 :   resultobj = SWIG_FromCharPtr((const char *)result);
   29595          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; } }
   29596             :   return resultobj;
   29597             : fail:
   29598             :   return NULL;
   29599             : }
   29600             : 
   29601             : 
   29602         329 : SWIGINTERN PyObject *_wrap_Group_GetMDArrayNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29603         329 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29604         329 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   29605         329 :   char **arg2 = (char **) 0 ;
   29606         329 :   void *argp1 = 0 ;
   29607         329 :   int res1 = 0 ;
   29608         329 :   PyObject *swig_obj[2] ;
   29609         329 :   char **result = 0 ;
   29610             :   
   29611         329 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetMDArrayNames", 1, 2, swig_obj)) SWIG_fail;
   29612         329 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   29613         329 :   if (!SWIG_IsOK(res1)) {
   29614           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetMDArrayNames" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   29615             :   }
   29616         329 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   29617         329 :   if (swig_obj[1]) {
   29618         329 :     {
   29619             :       /* %typemap(in) char **dict */
   29620         329 :       arg2 = NULL;
   29621         329 :       if ( PySequence_Check( swig_obj[1] ) ) {
   29622         329 :         int bErr = FALSE;
   29623         329 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   29624         329 :         if ( bErr )
   29625             :         {
   29626           0 :           SWIG_fail;
   29627             :         }
   29628             :       }
   29629           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   29630           0 :         int bErr = FALSE;
   29631           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   29632           0 :         if ( bErr )
   29633             :         {
   29634           0 :           SWIG_fail;
   29635             :         }
   29636             :       }
   29637             :       else {
   29638           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   29639           0 :         SWIG_fail;
   29640             :       }
   29641             :     }
   29642             :   }
   29643         329 :   {
   29644         329 :     const int bLocalUseExceptions = GetUseExceptions();
   29645         329 :     if ( bLocalUseExceptions ) {
   29646          74 :       pushErrorHandler();
   29647             :     }
   29648         329 :     {
   29649         329 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29650         329 :       result = (char **)GDALGroupHS_GetMDArrayNames(arg1,arg2);
   29651         329 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29652             :     }
   29653         329 :     if ( bLocalUseExceptions ) {
   29654          74 :       popErrorHandler();
   29655             :     }
   29656             : #ifndef SED_HACKS
   29657             :     if ( bLocalUseExceptions ) {
   29658             :       CPLErr eclass = CPLGetLastErrorType();
   29659             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29660             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29661             :       }
   29662             :     }
   29663             : #endif
   29664             :   }
   29665         329 :   {
   29666             :     /* %typemap(out) char **CSL -> ( string ) */
   29667         329 :     bool bErr = false;
   29668         329 :     resultobj = CSLToList(result, &bErr);
   29669         329 :     CSLDestroy(result);
   29670         329 :     if( bErr ) {
   29671           0 :       SWIG_fail;
   29672             :     }
   29673             :   }
   29674         329 :   {
   29675             :     /* %typemap(freearg) char **dict */
   29676         329 :     CSLDestroy( arg2 );
   29677             :   }
   29678         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; } }
   29679             :   return resultobj;
   29680           0 : fail:
   29681           0 :   {
   29682             :     /* %typemap(freearg) char **dict */
   29683           0 :     CSLDestroy( arg2 );
   29684             :   }
   29685             :   return NULL;
   29686             : }
   29687             : 
   29688             : 
   29689           1 : SWIGINTERN PyObject *_wrap_Group_GetMDArrayFullNamesRecursive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29690           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29691           1 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   29692           1 :   char **arg2 = (char **) 0 ;
   29693           1 :   char **arg3 = (char **) 0 ;
   29694           1 :   void *argp1 = 0 ;
   29695           1 :   int res1 = 0 ;
   29696           1 :   void *argp2 = 0 ;
   29697           1 :   int res2 = 0 ;
   29698           1 :   void *argp3 = 0 ;
   29699           1 :   int res3 = 0 ;
   29700           1 :   PyObject *swig_obj[3] ;
   29701           1 :   char **result = 0 ;
   29702             :   
   29703           1 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetMDArrayFullNamesRecursive", 1, 3, swig_obj)) SWIG_fail;
   29704           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   29705           1 :   if (!SWIG_IsOK(res1)) {
   29706           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetMDArrayFullNamesRecursive" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   29707             :   }
   29708           1 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   29709           1 :   if (swig_obj[1]) {
   29710           0 :     res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_p_char, 0 |  0 );
   29711           0 :     if (!SWIG_IsOK(res2)) {
   29712           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_GetMDArrayFullNamesRecursive" "', argument " "2"" of type '" "char **""'"); 
   29713             :     }
   29714           0 :     arg2 = reinterpret_cast< char ** >(argp2);
   29715             :   }
   29716           1 :   if (swig_obj[2]) {
   29717           0 :     res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_p_char, 0 |  0 );
   29718           0 :     if (!SWIG_IsOK(res3)) {
   29719           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Group_GetMDArrayFullNamesRecursive" "', argument " "3"" of type '" "char **""'"); 
   29720             :     }
   29721           0 :     arg3 = reinterpret_cast< char ** >(argp3);
   29722             :   }
   29723           1 :   {
   29724           1 :     const int bLocalUseExceptions = GetUseExceptions();
   29725           1 :     if ( bLocalUseExceptions ) {
   29726           1 :       pushErrorHandler();
   29727             :     }
   29728           1 :     {
   29729           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29730           1 :       result = (char **)GDALGroupHS_GetMDArrayFullNamesRecursive(arg1,arg2,arg3);
   29731           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29732             :     }
   29733           1 :     if ( bLocalUseExceptions ) {
   29734           1 :       popErrorHandler();
   29735             :     }
   29736             : #ifndef SED_HACKS
   29737             :     if ( bLocalUseExceptions ) {
   29738             :       CPLErr eclass = CPLGetLastErrorType();
   29739             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29740             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29741             :       }
   29742             :     }
   29743             : #endif
   29744             :   }
   29745           1 :   {
   29746             :     /* %typemap(out) char **CSL -> ( string ) */
   29747           1 :     bool bErr = false;
   29748           1 :     resultobj = CSLToList(result, &bErr);
   29749           1 :     CSLDestroy(result);
   29750           1 :     if( bErr ) {
   29751           0 :       SWIG_fail;
   29752             :     }
   29753             :   }
   29754           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; } }
   29755             :   return resultobj;
   29756             : fail:
   29757             :   return NULL;
   29758             : }
   29759             : 
   29760             : 
   29761         806 : SWIGINTERN PyObject *_wrap_Group_OpenMDArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29762         806 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29763         806 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   29764         806 :   char *arg2 = (char *) 0 ;
   29765         806 :   char **arg3 = (char **) 0 ;
   29766         806 :   void *argp1 = 0 ;
   29767         806 :   int res1 = 0 ;
   29768         806 :   int res2 ;
   29769         806 :   char *buf2 = 0 ;
   29770         806 :   int alloc2 = 0 ;
   29771         806 :   PyObject *swig_obj[3] ;
   29772         806 :   GDALMDArrayHS *result = 0 ;
   29773             :   
   29774         806 :   if (!SWIG_Python_UnpackTuple(args, "Group_OpenMDArray", 2, 3, swig_obj)) SWIG_fail;
   29775         806 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   29776         806 :   if (!SWIG_IsOK(res1)) {
   29777           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_OpenMDArray" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   29778             :   }
   29779         806 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   29780         806 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   29781         806 :   if (!SWIG_IsOK(res2)) {
   29782           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_OpenMDArray" "', argument " "2"" of type '" "char const *""'");
   29783             :   }
   29784         806 :   arg2 = reinterpret_cast< char * >(buf2);
   29785         806 :   if (swig_obj[2]) {
   29786          10 :     {
   29787             :       /* %typemap(in) char **dict */
   29788          10 :       arg3 = NULL;
   29789          10 :       if ( PySequence_Check( swig_obj[2] ) ) {
   29790          10 :         int bErr = FALSE;
   29791          10 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   29792          10 :         if ( bErr )
   29793             :         {
   29794           0 :           SWIG_fail;
   29795             :         }
   29796             :       }
   29797           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   29798           0 :         int bErr = FALSE;
   29799           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   29800           0 :         if ( bErr )
   29801             :         {
   29802           0 :           SWIG_fail;
   29803             :         }
   29804             :       }
   29805             :       else {
   29806           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   29807           0 :         SWIG_fail;
   29808             :       }
   29809             :     }
   29810             :   }
   29811         806 :   {
   29812         806 :     if (!arg2) {
   29813           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   29814             :     }
   29815             :   }
   29816         806 :   {
   29817         806 :     const int bLocalUseExceptions = GetUseExceptions();
   29818         806 :     if ( bLocalUseExceptions ) {
   29819         227 :       pushErrorHandler();
   29820             :     }
   29821         806 :     {
   29822         806 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29823         806 :       result = (GDALMDArrayHS *)GDALGroupHS_OpenMDArray(arg1,(char const *)arg2,arg3);
   29824         806 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29825             :     }
   29826         806 :     if ( bLocalUseExceptions ) {
   29827         227 :       popErrorHandler();
   29828             :     }
   29829             : #ifndef SED_HACKS
   29830             :     if ( bLocalUseExceptions ) {
   29831             :       CPLErr eclass = CPLGetLastErrorType();
   29832             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29833             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29834             :       }
   29835             :     }
   29836             : #endif
   29837             :   }
   29838         806 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   29839         806 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   29840         806 :   {
   29841             :     /* %typemap(freearg) char **dict */
   29842         806 :     CSLDestroy( arg3 );
   29843             :   }
   29844         840 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   29845             :   return resultobj;
   29846           0 : fail:
   29847           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   29848           0 :   {
   29849             :     /* %typemap(freearg) char **dict */
   29850           0 :     CSLDestroy( arg3 );
   29851             :   }
   29852             :   return NULL;
   29853             : }
   29854             : 
   29855             : 
   29856          16 : SWIGINTERN PyObject *_wrap_Group_OpenMDArrayFromFullname(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29857          16 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29858          16 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   29859          16 :   char *arg2 = (char *) 0 ;
   29860          16 :   char **arg3 = (char **) 0 ;
   29861          16 :   void *argp1 = 0 ;
   29862          16 :   int res1 = 0 ;
   29863          16 :   int res2 ;
   29864          16 :   char *buf2 = 0 ;
   29865          16 :   int alloc2 = 0 ;
   29866          16 :   PyObject *swig_obj[3] ;
   29867          16 :   GDALMDArrayHS *result = 0 ;
   29868             :   
   29869          16 :   if (!SWIG_Python_UnpackTuple(args, "Group_OpenMDArrayFromFullname", 2, 3, swig_obj)) SWIG_fail;
   29870          16 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   29871          16 :   if (!SWIG_IsOK(res1)) {
   29872           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_OpenMDArrayFromFullname" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   29873             :   }
   29874          16 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   29875          16 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   29876          16 :   if (!SWIG_IsOK(res2)) {
   29877           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_OpenMDArrayFromFullname" "', argument " "2"" of type '" "char const *""'");
   29878             :   }
   29879          16 :   arg2 = reinterpret_cast< char * >(buf2);
   29880          16 :   if (swig_obj[2]) {
   29881           0 :     {
   29882             :       /* %typemap(in) char **dict */
   29883           0 :       arg3 = NULL;
   29884           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   29885           0 :         int bErr = FALSE;
   29886           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   29887           0 :         if ( bErr )
   29888             :         {
   29889           0 :           SWIG_fail;
   29890             :         }
   29891             :       }
   29892           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   29893           0 :         int bErr = FALSE;
   29894           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   29895           0 :         if ( bErr )
   29896             :         {
   29897           0 :           SWIG_fail;
   29898             :         }
   29899             :       }
   29900             :       else {
   29901           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   29902           0 :         SWIG_fail;
   29903             :       }
   29904             :     }
   29905             :   }
   29906          16 :   {
   29907          16 :     if (!arg2) {
   29908           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   29909             :     }
   29910             :   }
   29911          16 :   {
   29912          16 :     const int bLocalUseExceptions = GetUseExceptions();
   29913          16 :     if ( bLocalUseExceptions ) {
   29914           8 :       pushErrorHandler();
   29915             :     }
   29916          16 :     {
   29917          16 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   29918          16 :       result = (GDALMDArrayHS *)GDALGroupHS_OpenMDArrayFromFullname(arg1,(char const *)arg2,arg3);
   29919          16 :       SWIG_PYTHON_THREAD_END_ALLOW;
   29920             :     }
   29921          16 :     if ( bLocalUseExceptions ) {
   29922           8 :       popErrorHandler();
   29923             :     }
   29924             : #ifndef SED_HACKS
   29925             :     if ( bLocalUseExceptions ) {
   29926             :       CPLErr eclass = CPLGetLastErrorType();
   29927             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   29928             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   29929             :       }
   29930             :     }
   29931             : #endif
   29932             :   }
   29933          16 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   29934          16 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   29935          16 :   {
   29936             :     /* %typemap(freearg) char **dict */
   29937          16 :     CSLDestroy( arg3 );
   29938             :   }
   29939          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; } }
   29940             :   return resultobj;
   29941           0 : fail:
   29942           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   29943           0 :   {
   29944             :     /* %typemap(freearg) char **dict */
   29945           0 :     CSLDestroy( arg3 );
   29946             :   }
   29947             :   return NULL;
   29948             : }
   29949             : 
   29950             : 
   29951          19 : SWIGINTERN PyObject *_wrap_Group_ResolveMDArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   29952          19 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   29953          19 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   29954          19 :   char *arg2 = (char *) 0 ;
   29955          19 :   char *arg3 = (char *) 0 ;
   29956          19 :   char **arg4 = (char **) 0 ;
   29957          19 :   void *argp1 = 0 ;
   29958          19 :   int res1 = 0 ;
   29959          19 :   int res2 ;
   29960          19 :   char *buf2 = 0 ;
   29961          19 :   int alloc2 = 0 ;
   29962          19 :   int res3 ;
   29963          19 :   char *buf3 = 0 ;
   29964          19 :   int alloc3 = 0 ;
   29965          19 :   PyObject *swig_obj[4] ;
   29966          19 :   GDALMDArrayHS *result = 0 ;
   29967             :   
   29968          19 :   if (!SWIG_Python_UnpackTuple(args, "Group_ResolveMDArray", 3, 4, swig_obj)) SWIG_fail;
   29969          19 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   29970          19 :   if (!SWIG_IsOK(res1)) {
   29971           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_ResolveMDArray" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   29972             :   }
   29973          19 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   29974          19 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   29975          19 :   if (!SWIG_IsOK(res2)) {
   29976           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_ResolveMDArray" "', argument " "2"" of type '" "char const *""'");
   29977             :   }
   29978          19 :   arg2 = reinterpret_cast< char * >(buf2);
   29979          19 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   29980          19 :   if (!SWIG_IsOK(res3)) {
   29981           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Group_ResolveMDArray" "', argument " "3"" of type '" "char const *""'");
   29982             :   }
   29983          19 :   arg3 = reinterpret_cast< char * >(buf3);
   29984          19 :   if (swig_obj[3]) {
   29985           0 :     {
   29986             :       /* %typemap(in) char **dict */
   29987           0 :       arg4 = NULL;
   29988           0 :       if ( PySequence_Check( swig_obj[3] ) ) {
   29989           0 :         int bErr = FALSE;
   29990           0 :         arg4 = CSLFromPySequence(swig_obj[3], &bErr);
   29991           0 :         if ( bErr )
   29992             :         {
   29993           0 :           SWIG_fail;
   29994             :         }
   29995             :       }
   29996           0 :       else if ( PyMapping_Check( swig_obj[3] ) ) {
   29997           0 :         int bErr = FALSE;
   29998           0 :         arg4 = CSLFromPyMapping(swig_obj[3], &bErr);
   29999           0 :         if ( bErr )
   30000             :         {
   30001           0 :           SWIG_fail;
   30002             :         }
   30003             :       }
   30004             :       else {
   30005           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30006           0 :         SWIG_fail;
   30007             :       }
   30008             :     }
   30009             :   }
   30010          19 :   {
   30011          19 :     if (!arg2) {
   30012           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   30013             :     }
   30014             :   }
   30015          19 :   {
   30016          19 :     const int bLocalUseExceptions = GetUseExceptions();
   30017          19 :     if ( bLocalUseExceptions ) {
   30018           1 :       pushErrorHandler();
   30019             :     }
   30020          19 :     {
   30021          19 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30022          19 :       result = (GDALMDArrayHS *)GDALGroupHS_ResolveMDArray(arg1,(char const *)arg2,(char const *)arg3,arg4);
   30023          19 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30024             :     }
   30025          19 :     if ( bLocalUseExceptions ) {
   30026           1 :       popErrorHandler();
   30027             :     }
   30028             : #ifndef SED_HACKS
   30029             :     if ( bLocalUseExceptions ) {
   30030             :       CPLErr eclass = CPLGetLastErrorType();
   30031             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30032             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30033             :       }
   30034             :     }
   30035             : #endif
   30036             :   }
   30037          19 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   30038          19 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30039          19 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   30040          19 :   {
   30041             :     /* %typemap(freearg) char **dict */
   30042          19 :     CSLDestroy( arg4 );
   30043             :   }
   30044          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; } }
   30045             :   return resultobj;
   30046           0 : fail:
   30047           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30048           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   30049           0 :   {
   30050             :     /* %typemap(freearg) char **dict */
   30051           0 :     CSLDestroy( arg4 );
   30052             :   }
   30053             :   return NULL;
   30054             : }
   30055             : 
   30056             : 
   30057          97 : SWIGINTERN PyObject *_wrap_Group_GetGroupNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30058          97 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30059          97 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30060          97 :   char **arg2 = (char **) 0 ;
   30061          97 :   void *argp1 = 0 ;
   30062          97 :   int res1 = 0 ;
   30063          97 :   PyObject *swig_obj[2] ;
   30064          97 :   char **result = 0 ;
   30065             :   
   30066          97 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetGroupNames", 1, 2, swig_obj)) SWIG_fail;
   30067          97 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30068          97 :   if (!SWIG_IsOK(res1)) {
   30069           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetGroupNames" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30070             :   }
   30071          97 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30072          97 :   if (swig_obj[1]) {
   30073          97 :     {
   30074             :       /* %typemap(in) char **dict */
   30075          97 :       arg2 = NULL;
   30076          97 :       if ( PySequence_Check( swig_obj[1] ) ) {
   30077          97 :         int bErr = FALSE;
   30078          97 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   30079          97 :         if ( bErr )
   30080             :         {
   30081           0 :           SWIG_fail;
   30082             :         }
   30083             :       }
   30084           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   30085           0 :         int bErr = FALSE;
   30086           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   30087           0 :         if ( bErr )
   30088             :         {
   30089           0 :           SWIG_fail;
   30090             :         }
   30091             :       }
   30092             :       else {
   30093           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30094           0 :         SWIG_fail;
   30095             :       }
   30096             :     }
   30097             :   }
   30098          97 :   {
   30099          97 :     const int bLocalUseExceptions = GetUseExceptions();
   30100          97 :     if ( bLocalUseExceptions ) {
   30101          51 :       pushErrorHandler();
   30102             :     }
   30103          97 :     {
   30104          97 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30105          97 :       result = (char **)GDALGroupHS_GetGroupNames(arg1,arg2);
   30106          97 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30107             :     }
   30108          97 :     if ( bLocalUseExceptions ) {
   30109          51 :       popErrorHandler();
   30110             :     }
   30111             : #ifndef SED_HACKS
   30112             :     if ( bLocalUseExceptions ) {
   30113             :       CPLErr eclass = CPLGetLastErrorType();
   30114             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30115             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30116             :       }
   30117             :     }
   30118             : #endif
   30119             :   }
   30120          97 :   {
   30121             :     /* %typemap(out) char **CSL -> ( string ) */
   30122          97 :     bool bErr = false;
   30123          97 :     resultobj = CSLToList(result, &bErr);
   30124          97 :     CSLDestroy(result);
   30125          97 :     if( bErr ) {
   30126           0 :       SWIG_fail;
   30127             :     }
   30128             :   }
   30129          97 :   {
   30130             :     /* %typemap(freearg) char **dict */
   30131          97 :     CSLDestroy( arg2 );
   30132             :   }
   30133          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; } }
   30134             :   return resultobj;
   30135           0 : fail:
   30136           0 :   {
   30137             :     /* %typemap(freearg) char **dict */
   30138           0 :     CSLDestroy( arg2 );
   30139             :   }
   30140             :   return NULL;
   30141             : }
   30142             : 
   30143             : 
   30144         163 : SWIGINTERN PyObject *_wrap_Group_OpenGroup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30145         163 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30146         163 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30147         163 :   char *arg2 = (char *) 0 ;
   30148         163 :   char **arg3 = (char **) 0 ;
   30149         163 :   void *argp1 = 0 ;
   30150         163 :   int res1 = 0 ;
   30151         163 :   int res2 ;
   30152         163 :   char *buf2 = 0 ;
   30153         163 :   int alloc2 = 0 ;
   30154         163 :   PyObject *swig_obj[3] ;
   30155         163 :   GDALGroupHS *result = 0 ;
   30156             :   
   30157         163 :   if (!SWIG_Python_UnpackTuple(args, "Group_OpenGroup", 2, 3, swig_obj)) SWIG_fail;
   30158         163 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30159         163 :   if (!SWIG_IsOK(res1)) {
   30160           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_OpenGroup" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30161             :   }
   30162         163 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30163         163 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   30164         163 :   if (!SWIG_IsOK(res2)) {
   30165           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_OpenGroup" "', argument " "2"" of type '" "char const *""'");
   30166             :   }
   30167         163 :   arg2 = reinterpret_cast< char * >(buf2);
   30168         163 :   if (swig_obj[2]) {
   30169           1 :     {
   30170             :       /* %typemap(in) char **dict */
   30171           1 :       arg3 = NULL;
   30172           1 :       if ( PySequence_Check( swig_obj[2] ) ) {
   30173           1 :         int bErr = FALSE;
   30174           1 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   30175           1 :         if ( bErr )
   30176             :         {
   30177           0 :           SWIG_fail;
   30178             :         }
   30179             :       }
   30180           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   30181           0 :         int bErr = FALSE;
   30182           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   30183           0 :         if ( bErr )
   30184             :         {
   30185           0 :           SWIG_fail;
   30186             :         }
   30187             :       }
   30188             :       else {
   30189           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30190           0 :         SWIG_fail;
   30191             :       }
   30192             :     }
   30193             :   }
   30194         163 :   {
   30195         163 :     if (!arg2) {
   30196           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   30197             :     }
   30198             :   }
   30199         163 :   {
   30200         163 :     const int bLocalUseExceptions = GetUseExceptions();
   30201         163 :     if ( bLocalUseExceptions ) {
   30202          97 :       pushErrorHandler();
   30203             :     }
   30204         163 :     {
   30205         163 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30206         163 :       result = (GDALGroupHS *)GDALGroupHS_OpenGroup(arg1,(char const *)arg2,arg3);
   30207         163 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30208             :     }
   30209         163 :     if ( bLocalUseExceptions ) {
   30210          97 :       popErrorHandler();
   30211             :     }
   30212             : #ifndef SED_HACKS
   30213             :     if ( bLocalUseExceptions ) {
   30214             :       CPLErr eclass = CPLGetLastErrorType();
   30215             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30216             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30217             :       }
   30218             :     }
   30219             : #endif
   30220             :   }
   30221         163 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_OWN |  0 );
   30222         163 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30223         163 :   {
   30224             :     /* %typemap(freearg) char **dict */
   30225         163 :     CSLDestroy( arg3 );
   30226             :   }
   30227         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; } }
   30228             :   return resultobj;
   30229           0 : fail:
   30230           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30231           0 :   {
   30232             :     /* %typemap(freearg) char **dict */
   30233           0 :     CSLDestroy( arg3 );
   30234             :   }
   30235             :   return NULL;
   30236             : }
   30237             : 
   30238             : 
   30239           3 : SWIGINTERN PyObject *_wrap_Group_OpenGroupFromFullname(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30240           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30241           3 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30242           3 :   char *arg2 = (char *) 0 ;
   30243           3 :   char **arg3 = (char **) 0 ;
   30244           3 :   void *argp1 = 0 ;
   30245           3 :   int res1 = 0 ;
   30246           3 :   int res2 ;
   30247           3 :   char *buf2 = 0 ;
   30248           3 :   int alloc2 = 0 ;
   30249           3 :   PyObject *swig_obj[3] ;
   30250           3 :   GDALGroupHS *result = 0 ;
   30251             :   
   30252           3 :   if (!SWIG_Python_UnpackTuple(args, "Group_OpenGroupFromFullname", 2, 3, swig_obj)) SWIG_fail;
   30253           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30254           3 :   if (!SWIG_IsOK(res1)) {
   30255           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_OpenGroupFromFullname" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30256             :   }
   30257           3 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30258           3 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   30259           3 :   if (!SWIG_IsOK(res2)) {
   30260           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_OpenGroupFromFullname" "', argument " "2"" of type '" "char const *""'");
   30261             :   }
   30262           3 :   arg2 = reinterpret_cast< char * >(buf2);
   30263           3 :   if (swig_obj[2]) {
   30264           0 :     {
   30265             :       /* %typemap(in) char **dict */
   30266           0 :       arg3 = NULL;
   30267           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   30268           0 :         int bErr = FALSE;
   30269           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   30270           0 :         if ( bErr )
   30271             :         {
   30272           0 :           SWIG_fail;
   30273             :         }
   30274             :       }
   30275           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   30276           0 :         int bErr = FALSE;
   30277           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   30278           0 :         if ( bErr )
   30279             :         {
   30280           0 :           SWIG_fail;
   30281             :         }
   30282             :       }
   30283             :       else {
   30284           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30285           0 :         SWIG_fail;
   30286             :       }
   30287             :     }
   30288             :   }
   30289           3 :   {
   30290           3 :     if (!arg2) {
   30291           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   30292             :     }
   30293             :   }
   30294           3 :   {
   30295           3 :     const int bLocalUseExceptions = GetUseExceptions();
   30296           3 :     if ( bLocalUseExceptions ) {
   30297           1 :       pushErrorHandler();
   30298             :     }
   30299           3 :     {
   30300           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30301           3 :       result = (GDALGroupHS *)GDALGroupHS_OpenGroupFromFullname(arg1,(char const *)arg2,arg3);
   30302           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30303             :     }
   30304           3 :     if ( bLocalUseExceptions ) {
   30305           1 :       popErrorHandler();
   30306             :     }
   30307             : #ifndef SED_HACKS
   30308             :     if ( bLocalUseExceptions ) {
   30309             :       CPLErr eclass = CPLGetLastErrorType();
   30310             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30311             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30312             :       }
   30313             :     }
   30314             : #endif
   30315             :   }
   30316           3 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_OWN |  0 );
   30317           3 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30318           3 :   {
   30319             :     /* %typemap(freearg) char **dict */
   30320           3 :     CSLDestroy( arg3 );
   30321             :   }
   30322           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; } }
   30323             :   return resultobj;
   30324           0 : fail:
   30325           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30326           0 :   {
   30327             :     /* %typemap(freearg) char **dict */
   30328           0 :     CSLDestroy( arg3 );
   30329             :   }
   30330             :   return NULL;
   30331             : }
   30332             : 
   30333             : 
   30334           8 : SWIGINTERN PyObject *_wrap_Group_GetVectorLayerNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30335           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30336           8 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30337           8 :   char **arg2 = (char **) 0 ;
   30338           8 :   void *argp1 = 0 ;
   30339           8 :   int res1 = 0 ;
   30340           8 :   PyObject *swig_obj[2] ;
   30341           8 :   char **result = 0 ;
   30342             :   
   30343           8 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetVectorLayerNames", 1, 2, swig_obj)) SWIG_fail;
   30344           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30345           8 :   if (!SWIG_IsOK(res1)) {
   30346           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetVectorLayerNames" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30347             :   }
   30348           8 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30349           8 :   if (swig_obj[1]) {
   30350           0 :     {
   30351             :       /* %typemap(in) char **dict */
   30352           0 :       arg2 = NULL;
   30353           0 :       if ( PySequence_Check( swig_obj[1] ) ) {
   30354           0 :         int bErr = FALSE;
   30355           0 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   30356           0 :         if ( bErr )
   30357             :         {
   30358           0 :           SWIG_fail;
   30359             :         }
   30360             :       }
   30361           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   30362           0 :         int bErr = FALSE;
   30363           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   30364           0 :         if ( bErr )
   30365             :         {
   30366           0 :           SWIG_fail;
   30367             :         }
   30368             :       }
   30369             :       else {
   30370           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30371           0 :         SWIG_fail;
   30372             :       }
   30373             :     }
   30374             :   }
   30375           8 :   {
   30376           8 :     const int bLocalUseExceptions = GetUseExceptions();
   30377           8 :     if ( bLocalUseExceptions ) {
   30378           0 :       pushErrorHandler();
   30379             :     }
   30380           8 :     {
   30381           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30382           8 :       result = (char **)GDALGroupHS_GetVectorLayerNames(arg1,arg2);
   30383           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30384             :     }
   30385           8 :     if ( bLocalUseExceptions ) {
   30386           0 :       popErrorHandler();
   30387             :     }
   30388             : #ifndef SED_HACKS
   30389             :     if ( bLocalUseExceptions ) {
   30390             :       CPLErr eclass = CPLGetLastErrorType();
   30391             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30392             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30393             :       }
   30394             :     }
   30395             : #endif
   30396             :   }
   30397           8 :   {
   30398             :     /* %typemap(out) char **CSL -> ( string ) */
   30399           8 :     bool bErr = false;
   30400           8 :     resultobj = CSLToList(result, &bErr);
   30401           8 :     CSLDestroy(result);
   30402           8 :     if( bErr ) {
   30403           0 :       SWIG_fail;
   30404             :     }
   30405             :   }
   30406           8 :   {
   30407             :     /* %typemap(freearg) char **dict */
   30408           8 :     CSLDestroy( arg2 );
   30409             :   }
   30410           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; } }
   30411             :   return resultobj;
   30412           0 : fail:
   30413           0 :   {
   30414             :     /* %typemap(freearg) char **dict */
   30415           0 :     CSLDestroy( arg2 );
   30416             :   }
   30417             :   return NULL;
   30418             : }
   30419             : 
   30420             : 
   30421          12 : SWIGINTERN PyObject *_wrap_Group_OpenVectorLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30422          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30423          12 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30424          12 :   char *arg2 = (char *) 0 ;
   30425          12 :   char **arg3 = (char **) 0 ;
   30426          12 :   void *argp1 = 0 ;
   30427          12 :   int res1 = 0 ;
   30428          12 :   int res2 ;
   30429          12 :   char *buf2 = 0 ;
   30430          12 :   int alloc2 = 0 ;
   30431          12 :   PyObject *swig_obj[3] ;
   30432          12 :   OGRLayerShadow *result = 0 ;
   30433             :   
   30434          12 :   if (!SWIG_Python_UnpackTuple(args, "Group_OpenVectorLayer", 2, 3, swig_obj)) SWIG_fail;
   30435          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30436          12 :   if (!SWIG_IsOK(res1)) {
   30437           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_OpenVectorLayer" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30438             :   }
   30439          12 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30440          12 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   30441          12 :   if (!SWIG_IsOK(res2)) {
   30442           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_OpenVectorLayer" "', argument " "2"" of type '" "char const *""'");
   30443             :   }
   30444          12 :   arg2 = reinterpret_cast< char * >(buf2);
   30445          12 :   if (swig_obj[2]) {
   30446           0 :     {
   30447             :       /* %typemap(in) char **dict */
   30448           0 :       arg3 = NULL;
   30449           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   30450           0 :         int bErr = FALSE;
   30451           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   30452           0 :         if ( bErr )
   30453             :         {
   30454           0 :           SWIG_fail;
   30455             :         }
   30456             :       }
   30457           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   30458           0 :         int bErr = FALSE;
   30459           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   30460           0 :         if ( bErr )
   30461             :         {
   30462           0 :           SWIG_fail;
   30463             :         }
   30464             :       }
   30465             :       else {
   30466           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30467           0 :         SWIG_fail;
   30468             :       }
   30469             :     }
   30470             :   }
   30471          12 :   {
   30472          12 :     if (!arg2) {
   30473           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   30474             :     }
   30475             :   }
   30476          12 :   {
   30477          12 :     const int bLocalUseExceptions = GetUseExceptions();
   30478          12 :     if ( bLocalUseExceptions ) {
   30479           1 :       pushErrorHandler();
   30480             :     }
   30481          12 :     {
   30482          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30483          12 :       result = (OGRLayerShadow *)GDALGroupHS_OpenVectorLayer(arg1,(char const *)arg2,arg3);
   30484          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30485             :     }
   30486          12 :     if ( bLocalUseExceptions ) {
   30487           1 :       popErrorHandler();
   30488             :     }
   30489             : #ifndef SED_HACKS
   30490             :     if ( bLocalUseExceptions ) {
   30491             :       CPLErr eclass = CPLGetLastErrorType();
   30492             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30493             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30494             :       }
   30495             :     }
   30496             : #endif
   30497             :   }
   30498          12 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   30499          12 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30500          12 :   {
   30501             :     /* %typemap(freearg) char **dict */
   30502          12 :     CSLDestroy( arg3 );
   30503             :   }
   30504          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; } }
   30505             :   return resultobj;
   30506           0 : fail:
   30507           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30508           0 :   {
   30509             :     /* %typemap(freearg) char **dict */
   30510           0 :     CSLDestroy( arg3 );
   30511             :   }
   30512             :   return NULL;
   30513             : }
   30514             : 
   30515             : 
   30516          73 : SWIGINTERN PyObject *_wrap_Group_GetDimensions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30517          73 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30518          73 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30519          73 :   GDALDimensionHS ***arg2 = (GDALDimensionHS ***) 0 ;
   30520          73 :   size_t *arg3 = (size_t *) 0 ;
   30521          73 :   char **arg4 = (char **) 0 ;
   30522          73 :   void *argp1 = 0 ;
   30523          73 :   int res1 = 0 ;
   30524          73 :   GDALDimensionHS **dims2 = 0 ;
   30525          73 :   size_t nCount2 = 0 ;
   30526          73 :   PyObject *swig_obj[2] ;
   30527             :   
   30528          73 :   {
   30529             :     /* %typemap(in,numinputs=0) (GDALDimensionHS*** pdims, size_t* pnCount) */
   30530          73 :     arg2 = &dims2;
   30531          73 :     arg3 = &nCount2;
   30532             :   }
   30533          73 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetDimensions", 1, 2, swig_obj)) SWIG_fail;
   30534          73 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30535          73 :   if (!SWIG_IsOK(res1)) {
   30536           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetDimensions" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30537             :   }
   30538          73 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30539          73 :   if (swig_obj[1]) {
   30540           0 :     {
   30541             :       /* %typemap(in) char **dict */
   30542           0 :       arg4 = NULL;
   30543           0 :       if ( PySequence_Check( swig_obj[1] ) ) {
   30544           0 :         int bErr = FALSE;
   30545           0 :         arg4 = CSLFromPySequence(swig_obj[1], &bErr);
   30546           0 :         if ( bErr )
   30547             :         {
   30548           0 :           SWIG_fail;
   30549             :         }
   30550             :       }
   30551           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   30552           0 :         int bErr = FALSE;
   30553           0 :         arg4 = CSLFromPyMapping(swig_obj[1], &bErr);
   30554           0 :         if ( bErr )
   30555             :         {
   30556           0 :           SWIG_fail;
   30557             :         }
   30558             :       }
   30559             :       else {
   30560           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30561           0 :         SWIG_fail;
   30562             :       }
   30563             :     }
   30564             :   }
   30565          73 :   {
   30566          73 :     const int bLocalUseExceptions = GetUseExceptions();
   30567          73 :     if ( bLocalUseExceptions ) {
   30568          40 :       pushErrorHandler();
   30569             :     }
   30570          73 :     {
   30571          73 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30572          73 :       GDALGroupHS_GetDimensions(arg1,arg2,arg3,arg4);
   30573          73 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30574             :     }
   30575          73 :     if ( bLocalUseExceptions ) {
   30576          40 :       popErrorHandler();
   30577             :     }
   30578             : #ifndef SED_HACKS
   30579             :     if ( bLocalUseExceptions ) {
   30580             :       CPLErr eclass = CPLGetLastErrorType();
   30581             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30582             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30583             :       }
   30584             :     }
   30585             : #endif
   30586             :   }
   30587          73 :   resultobj = SWIG_Py_Void();
   30588          73 :   {
   30589             :     /* %typemap(argout) (GDALDimensionHS*** pdims, size_t* pnCount) */
   30590          73 :     Py_DECREF(resultobj);
   30591          73 :     resultobj = PyList_New( *arg3 );
   30592          73 :     if( !resultobj ) {
   30593           0 :       SWIG_fail;
   30594             :     }
   30595         230 :     for( size_t i = 0; i < *arg3; i++ ) {
   30596         157 :       PyList_SetItem(resultobj, i,
   30597         157 :         SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALDimensionHS,SWIG_POINTER_OWN) );
   30598             :       /* We have borrowed the GDALDimensionHS */
   30599         157 :       (*arg2)[i] = NULL;
   30600             :     }
   30601             :   }
   30602          73 :   {
   30603             :     /* %typemap(freearg) (GDALDimensionHS*** pdims, size_t* pnCount) */
   30604          73 :     GDALReleaseDimensions(*arg2, *arg3);
   30605             :   }
   30606          73 :   {
   30607             :     /* %typemap(freearg) char **dict */
   30608          73 :     CSLDestroy( arg4 );
   30609             :   }
   30610          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; } }
   30611             :   return resultobj;
   30612           0 : fail:
   30613           0 :   {
   30614             :     /* %typemap(freearg) (GDALDimensionHS*** pdims, size_t* pnCount) */
   30615           0 :     GDALReleaseDimensions(*arg2, *arg3);
   30616             :   }
   30617           0 :   {
   30618             :     /* %typemap(freearg) char **dict */
   30619           0 :     CSLDestroy( arg4 );
   30620             :   }
   30621             :   return NULL;
   30622             : }
   30623             : 
   30624             : 
   30625          80 : SWIGINTERN PyObject *_wrap_Group_GetAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30626          80 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30627          80 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30628          80 :   char *arg2 = (char *) 0 ;
   30629          80 :   void *argp1 = 0 ;
   30630          80 :   int res1 = 0 ;
   30631          80 :   int res2 ;
   30632          80 :   char *buf2 = 0 ;
   30633          80 :   int alloc2 = 0 ;
   30634          80 :   PyObject *swig_obj[2] ;
   30635          80 :   GDALAttributeHS *result = 0 ;
   30636             :   
   30637          80 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetAttribute", 2, 2, swig_obj)) SWIG_fail;
   30638          80 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30639          80 :   if (!SWIG_IsOK(res1)) {
   30640           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetAttribute" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30641             :   }
   30642          80 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30643          80 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   30644          80 :   if (!SWIG_IsOK(res2)) {
   30645           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_GetAttribute" "', argument " "2"" of type '" "char const *""'");
   30646             :   }
   30647          80 :   arg2 = reinterpret_cast< char * >(buf2);
   30648          80 :   {
   30649          80 :     if (!arg2) {
   30650           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   30651             :     }
   30652             :   }
   30653          80 :   {
   30654          80 :     const int bLocalUseExceptions = GetUseExceptions();
   30655          80 :     if ( bLocalUseExceptions ) {
   30656          22 :       pushErrorHandler();
   30657             :     }
   30658          80 :     {
   30659          80 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30660          80 :       result = (GDALAttributeHS *)GDALGroupHS_GetAttribute(arg1,(char const *)arg2);
   30661          80 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30662             :     }
   30663          80 :     if ( bLocalUseExceptions ) {
   30664          22 :       popErrorHandler();
   30665             :     }
   30666             : #ifndef SED_HACKS
   30667             :     if ( bLocalUseExceptions ) {
   30668             :       CPLErr eclass = CPLGetLastErrorType();
   30669             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30670             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30671             :       }
   30672             :     }
   30673             : #endif
   30674             :   }
   30675          80 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAttributeHS, SWIG_POINTER_OWN |  0 );
   30676          80 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30677          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; } }
   30678             :   return resultobj;
   30679           0 : fail:
   30680           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30681             :   return NULL;
   30682             : }
   30683             : 
   30684             : 
   30685          71 : SWIGINTERN PyObject *_wrap_Group_GetAttributes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30686          71 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30687          71 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30688          71 :   GDALAttributeHS ***arg2 = (GDALAttributeHS ***) 0 ;
   30689          71 :   size_t *arg3 = (size_t *) 0 ;
   30690          71 :   char **arg4 = (char **) 0 ;
   30691          71 :   void *argp1 = 0 ;
   30692          71 :   int res1 = 0 ;
   30693          71 :   GDALAttributeHS **attrs2 = 0 ;
   30694          71 :   size_t nCount2 = 0 ;
   30695          71 :   PyObject *swig_obj[2] ;
   30696             :   
   30697          71 :   {
   30698             :     /* %typemap(in,numinputs=0) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   30699          71 :     arg2 = &attrs2;
   30700          71 :     arg3 = &nCount2;
   30701             :   }
   30702          71 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetAttributes", 1, 2, swig_obj)) SWIG_fail;
   30703          71 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30704          71 :   if (!SWIG_IsOK(res1)) {
   30705           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetAttributes" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30706             :   }
   30707          71 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30708          71 :   if (swig_obj[1]) {
   30709           0 :     {
   30710             :       /* %typemap(in) char **dict */
   30711           0 :       arg4 = NULL;
   30712           0 :       if ( PySequence_Check( swig_obj[1] ) ) {
   30713           0 :         int bErr = FALSE;
   30714           0 :         arg4 = CSLFromPySequence(swig_obj[1], &bErr);
   30715           0 :         if ( bErr )
   30716             :         {
   30717           0 :           SWIG_fail;
   30718             :         }
   30719             :       }
   30720           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   30721           0 :         int bErr = FALSE;
   30722           0 :         arg4 = CSLFromPyMapping(swig_obj[1], &bErr);
   30723           0 :         if ( bErr )
   30724             :         {
   30725           0 :           SWIG_fail;
   30726             :         }
   30727             :       }
   30728             :       else {
   30729           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30730           0 :         SWIG_fail;
   30731             :       }
   30732             :     }
   30733             :   }
   30734          71 :   {
   30735          71 :     const int bLocalUseExceptions = GetUseExceptions();
   30736          71 :     if ( bLocalUseExceptions ) {
   30737          35 :       pushErrorHandler();
   30738             :     }
   30739          71 :     {
   30740          71 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30741          71 :       GDALGroupHS_GetAttributes(arg1,arg2,arg3,arg4);
   30742          71 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30743             :     }
   30744          71 :     if ( bLocalUseExceptions ) {
   30745          35 :       popErrorHandler();
   30746             :     }
   30747             : #ifndef SED_HACKS
   30748             :     if ( bLocalUseExceptions ) {
   30749             :       CPLErr eclass = CPLGetLastErrorType();
   30750             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30751             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30752             :       }
   30753             :     }
   30754             : #endif
   30755             :   }
   30756          71 :   resultobj = SWIG_Py_Void();
   30757          71 :   {
   30758             :     /* %typemap(argout) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   30759          71 :     Py_DECREF(resultobj);
   30760          71 :     resultobj = PyList_New( *arg3 );
   30761          71 :     if( !resultobj ) {
   30762           0 :       SWIG_fail;
   30763             :     }
   30764         229 :     for( size_t i = 0; i < *arg3; i++ ) {
   30765         158 :       PyList_SetItem(resultobj, i,
   30766         158 :         SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALAttributeHS,SWIG_POINTER_OWN) );
   30767             :       /* We have borrowed the GDALAttributeHS */
   30768         158 :       (*arg2)[i] = NULL;
   30769             :     }
   30770             :   }
   30771          71 :   {
   30772             :     /* %typemap(freearg) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   30773          71 :     GDALReleaseAttributes(*arg2, *arg3);
   30774             :   }
   30775          71 :   {
   30776             :     /* %typemap(freearg) char **dict */
   30777          71 :     CSLDestroy( arg4 );
   30778             :   }
   30779          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; } }
   30780             :   return resultobj;
   30781           0 : fail:
   30782           0 :   {
   30783             :     /* %typemap(freearg) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   30784           0 :     GDALReleaseAttributes(*arg2, *arg3);
   30785             :   }
   30786           0 :   {
   30787             :     /* %typemap(freearg) char **dict */
   30788           0 :     CSLDestroy( arg4 );
   30789             :   }
   30790             :   return NULL;
   30791             : }
   30792             : 
   30793             : 
   30794           4 : SWIGINTERN PyObject *_wrap_Group_GetStructuralInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30795           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30796           4 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30797           4 :   void *argp1 = 0 ;
   30798           4 :   int res1 = 0 ;
   30799           4 :   PyObject *swig_obj[1] ;
   30800           4 :   char **result = 0 ;
   30801             :   
   30802           4 :   if (!args) SWIG_fail;
   30803           4 :   swig_obj[0] = args;
   30804           4 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30805           4 :   if (!SWIG_IsOK(res1)) {
   30806           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetStructuralInfo" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30807             :   }
   30808           4 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30809           4 :   {
   30810           4 :     const int bLocalUseExceptions = GetUseExceptions();
   30811           4 :     if ( bLocalUseExceptions ) {
   30812           0 :       pushErrorHandler();
   30813             :     }
   30814           4 :     {
   30815           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30816           4 :       result = (char **)GDALGroupHS_GetStructuralInfo(arg1);
   30817           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30818             :     }
   30819           4 :     if ( bLocalUseExceptions ) {
   30820           0 :       popErrorHandler();
   30821             :     }
   30822             : #ifndef SED_HACKS
   30823             :     if ( bLocalUseExceptions ) {
   30824             :       CPLErr eclass = CPLGetLastErrorType();
   30825             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30826             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30827             :       }
   30828             :     }
   30829             : #endif
   30830             :   }
   30831           4 :   {
   30832             :     /* %typemap(out) char **dict */
   30833           4 :     resultobj = GetCSLStringAsPyDict(result, false);
   30834             :   }
   30835           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; } }
   30836             :   return resultobj;
   30837             : fail:
   30838             :   return NULL;
   30839             : }
   30840             : 
   30841             : 
   30842         180 : SWIGINTERN PyObject *_wrap_Group_CreateGroup(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   30843         180 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30844         180 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30845         180 :   char *arg2 = (char *) 0 ;
   30846         180 :   char **arg3 = (char **) 0 ;
   30847         180 :   void *argp1 = 0 ;
   30848         180 :   int res1 = 0 ;
   30849         180 :   int res2 ;
   30850         180 :   char *buf2 = 0 ;
   30851         180 :   int alloc2 = 0 ;
   30852         180 :   PyObject * obj0 = 0 ;
   30853         180 :   PyObject * obj1 = 0 ;
   30854         180 :   PyObject * obj2 = 0 ;
   30855         180 :   char * kwnames[] = {
   30856             :     (char *)"self",  (char *)"name",  (char *)"options",  NULL 
   30857             :   };
   30858         180 :   GDALGroupHS *result = 0 ;
   30859             :   
   30860         180 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:Group_CreateGroup", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   30861         180 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30862         180 :   if (!SWIG_IsOK(res1)) {
   30863           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_CreateGroup" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30864             :   }
   30865         180 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30866         180 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   30867         180 :   if (!SWIG_IsOK(res2)) {
   30868           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_CreateGroup" "', argument " "2"" of type '" "char const *""'");
   30869             :   }
   30870         180 :   arg2 = reinterpret_cast< char * >(buf2);
   30871         180 :   if (obj2) {
   30872           0 :     {
   30873             :       /* %typemap(in) char **dict */
   30874           0 :       arg3 = NULL;
   30875           0 :       if ( PySequence_Check( obj2 ) ) {
   30876           0 :         int bErr = FALSE;
   30877           0 :         arg3 = CSLFromPySequence(obj2, &bErr);
   30878           0 :         if ( bErr )
   30879             :         {
   30880           0 :           SWIG_fail;
   30881             :         }
   30882             :       }
   30883           0 :       else if ( PyMapping_Check( obj2 ) ) {
   30884           0 :         int bErr = FALSE;
   30885           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   30886           0 :         if ( bErr )
   30887             :         {
   30888           0 :           SWIG_fail;
   30889             :         }
   30890             :       }
   30891             :       else {
   30892           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30893           0 :         SWIG_fail;
   30894             :       }
   30895             :     }
   30896             :   }
   30897         180 :   {
   30898         180 :     if (!arg2) {
   30899           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   30900             :     }
   30901             :   }
   30902         179 :   {
   30903         179 :     const int bLocalUseExceptions = GetUseExceptions();
   30904         179 :     if ( bLocalUseExceptions ) {
   30905          92 :       pushErrorHandler();
   30906             :     }
   30907         179 :     {
   30908         179 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   30909         179 :       result = (GDALGroupHS *)GDALGroupHS_CreateGroup(arg1,(char const *)arg2,arg3);
   30910         179 :       SWIG_PYTHON_THREAD_END_ALLOW;
   30911             :     }
   30912         179 :     if ( bLocalUseExceptions ) {
   30913          92 :       popErrorHandler();
   30914             :     }
   30915             : #ifndef SED_HACKS
   30916             :     if ( bLocalUseExceptions ) {
   30917             :       CPLErr eclass = CPLGetLastErrorType();
   30918             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   30919             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   30920             :       }
   30921             :     }
   30922             : #endif
   30923             :   }
   30924         179 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_OWN |  0 );
   30925         179 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30926         179 :   {
   30927             :     /* %typemap(freearg) char **dict */
   30928         179 :     CSLDestroy( arg3 );
   30929             :   }
   30930         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; } }
   30931             :   return resultobj;
   30932           1 : fail:
   30933           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   30934           1 :   {
   30935             :     /* %typemap(freearg) char **dict */
   30936           1 :     CSLDestroy( arg3 );
   30937             :   }
   30938             :   return NULL;
   30939             : }
   30940             : 
   30941             : 
   30942          20 : SWIGINTERN PyObject *_wrap_Group_DeleteGroup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   30943          20 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   30944          20 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   30945          20 :   char *arg2 = (char *) 0 ;
   30946          20 :   char **arg3 = (char **) 0 ;
   30947          20 :   void *argp1 = 0 ;
   30948          20 :   int res1 = 0 ;
   30949          20 :   int res2 ;
   30950          20 :   char *buf2 = 0 ;
   30951          20 :   int alloc2 = 0 ;
   30952          20 :   PyObject *swig_obj[3] ;
   30953          20 :   CPLErr result;
   30954             :   
   30955          20 :   if (!SWIG_Python_UnpackTuple(args, "Group_DeleteGroup", 2, 3, swig_obj)) SWIG_fail;
   30956          20 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   30957          20 :   if (!SWIG_IsOK(res1)) {
   30958           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_DeleteGroup" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   30959             :   }
   30960          20 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   30961          20 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   30962          20 :   if (!SWIG_IsOK(res2)) {
   30963           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_DeleteGroup" "', argument " "2"" of type '" "char const *""'");
   30964             :   }
   30965          20 :   arg2 = reinterpret_cast< char * >(buf2);
   30966          20 :   if (swig_obj[2]) {
   30967           0 :     {
   30968             :       /* %typemap(in) char **dict */
   30969           0 :       arg3 = NULL;
   30970           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   30971           0 :         int bErr = FALSE;
   30972           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   30973           0 :         if ( bErr )
   30974             :         {
   30975           0 :           SWIG_fail;
   30976             :         }
   30977             :       }
   30978           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   30979           0 :         int bErr = FALSE;
   30980           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   30981           0 :         if ( bErr )
   30982             :         {
   30983           0 :           SWIG_fail;
   30984             :         }
   30985             :       }
   30986             :       else {
   30987           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   30988           0 :         SWIG_fail;
   30989             :       }
   30990             :     }
   30991             :   }
   30992          20 :   {
   30993          20 :     if (!arg2) {
   30994           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   30995             :     }
   30996             :   }
   30997          20 :   {
   30998          20 :     const int bLocalUseExceptions = GetUseExceptions();
   30999          20 :     if ( bLocalUseExceptions ) {
   31000          20 :       pushErrorHandler();
   31001             :     }
   31002          20 :     {
   31003          20 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31004          20 :       result = (CPLErr)GDALGroupHS_DeleteGroup(arg1,(char const *)arg2,arg3);
   31005          20 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31006             :     }
   31007          20 :     if ( bLocalUseExceptions ) {
   31008          20 :       popErrorHandler();
   31009             :     }
   31010             : #ifndef SED_HACKS
   31011             :     if ( bLocalUseExceptions ) {
   31012             :       CPLErr eclass = CPLGetLastErrorType();
   31013             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31014             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31015             :       }
   31016             :     }
   31017             : #endif
   31018             :   }
   31019          20 :   resultobj = SWIG_From_int(static_cast< int >(result));
   31020          20 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31021          20 :   {
   31022             :     /* %typemap(freearg) char **dict */
   31023          20 :     CSLDestroy( arg3 );
   31024             :   }
   31025          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; } }
   31026             :   return resultobj;
   31027           0 : fail:
   31028           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31029           0 :   {
   31030             :     /* %typemap(freearg) char **dict */
   31031           0 :     CSLDestroy( arg3 );
   31032             :   }
   31033             :   return NULL;
   31034             : }
   31035             : 
   31036             : 
   31037         658 : SWIGINTERN PyObject *_wrap_Group_CreateDimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   31038         658 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31039         658 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31040         658 :   char *arg2 = (char *) 0 ;
   31041         658 :   char *arg3 = (char *) 0 ;
   31042         658 :   char *arg4 = (char *) 0 ;
   31043         658 :   GUIntBig arg5 ;
   31044         658 :   char **arg6 = (char **) 0 ;
   31045         658 :   void *argp1 = 0 ;
   31046         658 :   int res1 = 0 ;
   31047         658 :   int res2 ;
   31048         658 :   char *buf2 = 0 ;
   31049         658 :   int alloc2 = 0 ;
   31050         658 :   int res3 ;
   31051         658 :   char *buf3 = 0 ;
   31052         658 :   int alloc3 = 0 ;
   31053         658 :   int res4 ;
   31054         658 :   char *buf4 = 0 ;
   31055         658 :   int alloc4 = 0 ;
   31056         658 :   PyObject * obj0 = 0 ;
   31057         658 :   PyObject * obj1 = 0 ;
   31058         658 :   PyObject * obj2 = 0 ;
   31059         658 :   PyObject * obj3 = 0 ;
   31060         658 :   PyObject * obj4 = 0 ;
   31061         658 :   PyObject * obj5 = 0 ;
   31062         658 :   char * kwnames[] = {
   31063             :     (char *)"self",  (char *)"name",  (char *)"dim_type",  (char *)"direction",  (char *)"size",  (char *)"options",  NULL 
   31064             :   };
   31065         658 :   GDALDimensionHS *result = 0 ;
   31066             :   
   31067         658 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO|O:Group_CreateDimension", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
   31068         658 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31069         658 :   if (!SWIG_IsOK(res1)) {
   31070           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_CreateDimension" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31071             :   }
   31072         658 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31073         658 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   31074         658 :   if (!SWIG_IsOK(res2)) {
   31075           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_CreateDimension" "', argument " "2"" of type '" "char const *""'");
   31076             :   }
   31077         658 :   arg2 = reinterpret_cast< char * >(buf2);
   31078         658 :   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   31079         658 :   if (!SWIG_IsOK(res3)) {
   31080           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Group_CreateDimension" "', argument " "3"" of type '" "char const *""'");
   31081             :   }
   31082         658 :   arg3 = reinterpret_cast< char * >(buf3);
   31083         658 :   res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
   31084         658 :   if (!SWIG_IsOK(res4)) {
   31085           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Group_CreateDimension" "', argument " "4"" of type '" "char const *""'");
   31086             :   }
   31087         658 :   arg4 = reinterpret_cast< char * >(buf4);
   31088         658 :   {
   31089         658 :     arg5 = (GIntBig)PyLong_AsUnsignedLongLong(obj4);
   31090             :   }
   31091         658 :   if (obj5) {
   31092           7 :     {
   31093             :       /* %typemap(in) char **dict */
   31094           7 :       arg6 = NULL;
   31095           7 :       if ( PySequence_Check( obj5 ) ) {
   31096           7 :         int bErr = FALSE;
   31097           7 :         arg6 = CSLFromPySequence(obj5, &bErr);
   31098           7 :         if ( bErr )
   31099             :         {
   31100           0 :           SWIG_fail;
   31101             :         }
   31102             :       }
   31103           0 :       else if ( PyMapping_Check( obj5 ) ) {
   31104           0 :         int bErr = FALSE;
   31105           0 :         arg6 = CSLFromPyMapping(obj5, &bErr);
   31106           0 :         if ( bErr )
   31107             :         {
   31108           0 :           SWIG_fail;
   31109             :         }
   31110             :       }
   31111             :       else {
   31112           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   31113           0 :         SWIG_fail;
   31114             :       }
   31115             :     }
   31116             :   }
   31117         658 :   {
   31118         658 :     if (!arg2) {
   31119           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   31120             :     }
   31121             :   }
   31122         658 :   {
   31123         658 :     const int bLocalUseExceptions = GetUseExceptions();
   31124         658 :     if ( bLocalUseExceptions ) {
   31125         118 :       pushErrorHandler();
   31126             :     }
   31127         658 :     {
   31128         658 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31129         658 :       result = (GDALDimensionHS *)GDALGroupHS_CreateDimension(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5,arg6);
   31130         658 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31131             :     }
   31132         658 :     if ( bLocalUseExceptions ) {
   31133         118 :       popErrorHandler();
   31134             :     }
   31135             : #ifndef SED_HACKS
   31136             :     if ( bLocalUseExceptions ) {
   31137             :       CPLErr eclass = CPLGetLastErrorType();
   31138             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31139             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31140             :       }
   31141             :     }
   31142             : #endif
   31143             :   }
   31144         658 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDimensionHS, SWIG_POINTER_OWN |  0 );
   31145         658 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31146         658 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   31147         658 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   31148         658 :   {
   31149             :     /* %typemap(freearg) char **dict */
   31150         658 :     CSLDestroy( arg6 );
   31151             :   }
   31152         658 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   31153             :   return resultobj;
   31154           0 : fail:
   31155           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31156           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   31157           0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   31158           0 :   {
   31159             :     /* %typemap(freearg) char **dict */
   31160           0 :     CSLDestroy( arg6 );
   31161             :   }
   31162             :   return NULL;
   31163             : }
   31164             : 
   31165             : 
   31166         612 : SWIGINTERN PyObject *_wrap_Group_CreateMDArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31167         612 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31168         612 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31169         612 :   char *arg2 = (char *) 0 ;
   31170         612 :   int arg3 ;
   31171         612 :   GDALDimensionHS **arg4 = (GDALDimensionHS **) 0 ;
   31172         612 :   GDALExtendedDataTypeHS *arg5 = (GDALExtendedDataTypeHS *) 0 ;
   31173         612 :   char **arg6 = (char **) 0 ;
   31174         612 :   void *argp1 = 0 ;
   31175         612 :   int res1 = 0 ;
   31176         612 :   int res2 ;
   31177         612 :   char *buf2 = 0 ;
   31178         612 :   int alloc2 = 0 ;
   31179         612 :   void *argp5 = 0 ;
   31180         612 :   int res5 = 0 ;
   31181         612 :   PyObject *swig_obj[5] ;
   31182         612 :   GDALMDArrayHS *result = 0 ;
   31183             :   
   31184         612 :   if (!SWIG_Python_UnpackTuple(args, "Group_CreateMDArray", 4, 5, swig_obj)) SWIG_fail;
   31185         612 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31186         612 :   if (!SWIG_IsOK(res1)) {
   31187           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_CreateMDArray" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31188             :   }
   31189         612 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31190         612 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   31191         612 :   if (!SWIG_IsOK(res2)) {
   31192           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_CreateMDArray" "', argument " "2"" of type '" "char const *""'");
   31193             :   }
   31194         612 :   arg2 = reinterpret_cast< char * >(buf2);
   31195         612 :   {
   31196             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDimensionHS *optional_##GDALDimensionHS)*/
   31197         612 :     if ( !PySequence_Check(swig_obj[2]) ) {
   31198           1 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   31199           1 :       SWIG_fail;
   31200             :     }
   31201         611 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   31202         611 :     if( size > (Py_ssize_t)INT_MAX ) {
   31203           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   31204           0 :       SWIG_fail;
   31205             :     }
   31206         611 :     if( (size_t)size > SIZE_MAX / sizeof(GDALDimensionHS*) ) {
   31207           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   31208           0 :       SWIG_fail;
   31209             :     }
   31210         611 :     arg3 = (int)size;
   31211         611 :     arg4 = (GDALDimensionHS**) VSIMalloc(arg3*sizeof(GDALDimensionHS*));
   31212         611 :     if( !arg4) {
   31213           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   31214           0 :       SWIG_fail;
   31215             :     }
   31216             :     
   31217        1433 :     for( int i = 0; i<arg3; i++ ) {
   31218         824 :       PyObject *o = PySequence_GetItem(swig_obj[2],i);
   31219         824 :       GDALDimensionHS* rawobjectpointer = NULL;
   31220         824 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDimensionHS, SWIG_POINTER_EXCEPTION | 0 ));
   31221         824 :       if (!rawobjectpointer) {
   31222           2 :         Py_DECREF(o);
   31223           2 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALDimensionHS");
   31224           2 :         SWIG_fail;
   31225             :       }
   31226         822 :       arg4[i] = rawobjectpointer;
   31227         822 :       Py_DECREF(o);
   31228             :       
   31229             :     }
   31230             :   }
   31231         609 :   res5 = SWIG_ConvertPtr(swig_obj[3], &argp5,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   31232         609 :   if (!SWIG_IsOK(res5)) {
   31233           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Group_CreateMDArray" "', argument " "5"" of type '" "GDALExtendedDataTypeHS *""'"); 
   31234             :   }
   31235         609 :   arg5 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp5);
   31236         609 :   if (swig_obj[4]) {
   31237         134 :     {
   31238             :       /* %typemap(in) char **dict */
   31239         134 :       arg6 = NULL;
   31240         134 :       if ( PySequence_Check( swig_obj[4] ) ) {
   31241         134 :         int bErr = FALSE;
   31242         134 :         arg6 = CSLFromPySequence(swig_obj[4], &bErr);
   31243         134 :         if ( bErr )
   31244             :         {
   31245           0 :           SWIG_fail;
   31246             :         }
   31247             :       }
   31248           0 :       else if ( PyMapping_Check( swig_obj[4] ) ) {
   31249           0 :         int bErr = FALSE;
   31250           0 :         arg6 = CSLFromPyMapping(swig_obj[4], &bErr);
   31251           0 :         if ( bErr )
   31252             :         {
   31253           0 :           SWIG_fail;
   31254             :         }
   31255             :       }
   31256             :       else {
   31257           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   31258           0 :         SWIG_fail;
   31259             :       }
   31260             :     }
   31261             :   }
   31262         609 :   {
   31263         609 :     if (!arg2) {
   31264           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   31265             :     }
   31266             :   }
   31267         608 :   {
   31268         608 :     if (!arg5) {
   31269           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   31270             :     }
   31271             :   }
   31272         607 :   {
   31273         607 :     const int bLocalUseExceptions = GetUseExceptions();
   31274         607 :     if ( bLocalUseExceptions ) {
   31275         162 :       pushErrorHandler();
   31276             :     }
   31277         607 :     {
   31278         607 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31279         607 :       result = (GDALMDArrayHS *)GDALGroupHS_CreateMDArray(arg1,(char const *)arg2,arg3,arg4,arg5,arg6);
   31280         607 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31281             :     }
   31282         607 :     if ( bLocalUseExceptions ) {
   31283         162 :       popErrorHandler();
   31284             :     }
   31285             : #ifndef SED_HACKS
   31286             :     if ( bLocalUseExceptions ) {
   31287             :       CPLErr eclass = CPLGetLastErrorType();
   31288             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31289             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31290             :       }
   31291             :     }
   31292             : #endif
   31293             :   }
   31294         607 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   31295         607 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31296         607 :   {
   31297             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDimensionHS **poObjects)*/
   31298         607 :     CPLFree( arg4 );
   31299             :   }
   31300         607 :   {
   31301             :     /* %typemap(freearg) char **dict */
   31302         607 :     CSLDestroy( arg6 );
   31303             :   }
   31304         624 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   31305             :   return resultobj;
   31306           5 : fail:
   31307           5 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31308           5 :   {
   31309             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDimensionHS **poObjects)*/
   31310           5 :     CPLFree( arg4 );
   31311             :   }
   31312           5 :   {
   31313             :     /* %typemap(freearg) char **dict */
   31314           5 :     CSLDestroy( arg6 );
   31315             :   }
   31316             :   return NULL;
   31317             : }
   31318             : 
   31319             : 
   31320          20 : SWIGINTERN PyObject *_wrap_Group_DeleteMDArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31321          20 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31322          20 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31323          20 :   char *arg2 = (char *) 0 ;
   31324          20 :   char **arg3 = (char **) 0 ;
   31325          20 :   void *argp1 = 0 ;
   31326          20 :   int res1 = 0 ;
   31327          20 :   int res2 ;
   31328          20 :   char *buf2 = 0 ;
   31329          20 :   int alloc2 = 0 ;
   31330          20 :   PyObject *swig_obj[3] ;
   31331          20 :   CPLErr result;
   31332             :   
   31333          20 :   if (!SWIG_Python_UnpackTuple(args, "Group_DeleteMDArray", 2, 3, swig_obj)) SWIG_fail;
   31334          20 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31335          20 :   if (!SWIG_IsOK(res1)) {
   31336           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_DeleteMDArray" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31337             :   }
   31338          20 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31339          20 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   31340          20 :   if (!SWIG_IsOK(res2)) {
   31341           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_DeleteMDArray" "', argument " "2"" of type '" "char const *""'");
   31342             :   }
   31343          20 :   arg2 = reinterpret_cast< char * >(buf2);
   31344          20 :   if (swig_obj[2]) {
   31345           0 :     {
   31346             :       /* %typemap(in) char **dict */
   31347           0 :       arg3 = NULL;
   31348           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   31349           0 :         int bErr = FALSE;
   31350           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   31351           0 :         if ( bErr )
   31352             :         {
   31353           0 :           SWIG_fail;
   31354             :         }
   31355             :       }
   31356           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   31357           0 :         int bErr = FALSE;
   31358           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   31359           0 :         if ( bErr )
   31360             :         {
   31361           0 :           SWIG_fail;
   31362             :         }
   31363             :       }
   31364             :       else {
   31365           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   31366           0 :         SWIG_fail;
   31367             :       }
   31368             :     }
   31369             :   }
   31370          20 :   {
   31371          20 :     if (!arg2) {
   31372           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   31373             :     }
   31374             :   }
   31375          20 :   {
   31376          20 :     const int bLocalUseExceptions = GetUseExceptions();
   31377          20 :     if ( bLocalUseExceptions ) {
   31378          20 :       pushErrorHandler();
   31379             :     }
   31380          20 :     {
   31381          20 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31382          20 :       result = (CPLErr)GDALGroupHS_DeleteMDArray(arg1,(char const *)arg2,arg3);
   31383          20 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31384             :     }
   31385          20 :     if ( bLocalUseExceptions ) {
   31386          20 :       popErrorHandler();
   31387             :     }
   31388             : #ifndef SED_HACKS
   31389             :     if ( bLocalUseExceptions ) {
   31390             :       CPLErr eclass = CPLGetLastErrorType();
   31391             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31392             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31393             :       }
   31394             :     }
   31395             : #endif
   31396             :   }
   31397          20 :   resultobj = SWIG_From_int(static_cast< int >(result));
   31398          20 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31399          20 :   {
   31400             :     /* %typemap(freearg) char **dict */
   31401          20 :     CSLDestroy( arg3 );
   31402             :   }
   31403          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; } }
   31404             :   return resultobj;
   31405           0 : fail:
   31406           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31407           0 :   {
   31408             :     /* %typemap(freearg) char **dict */
   31409           0 :     CSLDestroy( arg3 );
   31410             :   }
   31411             :   return NULL;
   31412             : }
   31413             : 
   31414             : 
   31415         126 : SWIGINTERN PyObject *_wrap_Group_CreateAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31416         126 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31417         126 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31418         126 :   char *arg2 = (char *) 0 ;
   31419         126 :   int arg3 ;
   31420         126 :   GUIntBig *arg4 = (GUIntBig *) 0 ;
   31421         126 :   GDALExtendedDataTypeHS *arg5 = (GDALExtendedDataTypeHS *) 0 ;
   31422         126 :   char **arg6 = (char **) 0 ;
   31423         126 :   void *argp1 = 0 ;
   31424         126 :   int res1 = 0 ;
   31425         126 :   int res2 ;
   31426         126 :   char *buf2 = 0 ;
   31427         126 :   int alloc2 = 0 ;
   31428         126 :   void *argp5 = 0 ;
   31429         126 :   int res5 = 0 ;
   31430         126 :   PyObject *swig_obj[5] ;
   31431         126 :   GDALAttributeHS *result = 0 ;
   31432             :   
   31433         126 :   if (!SWIG_Python_UnpackTuple(args, "Group_CreateAttribute", 4, 5, swig_obj)) SWIG_fail;
   31434         126 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31435         126 :   if (!SWIG_IsOK(res1)) {
   31436           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_CreateAttribute" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31437             :   }
   31438         126 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31439         126 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   31440         126 :   if (!SWIG_IsOK(res2)) {
   31441           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_CreateAttribute" "', argument " "2"" of type '" "char const *""'");
   31442             :   }
   31443         126 :   arg2 = reinterpret_cast< char * >(buf2);
   31444         126 :   {
   31445             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   31446         126 :     arg4 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg3);
   31447         126 :     if( arg3 < 0 ) {
   31448           0 :       SWIG_fail;
   31449             :     }
   31450             :   }
   31451         126 :   res5 = SWIG_ConvertPtr(swig_obj[3], &argp5,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   31452         126 :   if (!SWIG_IsOK(res5)) {
   31453           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Group_CreateAttribute" "', argument " "5"" of type '" "GDALExtendedDataTypeHS *""'"); 
   31454             :   }
   31455         126 :   arg5 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp5);
   31456         126 :   if (swig_obj[4]) {
   31457           6 :     {
   31458             :       /* %typemap(in) char **dict */
   31459           6 :       arg6 = NULL;
   31460           6 :       if ( PySequence_Check( swig_obj[4] ) ) {
   31461           6 :         int bErr = FALSE;
   31462           6 :         arg6 = CSLFromPySequence(swig_obj[4], &bErr);
   31463           6 :         if ( bErr )
   31464             :         {
   31465           0 :           SWIG_fail;
   31466             :         }
   31467             :       }
   31468           0 :       else if ( PyMapping_Check( swig_obj[4] ) ) {
   31469           0 :         int bErr = FALSE;
   31470           0 :         arg6 = CSLFromPyMapping(swig_obj[4], &bErr);
   31471           0 :         if ( bErr )
   31472             :         {
   31473           0 :           SWIG_fail;
   31474             :         }
   31475             :       }
   31476             :       else {
   31477           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   31478           0 :         SWIG_fail;
   31479             :       }
   31480             :     }
   31481             :   }
   31482         126 :   {
   31483         126 :     if (!arg2) {
   31484           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   31485             :     }
   31486             :   }
   31487         125 :   {
   31488         125 :     if (!arg5) {
   31489           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   31490             :     }
   31491             :   }
   31492         125 :   {
   31493         125 :     const int bLocalUseExceptions = GetUseExceptions();
   31494         125 :     if ( bLocalUseExceptions ) {
   31495          53 :       pushErrorHandler();
   31496             :     }
   31497         125 :     {
   31498         125 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31499         125 :       result = (GDALAttributeHS *)GDALGroupHS_CreateAttribute(arg1,(char const *)arg2,arg3,arg4,arg5,arg6);
   31500         125 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31501             :     }
   31502         125 :     if ( bLocalUseExceptions ) {
   31503          53 :       popErrorHandler();
   31504             :     }
   31505             : #ifndef SED_HACKS
   31506             :     if ( bLocalUseExceptions ) {
   31507             :       CPLErr eclass = CPLGetLastErrorType();
   31508             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31509             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31510             :       }
   31511             :     }
   31512             : #endif
   31513             :   }
   31514         125 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAttributeHS, SWIG_POINTER_OWN |  0 );
   31515         125 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31516         125 :   {
   31517             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   31518         125 :     free(arg4);
   31519             :   }
   31520         125 :   {
   31521             :     /* %typemap(freearg) char **dict */
   31522         125 :     CSLDestroy( arg6 );
   31523             :   }
   31524         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; } }
   31525             :   return resultobj;
   31526           1 : fail:
   31527           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31528           1 :   {
   31529             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   31530           1 :     free(arg4);
   31531             :   }
   31532           1 :   {
   31533             :     /* %typemap(freearg) char **dict */
   31534           1 :     CSLDestroy( arg6 );
   31535             :   }
   31536             :   return NULL;
   31537             : }
   31538             : 
   31539             : 
   31540          25 : SWIGINTERN PyObject *_wrap_Group_DeleteAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31541          25 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31542          25 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31543          25 :   char *arg2 = (char *) 0 ;
   31544          25 :   char **arg3 = (char **) 0 ;
   31545          25 :   void *argp1 = 0 ;
   31546          25 :   int res1 = 0 ;
   31547          25 :   int res2 ;
   31548          25 :   char *buf2 = 0 ;
   31549          25 :   int alloc2 = 0 ;
   31550          25 :   PyObject *swig_obj[3] ;
   31551          25 :   CPLErr result;
   31552             :   
   31553          25 :   if (!SWIG_Python_UnpackTuple(args, "Group_DeleteAttribute", 2, 3, swig_obj)) SWIG_fail;
   31554          25 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31555          25 :   if (!SWIG_IsOK(res1)) {
   31556           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_DeleteAttribute" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31557             :   }
   31558          25 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31559          25 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   31560          25 :   if (!SWIG_IsOK(res2)) {
   31561           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_DeleteAttribute" "', argument " "2"" of type '" "char const *""'");
   31562             :   }
   31563          25 :   arg2 = reinterpret_cast< char * >(buf2);
   31564          25 :   if (swig_obj[2]) {
   31565           0 :     {
   31566             :       /* %typemap(in) char **dict */
   31567           0 :       arg3 = NULL;
   31568           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   31569           0 :         int bErr = FALSE;
   31570           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   31571           0 :         if ( bErr )
   31572             :         {
   31573           0 :           SWIG_fail;
   31574             :         }
   31575             :       }
   31576           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   31577           0 :         int bErr = FALSE;
   31578           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   31579           0 :         if ( bErr )
   31580             :         {
   31581           0 :           SWIG_fail;
   31582             :         }
   31583             :       }
   31584             :       else {
   31585           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   31586           0 :         SWIG_fail;
   31587             :       }
   31588             :     }
   31589             :   }
   31590          25 :   {
   31591          25 :     if (!arg2) {
   31592           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   31593             :     }
   31594             :   }
   31595          25 :   {
   31596          25 :     const int bLocalUseExceptions = GetUseExceptions();
   31597          25 :     if ( bLocalUseExceptions ) {
   31598          25 :       pushErrorHandler();
   31599             :     }
   31600          25 :     {
   31601          25 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31602          25 :       result = (CPLErr)GDALGroupHS_DeleteAttribute(arg1,(char const *)arg2,arg3);
   31603          25 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31604             :     }
   31605          25 :     if ( bLocalUseExceptions ) {
   31606          25 :       popErrorHandler();
   31607             :     }
   31608             : #ifndef SED_HACKS
   31609             :     if ( bLocalUseExceptions ) {
   31610             :       CPLErr eclass = CPLGetLastErrorType();
   31611             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31612             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31613             :       }
   31614             :     }
   31615             : #endif
   31616             :   }
   31617          25 :   resultobj = SWIG_From_int(static_cast< int >(result));
   31618          25 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31619          25 :   {
   31620             :     /* %typemap(freearg) char **dict */
   31621          25 :     CSLDestroy( arg3 );
   31622             :   }
   31623          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; } }
   31624             :   return resultobj;
   31625           0 : fail:
   31626           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31627           0 :   {
   31628             :     /* %typemap(freearg) char **dict */
   31629           0 :     CSLDestroy( arg3 );
   31630             :   }
   31631             :   return NULL;
   31632             : }
   31633             : 
   31634             : 
   31635          45 : SWIGINTERN PyObject *_wrap_Group_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31636          45 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31637          45 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31638          45 :   char *arg2 = (char *) 0 ;
   31639          45 :   void *argp1 = 0 ;
   31640          45 :   int res1 = 0 ;
   31641          45 :   int res2 ;
   31642          45 :   char *buf2 = 0 ;
   31643          45 :   int alloc2 = 0 ;
   31644          45 :   PyObject *swig_obj[2] ;
   31645          45 :   CPLErr result;
   31646             :   
   31647          45 :   if (!SWIG_Python_UnpackTuple(args, "Group_Rename", 2, 2, swig_obj)) SWIG_fail;
   31648          45 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31649          45 :   if (!SWIG_IsOK(res1)) {
   31650           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_Rename" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31651             :   }
   31652          45 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31653          45 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   31654          45 :   if (!SWIG_IsOK(res2)) {
   31655           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_Rename" "', argument " "2"" of type '" "char const *""'");
   31656             :   }
   31657          45 :   arg2 = reinterpret_cast< char * >(buf2);
   31658          45 :   {
   31659          45 :     const int bLocalUseExceptions = GetUseExceptions();
   31660          45 :     if ( bLocalUseExceptions ) {
   31661          45 :       pushErrorHandler();
   31662             :     }
   31663          45 :     {
   31664          45 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31665          45 :       result = (CPLErr)GDALGroupHS_Rename(arg1,(char const *)arg2);
   31666          45 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31667             :     }
   31668          45 :     if ( bLocalUseExceptions ) {
   31669          45 :       popErrorHandler();
   31670             :     }
   31671             : #ifndef SED_HACKS
   31672             :     if ( bLocalUseExceptions ) {
   31673             :       CPLErr eclass = CPLGetLastErrorType();
   31674             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31675             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31676             :       }
   31677             :     }
   31678             : #endif
   31679             :   }
   31680          45 :   resultobj = SWIG_From_int(static_cast< int >(result));
   31681          45 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31682         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; } }
   31683             :   return resultobj;
   31684           0 : fail:
   31685           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31686             :   return NULL;
   31687             : }
   31688             : 
   31689             : 
   31690          14 : SWIGINTERN PyObject *_wrap_Group_SubsetDimensionFromSelection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31691          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31692          14 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31693          14 :   char *arg2 = (char *) 0 ;
   31694          14 :   char **arg3 = (char **) 0 ;
   31695          14 :   void *argp1 = 0 ;
   31696          14 :   int res1 = 0 ;
   31697          14 :   int res2 ;
   31698          14 :   char *buf2 = 0 ;
   31699          14 :   int alloc2 = 0 ;
   31700          14 :   PyObject *swig_obj[3] ;
   31701          14 :   GDALGroupHS *result = 0 ;
   31702             :   
   31703          14 :   if (!SWIG_Python_UnpackTuple(args, "Group_SubsetDimensionFromSelection", 2, 3, swig_obj)) SWIG_fail;
   31704          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31705          14 :   if (!SWIG_IsOK(res1)) {
   31706           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_SubsetDimensionFromSelection" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31707             :   }
   31708          14 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31709          14 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   31710          14 :   if (!SWIG_IsOK(res2)) {
   31711           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Group_SubsetDimensionFromSelection" "', argument " "2"" of type '" "char const *""'");
   31712             :   }
   31713          14 :   arg2 = reinterpret_cast< char * >(buf2);
   31714          14 :   if (swig_obj[2]) {
   31715           0 :     {
   31716             :       /* %typemap(in) char **dict */
   31717           0 :       arg3 = NULL;
   31718           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   31719           0 :         int bErr = FALSE;
   31720           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   31721           0 :         if ( bErr )
   31722             :         {
   31723           0 :           SWIG_fail;
   31724             :         }
   31725             :       }
   31726           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   31727           0 :         int bErr = FALSE;
   31728           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   31729           0 :         if ( bErr )
   31730             :         {
   31731           0 :           SWIG_fail;
   31732             :         }
   31733             :       }
   31734             :       else {
   31735           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   31736           0 :         SWIG_fail;
   31737             :       }
   31738             :     }
   31739             :   }
   31740          14 :   {
   31741          14 :     const int bLocalUseExceptions = GetUseExceptions();
   31742          14 :     if ( bLocalUseExceptions ) {
   31743          13 :       pushErrorHandler();
   31744             :     }
   31745          14 :     {
   31746          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31747          14 :       result = (GDALGroupHS *)GDALGroupHS_SubsetDimensionFromSelection(arg1,(char const *)arg2,arg3);
   31748          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31749             :     }
   31750          14 :     if ( bLocalUseExceptions ) {
   31751          13 :       popErrorHandler();
   31752             :     }
   31753             : #ifndef SED_HACKS
   31754             :     if ( bLocalUseExceptions ) {
   31755             :       CPLErr eclass = CPLGetLastErrorType();
   31756             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31757             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31758             :       }
   31759             :     }
   31760             : #endif
   31761             :   }
   31762          14 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGroupHS, SWIG_POINTER_OWN |  0 );
   31763          14 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31764          14 :   {
   31765             :     /* %typemap(freearg) char **dict */
   31766          14 :     CSLDestroy( arg3 );
   31767             :   }
   31768          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; } }
   31769             :   return resultobj;
   31770           0 : fail:
   31771           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   31772           0 :   {
   31773             :     /* %typemap(freearg) char **dict */
   31774           0 :     CSLDestroy( arg3 );
   31775             :   }
   31776             :   return NULL;
   31777             : }
   31778             : 
   31779             : 
   31780           2 : SWIGINTERN PyObject *_wrap_Group_GetDataTypeCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31781           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31782           2 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31783           2 :   void *argp1 = 0 ;
   31784           2 :   int res1 = 0 ;
   31785           2 :   PyObject *swig_obj[1] ;
   31786           2 :   size_t result;
   31787             :   
   31788           2 :   if (!args) SWIG_fail;
   31789           2 :   swig_obj[0] = args;
   31790           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31791           2 :   if (!SWIG_IsOK(res1)) {
   31792           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetDataTypeCount" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31793             :   }
   31794           2 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31795           2 :   {
   31796           2 :     const int bLocalUseExceptions = GetUseExceptions();
   31797           2 :     if ( bLocalUseExceptions ) {
   31798           2 :       pushErrorHandler();
   31799             :     }
   31800           2 :     {
   31801           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31802           2 :       result = GDALGroupHS_GetDataTypeCount(arg1);
   31803           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31804             :     }
   31805           2 :     if ( bLocalUseExceptions ) {
   31806           2 :       popErrorHandler();
   31807             :     }
   31808             : #ifndef SED_HACKS
   31809             :     if ( bLocalUseExceptions ) {
   31810             :       CPLErr eclass = CPLGetLastErrorType();
   31811             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31812             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31813             :       }
   31814             :     }
   31815             : #endif
   31816             :   }
   31817           2 :   resultobj = SWIG_From_size_t(static_cast< size_t >(result));
   31818           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; } }
   31819             :   return resultobj;
   31820             : fail:
   31821             :   return NULL;
   31822             : }
   31823             : 
   31824             : 
   31825           2 : SWIGINTERN PyObject *_wrap_Group_GetDataType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31826           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31827           2 :   GDALGroupHS *arg1 = (GDALGroupHS *) 0 ;
   31828           2 :   size_t arg2 ;
   31829           2 :   void *argp1 = 0 ;
   31830           2 :   int res1 = 0 ;
   31831           2 :   size_t val2 ;
   31832           2 :   int ecode2 = 0 ;
   31833           2 :   PyObject *swig_obj[2] ;
   31834           2 :   GDALExtendedDataTypeHS *result = 0 ;
   31835             :   
   31836           2 :   if (!SWIG_Python_UnpackTuple(args, "Group_GetDataType", 2, 2, swig_obj)) SWIG_fail;
   31837           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   31838           2 :   if (!SWIG_IsOK(res1)) {
   31839           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Group_GetDataType" "', argument " "1"" of type '" "GDALGroupHS *""'"); 
   31840             :   }
   31841           2 :   arg1 = reinterpret_cast< GDALGroupHS * >(argp1);
   31842           2 :   ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
   31843           2 :   if (!SWIG_IsOK(ecode2)) {
   31844           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Group_GetDataType" "', argument " "2"" of type '" "size_t""'");
   31845             :   } 
   31846           2 :   arg2 = static_cast< size_t >(val2);
   31847           2 :   {
   31848           2 :     const int bLocalUseExceptions = GetUseExceptions();
   31849           2 :     if ( bLocalUseExceptions ) {
   31850           2 :       pushErrorHandler();
   31851             :     }
   31852           2 :     {
   31853           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31854           2 :       result = (GDALExtendedDataTypeHS *)GDALGroupHS_GetDataType(arg1,arg2);
   31855           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   31856             :     }
   31857           2 :     if ( bLocalUseExceptions ) {
   31858           2 :       popErrorHandler();
   31859             :     }
   31860             : #ifndef SED_HACKS
   31861             :     if ( bLocalUseExceptions ) {
   31862             :       CPLErr eclass = CPLGetLastErrorType();
   31863             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   31864             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   31865             :       }
   31866             :     }
   31867             : #endif
   31868             :   }
   31869           2 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
   31870           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; } }
   31871             :   return resultobj;
   31872             : fail:
   31873             :   return NULL;
   31874             : }
   31875             : 
   31876             : 
   31877         277 : SWIGINTERN PyObject *Group_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31878         277 :   PyObject *obj;
   31879         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   31880         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALGroupHS, SWIG_NewClientData(obj));
   31881         277 :   return SWIG_Py_Void();
   31882             : }
   31883             : 
   31884          12 : SWIGINTERN PyObject *_wrap_Statistics_min_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31885          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31886          12 :   Statistics *arg1 = (Statistics *) 0 ;
   31887          12 :   void *argp1 = 0 ;
   31888          12 :   int res1 = 0 ;
   31889          12 :   PyObject *swig_obj[1] ;
   31890          12 :   double result;
   31891             :   
   31892          12 :   if (!args) SWIG_fail;
   31893          12 :   swig_obj[0] = args;
   31894          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
   31895          12 :   if (!SWIG_IsOK(res1)) {
   31896           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_min_get" "', argument " "1"" of type '" "Statistics *""'"); 
   31897             :   }
   31898          12 :   arg1 = reinterpret_cast< Statistics * >(argp1);
   31899          12 :   {
   31900          12 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31901          12 :     result = (double) ((arg1)->min);
   31902          12 :     SWIG_PYTHON_THREAD_END_ALLOW;
   31903             :   }
   31904          12 :   resultobj = SWIG_From_double(static_cast< double >(result));
   31905          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; } }
   31906             :   return resultobj;
   31907             : fail:
   31908             :   return NULL;
   31909             : }
   31910             : 
   31911             : 
   31912          12 : SWIGINTERN PyObject *_wrap_Statistics_max_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31913          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31914          12 :   Statistics *arg1 = (Statistics *) 0 ;
   31915          12 :   void *argp1 = 0 ;
   31916          12 :   int res1 = 0 ;
   31917          12 :   PyObject *swig_obj[1] ;
   31918          12 :   double result;
   31919             :   
   31920          12 :   if (!args) SWIG_fail;
   31921          12 :   swig_obj[0] = args;
   31922          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
   31923          12 :   if (!SWIG_IsOK(res1)) {
   31924           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_max_get" "', argument " "1"" of type '" "Statistics *""'"); 
   31925             :   }
   31926          12 :   arg1 = reinterpret_cast< Statistics * >(argp1);
   31927          12 :   {
   31928          12 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31929          12 :     result = (double) ((arg1)->max);
   31930          12 :     SWIG_PYTHON_THREAD_END_ALLOW;
   31931             :   }
   31932          12 :   resultobj = SWIG_From_double(static_cast< double >(result));
   31933          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; } }
   31934             :   return resultobj;
   31935             : fail:
   31936             :   return NULL;
   31937             : }
   31938             : 
   31939             : 
   31940           5 : SWIGINTERN PyObject *_wrap_Statistics_mean_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31941           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31942           5 :   Statistics *arg1 = (Statistics *) 0 ;
   31943           5 :   void *argp1 = 0 ;
   31944           5 :   int res1 = 0 ;
   31945           5 :   PyObject *swig_obj[1] ;
   31946           5 :   double result;
   31947             :   
   31948           5 :   if (!args) SWIG_fail;
   31949           5 :   swig_obj[0] = args;
   31950           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
   31951           5 :   if (!SWIG_IsOK(res1)) {
   31952           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_mean_get" "', argument " "1"" of type '" "Statistics *""'"); 
   31953             :   }
   31954           5 :   arg1 = reinterpret_cast< Statistics * >(argp1);
   31955           5 :   {
   31956           5 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31957           5 :     result = (double) ((arg1)->mean);
   31958           5 :     SWIG_PYTHON_THREAD_END_ALLOW;
   31959             :   }
   31960           5 :   resultobj = SWIG_From_double(static_cast< double >(result));
   31961           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; } }
   31962             :   return resultobj;
   31963             : fail:
   31964             :   return NULL;
   31965             : }
   31966             : 
   31967             : 
   31968           5 : SWIGINTERN PyObject *_wrap_Statistics_std_dev_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31969           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31970           5 :   Statistics *arg1 = (Statistics *) 0 ;
   31971           5 :   void *argp1 = 0 ;
   31972           5 :   int res1 = 0 ;
   31973           5 :   PyObject *swig_obj[1] ;
   31974           5 :   double result;
   31975             :   
   31976           5 :   if (!args) SWIG_fail;
   31977           5 :   swig_obj[0] = args;
   31978           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
   31979           5 :   if (!SWIG_IsOK(res1)) {
   31980           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_std_dev_get" "', argument " "1"" of type '" "Statistics *""'"); 
   31981             :   }
   31982           5 :   arg1 = reinterpret_cast< Statistics * >(argp1);
   31983           5 :   {
   31984           5 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   31985           5 :     result = (double) ((arg1)->std_dev);
   31986           5 :     SWIG_PYTHON_THREAD_END_ALLOW;
   31987             :   }
   31988           5 :   resultobj = SWIG_From_double(static_cast< double >(result));
   31989           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; } }
   31990             :   return resultobj;
   31991             : fail:
   31992             :   return NULL;
   31993             : }
   31994             : 
   31995             : 
   31996           5 : SWIGINTERN PyObject *_wrap_Statistics_valid_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   31997           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   31998           5 :   Statistics *arg1 = (Statistics *) 0 ;
   31999           5 :   void *argp1 = 0 ;
   32000           5 :   int res1 = 0 ;
   32001           5 :   PyObject *swig_obj[1] ;
   32002           5 :   GIntBig result;
   32003             :   
   32004           5 :   if (!args) SWIG_fail;
   32005           5 :   swig_obj[0] = args;
   32006           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
   32007           5 :   if (!SWIG_IsOK(res1)) {
   32008           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_valid_count_get" "', argument " "1"" of type '" "Statistics *""'"); 
   32009             :   }
   32010           5 :   arg1 = reinterpret_cast< Statistics * >(argp1);
   32011           5 :   {
   32012           5 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32013           5 :     result =  ((arg1)->valid_count);
   32014           5 :     SWIG_PYTHON_THREAD_END_ALLOW;
   32015             :   }
   32016           5 :   {
   32017           5 :     resultobj = PyLong_FromLongLong(result);
   32018             :   }
   32019           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; } }
   32020             :   return resultobj;
   32021             : fail:
   32022             :   return NULL;
   32023             : }
   32024             : 
   32025             : 
   32026           0 : SWIGINTERN PyObject *_wrap_delete_Statistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32027           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32028           0 :   Statistics *arg1 = (Statistics *) 0 ;
   32029           0 :   void *argp1 = 0 ;
   32030           0 :   int res1 = 0 ;
   32031           0 :   PyObject *swig_obj[1] ;
   32032             :   
   32033           0 :   if (!args) SWIG_fail;
   32034           0 :   swig_obj[0] = args;
   32035           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Statistics, SWIG_POINTER_DISOWN |  0 );
   32036           0 :   if (!SWIG_IsOK(res1)) {
   32037           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Statistics" "', argument " "1"" of type '" "Statistics *""'"); 
   32038             :   }
   32039           0 :   arg1 = reinterpret_cast< Statistics * >(argp1);
   32040           0 :   {
   32041           0 :     const int bLocalUseExceptions = GetUseExceptions();
   32042           0 :     if ( bLocalUseExceptions ) {
   32043           0 :       pushErrorHandler();
   32044             :     }
   32045           0 :     {
   32046           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32047           0 :       delete_Statistics(arg1);
   32048           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32049             :     }
   32050           0 :     if ( bLocalUseExceptions ) {
   32051           0 :       popErrorHandler();
   32052             :     }
   32053             : #ifndef SED_HACKS
   32054             :     if ( bLocalUseExceptions ) {
   32055             :       CPLErr eclass = CPLGetLastErrorType();
   32056             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32057             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32058             :       }
   32059             :     }
   32060             : #endif
   32061             :   }
   32062           0 :   resultobj = SWIG_Py_Void();
   32063           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; } }
   32064             :   return resultobj;
   32065             : fail:
   32066             :   return NULL;
   32067             : }
   32068             : 
   32069             : 
   32070           0 : SWIGINTERN PyObject *_wrap_new_Statistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32071           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32072           0 :   Statistics *result = 0 ;
   32073             :   
   32074           0 :   if (!SWIG_Python_UnpackTuple(args, "new_Statistics", 0, 0, 0)) SWIG_fail;
   32075           0 :   {
   32076           0 :     const int bLocalUseExceptions = GetUseExceptions();
   32077           0 :     if ( bLocalUseExceptions ) {
   32078           0 :       pushErrorHandler();
   32079             :     }
   32080           0 :     {
   32081           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32082           0 :       result = (Statistics *)new Statistics();
   32083           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32084             :     }
   32085           0 :     if ( bLocalUseExceptions ) {
   32086           0 :       popErrorHandler();
   32087             :     }
   32088             : #ifndef SED_HACKS
   32089             :     if ( bLocalUseExceptions ) {
   32090             :       CPLErr eclass = CPLGetLastErrorType();
   32091             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32092             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32093             :       }
   32094             :     }
   32095             : #endif
   32096             :   }
   32097           0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Statistics, SWIG_POINTER_NEW |  0 );
   32098           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; } }
   32099             :   return resultobj;
   32100           0 : fail:
   32101           0 :   return NULL;
   32102             : }
   32103             : 
   32104             : 
   32105         277 : SWIGINTERN PyObject *Statistics_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32106         277 :   PyObject *obj;
   32107         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   32108         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_Statistics, SWIG_NewClientData(obj));
   32109         277 :   return SWIG_Py_Void();
   32110             : }
   32111             : 
   32112           0 : SWIGINTERN PyObject *Statistics_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32113           0 :   return SWIG_Python_InitShadowInstance(args);
   32114             : }
   32115             : 
   32116        2019 : SWIGINTERN PyObject *_wrap_delete_MDArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32117        2019 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32118        2019 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32119        2019 :   void *argp1 = 0 ;
   32120        2019 :   int res1 = 0 ;
   32121        2019 :   PyObject *swig_obj[1] ;
   32122             :   
   32123        2019 :   if (!args) SWIG_fail;
   32124        2019 :   swig_obj[0] = args;
   32125        2019 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_DISOWN |  0 );
   32126        2019 :   if (!SWIG_IsOK(res1)) {
   32127           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MDArray" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32128             :   }
   32129        2019 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32130        2019 :   {
   32131        2019 :     const int bLocalUseExceptions = GetUseExceptions();
   32132        2019 :     if ( bLocalUseExceptions ) {
   32133         440 :       pushErrorHandler();
   32134             :     }
   32135        2019 :     {
   32136        2019 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32137        2019 :       delete_GDALMDArrayHS(arg1);
   32138        2019 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32139             :     }
   32140        2019 :     if ( bLocalUseExceptions ) {
   32141         440 :       popErrorHandler();
   32142             :     }
   32143             : #ifndef SED_HACKS
   32144             :     if ( bLocalUseExceptions ) {
   32145             :       CPLErr eclass = CPLGetLastErrorType();
   32146             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32147             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32148             :       }
   32149             :     }
   32150             : #endif
   32151             :   }
   32152        2019 :   resultobj = SWIG_Py_Void();
   32153        2019 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   32154             :   return resultobj;
   32155             : fail:
   32156             :   return NULL;
   32157             : }
   32158             : 
   32159             : 
   32160          83 : SWIGINTERN PyObject *_wrap_MDArray_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32161          83 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32162          83 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32163          83 :   void *argp1 = 0 ;
   32164          83 :   int res1 = 0 ;
   32165          83 :   PyObject *swig_obj[1] ;
   32166          83 :   char *result = 0 ;
   32167             :   
   32168          83 :   if (!args) SWIG_fail;
   32169          83 :   swig_obj[0] = args;
   32170          83 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32171          83 :   if (!SWIG_IsOK(res1)) {
   32172           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetName" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32173             :   }
   32174          83 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32175          83 :   {
   32176          83 :     const int bLocalUseExceptions = GetUseExceptions();
   32177          83 :     if ( bLocalUseExceptions ) {
   32178          27 :       pushErrorHandler();
   32179             :     }
   32180          83 :     {
   32181          83 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32182          83 :       result = (char *)GDALMDArrayHS_GetName(arg1);
   32183          83 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32184             :     }
   32185          83 :     if ( bLocalUseExceptions ) {
   32186          27 :       popErrorHandler();
   32187             :     }
   32188             : #ifndef SED_HACKS
   32189             :     if ( bLocalUseExceptions ) {
   32190             :       CPLErr eclass = CPLGetLastErrorType();
   32191             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32192             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32193             :       }
   32194             :     }
   32195             : #endif
   32196             :   }
   32197          83 :   resultobj = SWIG_FromCharPtr((const char *)result);
   32198          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; } }
   32199             :   return resultobj;
   32200             : fail:
   32201             :   return NULL;
   32202             : }
   32203             : 
   32204             : 
   32205          50 : SWIGINTERN PyObject *_wrap_MDArray_GetFullName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32206          50 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32207          50 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32208          50 :   void *argp1 = 0 ;
   32209          50 :   int res1 = 0 ;
   32210          50 :   PyObject *swig_obj[1] ;
   32211          50 :   char *result = 0 ;
   32212             :   
   32213          50 :   if (!args) SWIG_fail;
   32214          50 :   swig_obj[0] = args;
   32215          50 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32216          50 :   if (!SWIG_IsOK(res1)) {
   32217           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetFullName" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32218             :   }
   32219          50 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32220          50 :   {
   32221          50 :     const int bLocalUseExceptions = GetUseExceptions();
   32222          50 :     if ( bLocalUseExceptions ) {
   32223          27 :       pushErrorHandler();
   32224             :     }
   32225          50 :     {
   32226          50 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32227          50 :       result = (char *)GDALMDArrayHS_GetFullName(arg1);
   32228          50 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32229             :     }
   32230          50 :     if ( bLocalUseExceptions ) {
   32231          27 :       popErrorHandler();
   32232             :     }
   32233             : #ifndef SED_HACKS
   32234             :     if ( bLocalUseExceptions ) {
   32235             :       CPLErr eclass = CPLGetLastErrorType();
   32236             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32237             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32238             :       }
   32239             :     }
   32240             : #endif
   32241             :   }
   32242          50 :   resultobj = SWIG_FromCharPtr((const char *)result);
   32243          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; } }
   32244             :   return resultobj;
   32245             : fail:
   32246             :   return NULL;
   32247             : }
   32248             : 
   32249             : 
   32250           6 : SWIGINTERN PyObject *_wrap_MDArray_GetTotalElementsCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32251           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32252           6 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32253           6 :   void *argp1 = 0 ;
   32254           6 :   int res1 = 0 ;
   32255           6 :   PyObject *swig_obj[1] ;
   32256           6 :   GUIntBig result;
   32257             :   
   32258           6 :   if (!args) SWIG_fail;
   32259           6 :   swig_obj[0] = args;
   32260           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32261           6 :   if (!SWIG_IsOK(res1)) {
   32262           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetTotalElementsCount" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32263             :   }
   32264           6 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32265           6 :   {
   32266           6 :     const int bLocalUseExceptions = GetUseExceptions();
   32267           6 :     if ( bLocalUseExceptions ) {
   32268           0 :       pushErrorHandler();
   32269             :     }
   32270           6 :     {
   32271           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32272           6 :       result = GDALMDArrayHS_GetTotalElementsCount(arg1);
   32273           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32274             :     }
   32275           6 :     if ( bLocalUseExceptions ) {
   32276           0 :       popErrorHandler();
   32277             :     }
   32278             : #ifndef SED_HACKS
   32279             :     if ( bLocalUseExceptions ) {
   32280             :       CPLErr eclass = CPLGetLastErrorType();
   32281             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32282             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32283             :       }
   32284             :     }
   32285             : #endif
   32286             :   }
   32287           6 :   {
   32288           6 :     resultobj = PyLong_FromUnsignedLongLong(result);
   32289             :   }
   32290           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; } }
   32291             :   return resultobj;
   32292             : fail:
   32293             :   return NULL;
   32294             : }
   32295             : 
   32296             : 
   32297        3505 : SWIGINTERN PyObject *_wrap_MDArray_GetDimensionCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32298        3505 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32299        3505 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32300        3505 :   void *argp1 = 0 ;
   32301        3505 :   int res1 = 0 ;
   32302        3505 :   PyObject *swig_obj[1] ;
   32303        3505 :   size_t result;
   32304             :   
   32305        3505 :   if (!args) SWIG_fail;
   32306        3505 :   swig_obj[0] = args;
   32307        3505 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32308        3505 :   if (!SWIG_IsOK(res1)) {
   32309           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetDimensionCount" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32310             :   }
   32311        3505 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32312        3505 :   {
   32313        3505 :     const int bLocalUseExceptions = GetUseExceptions();
   32314        3505 :     if ( bLocalUseExceptions ) {
   32315         476 :       pushErrorHandler();
   32316             :     }
   32317        3505 :     {
   32318        3505 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32319        3505 :       result = GDALMDArrayHS_GetDimensionCount(arg1);
   32320        3505 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32321             :     }
   32322        3505 :     if ( bLocalUseExceptions ) {
   32323         476 :       popErrorHandler();
   32324             :     }
   32325             : #ifndef SED_HACKS
   32326             :     if ( bLocalUseExceptions ) {
   32327             :       CPLErr eclass = CPLGetLastErrorType();
   32328             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32329             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32330             :       }
   32331             :     }
   32332             : #endif
   32333             :   }
   32334        3505 :   resultobj = SWIG_From_size_t(static_cast< size_t >(result));
   32335        3505 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   32336             :   return resultobj;
   32337             : fail:
   32338             :   return NULL;
   32339             : }
   32340             : 
   32341             : 
   32342        2279 : SWIGINTERN PyObject *_wrap_MDArray_GetDimensions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32343        2279 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32344        2279 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32345        2279 :   GDALDimensionHS ***arg2 = (GDALDimensionHS ***) 0 ;
   32346        2279 :   size_t *arg3 = (size_t *) 0 ;
   32347        2279 :   void *argp1 = 0 ;
   32348        2279 :   int res1 = 0 ;
   32349        2279 :   GDALDimensionHS **dims2 = 0 ;
   32350        2279 :   size_t nCount2 = 0 ;
   32351        2279 :   PyObject *swig_obj[1] ;
   32352             :   
   32353        2279 :   {
   32354             :     /* %typemap(in,numinputs=0) (GDALDimensionHS*** pdims, size_t* pnCount) */
   32355        2279 :     arg2 = &dims2;
   32356        2279 :     arg3 = &nCount2;
   32357             :   }
   32358        2279 :   if (!args) SWIG_fail;
   32359        2279 :   swig_obj[0] = args;
   32360        2279 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32361        2279 :   if (!SWIG_IsOK(res1)) {
   32362           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetDimensions" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32363             :   }
   32364        2279 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32365        2279 :   {
   32366        2279 :     const int bLocalUseExceptions = GetUseExceptions();
   32367        2279 :     if ( bLocalUseExceptions ) {
   32368         316 :       pushErrorHandler();
   32369             :     }
   32370        2279 :     {
   32371        2279 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32372        2279 :       GDALMDArrayHS_GetDimensions(arg1,arg2,arg3);
   32373        2279 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32374             :     }
   32375        2279 :     if ( bLocalUseExceptions ) {
   32376         316 :       popErrorHandler();
   32377             :     }
   32378             : #ifndef SED_HACKS
   32379             :     if ( bLocalUseExceptions ) {
   32380             :       CPLErr eclass = CPLGetLastErrorType();
   32381             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32382             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32383             :       }
   32384             :     }
   32385             : #endif
   32386             :   }
   32387        2279 :   resultobj = SWIG_Py_Void();
   32388        2279 :   {
   32389             :     /* %typemap(argout) (GDALDimensionHS*** pdims, size_t* pnCount) */
   32390        2279 :     Py_DECREF(resultobj);
   32391        2279 :     resultobj = PyList_New( *arg3 );
   32392        2279 :     if( !resultobj ) {
   32393           0 :       SWIG_fail;
   32394             :     }
   32395        6385 :     for( size_t i = 0; i < *arg3; i++ ) {
   32396        4106 :       PyList_SetItem(resultobj, i,
   32397        4106 :         SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALDimensionHS,SWIG_POINTER_OWN) );
   32398             :       /* We have borrowed the GDALDimensionHS */
   32399        4106 :       (*arg2)[i] = NULL;
   32400             :     }
   32401             :   }
   32402        2279 :   {
   32403             :     /* %typemap(freearg) (GDALDimensionHS*** pdims, size_t* pnCount) */
   32404        2279 :     GDALReleaseDimensions(*arg2, *arg3);
   32405             :   }
   32406        2279 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   32407             :   return resultobj;
   32408           0 : fail:
   32409           0 :   {
   32410             :     /* %typemap(freearg) (GDALDimensionHS*** pdims, size_t* pnCount) */
   32411           0 :     GDALReleaseDimensions(*arg2, *arg3);
   32412             :   }
   32413             :   return NULL;
   32414             : }
   32415             : 
   32416             : 
   32417          13 : SWIGINTERN PyObject *_wrap_MDArray_GetCoordinateVariables(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32418          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32419          13 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32420          13 :   GDALMDArrayHS ***arg2 = (GDALMDArrayHS ***) 0 ;
   32421          13 :   size_t *arg3 = (size_t *) 0 ;
   32422          13 :   void *argp1 = 0 ;
   32423          13 :   int res1 = 0 ;
   32424          13 :   GDALMDArrayHS **arrays2 = 0 ;
   32425          13 :   size_t nCount2 = 0 ;
   32426          13 :   PyObject *swig_obj[1] ;
   32427             :   
   32428          13 :   {
   32429             :     /* %typemap(in,numinputs=0) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   32430          13 :     arg2 = &arrays2;
   32431          13 :     arg3 = &nCount2;
   32432             :   }
   32433          13 :   if (!args) SWIG_fail;
   32434          13 :   swig_obj[0] = args;
   32435          13 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32436          13 :   if (!SWIG_IsOK(res1)) {
   32437           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetCoordinateVariables" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32438             :   }
   32439          13 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32440          13 :   {
   32441          13 :     const int bLocalUseExceptions = GetUseExceptions();
   32442          13 :     if ( bLocalUseExceptions ) {
   32443           3 :       pushErrorHandler();
   32444             :     }
   32445          13 :     {
   32446          13 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32447          13 :       GDALMDArrayHS_GetCoordinateVariables(arg1,arg2,arg3);
   32448          13 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32449             :     }
   32450          13 :     if ( bLocalUseExceptions ) {
   32451           3 :       popErrorHandler();
   32452             :     }
   32453             : #ifndef SED_HACKS
   32454             :     if ( bLocalUseExceptions ) {
   32455             :       CPLErr eclass = CPLGetLastErrorType();
   32456             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32457             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32458             :       }
   32459             :     }
   32460             : #endif
   32461             :   }
   32462          13 :   resultobj = SWIG_Py_Void();
   32463          13 :   {
   32464             :     /* %typemap(argout) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   32465          13 :     Py_DECREF(resultobj);
   32466          13 :     resultobj = PyList_New( *arg3 );
   32467          13 :     if( !resultobj ) {
   32468           0 :       SWIG_fail;
   32469             :     }
   32470          29 :     for( size_t i = 0; i < *arg3; i++ ) {
   32471          16 :       PyList_SetItem(resultobj, i,
   32472          16 :         SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALMDArrayHS,SWIG_POINTER_OWN) );
   32473             :       /* We have borrowed the GDALMDArrayHS */
   32474          16 :       (*arg2)[i] = NULL;
   32475             :     }
   32476             :   }
   32477          13 :   {
   32478             :     /* %typemap(freearg) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   32479          13 :     GDALReleaseArrays(*arg2, *arg3);
   32480             :   }
   32481          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; } }
   32482             :   return resultobj;
   32483           0 : fail:
   32484           0 :   {
   32485             :     /* %typemap(freearg) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   32486           0 :     GDALReleaseArrays(*arg2, *arg3);
   32487             :   }
   32488             :   return NULL;
   32489             : }
   32490             : 
   32491             : 
   32492          93 : SWIGINTERN PyObject *_wrap_MDArray_GetBlockSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32493          93 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32494          93 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32495          93 :   GUIntBig **arg2 = (GUIntBig **) 0 ;
   32496          93 :   size_t *arg3 = (size_t *) 0 ;
   32497          93 :   void *argp1 = 0 ;
   32498          93 :   int res1 = 0 ;
   32499          93 :   GUIntBig *vals2 = 0 ;
   32500          93 :   size_t nCount2 = 0 ;
   32501          93 :   PyObject *swig_obj[1] ;
   32502             :   
   32503          93 :   {
   32504             :     /* %typemap(in,numinputs=0) (GUIntBig** pvals, size_t* pnCount) */
   32505          93 :     arg2 = &vals2;
   32506          93 :     arg3 = &nCount2;
   32507             :   }
   32508          93 :   if (!args) SWIG_fail;
   32509          93 :   swig_obj[0] = args;
   32510          93 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32511          93 :   if (!SWIG_IsOK(res1)) {
   32512           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetBlockSize" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32513             :   }
   32514          93 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32515          93 :   {
   32516          93 :     const int bLocalUseExceptions = GetUseExceptions();
   32517          93 :     if ( bLocalUseExceptions ) {
   32518           3 :       pushErrorHandler();
   32519             :     }
   32520          93 :     {
   32521          93 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32522          93 :       GDALMDArrayHS_GetBlockSize(arg1,arg2,arg3);
   32523          93 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32524             :     }
   32525          93 :     if ( bLocalUseExceptions ) {
   32526           3 :       popErrorHandler();
   32527             :     }
   32528             : #ifndef SED_HACKS
   32529             :     if ( bLocalUseExceptions ) {
   32530             :       CPLErr eclass = CPLGetLastErrorType();
   32531             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32532             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32533             :       }
   32534             :     }
   32535             : #endif
   32536             :   }
   32537          93 :   resultobj = SWIG_Py_Void();
   32538          93 :   {
   32539             :     /* %typemap(argout) (GUIntBig** pvals, size_t* pnCount) */
   32540          93 :     Py_DECREF(resultobj);
   32541          93 :     resultobj = PyList_New( *arg3 );
   32542          93 :     if( !resultobj ) {
   32543           0 :       SWIG_fail;
   32544             :     }
   32545         285 :     for( size_t i = 0; i < *arg3; i++ ) {
   32546         192 :       char szTmp[32];
   32547         192 :       snprintf(szTmp, sizeof(szTmp), CPL_FRMT_GUIB, (*arg2)[i]);
   32548         192 :       PyObject *o = PyLong_FromString(szTmp, NULL, 10);
   32549         192 :       PyList_SetItem(resultobj, i, o );
   32550             :     }
   32551             :   }
   32552          93 :   {
   32553             :     /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
   32554          93 :     CPLFree(*arg2);
   32555             :   }
   32556          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; } }
   32557             :   return resultobj;
   32558           0 : fail:
   32559           0 :   {
   32560             :     /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
   32561           0 :     CPLFree(*arg2);
   32562             :   }
   32563             :   return NULL;
   32564             : }
   32565             : 
   32566             : 
   32567           1 : SWIGINTERN PyObject *_wrap_MDArray_GetProcessingChunkSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32568           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32569           1 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32570           1 :   size_t arg2 ;
   32571           1 :   GUIntBig **arg3 = (GUIntBig **) 0 ;
   32572           1 :   size_t *arg4 = (size_t *) 0 ;
   32573           1 :   void *argp1 = 0 ;
   32574           1 :   int res1 = 0 ;
   32575           1 :   size_t val2 ;
   32576           1 :   int ecode2 = 0 ;
   32577           1 :   GUIntBig *vals3 = 0 ;
   32578           1 :   size_t nCount3 = 0 ;
   32579           1 :   PyObject *swig_obj[2] ;
   32580             :   
   32581           1 :   {
   32582             :     /* %typemap(in,numinputs=0) (GUIntBig** pvals, size_t* pnCount) */
   32583           1 :     arg3 = &vals3;
   32584           1 :     arg4 = &nCount3;
   32585             :   }
   32586           1 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_GetProcessingChunkSize", 2, 2, swig_obj)) SWIG_fail;
   32587           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32588           1 :   if (!SWIG_IsOK(res1)) {
   32589           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetProcessingChunkSize" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32590             :   }
   32591           1 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32592           1 :   ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
   32593           1 :   if (!SWIG_IsOK(ecode2)) {
   32594           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_GetProcessingChunkSize" "', argument " "2"" of type '" "size_t""'");
   32595             :   } 
   32596           1 :   arg2 = static_cast< size_t >(val2);
   32597           1 :   {
   32598           1 :     const int bLocalUseExceptions = GetUseExceptions();
   32599           1 :     if ( bLocalUseExceptions ) {
   32600           0 :       pushErrorHandler();
   32601             :     }
   32602           1 :     {
   32603           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32604           1 :       GDALMDArrayHS_GetProcessingChunkSize(arg1,arg2,arg3,arg4);
   32605           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32606             :     }
   32607           1 :     if ( bLocalUseExceptions ) {
   32608           0 :       popErrorHandler();
   32609             :     }
   32610             : #ifndef SED_HACKS
   32611             :     if ( bLocalUseExceptions ) {
   32612             :       CPLErr eclass = CPLGetLastErrorType();
   32613             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32614             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32615             :       }
   32616             :     }
   32617             : #endif
   32618             :   }
   32619           1 :   resultobj = SWIG_Py_Void();
   32620           1 :   {
   32621             :     /* %typemap(argout) (GUIntBig** pvals, size_t* pnCount) */
   32622           1 :     Py_DECREF(resultobj);
   32623           1 :     resultobj = PyList_New( *arg4 );
   32624           1 :     if( !resultobj ) {
   32625           0 :       SWIG_fail;
   32626             :     }
   32627           3 :     for( size_t i = 0; i < *arg4; i++ ) {
   32628           2 :       char szTmp[32];
   32629           2 :       snprintf(szTmp, sizeof(szTmp), CPL_FRMT_GUIB, (*arg3)[i]);
   32630           2 :       PyObject *o = PyLong_FromString(szTmp, NULL, 10);
   32631           2 :       PyList_SetItem(resultobj, i, o );
   32632             :     }
   32633             :   }
   32634           1 :   {
   32635             :     /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
   32636           1 :     CPLFree(*arg3);
   32637             :   }
   32638           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; } }
   32639             :   return resultobj;
   32640           0 : fail:
   32641           0 :   {
   32642             :     /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
   32643           0 :     CPLFree(*arg3);
   32644             :   }
   32645             :   return NULL;
   32646             : }
   32647             : 
   32648             : 
   32649        1972 : SWIGINTERN PyObject *_wrap_MDArray_GetDataType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32650        1972 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32651        1972 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32652        1972 :   void *argp1 = 0 ;
   32653        1972 :   int res1 = 0 ;
   32654        1972 :   PyObject *swig_obj[1] ;
   32655        1972 :   GDALExtendedDataTypeHS *result = 0 ;
   32656             :   
   32657        1972 :   if (!args) SWIG_fail;
   32658        1972 :   swig_obj[0] = args;
   32659        1972 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32660        1972 :   if (!SWIG_IsOK(res1)) {
   32661           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetDataType" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32662             :   }
   32663        1972 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32664        1972 :   {
   32665        1972 :     const int bLocalUseExceptions = GetUseExceptions();
   32666        1972 :     if ( bLocalUseExceptions ) {
   32667         402 :       pushErrorHandler();
   32668             :     }
   32669        1972 :     {
   32670        1972 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32671        1972 :       result = (GDALExtendedDataTypeHS *)GDALMDArrayHS_GetDataType(arg1);
   32672        1972 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32673             :     }
   32674        1972 :     if ( bLocalUseExceptions ) {
   32675         402 :       popErrorHandler();
   32676             :     }
   32677             : #ifndef SED_HACKS
   32678             :     if ( bLocalUseExceptions ) {
   32679             :       CPLErr eclass = CPLGetLastErrorType();
   32680             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32681             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32682             :       }
   32683             :     }
   32684             : #endif
   32685             :   }
   32686        1972 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
   32687        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; } }
   32688             :   return resultobj;
   32689             : fail:
   32690             :   return NULL;
   32691             : }
   32692             : 
   32693             : 
   32694          15 : SWIGINTERN PyObject *_wrap_MDArray_GetStructuralInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32695          15 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32696          15 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32697          15 :   void *argp1 = 0 ;
   32698          15 :   int res1 = 0 ;
   32699          15 :   PyObject *swig_obj[1] ;
   32700          15 :   char **result = 0 ;
   32701             :   
   32702          15 :   if (!args) SWIG_fail;
   32703          15 :   swig_obj[0] = args;
   32704          15 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32705          15 :   if (!SWIG_IsOK(res1)) {
   32706           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetStructuralInfo" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32707             :   }
   32708          15 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32709          15 :   {
   32710          15 :     const int bLocalUseExceptions = GetUseExceptions();
   32711          15 :     if ( bLocalUseExceptions ) {
   32712           2 :       pushErrorHandler();
   32713             :     }
   32714          15 :     {
   32715          15 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32716          15 :       result = (char **)GDALMDArrayHS_GetStructuralInfo(arg1);
   32717          15 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32718             :     }
   32719          15 :     if ( bLocalUseExceptions ) {
   32720           2 :       popErrorHandler();
   32721             :     }
   32722             : #ifndef SED_HACKS
   32723             :     if ( bLocalUseExceptions ) {
   32724             :       CPLErr eclass = CPLGetLastErrorType();
   32725             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32726             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32727             :       }
   32728             :     }
   32729             : #endif
   32730             :   }
   32731          15 :   {
   32732             :     /* %typemap(out) char **dict */
   32733          15 :     resultobj = GetCSLStringAsPyDict(result, false);
   32734             :   }
   32735          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; } }
   32736             :   return resultobj;
   32737             : fail:
   32738             :   return NULL;
   32739             : }
   32740             : 
   32741             : 
   32742          44 : SWIGINTERN PyObject *_wrap_MDArray_Resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32743          44 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32744          44 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32745          44 :   int arg2 ;
   32746          44 :   GUIntBig *arg3 = (GUIntBig *) 0 ;
   32747          44 :   char **arg4 = (char **) NULL ;
   32748          44 :   void *argp1 = 0 ;
   32749          44 :   int res1 = 0 ;
   32750          44 :   PyObject *swig_obj[3] ;
   32751          44 :   CPLErr result;
   32752             :   
   32753          44 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_Resize", 2, 3, swig_obj)) SWIG_fail;
   32754          44 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32755          44 :   if (!SWIG_IsOK(res1)) {
   32756           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Resize" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32757             :   }
   32758          44 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32759          44 :   {
   32760             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   32761          44 :     arg3 = CreateCGUIntBigListFromSequence(swig_obj[1], &arg2);
   32762          44 :     if( arg2 < 0 ) {
   32763           0 :       SWIG_fail;
   32764             :     }
   32765             :   }
   32766          44 :   if (swig_obj[2]) {
   32767           0 :     {
   32768             :       /* %typemap(in) char **dict */
   32769           0 :       arg4 = NULL;
   32770           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   32771           0 :         int bErr = FALSE;
   32772           0 :         arg4 = CSLFromPySequence(swig_obj[2], &bErr);
   32773           0 :         if ( bErr )
   32774             :         {
   32775           0 :           SWIG_fail;
   32776             :         }
   32777             :       }
   32778           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   32779           0 :         int bErr = FALSE;
   32780           0 :         arg4 = CSLFromPyMapping(swig_obj[2], &bErr);
   32781           0 :         if ( bErr )
   32782             :         {
   32783           0 :           SWIG_fail;
   32784             :         }
   32785             :       }
   32786             :       else {
   32787           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   32788           0 :         SWIG_fail;
   32789             :       }
   32790             :     }
   32791             :   }
   32792          44 :   {
   32793          44 :     const int bLocalUseExceptions = GetUseExceptions();
   32794          44 :     if ( bLocalUseExceptions ) {
   32795           0 :       pushErrorHandler();
   32796             :     }
   32797          44 :     {
   32798          44 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32799          44 :       result = (CPLErr)GDALMDArrayHS_Resize(arg1,arg2,arg3,arg4);
   32800          44 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32801             :     }
   32802          44 :     if ( bLocalUseExceptions ) {
   32803           0 :       popErrorHandler();
   32804             :     }
   32805             : #ifndef SED_HACKS
   32806             :     if ( bLocalUseExceptions ) {
   32807             :       CPLErr eclass = CPLGetLastErrorType();
   32808             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32809             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32810             :       }
   32811             :     }
   32812             : #endif
   32813             :   }
   32814          44 :   resultobj = SWIG_From_int(static_cast< int >(result));
   32815          44 :   {
   32816             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   32817          44 :     free(arg3);
   32818             :   }
   32819          44 :   {
   32820             :     /* %typemap(freearg) char **dict */
   32821          44 :     CSLDestroy( arg4 );
   32822             :   }
   32823          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; } }
   32824             :   return resultobj;
   32825           0 : fail:
   32826           0 :   {
   32827             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   32828           0 :     free(arg3);
   32829             :   }
   32830           0 :   {
   32831             :     /* %typemap(freearg) char **dict */
   32832           0 :     CSLDestroy( arg4 );
   32833             :   }
   32834             :   return NULL;
   32835             : }
   32836             : 
   32837             : 
   32838        1889 : SWIGINTERN PyObject *_wrap_MDArray_Read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32839        1889 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32840        1889 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32841        1889 :   int arg2 ;
   32842        1889 :   GUIntBig *arg3 = (GUIntBig *) 0 ;
   32843        1889 :   int arg4 ;
   32844        1889 :   GUIntBig *arg5 = (GUIntBig *) 0 ;
   32845        1889 :   int arg6 ;
   32846        1889 :   GIntBig *arg7 = (GIntBig *) 0 ;
   32847        1889 :   int arg8 ;
   32848        1889 :   GIntBig *arg9 = (GIntBig *) 0 ;
   32849        1889 :   GDALExtendedDataTypeHS *arg10 = (GDALExtendedDataTypeHS *) 0 ;
   32850        1889 :   void **arg11 = (void **) 0 ;
   32851        1889 :   void *argp1 = 0 ;
   32852        1889 :   int res1 = 0 ;
   32853        1889 :   void *argp10 = 0 ;
   32854        1889 :   int res10 = 0 ;
   32855        1889 :   void *pyObject11 = NULL ;
   32856        1889 :   PyObject *swig_obj[6] ;
   32857        1889 :   CPLErr result;
   32858             :   
   32859        1889 :   {
   32860             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject11 = NULL ) */
   32861        1889 :     arg11 = &pyObject11;
   32862             :   }
   32863        1889 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_Read", 6, 6, swig_obj)) SWIG_fail;
   32864        1889 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   32865        1889 :   if (!SWIG_IsOK(res1)) {
   32866           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Read" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   32867             :   }
   32868        1889 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   32869        1889 :   {
   32870             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   32871        1889 :     arg3 = CreateCGUIntBigListFromSequence(swig_obj[1], &arg2);
   32872        1889 :     if( arg2 < 0 ) {
   32873           0 :       SWIG_fail;
   32874             :     }
   32875             :   }
   32876        1889 :   {
   32877             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   32878        1889 :     arg5 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg4);
   32879        1889 :     if( arg4 < 0 ) {
   32880           0 :       SWIG_fail;
   32881             :     }
   32882             :   }
   32883        1889 :   {
   32884             :     /* %typemap(in,numinputs=1) (int nList, GIntBig* pList)*/
   32885        1889 :     arg7 = CreateCGIntBigListFromSequence(swig_obj[3], &arg6);
   32886        1889 :     if( arg6 < 0 ) {
   32887           0 :       SWIG_fail;
   32888             :     }
   32889             :   }
   32890        1889 :   {
   32891             :     /* %typemap(in,numinputs=1) (int nList, GIntBig* pList)*/
   32892        1889 :     arg9 = CreateCGIntBigListFromSequence(swig_obj[4], &arg8);
   32893        1889 :     if( arg8 < 0 ) {
   32894           0 :       SWIG_fail;
   32895             :     }
   32896             :   }
   32897        1889 :   res10 = SWIG_ConvertPtr(swig_obj[5], &argp10,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   32898        1889 :   if (!SWIG_IsOK(res10)) {
   32899           0 :     SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "MDArray_Read" "', argument " "10"" of type '" "GDALExtendedDataTypeHS *""'"); 
   32900             :   }
   32901        1889 :   arg10 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp10);
   32902        1889 :   {
   32903        1889 :     if (!arg10) {
   32904           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   32905             :     }
   32906             :   }
   32907        1889 :   {
   32908        1889 :     const int bLocalUseExceptions = GetUseExceptions();
   32909        1889 :     if ( bLocalUseExceptions ) {
   32910         152 :       pushErrorHandler();
   32911             :     }
   32912        1889 :     {
   32913        1889 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   32914        1889 :       result = (CPLErr)GDALMDArrayHS_Read(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
   32915        1889 :       SWIG_PYTHON_THREAD_END_ALLOW;
   32916             :     }
   32917        1889 :     if ( bLocalUseExceptions ) {
   32918         152 :       popErrorHandler();
   32919             :     }
   32920             : #ifndef SED_HACKS
   32921             :     if ( bLocalUseExceptions ) {
   32922             :       CPLErr eclass = CPLGetLastErrorType();
   32923             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   32924             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   32925             :       }
   32926             :     }
   32927             : #endif
   32928             :   }
   32929        1889 :   resultobj = SWIG_From_int(static_cast< int >(result));
   32930        1889 :   {
   32931             :     /* %typemap(argout) ( void **outPythonObject ) */
   32932        1889 :     Py_XDECREF(resultobj);
   32933        1889 :     if (*arg11)
   32934             :     {
   32935             :       resultobj = (PyObject*)*arg11;
   32936             :     }
   32937             :     else
   32938             :     {
   32939          40 :       resultobj = Py_None;
   32940          40 :       Py_INCREF(resultobj);
   32941             :     }
   32942             :   }
   32943        1889 :   {
   32944             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   32945        1889 :     free(arg3);
   32946             :   }
   32947        1889 :   {
   32948             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   32949        1889 :     free(arg5);
   32950             :   }
   32951        1889 :   {
   32952             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   32953        1889 :     free(arg7);
   32954             :   }
   32955        1889 :   {
   32956             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   32957        1889 :     free(arg9);
   32958             :   }
   32959        1895 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   32960             :   return resultobj;
   32961           0 : fail:
   32962           0 :   {
   32963             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   32964           0 :     free(arg3);
   32965             :   }
   32966           0 :   {
   32967             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   32968           0 :     free(arg5);
   32969             :   }
   32970           0 :   {
   32971             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   32972           0 :     free(arg7);
   32973             :   }
   32974           0 :   {
   32975             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   32976           0 :     free(arg9);
   32977             :   }
   32978           0 :   return NULL;
   32979             : }
   32980             : 
   32981             : 
   32982          13 : SWIGINTERN PyObject *_wrap_MDArray_WriteStringArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   32983          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   32984          13 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   32985          13 :   int arg2 ;
   32986          13 :   GUIntBig *arg3 = (GUIntBig *) 0 ;
   32987          13 :   int arg4 ;
   32988          13 :   GUIntBig *arg5 = (GUIntBig *) 0 ;
   32989          13 :   int arg6 ;
   32990          13 :   GIntBig *arg7 = (GIntBig *) 0 ;
   32991          13 :   GDALExtendedDataTypeHS *arg8 = (GDALExtendedDataTypeHS *) 0 ;
   32992          13 :   char **arg9 = (char **) 0 ;
   32993          13 :   void *argp1 = 0 ;
   32994          13 :   int res1 = 0 ;
   32995          13 :   void *argp8 = 0 ;
   32996          13 :   int res8 = 0 ;
   32997          13 :   PyObject *swig_obj[6] ;
   32998          13 :   CPLErr result;
   32999             :   
   33000          13 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_WriteStringArray", 6, 6, swig_obj)) SWIG_fail;
   33001          13 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33002          13 :   if (!SWIG_IsOK(res1)) {
   33003           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_WriteStringArray" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33004             :   }
   33005          13 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33006          13 :   {
   33007             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   33008          13 :     arg3 = CreateCGUIntBigListFromSequence(swig_obj[1], &arg2);
   33009          13 :     if( arg2 < 0 ) {
   33010           0 :       SWIG_fail;
   33011             :     }
   33012             :   }
   33013          13 :   {
   33014             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   33015          13 :     arg5 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg4);
   33016          13 :     if( arg4 < 0 ) {
   33017           0 :       SWIG_fail;
   33018             :     }
   33019             :   }
   33020          13 :   {
   33021             :     /* %typemap(in,numinputs=1) (int nList, GIntBig* pList)*/
   33022          13 :     arg7 = CreateCGIntBigListFromSequence(swig_obj[3], &arg6);
   33023          13 :     if( arg6 < 0 ) {
   33024           0 :       SWIG_fail;
   33025             :     }
   33026             :   }
   33027          13 :   res8 = SWIG_ConvertPtr(swig_obj[4], &argp8,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   33028          13 :   if (!SWIG_IsOK(res8)) {
   33029           0 :     SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "MDArray_WriteStringArray" "', argument " "8"" of type '" "GDALExtendedDataTypeHS *""'"); 
   33030             :   }
   33031          13 :   arg8 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp8);
   33032          13 :   {
   33033             :     /* %typemap(in) char **dict */
   33034          13 :     arg9 = NULL;
   33035          13 :     if ( PySequence_Check( swig_obj[5] ) ) {
   33036          13 :       int bErr = FALSE;
   33037          13 :       arg9 = CSLFromPySequence(swig_obj[5], &bErr);
   33038          13 :       if ( bErr )
   33039             :       {
   33040           0 :         SWIG_fail;
   33041             :       }
   33042             :     }
   33043           0 :     else if ( PyMapping_Check( swig_obj[5] ) ) {
   33044           0 :       int bErr = FALSE;
   33045           0 :       arg9 = CSLFromPyMapping(swig_obj[5], &bErr);
   33046           0 :       if ( bErr )
   33047             :       {
   33048           0 :         SWIG_fail;
   33049             :       }
   33050             :     }
   33051             :     else {
   33052           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   33053           0 :       SWIG_fail;
   33054             :     }
   33055             :   }
   33056          13 :   {
   33057          13 :     if (!arg8) {
   33058           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   33059             :     }
   33060             :   }
   33061          13 :   {
   33062          13 :     const int bLocalUseExceptions = GetUseExceptions();
   33063          13 :     if ( bLocalUseExceptions ) {
   33064           3 :       pushErrorHandler();
   33065             :     }
   33066          13 :     {
   33067          13 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33068          13 :       result = (CPLErr)GDALMDArrayHS_WriteStringArray(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
   33069          13 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33070             :     }
   33071          13 :     if ( bLocalUseExceptions ) {
   33072           3 :       popErrorHandler();
   33073             :     }
   33074             : #ifndef SED_HACKS
   33075             :     if ( bLocalUseExceptions ) {
   33076             :       CPLErr eclass = CPLGetLastErrorType();
   33077             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33078             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33079             :       }
   33080             :     }
   33081             : #endif
   33082             :   }
   33083          13 :   resultobj = SWIG_From_int(static_cast< int >(result));
   33084          13 :   {
   33085             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33086          13 :     free(arg3);
   33087             :   }
   33088          13 :   {
   33089             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33090          13 :     free(arg5);
   33091             :   }
   33092          13 :   {
   33093             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   33094          13 :     free(arg7);
   33095             :   }
   33096          13 :   {
   33097             :     /* %typemap(freearg) char **dict */
   33098          13 :     CSLDestroy( arg9 );
   33099             :   }
   33100          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; } }
   33101             :   return resultobj;
   33102           0 : fail:
   33103           0 :   {
   33104             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33105           0 :     free(arg3);
   33106             :   }
   33107           0 :   {
   33108             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33109           0 :     free(arg5);
   33110             :   }
   33111           0 :   {
   33112             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   33113           0 :     free(arg7);
   33114             :   }
   33115           0 :   {
   33116             :     /* %typemap(freearg) char **dict */
   33117           0 :     CSLDestroy( arg9 );
   33118             :   }
   33119             :   return NULL;
   33120             : }
   33121             : 
   33122             : 
   33123         515 : SWIGINTERN PyObject *_wrap_MDArray_Write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33124         515 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33125         515 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33126         515 :   int arg2 ;
   33127         515 :   GUIntBig *arg3 = (GUIntBig *) 0 ;
   33128         515 :   int arg4 ;
   33129         515 :   GUIntBig *arg5 = (GUIntBig *) 0 ;
   33130         515 :   int arg6 ;
   33131         515 :   GIntBig *arg7 = (GIntBig *) 0 ;
   33132         515 :   int arg8 ;
   33133         515 :   GIntBig *arg9 = (GIntBig *) 0 ;
   33134         515 :   GDALExtendedDataTypeHS *arg10 = (GDALExtendedDataTypeHS *) 0 ;
   33135         515 :   GIntBig arg11 ;
   33136         515 :   char *arg12 = (char *) 0 ;
   33137         515 :   void *argp1 = 0 ;
   33138         515 :   int res1 = 0 ;
   33139         515 :   void *argp10 = 0 ;
   33140         515 :   int res10 = 0 ;
   33141         515 :   int alloc11 = 0 ;
   33142         515 :   bool viewIsValid11 = false ;
   33143         515 :   Py_buffer view11 ;
   33144         515 :   PyObject *swig_obj[7] ;
   33145         515 :   CPLErr result;
   33146             :   
   33147         515 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_Write", 7, 7, swig_obj)) SWIG_fail;
   33148         515 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33149         515 :   if (!SWIG_IsOK(res1)) {
   33150           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Write" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33151             :   }
   33152         515 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33153         515 :   {
   33154             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   33155         515 :     arg3 = CreateCGUIntBigListFromSequence(swig_obj[1], &arg2);
   33156         515 :     if( arg2 < 0 ) {
   33157           0 :       SWIG_fail;
   33158             :     }
   33159             :   }
   33160         515 :   {
   33161             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   33162         515 :     arg5 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg4);
   33163         515 :     if( arg4 < 0 ) {
   33164           0 :       SWIG_fail;
   33165             :     }
   33166             :   }
   33167         515 :   {
   33168             :     /* %typemap(in,numinputs=1) (int nList, GIntBig* pList)*/
   33169         515 :     arg7 = CreateCGIntBigListFromSequence(swig_obj[3], &arg6);
   33170         515 :     if( arg6 < 0 ) {
   33171           0 :       SWIG_fail;
   33172             :     }
   33173             :   }
   33174         515 :   {
   33175             :     /* %typemap(in,numinputs=1) (int nList, GIntBig* pList)*/
   33176         515 :     arg9 = CreateCGIntBigListFromSequence(swig_obj[4], &arg8);
   33177         515 :     if( arg8 < 0 ) {
   33178           0 :       SWIG_fail;
   33179             :     }
   33180             :   }
   33181         515 :   res10 = SWIG_ConvertPtr(swig_obj[5], &argp10,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   33182         515 :   if (!SWIG_IsOK(res10)) {
   33183           0 :     SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "MDArray_Write" "', argument " "10"" of type '" "GDALExtendedDataTypeHS *""'"); 
   33184             :   }
   33185         515 :   arg10 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp10);
   33186         515 :   {
   33187             :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   33188         515 :     char* ptr = NULL;
   33189         515 :     if( !GetBufferAsCharPtrGIntBigSize(swig_obj[6], &arg11, &ptr, &alloc11, &viewIsValid11, &view11) ) {
   33190           0 :       SWIG_fail;
   33191             :     }
   33192         515 :     arg12 = (char *)ptr;
   33193             :   }
   33194         515 :   {
   33195         515 :     if (!arg10) {
   33196           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   33197             :     }
   33198             :   }
   33199         515 :   {
   33200         515 :     const int bLocalUseExceptions = GetUseExceptions();
   33201         515 :     if ( bLocalUseExceptions ) {
   33202          44 :       pushErrorHandler();
   33203             :     }
   33204         515 :     {
   33205         515 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33206         515 :       result = (CPLErr)GDALMDArrayHS_Write(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
   33207         515 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33208             :     }
   33209         515 :     if ( bLocalUseExceptions ) {
   33210          44 :       popErrorHandler();
   33211             :     }
   33212             : #ifndef SED_HACKS
   33213             :     if ( bLocalUseExceptions ) {
   33214             :       CPLErr eclass = CPLGetLastErrorType();
   33215             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33216             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33217             :       }
   33218             :     }
   33219             : #endif
   33220             :   }
   33221         515 :   resultobj = SWIG_From_int(static_cast< int >(result));
   33222         515 :   {
   33223             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33224         515 :     free(arg3);
   33225             :   }
   33226         515 :   {
   33227             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33228         515 :     free(arg5);
   33229             :   }
   33230         515 :   {
   33231             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   33232         515 :     free(arg7);
   33233             :   }
   33234         515 :   {
   33235             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   33236         515 :     free(arg9);
   33237             :   }
   33238         515 :   {
   33239             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   33240         515 :     if( viewIsValid11 ) {
   33241         514 :       PyBuffer_Release(&view11);
   33242             :     }
   33243           1 :     else if( alloc11 == SWIG_NEWOBJ ) {
   33244           1 :       delete[] arg12;
   33245             :     }
   33246             :   }
   33247         517 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   33248             :   return resultobj;
   33249           0 : fail:
   33250           0 :   {
   33251             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33252           0 :     free(arg3);
   33253             :   }
   33254           0 :   {
   33255             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33256           0 :     free(arg5);
   33257             :   }
   33258           0 :   {
   33259             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   33260           0 :     free(arg7);
   33261             :   }
   33262           0 :   {
   33263             :     /* %typemap(freearg) (int nList, GIntBig* pList) */
   33264           0 :     free(arg9);
   33265             :   }
   33266           0 :   {
   33267             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   33268           0 :     if( viewIsValid11 ) {
   33269           0 :       PyBuffer_Release(&view11);
   33270             :     }
   33271           0 :     else if( alloc11 == SWIG_NEWOBJ ) {
   33272           0 :       delete[] arg12;
   33273             :     }
   33274             :   }
   33275             :   return NULL;
   33276             : }
   33277             : 
   33278             : 
   33279          22 : SWIGINTERN PyObject *_wrap_MDArray_AdviseRead(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33280          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33281          22 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33282          22 :   int arg2 ;
   33283          22 :   GUIntBig *arg3 = (GUIntBig *) 0 ;
   33284          22 :   int arg4 ;
   33285          22 :   GUIntBig *arg5 = (GUIntBig *) 0 ;
   33286          22 :   char **arg6 = (char **) 0 ;
   33287          22 :   void *argp1 = 0 ;
   33288          22 :   int res1 = 0 ;
   33289          22 :   PyObject *swig_obj[4] ;
   33290          22 :   CPLErr result;
   33291             :   
   33292          22 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_AdviseRead", 3, 4, swig_obj)) SWIG_fail;
   33293          22 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33294          22 :   if (!SWIG_IsOK(res1)) {
   33295           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_AdviseRead" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33296             :   }
   33297          22 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33298          22 :   {
   33299             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   33300          22 :     arg3 = CreateCGUIntBigListFromSequence(swig_obj[1], &arg2);
   33301          22 :     if( arg2 < 0 ) {
   33302           0 :       SWIG_fail;
   33303             :     }
   33304             :   }
   33305          22 :   {
   33306             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   33307          22 :     arg5 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg4);
   33308          22 :     if( arg4 < 0 ) {
   33309           0 :       SWIG_fail;
   33310             :     }
   33311             :   }
   33312          22 :   if (swig_obj[3]) {
   33313          22 :     {
   33314             :       /* %typemap(in) char **dict */
   33315          22 :       arg6 = NULL;
   33316          22 :       if ( PySequence_Check( swig_obj[3] ) ) {
   33317          22 :         int bErr = FALSE;
   33318          22 :         arg6 = CSLFromPySequence(swig_obj[3], &bErr);
   33319          22 :         if ( bErr )
   33320             :         {
   33321           0 :           SWIG_fail;
   33322             :         }
   33323             :       }
   33324           0 :       else if ( PyMapping_Check( swig_obj[3] ) ) {
   33325           0 :         int bErr = FALSE;
   33326           0 :         arg6 = CSLFromPyMapping(swig_obj[3], &bErr);
   33327           0 :         if ( bErr )
   33328             :         {
   33329           0 :           SWIG_fail;
   33330             :         }
   33331             :       }
   33332             :       else {
   33333           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   33334           0 :         SWIG_fail;
   33335             :       }
   33336             :     }
   33337             :   }
   33338          22 :   {
   33339          22 :     const int bLocalUseExceptions = GetUseExceptions();
   33340          22 :     if ( bLocalUseExceptions ) {
   33341           0 :       pushErrorHandler();
   33342             :     }
   33343          22 :     {
   33344          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33345          22 :       result = (CPLErr)GDALMDArrayHS_AdviseRead(arg1,arg2,arg3,arg4,arg5,arg6);
   33346          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33347             :     }
   33348          22 :     if ( bLocalUseExceptions ) {
   33349           0 :       popErrorHandler();
   33350             :     }
   33351             : #ifndef SED_HACKS
   33352             :     if ( bLocalUseExceptions ) {
   33353             :       CPLErr eclass = CPLGetLastErrorType();
   33354             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33355             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33356             :       }
   33357             :     }
   33358             : #endif
   33359             :   }
   33360          22 :   resultobj = SWIG_From_int(static_cast< int >(result));
   33361          22 :   {
   33362             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33363          22 :     free(arg3);
   33364             :   }
   33365          22 :   {
   33366             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33367          22 :     free(arg5);
   33368             :   }
   33369          22 :   {
   33370             :     /* %typemap(freearg) char **dict */
   33371          22 :     CSLDestroy( arg6 );
   33372             :   }
   33373          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; } }
   33374             :   return resultobj;
   33375           0 : fail:
   33376           0 :   {
   33377             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33378           0 :     free(arg3);
   33379             :   }
   33380           0 :   {
   33381             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33382           0 :     free(arg5);
   33383             :   }
   33384           0 :   {
   33385             :     /* %typemap(freearg) char **dict */
   33386           0 :     CSLDestroy( arg6 );
   33387             :   }
   33388             :   return NULL;
   33389             : }
   33390             : 
   33391             : 
   33392         119 : SWIGINTERN PyObject *_wrap_MDArray_GetAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33393         119 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33394         119 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33395         119 :   char *arg2 = (char *) 0 ;
   33396         119 :   void *argp1 = 0 ;
   33397         119 :   int res1 = 0 ;
   33398         119 :   int res2 ;
   33399         119 :   char *buf2 = 0 ;
   33400         119 :   int alloc2 = 0 ;
   33401         119 :   PyObject *swig_obj[2] ;
   33402         119 :   GDALAttributeHS *result = 0 ;
   33403             :   
   33404         119 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_GetAttribute", 2, 2, swig_obj)) SWIG_fail;
   33405         119 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33406         119 :   if (!SWIG_IsOK(res1)) {
   33407           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetAttribute" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33408             :   }
   33409         119 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33410         119 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   33411         119 :   if (!SWIG_IsOK(res2)) {
   33412           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_GetAttribute" "', argument " "2"" of type '" "char const *""'");
   33413             :   }
   33414         119 :   arg2 = reinterpret_cast< char * >(buf2);
   33415         119 :   {
   33416         119 :     if (!arg2) {
   33417           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   33418             :     }
   33419             :   }
   33420         119 :   {
   33421         119 :     const int bLocalUseExceptions = GetUseExceptions();
   33422         119 :     if ( bLocalUseExceptions ) {
   33423          59 :       pushErrorHandler();
   33424             :     }
   33425         119 :     {
   33426         119 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33427         119 :       result = (GDALAttributeHS *)GDALMDArrayHS_GetAttribute(arg1,(char const *)arg2);
   33428         119 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33429             :     }
   33430         119 :     if ( bLocalUseExceptions ) {
   33431          59 :       popErrorHandler();
   33432             :     }
   33433             : #ifndef SED_HACKS
   33434             :     if ( bLocalUseExceptions ) {
   33435             :       CPLErr eclass = CPLGetLastErrorType();
   33436             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33437             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33438             :       }
   33439             :     }
   33440             : #endif
   33441             :   }
   33442         119 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAttributeHS, SWIG_POINTER_OWN |  0 );
   33443         119 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   33444         129 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   33445             :   return resultobj;
   33446           0 : fail:
   33447           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   33448             :   return NULL;
   33449             : }
   33450             : 
   33451             : 
   33452          58 : SWIGINTERN PyObject *_wrap_MDArray_GetAttributes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33453          58 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33454          58 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33455          58 :   GDALAttributeHS ***arg2 = (GDALAttributeHS ***) 0 ;
   33456          58 :   size_t *arg3 = (size_t *) 0 ;
   33457          58 :   char **arg4 = (char **) 0 ;
   33458          58 :   void *argp1 = 0 ;
   33459          58 :   int res1 = 0 ;
   33460          58 :   GDALAttributeHS **attrs2 = 0 ;
   33461          58 :   size_t nCount2 = 0 ;
   33462          58 :   PyObject *swig_obj[2] ;
   33463             :   
   33464          58 :   {
   33465             :     /* %typemap(in,numinputs=0) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   33466          58 :     arg2 = &attrs2;
   33467          58 :     arg3 = &nCount2;
   33468             :   }
   33469          58 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_GetAttributes", 1, 2, swig_obj)) SWIG_fail;
   33470          58 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33471          58 :   if (!SWIG_IsOK(res1)) {
   33472           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetAttributes" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33473             :   }
   33474          58 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33475          58 :   if (swig_obj[1]) {
   33476           0 :     {
   33477             :       /* %typemap(in) char **dict */
   33478           0 :       arg4 = NULL;
   33479           0 :       if ( PySequence_Check( swig_obj[1] ) ) {
   33480           0 :         int bErr = FALSE;
   33481           0 :         arg4 = CSLFromPySequence(swig_obj[1], &bErr);
   33482           0 :         if ( bErr )
   33483             :         {
   33484           0 :           SWIG_fail;
   33485             :         }
   33486             :       }
   33487           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   33488           0 :         int bErr = FALSE;
   33489           0 :         arg4 = CSLFromPyMapping(swig_obj[1], &bErr);
   33490           0 :         if ( bErr )
   33491             :         {
   33492           0 :           SWIG_fail;
   33493             :         }
   33494             :       }
   33495             :       else {
   33496           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   33497           0 :         SWIG_fail;
   33498             :       }
   33499             :     }
   33500             :   }
   33501          58 :   {
   33502          58 :     const int bLocalUseExceptions = GetUseExceptions();
   33503          58 :     if ( bLocalUseExceptions ) {
   33504          42 :       pushErrorHandler();
   33505             :     }
   33506          58 :     {
   33507          58 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33508          58 :       GDALMDArrayHS_GetAttributes(arg1,arg2,arg3,arg4);
   33509          58 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33510             :     }
   33511          58 :     if ( bLocalUseExceptions ) {
   33512          42 :       popErrorHandler();
   33513             :     }
   33514             : #ifndef SED_HACKS
   33515             :     if ( bLocalUseExceptions ) {
   33516             :       CPLErr eclass = CPLGetLastErrorType();
   33517             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33518             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33519             :       }
   33520             :     }
   33521             : #endif
   33522             :   }
   33523          58 :   resultobj = SWIG_Py_Void();
   33524          58 :   {
   33525             :     /* %typemap(argout) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   33526          58 :     Py_DECREF(resultobj);
   33527          58 :     resultobj = PyList_New( *arg3 );
   33528          58 :     if( !resultobj ) {
   33529           0 :       SWIG_fail;
   33530             :     }
   33531         187 :     for( size_t i = 0; i < *arg3; i++ ) {
   33532         129 :       PyList_SetItem(resultobj, i,
   33533         129 :         SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALAttributeHS,SWIG_POINTER_OWN) );
   33534             :       /* We have borrowed the GDALAttributeHS */
   33535         129 :       (*arg2)[i] = NULL;
   33536             :     }
   33537             :   }
   33538          58 :   {
   33539             :     /* %typemap(freearg) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   33540          58 :     GDALReleaseAttributes(*arg2, *arg3);
   33541             :   }
   33542          58 :   {
   33543             :     /* %typemap(freearg) char **dict */
   33544          58 :     CSLDestroy( arg4 );
   33545             :   }
   33546          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; } }
   33547             :   return resultobj;
   33548           0 : fail:
   33549           0 :   {
   33550             :     /* %typemap(freearg) (GDALAttributeHS*** pattrs, size_t* pnCount) */
   33551           0 :     GDALReleaseAttributes(*arg2, *arg3);
   33552             :   }
   33553           0 :   {
   33554             :     /* %typemap(freearg) char **dict */
   33555           0 :     CSLDestroy( arg4 );
   33556             :   }
   33557             :   return NULL;
   33558             : }
   33559             : 
   33560             : 
   33561         163 : SWIGINTERN PyObject *_wrap_MDArray_CreateAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33562         163 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33563         163 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33564         163 :   char *arg2 = (char *) 0 ;
   33565         163 :   int arg3 ;
   33566         163 :   GUIntBig *arg4 = (GUIntBig *) 0 ;
   33567         163 :   GDALExtendedDataTypeHS *arg5 = (GDALExtendedDataTypeHS *) 0 ;
   33568         163 :   char **arg6 = (char **) 0 ;
   33569         163 :   void *argp1 = 0 ;
   33570         163 :   int res1 = 0 ;
   33571         163 :   int res2 ;
   33572         163 :   char *buf2 = 0 ;
   33573         163 :   int alloc2 = 0 ;
   33574         163 :   void *argp5 = 0 ;
   33575         163 :   int res5 = 0 ;
   33576         163 :   PyObject *swig_obj[5] ;
   33577         163 :   GDALAttributeHS *result = 0 ;
   33578             :   
   33579         163 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_CreateAttribute", 4, 5, swig_obj)) SWIG_fail;
   33580         163 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33581         163 :   if (!SWIG_IsOK(res1)) {
   33582           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_CreateAttribute" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33583             :   }
   33584         163 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33585         163 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   33586         163 :   if (!SWIG_IsOK(res2)) {
   33587           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_CreateAttribute" "', argument " "2"" of type '" "char const *""'");
   33588             :   }
   33589         163 :   arg2 = reinterpret_cast< char * >(buf2);
   33590         163 :   {
   33591             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   33592         163 :     arg4 = CreateCGUIntBigListFromSequence(swig_obj[2], &arg3);
   33593         163 :     if( arg3 < 0 ) {
   33594           0 :       SWIG_fail;
   33595             :     }
   33596             :   }
   33597         163 :   res5 = SWIG_ConvertPtr(swig_obj[3], &argp5,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   33598         163 :   if (!SWIG_IsOK(res5)) {
   33599           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "MDArray_CreateAttribute" "', argument " "5"" of type '" "GDALExtendedDataTypeHS *""'"); 
   33600             :   }
   33601         163 :   arg5 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp5);
   33602         163 :   if (swig_obj[4]) {
   33603           0 :     {
   33604             :       /* %typemap(in) char **dict */
   33605           0 :       arg6 = NULL;
   33606           0 :       if ( PySequence_Check( swig_obj[4] ) ) {
   33607           0 :         int bErr = FALSE;
   33608           0 :         arg6 = CSLFromPySequence(swig_obj[4], &bErr);
   33609           0 :         if ( bErr )
   33610             :         {
   33611           0 :           SWIG_fail;
   33612             :         }
   33613             :       }
   33614           0 :       else if ( PyMapping_Check( swig_obj[4] ) ) {
   33615           0 :         int bErr = FALSE;
   33616           0 :         arg6 = CSLFromPyMapping(swig_obj[4], &bErr);
   33617           0 :         if ( bErr )
   33618             :         {
   33619           0 :           SWIG_fail;
   33620             :         }
   33621             :       }
   33622             :       else {
   33623           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   33624           0 :         SWIG_fail;
   33625             :       }
   33626             :     }
   33627             :   }
   33628         163 :   {
   33629         163 :     if (!arg2) {
   33630           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   33631             :     }
   33632             :   }
   33633         162 :   {
   33634         162 :     if (!arg5) {
   33635           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   33636             :     }
   33637             :   }
   33638         162 :   {
   33639         162 :     const int bLocalUseExceptions = GetUseExceptions();
   33640         162 :     if ( bLocalUseExceptions ) {
   33641         118 :       pushErrorHandler();
   33642             :     }
   33643         162 :     {
   33644         162 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33645         162 :       result = (GDALAttributeHS *)GDALMDArrayHS_CreateAttribute(arg1,(char const *)arg2,arg3,arg4,arg5,arg6);
   33646         162 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33647             :     }
   33648         162 :     if ( bLocalUseExceptions ) {
   33649         118 :       popErrorHandler();
   33650             :     }
   33651             : #ifndef SED_HACKS
   33652             :     if ( bLocalUseExceptions ) {
   33653             :       CPLErr eclass = CPLGetLastErrorType();
   33654             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33655             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33656             :       }
   33657             :     }
   33658             : #endif
   33659             :   }
   33660         162 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAttributeHS, SWIG_POINTER_OWN |  0 );
   33661         162 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   33662         162 :   {
   33663             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33664         162 :     free(arg4);
   33665             :   }
   33666         162 :   {
   33667             :     /* %typemap(freearg) char **dict */
   33668         162 :     CSLDestroy( arg6 );
   33669             :   }
   33670         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; } }
   33671             :   return resultobj;
   33672           1 : fail:
   33673           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   33674           1 :   {
   33675             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   33676           1 :     free(arg4);
   33677             :   }
   33678           1 :   {
   33679             :     /* %typemap(freearg) char **dict */
   33680           1 :     CSLDestroy( arg6 );
   33681             :   }
   33682             :   return NULL;
   33683             : }
   33684             : 
   33685             : 
   33686          24 : SWIGINTERN PyObject *_wrap_MDArray_DeleteAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33687          24 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33688          24 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33689          24 :   char *arg2 = (char *) 0 ;
   33690          24 :   char **arg3 = (char **) 0 ;
   33691          24 :   void *argp1 = 0 ;
   33692          24 :   int res1 = 0 ;
   33693          24 :   int res2 ;
   33694          24 :   char *buf2 = 0 ;
   33695          24 :   int alloc2 = 0 ;
   33696          24 :   PyObject *swig_obj[3] ;
   33697          24 :   CPLErr result;
   33698             :   
   33699          24 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_DeleteAttribute", 2, 3, swig_obj)) SWIG_fail;
   33700          24 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33701          24 :   if (!SWIG_IsOK(res1)) {
   33702           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_DeleteAttribute" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33703             :   }
   33704          24 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33705          24 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   33706          24 :   if (!SWIG_IsOK(res2)) {
   33707           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_DeleteAttribute" "', argument " "2"" of type '" "char const *""'");
   33708             :   }
   33709          24 :   arg2 = reinterpret_cast< char * >(buf2);
   33710          24 :   if (swig_obj[2]) {
   33711           0 :     {
   33712             :       /* %typemap(in) char **dict */
   33713           0 :       arg3 = NULL;
   33714           0 :       if ( PySequence_Check( swig_obj[2] ) ) {
   33715           0 :         int bErr = FALSE;
   33716           0 :         arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   33717           0 :         if ( bErr )
   33718             :         {
   33719           0 :           SWIG_fail;
   33720             :         }
   33721             :       }
   33722           0 :       else if ( PyMapping_Check( swig_obj[2] ) ) {
   33723           0 :         int bErr = FALSE;
   33724           0 :         arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   33725           0 :         if ( bErr )
   33726             :         {
   33727           0 :           SWIG_fail;
   33728             :         }
   33729             :       }
   33730             :       else {
   33731           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   33732           0 :         SWIG_fail;
   33733             :       }
   33734             :     }
   33735             :   }
   33736          24 :   {
   33737          24 :     if (!arg2) {
   33738           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   33739             :     }
   33740             :   }
   33741          24 :   {
   33742          24 :     const int bLocalUseExceptions = GetUseExceptions();
   33743          24 :     if ( bLocalUseExceptions ) {
   33744          24 :       pushErrorHandler();
   33745             :     }
   33746          24 :     {
   33747          24 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33748          24 :       result = (CPLErr)GDALMDArrayHS_DeleteAttribute(arg1,(char const *)arg2,arg3);
   33749          24 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33750             :     }
   33751          24 :     if ( bLocalUseExceptions ) {
   33752          24 :       popErrorHandler();
   33753             :     }
   33754             : #ifndef SED_HACKS
   33755             :     if ( bLocalUseExceptions ) {
   33756             :       CPLErr eclass = CPLGetLastErrorType();
   33757             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33758             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33759             :       }
   33760             :     }
   33761             : #endif
   33762             :   }
   33763          24 :   resultobj = SWIG_From_int(static_cast< int >(result));
   33764          24 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   33765          24 :   {
   33766             :     /* %typemap(freearg) char **dict */
   33767          24 :     CSLDestroy( arg3 );
   33768             :   }
   33769          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; } }
   33770             :   return resultobj;
   33771           0 : fail:
   33772           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   33773           0 :   {
   33774             :     /* %typemap(freearg) char **dict */
   33775           0 :     CSLDestroy( arg3 );
   33776             :   }
   33777             :   return NULL;
   33778             : }
   33779             : 
   33780             : 
   33781          72 : SWIGINTERN PyObject *_wrap_MDArray_GetNoDataValueAsRaw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33782          72 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33783          72 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33784          72 :   void **arg2 = (void **) 0 ;
   33785          72 :   void *argp1 = 0 ;
   33786          72 :   int res1 = 0 ;
   33787          72 :   void *pyObject2 = NULL ;
   33788          72 :   PyObject *swig_obj[1] ;
   33789          72 :   CPLErr result;
   33790             :   
   33791          72 :   {
   33792             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject2 = NULL ) */
   33793          72 :     arg2 = &pyObject2;
   33794             :   }
   33795          72 :   if (!args) SWIG_fail;
   33796          72 :   swig_obj[0] = args;
   33797          72 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33798          72 :   if (!SWIG_IsOK(res1)) {
   33799           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetNoDataValueAsRaw" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33800             :   }
   33801          72 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33802          72 :   {
   33803          72 :     const int bLocalUseExceptions = GetUseExceptions();
   33804          72 :     if ( bLocalUseExceptions ) {
   33805          20 :       pushErrorHandler();
   33806             :     }
   33807          72 :     {
   33808          72 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33809          72 :       result = (CPLErr)GDALMDArrayHS_GetNoDataValueAsRaw(arg1,arg2);
   33810          72 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33811             :     }
   33812          72 :     if ( bLocalUseExceptions ) {
   33813          20 :       popErrorHandler();
   33814             :     }
   33815             : #ifndef SED_HACKS
   33816             :     if ( bLocalUseExceptions ) {
   33817             :       CPLErr eclass = CPLGetLastErrorType();
   33818             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33819             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33820             :       }
   33821             :     }
   33822             : #endif
   33823             :   }
   33824          72 :   resultobj = SWIG_From_int(static_cast< int >(result));
   33825          72 :   {
   33826             :     /* %typemap(argout) ( void **outPythonObject ) */
   33827          72 :     Py_XDECREF(resultobj);
   33828          72 :     if (*arg2)
   33829             :     {
   33830             :       resultobj = (PyObject*)*arg2;
   33831             :     }
   33832             :     else
   33833             :     {
   33834          36 :       resultobj = Py_None;
   33835          36 :       Py_INCREF(resultobj);
   33836             :     }
   33837             :   }
   33838          72 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   33839             :   return resultobj;
   33840             : fail:
   33841             :   return NULL;
   33842             : }
   33843             : 
   33844             : 
   33845         120 : SWIGINTERN PyObject *_wrap_MDArray_GetNoDataValueAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33846         120 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33847         120 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33848         120 :   double *arg2 = (double *) 0 ;
   33849         120 :   int *arg3 = (int *) 0 ;
   33850         120 :   void *argp1 = 0 ;
   33851         120 :   int res1 = 0 ;
   33852         120 :   double tmpval2 ;
   33853         120 :   int tmphasval2 ;
   33854         120 :   PyObject *swig_obj[1] ;
   33855             :   
   33856         120 :   {
   33857             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   33858         120 :     arg2 = &tmpval2;
   33859         120 :     arg3 = &tmphasval2;
   33860             :   }
   33861         120 :   if (!args) SWIG_fail;
   33862         120 :   swig_obj[0] = args;
   33863         120 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33864         120 :   if (!SWIG_IsOK(res1)) {
   33865           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetNoDataValueAsDouble" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33866             :   }
   33867         120 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33868         120 :   {
   33869         120 :     const int bLocalUseExceptions = GetUseExceptions();
   33870         120 :     if ( bLocalUseExceptions ) {
   33871           8 :       pushErrorHandler();
   33872             :     }
   33873         120 :     {
   33874         120 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33875         120 :       GDALMDArrayHS_GetNoDataValueAsDouble(arg1,arg2,arg3);
   33876         120 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33877             :     }
   33878         120 :     if ( bLocalUseExceptions ) {
   33879           8 :       popErrorHandler();
   33880             :     }
   33881             : #ifndef SED_HACKS
   33882             :     if ( bLocalUseExceptions ) {
   33883             :       CPLErr eclass = CPLGetLastErrorType();
   33884             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33885             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33886             :       }
   33887             :     }
   33888             : #endif
   33889             :   }
   33890         120 :   resultobj = SWIG_Py_Void();
   33891         120 :   {
   33892             :     /* %typemap(python,argout) (double *val, int *hasval) */
   33893         120 :     PyObject *r;
   33894         120 :     if ( !*arg3 ) {
   33895          48 :       Py_INCREF(Py_None);
   33896          48 :       r = Py_None;
   33897             :     }
   33898             :     else {
   33899          72 :       r = PyFloat_FromDouble( *arg2 );
   33900             :     }
   33901             : #if SWIG_VERSION >= 0x040300
   33902             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   33903             : #else
   33904         120 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   33905             : #endif
   33906             :   }
   33907         120 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   33908             :   return resultobj;
   33909             : fail:
   33910             :   return NULL;
   33911             : }
   33912             : 
   33913             : 
   33914          11 : SWIGINTERN PyObject *_wrap_MDArray_GetNoDataValueAsInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33915          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33916          11 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33917          11 :   GIntBig *arg2 = (GIntBig *) 0 ;
   33918          11 :   int *arg3 = (int *) 0 ;
   33919          11 :   void *argp1 = 0 ;
   33920          11 :   int res1 = 0 ;
   33921          11 :   GIntBig tmpval2 ;
   33922          11 :   int tmphasval2 ;
   33923          11 :   PyObject *swig_obj[1] ;
   33924             :   
   33925          11 :   {
   33926             :     /* %typemap(python,in,numinputs=0) (GIntBig *val, int *hasval) */
   33927          11 :     arg2 = &tmpval2;
   33928          11 :     arg3 = &tmphasval2;
   33929             :   }
   33930          11 :   if (!args) SWIG_fail;
   33931          11 :   swig_obj[0] = args;
   33932          11 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   33933          11 :   if (!SWIG_IsOK(res1)) {
   33934           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetNoDataValueAsInt64" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   33935             :   }
   33936          11 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   33937          11 :   {
   33938          11 :     const int bLocalUseExceptions = GetUseExceptions();
   33939          11 :     if ( bLocalUseExceptions ) {
   33940           0 :       pushErrorHandler();
   33941             :     }
   33942          11 :     {
   33943          11 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   33944          11 :       GDALMDArrayHS_GetNoDataValueAsInt64(arg1,arg2,arg3);
   33945          11 :       SWIG_PYTHON_THREAD_END_ALLOW;
   33946             :     }
   33947          11 :     if ( bLocalUseExceptions ) {
   33948           0 :       popErrorHandler();
   33949             :     }
   33950             : #ifndef SED_HACKS
   33951             :     if ( bLocalUseExceptions ) {
   33952             :       CPLErr eclass = CPLGetLastErrorType();
   33953             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   33954             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   33955             :       }
   33956             :     }
   33957             : #endif
   33958             :   }
   33959          11 :   resultobj = SWIG_Py_Void();
   33960          11 :   {
   33961             :     /* %typemap(python,argout) (GIntBig *val, int *hasval) */
   33962          11 :     PyObject *r;
   33963          11 :     if ( !*arg3 ) {
   33964           4 :       Py_INCREF(Py_None);
   33965           4 :       r = Py_None;
   33966             :     }
   33967             :     else {
   33968           7 :       r = PyLong_FromLongLong( *arg2 );
   33969             :     }
   33970             : #if SWIG_VERSION >= 0x040300
   33971             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   33972             : #else
   33973          11 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   33974             : #endif
   33975             :   }
   33976          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; } }
   33977             :   return resultobj;
   33978             : fail:
   33979             :   return NULL;
   33980             : }
   33981             : 
   33982             : 
   33983           7 : SWIGINTERN PyObject *_wrap_MDArray_GetNoDataValueAsUInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   33984           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   33985           7 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   33986           7 :   GUIntBig *arg2 = (GUIntBig *) 0 ;
   33987           7 :   int *arg3 = (int *) 0 ;
   33988           7 :   void *argp1 = 0 ;
   33989           7 :   int res1 = 0 ;
   33990           7 :   GUIntBig tmpval2 ;
   33991           7 :   int tmphasval2 ;
   33992           7 :   PyObject *swig_obj[1] ;
   33993             :   
   33994           7 :   {
   33995             :     /* %typemap(python,in,numinputs=0) (GUIntBig *val, int *hasval) */
   33996           7 :     arg2 = &tmpval2;
   33997           7 :     arg3 = &tmphasval2;
   33998             :   }
   33999           7 :   if (!args) SWIG_fail;
   34000           7 :   swig_obj[0] = args;
   34001           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34002           7 :   if (!SWIG_IsOK(res1)) {
   34003           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetNoDataValueAsUInt64" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34004             :   }
   34005           7 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34006           7 :   {
   34007           7 :     const int bLocalUseExceptions = GetUseExceptions();
   34008           7 :     if ( bLocalUseExceptions ) {
   34009           0 :       pushErrorHandler();
   34010             :     }
   34011           7 :     {
   34012           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34013           7 :       GDALMDArrayHS_GetNoDataValueAsUInt64(arg1,arg2,arg3);
   34014           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34015             :     }
   34016           7 :     if ( bLocalUseExceptions ) {
   34017           0 :       popErrorHandler();
   34018             :     }
   34019             : #ifndef SED_HACKS
   34020             :     if ( bLocalUseExceptions ) {
   34021             :       CPLErr eclass = CPLGetLastErrorType();
   34022             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34023             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34024             :       }
   34025             :     }
   34026             : #endif
   34027             :   }
   34028           7 :   resultobj = SWIG_Py_Void();
   34029           7 :   {
   34030             :     /* %typemap(python,argout) (GUIntBig *val, int *hasval) */
   34031           7 :     PyObject *r;
   34032           7 :     if ( !*arg3 ) {
   34033           2 :       Py_INCREF(Py_None);
   34034           2 :       r = Py_None;
   34035             :     }
   34036             :     else {
   34037           5 :       r = PyLong_FromUnsignedLongLong( *arg2 );
   34038             :     }
   34039             : #if SWIG_VERSION >= 0x040300
   34040             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   34041             : #else
   34042           7 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   34043             : #endif
   34044             :   }
   34045           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; } }
   34046             :   return resultobj;
   34047             : fail:
   34048             :   return NULL;
   34049             : }
   34050             : 
   34051             : 
   34052           5 : SWIGINTERN PyObject *_wrap_MDArray_GetNoDataValueAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34053           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34054           5 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34055           5 :   void *argp1 = 0 ;
   34056           5 :   int res1 = 0 ;
   34057           5 :   PyObject *swig_obj[1] ;
   34058           5 :   retStringAndCPLFree *result = 0 ;
   34059             :   
   34060           5 :   if (!args) SWIG_fail;
   34061           5 :   swig_obj[0] = args;
   34062           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34063           5 :   if (!SWIG_IsOK(res1)) {
   34064           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetNoDataValueAsString" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34065             :   }
   34066           5 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34067           5 :   {
   34068           5 :     const int bLocalUseExceptions = GetUseExceptions();
   34069           5 :     if ( bLocalUseExceptions ) {
   34070           0 :       pushErrorHandler();
   34071             :     }
   34072           5 :     {
   34073           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34074           5 :       result = (retStringAndCPLFree *)GDALMDArrayHS_GetNoDataValueAsString(arg1);
   34075           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34076             :     }
   34077           5 :     if ( bLocalUseExceptions ) {
   34078           0 :       popErrorHandler();
   34079             :     }
   34080             : #ifndef SED_HACKS
   34081             :     if ( bLocalUseExceptions ) {
   34082             :       CPLErr eclass = CPLGetLastErrorType();
   34083             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34084             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34085             :       }
   34086             :     }
   34087             : #endif
   34088             :   }
   34089           5 :   {
   34090             :     /* %typemap(out) (retStringAndCPLFree*) */
   34091           5 :     Py_XDECREF(resultobj);
   34092           5 :     if(result)
   34093             :     {
   34094           2 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   34095           2 :       CPLFree(result);
   34096             :     }
   34097             :     else
   34098             :     {
   34099           3 :       resultobj = Py_None;
   34100           3 :       Py_INCREF(resultobj);
   34101             :     }
   34102             :   }
   34103           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; } }
   34104             :   return resultobj;
   34105             : fail:
   34106             :   return NULL;
   34107             : }
   34108             : 
   34109             : 
   34110          51 : SWIGINTERN PyObject *_wrap_MDArray_SetNoDataValueDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34111          51 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34112          51 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34113          51 :   double arg2 ;
   34114          51 :   void *argp1 = 0 ;
   34115          51 :   int res1 = 0 ;
   34116          51 :   double val2 ;
   34117          51 :   int ecode2 = 0 ;
   34118          51 :   PyObject *swig_obj[2] ;
   34119          51 :   CPLErr result;
   34120             :   
   34121          51 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetNoDataValueDouble", 2, 2, swig_obj)) SWIG_fail;
   34122          51 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34123          51 :   if (!SWIG_IsOK(res1)) {
   34124           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetNoDataValueDouble" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34125             :   }
   34126          51 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34127          51 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   34128          51 :   if (!SWIG_IsOK(ecode2)) {
   34129           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_SetNoDataValueDouble" "', argument " "2"" of type '" "double""'");
   34130             :   } 
   34131          51 :   arg2 = static_cast< double >(val2);
   34132          51 :   {
   34133          51 :     const int bLocalUseExceptions = GetUseExceptions();
   34134          51 :     if ( bLocalUseExceptions ) {
   34135           4 :       pushErrorHandler();
   34136             :     }
   34137          51 :     {
   34138          51 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34139          51 :       result = (CPLErr)GDALMDArrayHS_SetNoDataValueDouble(arg1,arg2);
   34140          51 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34141             :     }
   34142          51 :     if ( bLocalUseExceptions ) {
   34143           4 :       popErrorHandler();
   34144             :     }
   34145             : #ifndef SED_HACKS
   34146             :     if ( bLocalUseExceptions ) {
   34147             :       CPLErr eclass = CPLGetLastErrorType();
   34148             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34149             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34150             :       }
   34151             :     }
   34152             : #endif
   34153             :   }
   34154          51 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34155          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; } }
   34156             :   return resultobj;
   34157             : fail:
   34158             :   return NULL;
   34159             : }
   34160             : 
   34161             : 
   34162           1 : SWIGINTERN PyObject *_wrap_MDArray_SetNoDataValueInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34163           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34164           1 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34165           1 :   GIntBig arg2 ;
   34166           1 :   void *argp1 = 0 ;
   34167           1 :   int res1 = 0 ;
   34168           1 :   PyObject *swig_obj[2] ;
   34169           1 :   CPLErr result;
   34170             :   
   34171           1 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetNoDataValueInt64", 2, 2, swig_obj)) SWIG_fail;
   34172           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34173           1 :   if (!SWIG_IsOK(res1)) {
   34174           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetNoDataValueInt64" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34175             :   }
   34176           1 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34177           1 :   {
   34178           1 :     arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
   34179             :   }
   34180           1 :   {
   34181           1 :     const int bLocalUseExceptions = GetUseExceptions();
   34182           1 :     if ( bLocalUseExceptions ) {
   34183           0 :       pushErrorHandler();
   34184             :     }
   34185           1 :     {
   34186           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34187           1 :       result = (CPLErr)GDALMDArrayHS_SetNoDataValueInt64(arg1,arg2);
   34188           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34189             :     }
   34190           1 :     if ( bLocalUseExceptions ) {
   34191           0 :       popErrorHandler();
   34192             :     }
   34193             : #ifndef SED_HACKS
   34194             :     if ( bLocalUseExceptions ) {
   34195             :       CPLErr eclass = CPLGetLastErrorType();
   34196             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34197             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34198             :       }
   34199             :     }
   34200             : #endif
   34201             :   }
   34202           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34203           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; } }
   34204             :   return resultobj;
   34205             : fail:
   34206             :   return NULL;
   34207             : }
   34208             : 
   34209             : 
   34210           1 : SWIGINTERN PyObject *_wrap_MDArray_SetNoDataValueUInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34211           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34212           1 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34213           1 :   GUIntBig arg2 ;
   34214           1 :   void *argp1 = 0 ;
   34215           1 :   int res1 = 0 ;
   34216           1 :   PyObject *swig_obj[2] ;
   34217           1 :   CPLErr result;
   34218             :   
   34219           1 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetNoDataValueUInt64", 2, 2, swig_obj)) SWIG_fail;
   34220           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34221           1 :   if (!SWIG_IsOK(res1)) {
   34222           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetNoDataValueUInt64" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34223             :   }
   34224           1 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34225           1 :   {
   34226           1 :     arg2 = (GIntBig)PyLong_AsUnsignedLongLong(swig_obj[1]);
   34227             :   }
   34228           1 :   {
   34229           1 :     const int bLocalUseExceptions = GetUseExceptions();
   34230           1 :     if ( bLocalUseExceptions ) {
   34231           0 :       pushErrorHandler();
   34232             :     }
   34233           1 :     {
   34234           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34235           1 :       result = (CPLErr)GDALMDArrayHS_SetNoDataValueUInt64(arg1,arg2);
   34236           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34237             :     }
   34238           1 :     if ( bLocalUseExceptions ) {
   34239           0 :       popErrorHandler();
   34240             :     }
   34241             : #ifndef SED_HACKS
   34242             :     if ( bLocalUseExceptions ) {
   34243             :       CPLErr eclass = CPLGetLastErrorType();
   34244             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34245             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34246             :       }
   34247             :     }
   34248             : #endif
   34249             :   }
   34250           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34251           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; } }
   34252             :   return resultobj;
   34253             : fail:
   34254             :   return NULL;
   34255             : }
   34256             : 
   34257             : 
   34258           3 : SWIGINTERN PyObject *_wrap_MDArray_SetNoDataValueString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34259           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34260           3 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34261           3 :   char *arg2 = (char *) 0 ;
   34262           3 :   void *argp1 = 0 ;
   34263           3 :   int res1 = 0 ;
   34264           3 :   int res2 ;
   34265           3 :   char *buf2 = 0 ;
   34266           3 :   int alloc2 = 0 ;
   34267           3 :   PyObject *swig_obj[2] ;
   34268           3 :   CPLErr result;
   34269             :   
   34270           3 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetNoDataValueString", 2, 2, swig_obj)) SWIG_fail;
   34271           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34272           3 :   if (!SWIG_IsOK(res1)) {
   34273           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetNoDataValueString" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34274             :   }
   34275           3 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34276           3 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   34277           3 :   if (!SWIG_IsOK(res2)) {
   34278           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_SetNoDataValueString" "', argument " "2"" of type '" "char const *""'");
   34279             :   }
   34280           3 :   arg2 = reinterpret_cast< char * >(buf2);
   34281           3 :   {
   34282           3 :     const int bLocalUseExceptions = GetUseExceptions();
   34283           3 :     if ( bLocalUseExceptions ) {
   34284           0 :       pushErrorHandler();
   34285             :     }
   34286           3 :     {
   34287           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34288           3 :       result = (CPLErr)GDALMDArrayHS_SetNoDataValueString(arg1,(char const *)arg2);
   34289           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34290             :     }
   34291           3 :     if ( bLocalUseExceptions ) {
   34292           0 :       popErrorHandler();
   34293             :     }
   34294             : #ifndef SED_HACKS
   34295             :     if ( bLocalUseExceptions ) {
   34296             :       CPLErr eclass = CPLGetLastErrorType();
   34297             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34298             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34299             :       }
   34300             :     }
   34301             : #endif
   34302             :   }
   34303           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34304           3 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   34305           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; } }
   34306             :   return resultobj;
   34307           0 : fail:
   34308           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   34309             :   return NULL;
   34310             : }
   34311             : 
   34312             : 
   34313           8 : SWIGINTERN PyObject *_wrap_MDArray_SetNoDataValueRaw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34314           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34315           8 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34316           8 :   GIntBig arg2 ;
   34317           8 :   char *arg3 = (char *) 0 ;
   34318           8 :   void *argp1 = 0 ;
   34319           8 :   int res1 = 0 ;
   34320           8 :   int alloc2 = 0 ;
   34321           8 :   bool viewIsValid2 = false ;
   34322           8 :   Py_buffer view2 ;
   34323           8 :   PyObject *swig_obj[2] ;
   34324           8 :   CPLErr result;
   34325             :   
   34326           8 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetNoDataValueRaw", 2, 2, swig_obj)) SWIG_fail;
   34327           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34328           8 :   if (!SWIG_IsOK(res1)) {
   34329           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetNoDataValueRaw" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34330             :   }
   34331           8 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34332           8 :   {
   34333             :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   34334           8 :     char* ptr = NULL;
   34335           8 :     if( !GetBufferAsCharPtrGIntBigSize(swig_obj[1], &arg2, &ptr, &alloc2, &viewIsValid2, &view2) ) {
   34336           0 :       SWIG_fail;
   34337             :     }
   34338           8 :     arg3 = (char *)ptr;
   34339             :   }
   34340           8 :   {
   34341           8 :     const int bLocalUseExceptions = GetUseExceptions();
   34342           8 :     if ( bLocalUseExceptions ) {
   34343           1 :       pushErrorHandler();
   34344             :     }
   34345           8 :     {
   34346           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34347           8 :       result = (CPLErr)GDALMDArrayHS_SetNoDataValueRaw(arg1,arg2,arg3);
   34348           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34349             :     }
   34350           8 :     if ( bLocalUseExceptions ) {
   34351           1 :       popErrorHandler();
   34352             :     }
   34353             : #ifndef SED_HACKS
   34354             :     if ( bLocalUseExceptions ) {
   34355             :       CPLErr eclass = CPLGetLastErrorType();
   34356             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34357             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34358             :       }
   34359             :     }
   34360             : #endif
   34361             :   }
   34362           8 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34363           8 :   {
   34364             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   34365           8 :     if( viewIsValid2 ) {
   34366           8 :       PyBuffer_Release(&view2);
   34367             :     }
   34368           0 :     else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
   34369           0 :       delete[] arg3;
   34370             :     }
   34371             :   }
   34372           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; } }
   34373             :   return resultobj;
   34374           0 : fail:
   34375           0 :   {
   34376             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   34377           0 :     if( viewIsValid2 ) {
   34378           0 :       PyBuffer_Release(&view2);
   34379             :     }
   34380           8 :     else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
   34381             :       delete[] arg3;
   34382             :     }
   34383             :   }
   34384             :   return NULL;
   34385             : }
   34386             : 
   34387             : 
   34388           4 : SWIGINTERN PyObject *_wrap_MDArray_DeleteNoDataValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34389           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34390           4 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34391           4 :   void *argp1 = 0 ;
   34392           4 :   int res1 = 0 ;
   34393           4 :   PyObject *swig_obj[1] ;
   34394           4 :   CPLErr result;
   34395             :   
   34396           4 :   if (!args) SWIG_fail;
   34397           4 :   swig_obj[0] = args;
   34398           4 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34399           4 :   if (!SWIG_IsOK(res1)) {
   34400           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_DeleteNoDataValue" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34401             :   }
   34402           4 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34403           4 :   {
   34404           4 :     const int bLocalUseExceptions = GetUseExceptions();
   34405           4 :     if ( bLocalUseExceptions ) {
   34406           0 :       pushErrorHandler();
   34407             :     }
   34408           4 :     {
   34409           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34410           4 :       result = (CPLErr)GDALMDArrayHS_DeleteNoDataValue(arg1);
   34411           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34412             :     }
   34413           4 :     if ( bLocalUseExceptions ) {
   34414           0 :       popErrorHandler();
   34415             :     }
   34416             : #ifndef SED_HACKS
   34417             :     if ( bLocalUseExceptions ) {
   34418             :       CPLErr eclass = CPLGetLastErrorType();
   34419             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34420             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34421             :       }
   34422             :     }
   34423             : #endif
   34424             :   }
   34425           4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34426           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; } }
   34427             :   return resultobj;
   34428             : fail:
   34429             :   return NULL;
   34430             : }
   34431             : 
   34432             : 
   34433         100 : SWIGINTERN PyObject *_wrap_MDArray_GetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34434         100 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34435         100 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34436         100 :   double *arg2 = (double *) 0 ;
   34437         100 :   int *arg3 = (int *) 0 ;
   34438         100 :   void *argp1 = 0 ;
   34439         100 :   int res1 = 0 ;
   34440         100 :   double tmpval2 ;
   34441         100 :   int tmphasval2 ;
   34442         100 :   PyObject *swig_obj[1] ;
   34443             :   
   34444         100 :   {
   34445             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   34446         100 :     arg2 = &tmpval2;
   34447         100 :     arg3 = &tmphasval2;
   34448             :   }
   34449         100 :   if (!args) SWIG_fail;
   34450         100 :   swig_obj[0] = args;
   34451         100 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34452         100 :   if (!SWIG_IsOK(res1)) {
   34453           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetOffset" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34454             :   }
   34455         100 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34456         100 :   {
   34457         100 :     const int bLocalUseExceptions = GetUseExceptions();
   34458         100 :     if ( bLocalUseExceptions ) {
   34459           1 :       pushErrorHandler();
   34460             :     }
   34461         100 :     {
   34462         100 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34463         100 :       GDALMDArrayHS_GetOffset(arg1,arg2,arg3);
   34464         100 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34465             :     }
   34466         100 :     if ( bLocalUseExceptions ) {
   34467           1 :       popErrorHandler();
   34468             :     }
   34469             : #ifndef SED_HACKS
   34470             :     if ( bLocalUseExceptions ) {
   34471             :       CPLErr eclass = CPLGetLastErrorType();
   34472             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34473             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34474             :       }
   34475             :     }
   34476             : #endif
   34477             :   }
   34478         100 :   resultobj = SWIG_Py_Void();
   34479         100 :   {
   34480             :     /* %typemap(python,argout) (double *val, int *hasval) */
   34481         100 :     PyObject *r;
   34482         100 :     if ( !*arg3 ) {
   34483          82 :       Py_INCREF(Py_None);
   34484          82 :       r = Py_None;
   34485             :     }
   34486             :     else {
   34487          18 :       r = PyFloat_FromDouble( *arg2 );
   34488             :     }
   34489             : #if SWIG_VERSION >= 0x040300
   34490             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   34491             : #else
   34492         100 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   34493             : #endif
   34494             :   }
   34495         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; } }
   34496             :   return resultobj;
   34497             : fail:
   34498             :   return NULL;
   34499             : }
   34500             : 
   34501             : 
   34502           5 : SWIGINTERN PyObject *_wrap_MDArray_GetOffsetStorageType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34503           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34504           5 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34505           5 :   void *argp1 = 0 ;
   34506           5 :   int res1 = 0 ;
   34507           5 :   PyObject *swig_obj[1] ;
   34508           5 :   GDALDataType result;
   34509             :   
   34510           5 :   if (!args) SWIG_fail;
   34511           5 :   swig_obj[0] = args;
   34512           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34513           5 :   if (!SWIG_IsOK(res1)) {
   34514           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetOffsetStorageType" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34515             :   }
   34516           5 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34517           5 :   {
   34518           5 :     const int bLocalUseExceptions = GetUseExceptions();
   34519           5 :     if ( bLocalUseExceptions ) {
   34520           0 :       pushErrorHandler();
   34521             :     }
   34522           5 :     {
   34523           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34524           5 :       result = (GDALDataType)GDALMDArrayHS_GetOffsetStorageType(arg1);
   34525           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34526             :     }
   34527           5 :     if ( bLocalUseExceptions ) {
   34528           0 :       popErrorHandler();
   34529             :     }
   34530             : #ifndef SED_HACKS
   34531             :     if ( bLocalUseExceptions ) {
   34532             :       CPLErr eclass = CPLGetLastErrorType();
   34533             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34534             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34535             :       }
   34536             :     }
   34537             : #endif
   34538             :   }
   34539           5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34540           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; } }
   34541             :   return resultobj;
   34542             : fail:
   34543             :   return NULL;
   34544             : }
   34545             : 
   34546             : 
   34547         103 : SWIGINTERN PyObject *_wrap_MDArray_GetScale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34548         103 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34549         103 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34550         103 :   double *arg2 = (double *) 0 ;
   34551         103 :   int *arg3 = (int *) 0 ;
   34552         103 :   void *argp1 = 0 ;
   34553         103 :   int res1 = 0 ;
   34554         103 :   double tmpval2 ;
   34555         103 :   int tmphasval2 ;
   34556         103 :   PyObject *swig_obj[1] ;
   34557             :   
   34558         103 :   {
   34559             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   34560         103 :     arg2 = &tmpval2;
   34561         103 :     arg3 = &tmphasval2;
   34562             :   }
   34563         103 :   if (!args) SWIG_fail;
   34564         103 :   swig_obj[0] = args;
   34565         103 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34566         103 :   if (!SWIG_IsOK(res1)) {
   34567           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetScale" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34568             :   }
   34569         103 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34570         103 :   {
   34571         103 :     const int bLocalUseExceptions = GetUseExceptions();
   34572         103 :     if ( bLocalUseExceptions ) {
   34573           1 :       pushErrorHandler();
   34574             :     }
   34575         103 :     {
   34576         103 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34577         103 :       GDALMDArrayHS_GetScale(arg1,arg2,arg3);
   34578         103 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34579             :     }
   34580         103 :     if ( bLocalUseExceptions ) {
   34581           1 :       popErrorHandler();
   34582             :     }
   34583             : #ifndef SED_HACKS
   34584             :     if ( bLocalUseExceptions ) {
   34585             :       CPLErr eclass = CPLGetLastErrorType();
   34586             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34587             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34588             :       }
   34589             :     }
   34590             : #endif
   34591             :   }
   34592         103 :   resultobj = SWIG_Py_Void();
   34593         103 :   {
   34594             :     /* %typemap(python,argout) (double *val, int *hasval) */
   34595         103 :     PyObject *r;
   34596         103 :     if ( !*arg3 ) {
   34597          82 :       Py_INCREF(Py_None);
   34598          82 :       r = Py_None;
   34599             :     }
   34600             :     else {
   34601          21 :       r = PyFloat_FromDouble( *arg2 );
   34602             :     }
   34603             : #if SWIG_VERSION >= 0x040300
   34604             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   34605             : #else
   34606         103 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   34607             : #endif
   34608             :   }
   34609         103 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   34610             :   return resultobj;
   34611             : fail:
   34612             :   return NULL;
   34613             : }
   34614             : 
   34615             : 
   34616           5 : SWIGINTERN PyObject *_wrap_MDArray_GetScaleStorageType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34617           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34618           5 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34619           5 :   void *argp1 = 0 ;
   34620           5 :   int res1 = 0 ;
   34621           5 :   PyObject *swig_obj[1] ;
   34622           5 :   GDALDataType result;
   34623             :   
   34624           5 :   if (!args) SWIG_fail;
   34625           5 :   swig_obj[0] = args;
   34626           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34627           5 :   if (!SWIG_IsOK(res1)) {
   34628           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetScaleStorageType" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34629             :   }
   34630           5 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34631           5 :   {
   34632           5 :     const int bLocalUseExceptions = GetUseExceptions();
   34633           5 :     if ( bLocalUseExceptions ) {
   34634           0 :       pushErrorHandler();
   34635             :     }
   34636           5 :     {
   34637           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34638           5 :       result = (GDALDataType)GDALMDArrayHS_GetScaleStorageType(arg1);
   34639           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34640             :     }
   34641           5 :     if ( bLocalUseExceptions ) {
   34642           0 :       popErrorHandler();
   34643             :     }
   34644             : #ifndef SED_HACKS
   34645             :     if ( bLocalUseExceptions ) {
   34646             :       CPLErr eclass = CPLGetLastErrorType();
   34647             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34648             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34649             :       }
   34650             :     }
   34651             : #endif
   34652             :   }
   34653           5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34654           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; } }
   34655             :   return resultobj;
   34656             : fail:
   34657             :   return NULL;
   34658             : }
   34659             : 
   34660             : 
   34661          21 : SWIGINTERN PyObject *_wrap_MDArray_SetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   34662          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34663          21 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34664          21 :   double arg2 ;
   34665          21 :   GDALDataType arg3 = (GDALDataType) GDT_Unknown ;
   34666          21 :   void *argp1 = 0 ;
   34667          21 :   int res1 = 0 ;
   34668          21 :   double val2 ;
   34669          21 :   int ecode2 = 0 ;
   34670          21 :   PyObject * obj0 = 0 ;
   34671          21 :   PyObject * obj1 = 0 ;
   34672          21 :   PyObject * obj2 = 0 ;
   34673          21 :   char * kwnames[] = {
   34674             :     (char *)"self",  (char *)"val",  (char *)"storageType",  NULL 
   34675             :   };
   34676          21 :   CPLErr result;
   34677             :   
   34678          21 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:MDArray_SetOffset", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   34679          21 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34680          21 :   if (!SWIG_IsOK(res1)) {
   34681           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetOffset" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34682             :   }
   34683          21 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34684          21 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   34685          21 :   if (!SWIG_IsOK(ecode2)) {
   34686           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_SetOffset" "', argument " "2"" of type '" "double""'");
   34687             :   } 
   34688          21 :   arg2 = static_cast< double >(val2);
   34689          21 :   if (obj2) {
   34690           2 :     {
   34691             :       // %typemap(in) GDALDataType
   34692           2 :       int val = 0;
   34693           2 :       int ecode = SWIG_AsVal_int(obj2, &val);
   34694           2 :       if (!SWIG_IsOK(ecode)) {
   34695           0 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   34696             :       }
   34697           2 :       if( val < GDT_Unknown || val >= GDT_TypeCount )
   34698             :       {
   34699           0 :         SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   34700             :       }
   34701             :       arg3 = static_cast<GDALDataType>(val);
   34702             :     }
   34703             :   }
   34704          21 :   {
   34705          21 :     const int bLocalUseExceptions = GetUseExceptions();
   34706          21 :     if ( bLocalUseExceptions ) {
   34707           2 :       pushErrorHandler();
   34708             :     }
   34709          21 :     {
   34710          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34711          21 :       result = (CPLErr)GDALMDArrayHS_SetOffset(arg1,arg2,arg3);
   34712          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34713             :     }
   34714          21 :     if ( bLocalUseExceptions ) {
   34715           2 :       popErrorHandler();
   34716             :     }
   34717             : #ifndef SED_HACKS
   34718             :     if ( bLocalUseExceptions ) {
   34719             :       CPLErr eclass = CPLGetLastErrorType();
   34720             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34721             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34722             :       }
   34723             :     }
   34724             : #endif
   34725             :   }
   34726          21 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34727          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; } }
   34728             :   return resultobj;
   34729             : fail:
   34730             :   return NULL;
   34731             : }
   34732             : 
   34733             : 
   34734          21 : SWIGINTERN PyObject *_wrap_MDArray_SetScale(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   34735          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34736          21 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34737          21 :   double arg2 ;
   34738          21 :   GDALDataType arg3 = (GDALDataType) GDT_Unknown ;
   34739          21 :   void *argp1 = 0 ;
   34740          21 :   int res1 = 0 ;
   34741          21 :   double val2 ;
   34742          21 :   int ecode2 = 0 ;
   34743          21 :   PyObject * obj0 = 0 ;
   34744          21 :   PyObject * obj1 = 0 ;
   34745          21 :   PyObject * obj2 = 0 ;
   34746          21 :   char * kwnames[] = {
   34747             :     (char *)"self",  (char *)"val",  (char *)"storageType",  NULL 
   34748             :   };
   34749          21 :   CPLErr result;
   34750             :   
   34751          21 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:MDArray_SetScale", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   34752          21 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34753          21 :   if (!SWIG_IsOK(res1)) {
   34754           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetScale" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34755             :   }
   34756          21 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34757          21 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   34758          21 :   if (!SWIG_IsOK(ecode2)) {
   34759           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_SetScale" "', argument " "2"" of type '" "double""'");
   34760             :   } 
   34761          21 :   arg2 = static_cast< double >(val2);
   34762          21 :   if (obj2) {
   34763           2 :     {
   34764             :       // %typemap(in) GDALDataType
   34765           2 :       int val = 0;
   34766           2 :       int ecode = SWIG_AsVal_int(obj2, &val);
   34767           2 :       if (!SWIG_IsOK(ecode)) {
   34768           0 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   34769             :       }
   34770           2 :       if( val < GDT_Unknown || val >= GDT_TypeCount )
   34771             :       {
   34772           0 :         SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   34773             :       }
   34774             :       arg3 = static_cast<GDALDataType>(val);
   34775             :     }
   34776             :   }
   34777          21 :   {
   34778          21 :     const int bLocalUseExceptions = GetUseExceptions();
   34779          21 :     if ( bLocalUseExceptions ) {
   34780           2 :       pushErrorHandler();
   34781             :     }
   34782          21 :     {
   34783          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34784          21 :       result = (CPLErr)GDALMDArrayHS_SetScale(arg1,arg2,arg3);
   34785          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34786             :     }
   34787          21 :     if ( bLocalUseExceptions ) {
   34788           2 :       popErrorHandler();
   34789             :     }
   34790             : #ifndef SED_HACKS
   34791             :     if ( bLocalUseExceptions ) {
   34792             :       CPLErr eclass = CPLGetLastErrorType();
   34793             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34794             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34795             :       }
   34796             :     }
   34797             : #endif
   34798             :   }
   34799          21 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34800          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; } }
   34801             :   return resultobj;
   34802             : fail:
   34803             :   return NULL;
   34804             : }
   34805             : 
   34806             : 
   34807          15 : SWIGINTERN PyObject *_wrap_MDArray_SetUnit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34808          15 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34809          15 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34810          15 :   char *arg2 = (char *) 0 ;
   34811          15 :   void *argp1 = 0 ;
   34812          15 :   int res1 = 0 ;
   34813          15 :   int res2 ;
   34814          15 :   char *buf2 = 0 ;
   34815          15 :   int alloc2 = 0 ;
   34816          15 :   PyObject *swig_obj[2] ;
   34817          15 :   CPLErr result;
   34818             :   
   34819          15 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetUnit", 2, 2, swig_obj)) SWIG_fail;
   34820          15 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34821          15 :   if (!SWIG_IsOK(res1)) {
   34822           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetUnit" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34823             :   }
   34824          15 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34825          15 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   34826          15 :   if (!SWIG_IsOK(res2)) {
   34827           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_SetUnit" "', argument " "2"" of type '" "char const *""'");
   34828             :   }
   34829          15 :   arg2 = reinterpret_cast< char * >(buf2);
   34830          15 :   {
   34831          15 :     const int bLocalUseExceptions = GetUseExceptions();
   34832          15 :     if ( bLocalUseExceptions ) {
   34833           4 :       pushErrorHandler();
   34834             :     }
   34835          15 :     {
   34836          15 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34837          15 :       result = (CPLErr)GDALMDArrayHS_SetUnit(arg1,(char const *)arg2);
   34838          15 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34839             :     }
   34840          15 :     if ( bLocalUseExceptions ) {
   34841           4 :       popErrorHandler();
   34842             :     }
   34843             : #ifndef SED_HACKS
   34844             :     if ( bLocalUseExceptions ) {
   34845             :       CPLErr eclass = CPLGetLastErrorType();
   34846             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34847             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34848             :       }
   34849             :     }
   34850             : #endif
   34851             :   }
   34852          15 :   resultobj = SWIG_From_int(static_cast< int >(result));
   34853          15 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   34854          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; } }
   34855             :   return resultobj;
   34856           0 : fail:
   34857           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   34858             :   return NULL;
   34859             : }
   34860             : 
   34861             : 
   34862         111 : SWIGINTERN PyObject *_wrap_MDArray_GetUnit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34863         111 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34864         111 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34865         111 :   void *argp1 = 0 ;
   34866         111 :   int res1 = 0 ;
   34867         111 :   PyObject *swig_obj[1] ;
   34868         111 :   char *result = 0 ;
   34869             :   
   34870         111 :   if (!args) SWIG_fail;
   34871         111 :   swig_obj[0] = args;
   34872         111 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34873         111 :   if (!SWIG_IsOK(res1)) {
   34874           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetUnit" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34875             :   }
   34876         111 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34877         111 :   {
   34878         111 :     const int bLocalUseExceptions = GetUseExceptions();
   34879         111 :     if ( bLocalUseExceptions ) {
   34880           7 :       pushErrorHandler();
   34881             :     }
   34882         111 :     {
   34883         111 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34884         111 :       result = (char *)GDALMDArrayHS_GetUnit(arg1);
   34885         111 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34886             :     }
   34887         111 :     if ( bLocalUseExceptions ) {
   34888           7 :       popErrorHandler();
   34889             :     }
   34890             : #ifndef SED_HACKS
   34891             :     if ( bLocalUseExceptions ) {
   34892             :       CPLErr eclass = CPLGetLastErrorType();
   34893             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34894             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34895             :       }
   34896             :     }
   34897             : #endif
   34898             :   }
   34899         111 :   resultobj = SWIG_FromCharPtr((const char *)result);
   34900         111 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   34901             :   return resultobj;
   34902             : fail:
   34903             :   return NULL;
   34904             : }
   34905             : 
   34906             : 
   34907          30 : SWIGINTERN PyObject *_wrap_MDArray_SetSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34908          30 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34909          30 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34910          30 :   OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
   34911          30 :   void *argp1 = 0 ;
   34912          30 :   int res1 = 0 ;
   34913          30 :   void *argp2 = 0 ;
   34914          30 :   int res2 = 0 ;
   34915          30 :   PyObject *swig_obj[2] ;
   34916          30 :   OGRErr result;
   34917             :   
   34918          30 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_SetSpatialRef", 2, 2, swig_obj)) SWIG_fail;
   34919          30 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34920          30 :   if (!SWIG_IsOK(res1)) {
   34921           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_SetSpatialRef" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34922             :   }
   34923          30 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34924          30 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   34925          30 :   if (!SWIG_IsOK(res2)) {
   34926           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_SetSpatialRef" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'"); 
   34927             :   }
   34928          30 :   arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
   34929          30 :   {
   34930          30 :     const int bLocalUseExceptions = GetUseExceptions();
   34931          30 :     if ( bLocalUseExceptions ) {
   34932           4 :       pushErrorHandler();
   34933             :     }
   34934          30 :     {
   34935          30 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34936          30 :       result = (OGRErr)GDALMDArrayHS_SetSpatialRef(arg1,arg2);
   34937          30 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34938             :     }
   34939          30 :     if ( bLocalUseExceptions ) {
   34940           4 :       popErrorHandler();
   34941             :     }
   34942             : #ifndef SED_HACKS
   34943             :     if ( bLocalUseExceptions ) {
   34944             :       CPLErr eclass = CPLGetLastErrorType();
   34945             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   34946             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   34947             :       }
   34948             :     }
   34949             : #endif
   34950             :   }
   34951          30 :   {
   34952             :     /* %typemap(out) OGRErr */
   34953          30 :     if ( result != 0 && GetUseExceptions()) {
   34954           0 :       const char* pszMessage = CPLGetLastErrorMsg();
   34955           0 :       if( pszMessage[0] != '\0' )
   34956           0 :       PyErr_SetString( PyExc_RuntimeError, pszMessage );
   34957             :       else
   34958           0 :       PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
   34959           0 :       SWIG_fail;
   34960             :     }
   34961             :   }
   34962          30 :   {
   34963             :     /* %typemap(ret) OGRErr */
   34964          30 :     if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
   34965          30 :       resultobj = PyInt_FromLong( result );
   34966             :     }
   34967             :   }
   34968          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; } }
   34969             :   return resultobj;
   34970             : fail:
   34971             :   return NULL;
   34972             : }
   34973             : 
   34974             : 
   34975          77 : SWIGINTERN PyObject *_wrap_MDArray_GetSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   34976          77 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   34977          77 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   34978          77 :   void *argp1 = 0 ;
   34979          77 :   int res1 = 0 ;
   34980          77 :   PyObject *swig_obj[1] ;
   34981          77 :   OSRSpatialReferenceShadow *result = 0 ;
   34982             :   
   34983          77 :   if (!args) SWIG_fail;
   34984          77 :   swig_obj[0] = args;
   34985          77 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   34986          77 :   if (!SWIG_IsOK(res1)) {
   34987           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetSpatialRef" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   34988             :   }
   34989          77 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   34990          77 :   {
   34991          77 :     const int bLocalUseExceptions = GetUseExceptions();
   34992          77 :     if ( bLocalUseExceptions ) {
   34993          13 :       pushErrorHandler();
   34994             :     }
   34995          77 :     {
   34996          77 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   34997          77 :       result = (OSRSpatialReferenceShadow *)GDALMDArrayHS_GetSpatialRef(arg1);
   34998          77 :       SWIG_PYTHON_THREAD_END_ALLOW;
   34999             :     }
   35000          77 :     if ( bLocalUseExceptions ) {
   35001          13 :       popErrorHandler();
   35002             :     }
   35003             : #ifndef SED_HACKS
   35004             :     if ( bLocalUseExceptions ) {
   35005             :       CPLErr eclass = CPLGetLastErrorType();
   35006             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35007             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35008             :       }
   35009             :     }
   35010             : #endif
   35011             :   }
   35012          77 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN |  0 );
   35013          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; } }
   35014             :   return resultobj;
   35015             : fail:
   35016             :   return NULL;
   35017             : }
   35018             : 
   35019             : 
   35020         431 : SWIGINTERN PyObject *_wrap_MDArray_GetView(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35021         431 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35022         431 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35023         431 :   char *arg2 = (char *) 0 ;
   35024         431 :   void *argp1 = 0 ;
   35025         431 :   int res1 = 0 ;
   35026         431 :   int res2 ;
   35027         431 :   char *buf2 = 0 ;
   35028         431 :   int alloc2 = 0 ;
   35029         431 :   PyObject *swig_obj[2] ;
   35030         431 :   GDALMDArrayHS *result = 0 ;
   35031             :   
   35032         431 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_GetView", 2, 2, swig_obj)) SWIG_fail;
   35033         431 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35034         431 :   if (!SWIG_IsOK(res1)) {
   35035           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetView" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35036             :   }
   35037         431 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35038         431 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   35039         431 :   if (!SWIG_IsOK(res2)) {
   35040           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_GetView" "', argument " "2"" of type '" "char const *""'");
   35041             :   }
   35042         431 :   arg2 = reinterpret_cast< char * >(buf2);
   35043         431 :   {
   35044         431 :     if (!arg2) {
   35045           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   35046             :     }
   35047             :   }
   35048         430 :   {
   35049         430 :     const int bLocalUseExceptions = GetUseExceptions();
   35050         430 :     if ( bLocalUseExceptions ) {
   35051           8 :       pushErrorHandler();
   35052             :     }
   35053         430 :     {
   35054         430 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35055         430 :       result = (GDALMDArrayHS *)GDALMDArrayHS_GetView(arg1,(char const *)arg2);
   35056         430 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35057             :     }
   35058         430 :     if ( bLocalUseExceptions ) {
   35059           8 :       popErrorHandler();
   35060             :     }
   35061             : #ifndef SED_HACKS
   35062             :     if ( bLocalUseExceptions ) {
   35063             :       CPLErr eclass = CPLGetLastErrorType();
   35064             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35065             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35066             :       }
   35067             :     }
   35068             : #endif
   35069             :   }
   35070         430 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   35071         430 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   35072         431 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   35073             :   return resultobj;
   35074           1 : fail:
   35075           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   35076             :   return NULL;
   35077             : }
   35078             : 
   35079             : 
   35080          44 : SWIGINTERN PyObject *_wrap_MDArray_Transpose(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35081          44 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35082          44 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35083          44 :   int arg2 ;
   35084          44 :   int *arg3 = (int *) 0 ;
   35085          44 :   void *argp1 = 0 ;
   35086          44 :   int res1 = 0 ;
   35087          44 :   PyObject *swig_obj[2] ;
   35088          44 :   GDALMDArrayHS *result = 0 ;
   35089             :   
   35090          44 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_Transpose", 2, 2, swig_obj)) SWIG_fail;
   35091          44 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35092          44 :   if (!SWIG_IsOK(res1)) {
   35093           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Transpose" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35094             :   }
   35095          44 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35096          44 :   {
   35097             :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   35098          44 :     arg3 = CreateCIntListFromSequence(swig_obj[1], &arg2);
   35099          44 :     if( arg2 < 0 ) {
   35100           0 :       SWIG_fail;
   35101             :     }
   35102             :   }
   35103          44 :   {
   35104          44 :     const int bLocalUseExceptions = GetUseExceptions();
   35105          44 :     if ( bLocalUseExceptions ) {
   35106           1 :       pushErrorHandler();
   35107             :     }
   35108          44 :     {
   35109          44 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35110          44 :       result = (GDALMDArrayHS *)GDALMDArrayHS_Transpose(arg1,arg2,arg3);
   35111          44 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35112             :     }
   35113          44 :     if ( bLocalUseExceptions ) {
   35114           1 :       popErrorHandler();
   35115             :     }
   35116             : #ifndef SED_HACKS
   35117             :     if ( bLocalUseExceptions ) {
   35118             :       CPLErr eclass = CPLGetLastErrorType();
   35119             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35120             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35121             :       }
   35122             :     }
   35123             : #endif
   35124             :   }
   35125          44 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   35126          44 :   {
   35127             :     /* %typemap(freearg) (int nList, int* pList) */
   35128          44 :     free(arg3);
   35129             :   }
   35130          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; } }
   35131             :   return resultobj;
   35132           0 : fail:
   35133           0 :   {
   35134             :     /* %typemap(freearg) (int nList, int* pList) */
   35135           0 :     free(arg3);
   35136             :   }
   35137           0 :   return NULL;
   35138             : }
   35139             : 
   35140             : 
   35141          13 : SWIGINTERN PyObject *_wrap_MDArray_GetUnscaled(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35142          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35143          13 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35144          13 :   void *argp1 = 0 ;
   35145          13 :   int res1 = 0 ;
   35146          13 :   PyObject *swig_obj[1] ;
   35147          13 :   GDALMDArrayHS *result = 0 ;
   35148             :   
   35149          13 :   if (!args) SWIG_fail;
   35150          13 :   swig_obj[0] = args;
   35151          13 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35152          13 :   if (!SWIG_IsOK(res1)) {
   35153           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetUnscaled" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35154             :   }
   35155          13 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35156          13 :   {
   35157          13 :     const int bLocalUseExceptions = GetUseExceptions();
   35158          13 :     if ( bLocalUseExceptions ) {
   35159           0 :       pushErrorHandler();
   35160             :     }
   35161          13 :     {
   35162          13 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35163          13 :       result = (GDALMDArrayHS *)GDALMDArrayHS_GetUnscaled(arg1);
   35164          13 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35165             :     }
   35166          13 :     if ( bLocalUseExceptions ) {
   35167           0 :       popErrorHandler();
   35168             :     }
   35169             : #ifndef SED_HACKS
   35170             :     if ( bLocalUseExceptions ) {
   35171             :       CPLErr eclass = CPLGetLastErrorType();
   35172             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35173             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35174             :       }
   35175             :     }
   35176             : #endif
   35177             :   }
   35178          13 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   35179          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; } }
   35180             :   return resultobj;
   35181             : fail:
   35182             :   return NULL;
   35183             : }
   35184             : 
   35185             : 
   35186          35 : SWIGINTERN PyObject *_wrap_MDArray_GetMask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35187          35 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35188          35 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35189          35 :   char **arg2 = (char **) 0 ;
   35190          35 :   void *argp1 = 0 ;
   35191          35 :   int res1 = 0 ;
   35192          35 :   PyObject *swig_obj[2] ;
   35193          35 :   GDALMDArrayHS *result = 0 ;
   35194             :   
   35195          35 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_GetMask", 1, 2, swig_obj)) SWIG_fail;
   35196          35 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35197          35 :   if (!SWIG_IsOK(res1)) {
   35198           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetMask" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35199             :   }
   35200          35 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35201          35 :   if (swig_obj[1]) {
   35202          14 :     {
   35203             :       /* %typemap(in) char **dict */
   35204          14 :       arg2 = NULL;
   35205          14 :       if ( PySequence_Check( swig_obj[1] ) ) {
   35206          14 :         int bErr = FALSE;
   35207          14 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   35208          14 :         if ( bErr )
   35209             :         {
   35210           0 :           SWIG_fail;
   35211             :         }
   35212             :       }
   35213           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   35214           0 :         int bErr = FALSE;
   35215           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   35216           0 :         if ( bErr )
   35217             :         {
   35218           0 :           SWIG_fail;
   35219             :         }
   35220             :       }
   35221             :       else {
   35222           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   35223           0 :         SWIG_fail;
   35224             :       }
   35225             :     }
   35226             :   }
   35227          35 :   {
   35228          35 :     const int bLocalUseExceptions = GetUseExceptions();
   35229          35 :     if ( bLocalUseExceptions ) {
   35230          14 :       pushErrorHandler();
   35231             :     }
   35232          35 :     {
   35233          35 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35234          35 :       result = (GDALMDArrayHS *)GDALMDArrayHS_GetMask(arg1,arg2);
   35235          35 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35236             :     }
   35237          35 :     if ( bLocalUseExceptions ) {
   35238          14 :       popErrorHandler();
   35239             :     }
   35240             : #ifndef SED_HACKS
   35241             :     if ( bLocalUseExceptions ) {
   35242             :       CPLErr eclass = CPLGetLastErrorType();
   35243             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35244             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35245             :       }
   35246             :     }
   35247             : #endif
   35248             :   }
   35249          35 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   35250          35 :   {
   35251             :     /* %typemap(freearg) char **dict */
   35252          35 :     CSLDestroy( arg2 );
   35253             :   }
   35254          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; } }
   35255             :   return resultobj;
   35256           0 : fail:
   35257           0 :   {
   35258             :     /* %typemap(freearg) char **dict */
   35259           0 :     CSLDestroy( arg2 );
   35260             :   }
   35261             :   return NULL;
   35262             : }
   35263             : 
   35264             : 
   35265          22 : SWIGINTERN PyObject *_wrap_MDArray_GetGridded(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   35266          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35267          22 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35268          22 :   char *arg2 = (char *) 0 ;
   35269          22 :   GDALMDArrayHS *arg3 = (GDALMDArrayHS *) NULL ;
   35270          22 :   GDALMDArrayHS *arg4 = (GDALMDArrayHS *) NULL ;
   35271          22 :   char **arg5 = (char **) 0 ;
   35272          22 :   void *argp1 = 0 ;
   35273          22 :   int res1 = 0 ;
   35274          22 :   int res2 ;
   35275          22 :   char *buf2 = 0 ;
   35276          22 :   int alloc2 = 0 ;
   35277          22 :   void *argp3 = 0 ;
   35278          22 :   int res3 = 0 ;
   35279          22 :   void *argp4 = 0 ;
   35280          22 :   int res4 = 0 ;
   35281          22 :   PyObject * obj0 = 0 ;
   35282          22 :   PyObject * obj1 = 0 ;
   35283          22 :   PyObject * obj2 = 0 ;
   35284          22 :   PyObject * obj3 = 0 ;
   35285          22 :   PyObject * obj4 = 0 ;
   35286          22 :   char * kwnames[] = {
   35287             :     (char *)"self",  (char *)"pszGridOptions",  (char *)"xArray",  (char *)"yArray",  (char *)"options",  NULL 
   35288             :   };
   35289          22 :   GDALMDArrayHS *result = 0 ;
   35290             :   
   35291          22 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:MDArray_GetGridded", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   35292          22 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35293          22 :   if (!SWIG_IsOK(res1)) {
   35294           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetGridded" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35295             :   }
   35296          22 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35297          22 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   35298          22 :   if (!SWIG_IsOK(res2)) {
   35299           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_GetGridded" "', argument " "2"" of type '" "char const *""'");
   35300             :   }
   35301          22 :   arg2 = reinterpret_cast< char * >(buf2);
   35302          22 :   if (obj2) {
   35303          14 :     res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35304          14 :     if (!SWIG_IsOK(res3)) {
   35305           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MDArray_GetGridded" "', argument " "3"" of type '" "GDALMDArrayHS *""'"); 
   35306             :     }
   35307          14 :     arg3 = reinterpret_cast< GDALMDArrayHS * >(argp3);
   35308             :   }
   35309          22 :   if (obj3) {
   35310          13 :     res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35311          13 :     if (!SWIG_IsOK(res4)) {
   35312           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MDArray_GetGridded" "', argument " "4"" of type '" "GDALMDArrayHS *""'"); 
   35313             :     }
   35314          13 :     arg4 = reinterpret_cast< GDALMDArrayHS * >(argp4);
   35315             :   }
   35316          22 :   if (obj4) {
   35317           3 :     {
   35318             :       /* %typemap(in) char **dict */
   35319           3 :       arg5 = NULL;
   35320           3 :       if ( PySequence_Check( obj4 ) ) {
   35321           3 :         int bErr = FALSE;
   35322           3 :         arg5 = CSLFromPySequence(obj4, &bErr);
   35323           3 :         if ( bErr )
   35324             :         {
   35325           0 :           SWIG_fail;
   35326             :         }
   35327             :       }
   35328           0 :       else if ( PyMapping_Check( obj4 ) ) {
   35329           0 :         int bErr = FALSE;
   35330           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   35331           0 :         if ( bErr )
   35332             :         {
   35333           0 :           SWIG_fail;
   35334             :         }
   35335             :       }
   35336             :       else {
   35337           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   35338           0 :         SWIG_fail;
   35339             :       }
   35340             :     }
   35341             :   }
   35342          22 :   {
   35343          22 :     if (!arg2) {
   35344           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   35345             :     }
   35346             :   }
   35347          22 :   {
   35348          22 :     const int bLocalUseExceptions = GetUseExceptions();
   35349          22 :     if ( bLocalUseExceptions ) {
   35350           0 :       pushErrorHandler();
   35351             :     }
   35352          22 :     {
   35353          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35354          22 :       result = (GDALMDArrayHS *)GDALMDArrayHS_GetGridded(arg1,(char const *)arg2,arg3,arg4,arg5);
   35355          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35356             :     }
   35357          22 :     if ( bLocalUseExceptions ) {
   35358           0 :       popErrorHandler();
   35359             :     }
   35360             : #ifndef SED_HACKS
   35361             :     if ( bLocalUseExceptions ) {
   35362             :       CPLErr eclass = CPLGetLastErrorType();
   35363             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35364             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35365             :       }
   35366             :     }
   35367             : #endif
   35368             :   }
   35369          22 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   35370          22 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   35371          22 :   {
   35372             :     /* %typemap(freearg) char **dict */
   35373          22 :     CSLDestroy( arg5 );
   35374             :   }
   35375          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; } }
   35376             :   return resultobj;
   35377           0 : fail:
   35378           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   35379           0 :   {
   35380             :     /* %typemap(freearg) char **dict */
   35381           0 :     CSLDestroy( arg5 );
   35382             :   }
   35383             :   return NULL;
   35384             : }
   35385             : 
   35386             : 
   35387          90 : SWIGINTERN PyObject *_wrap_MDArray_AsClassicDataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35388          90 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35389          90 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35390          90 :   size_t arg2 ;
   35391          90 :   size_t arg3 ;
   35392          90 :   GDALGroupHS *arg4 = (GDALGroupHS *) NULL ;
   35393          90 :   char **arg5 = (char **) 0 ;
   35394          90 :   void *argp1 = 0 ;
   35395          90 :   int res1 = 0 ;
   35396          90 :   size_t val2 ;
   35397          90 :   int ecode2 = 0 ;
   35398          90 :   size_t val3 ;
   35399          90 :   int ecode3 = 0 ;
   35400          90 :   void *argp4 = 0 ;
   35401          90 :   int res4 = 0 ;
   35402          90 :   PyObject *swig_obj[5] ;
   35403          90 :   GDALDatasetShadow *result = 0 ;
   35404             :   
   35405          90 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_AsClassicDataset", 3, 5, swig_obj)) SWIG_fail;
   35406          90 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35407          90 :   if (!SWIG_IsOK(res1)) {
   35408           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_AsClassicDataset" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35409             :   }
   35410          90 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35411          90 :   ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
   35412          90 :   if (!SWIG_IsOK(ecode2)) {
   35413           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_AsClassicDataset" "', argument " "2"" of type '" "size_t""'");
   35414             :   } 
   35415          90 :   arg2 = static_cast< size_t >(val2);
   35416          90 :   ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3);
   35417          90 :   if (!SWIG_IsOK(ecode3)) {
   35418           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MDArray_AsClassicDataset" "', argument " "3"" of type '" "size_t""'");
   35419             :   } 
   35420          90 :   arg3 = static_cast< size_t >(val3);
   35421          90 :   if (swig_obj[3]) {
   35422          52 :     res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_GDALGroupHS, 0 |  0 );
   35423          52 :     if (!SWIG_IsOK(res4)) {
   35424           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MDArray_AsClassicDataset" "', argument " "4"" of type '" "GDALGroupHS *""'"); 
   35425             :     }
   35426          52 :     arg4 = reinterpret_cast< GDALGroupHS * >(argp4);
   35427             :   }
   35428          90 :   if (swig_obj[4]) {
   35429          52 :     {
   35430             :       /* %typemap(in) char **dict */
   35431          52 :       arg5 = NULL;
   35432          52 :       if ( PySequence_Check( swig_obj[4] ) ) {
   35433          52 :         int bErr = FALSE;
   35434          52 :         arg5 = CSLFromPySequence(swig_obj[4], &bErr);
   35435          52 :         if ( bErr )
   35436             :         {
   35437           0 :           SWIG_fail;
   35438             :         }
   35439             :       }
   35440           0 :       else if ( PyMapping_Check( swig_obj[4] ) ) {
   35441           0 :         int bErr = FALSE;
   35442           0 :         arg5 = CSLFromPyMapping(swig_obj[4], &bErr);
   35443           0 :         if ( bErr )
   35444             :         {
   35445           0 :           SWIG_fail;
   35446             :         }
   35447             :       }
   35448             :       else {
   35449           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   35450           0 :         SWIG_fail;
   35451             :       }
   35452             :     }
   35453             :   }
   35454          90 :   {
   35455          90 :     const int bLocalUseExceptions = GetUseExceptions();
   35456          90 :     if ( bLocalUseExceptions ) {
   35457          62 :       pushErrorHandler();
   35458             :     }
   35459          90 :     {
   35460          90 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35461          90 :       result = (GDALDatasetShadow *)GDALMDArrayHS_AsClassicDataset(arg1,arg2,arg3,arg4,arg5);
   35462          90 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35463             :     }
   35464          90 :     if ( bLocalUseExceptions ) {
   35465          62 :       popErrorHandler();
   35466             :     }
   35467             : #ifndef SED_HACKS
   35468             :     if ( bLocalUseExceptions ) {
   35469             :       CPLErr eclass = CPLGetLastErrorType();
   35470             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35471             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35472             :       }
   35473             :     }
   35474             : #endif
   35475             :   }
   35476          90 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   35477          90 :   {
   35478             :     /* %typemap(freearg) char **dict */
   35479          90 :     CSLDestroy( arg5 );
   35480             :   }
   35481         172 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   35482             :   return resultobj;
   35483           0 : fail:
   35484           0 :   {
   35485             :     /* %typemap(freearg) char **dict */
   35486           0 :     CSLDestroy( arg5 );
   35487             :   }
   35488             :   return NULL;
   35489             : }
   35490             : 
   35491             : 
   35492          15 : SWIGINTERN PyObject *_wrap_MDArray_GetStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   35493          15 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35494          15 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35495          15 :   bool arg2 = (bool) FALSE ;
   35496          15 :   bool arg3 = (bool) TRUE ;
   35497          15 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   35498          15 :   void *arg5 = (void *) NULL ;
   35499          15 :   void *argp1 = 0 ;
   35500          15 :   int res1 = 0 ;
   35501          15 :   bool val2 ;
   35502          15 :   int ecode2 = 0 ;
   35503          15 :   bool val3 ;
   35504          15 :   int ecode3 = 0 ;
   35505          15 :   PyObject * obj0 = 0 ;
   35506          15 :   PyObject * obj1 = 0 ;
   35507          15 :   PyObject * obj2 = 0 ;
   35508          15 :   PyObject * obj3 = 0 ;
   35509          15 :   PyObject * obj4 = 0 ;
   35510          15 :   char * kwnames[] = {
   35511             :     (char *)"self",  (char *)"approx_ok",  (char *)"force",  (char *)"callback",  (char *)"callback_data",  NULL 
   35512             :   };
   35513          15 :   Statistics *result = 0 ;
   35514             :   
   35515             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   35516          15 :   PyProgressData *psProgressInfo;
   35517          15 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   35518          15 :   psProgressInfo->nLastReported = -1;
   35519          15 :   psProgressInfo->psPyCallback = NULL;
   35520          15 :   psProgressInfo->psPyCallbackData = NULL;
   35521          15 :   arg5 = psProgressInfo;
   35522          15 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOO:MDArray_GetStatistics", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   35523          15 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35524          15 :   if (!SWIG_IsOK(res1)) {
   35525           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetStatistics" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35526             :   }
   35527          15 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35528          15 :   if (obj1) {
   35529          13 :     ecode2 = SWIG_AsVal_bool(obj1, &val2);
   35530          13 :     if (!SWIG_IsOK(ecode2)) {
   35531           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_GetStatistics" "', argument " "2"" of type '" "bool""'");
   35532             :     } 
   35533             :     arg2 = static_cast< bool >(val2);
   35534             :   }
   35535          15 :   if (obj2) {
   35536          13 :     ecode3 = SWIG_AsVal_bool(obj2, &val3);
   35537          13 :     if (!SWIG_IsOK(ecode3)) {
   35538           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MDArray_GetStatistics" "', argument " "3"" of type '" "bool""'");
   35539             :     } 
   35540             :     arg3 = static_cast< bool >(val3);
   35541             :   }
   35542          15 :   if (obj3) {
   35543           0 :     {
   35544             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   35545             :       /* callback_func typemap */
   35546             :       
   35547             :       /* In some cases 0 is passed instead of None. */
   35548             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   35549           0 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   35550             :       {
   35551           0 :         if( PyLong_AsLong(obj3) == 0 )
   35552             :         {
   35553           0 :           obj3 = Py_None;
   35554             :         }
   35555             :       }
   35556             :       
   35557           0 :       if (obj3 && obj3 != Py_None ) {
   35558           0 :         void* cbfunction = NULL;
   35559           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   35560             :             (void**)&cbfunction,
   35561             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   35562             :             SWIG_POINTER_EXCEPTION | 0 ));
   35563             :         
   35564           0 :         if ( cbfunction == GDALTermProgress ) {
   35565             :           arg4 = GDALTermProgress;
   35566             :         } else {
   35567           0 :           if (!PyCallable_Check(obj3)) {
   35568           0 :             PyErr_SetString( PyExc_RuntimeError,
   35569             :               "Object given is not a Python function" );
   35570           0 :             SWIG_fail;
   35571             :           }
   35572           0 :           psProgressInfo->psPyCallback = obj3;
   35573           0 :           arg4 = PyProgressProxy;
   35574             :         }
   35575             :         
   35576             :       }
   35577             :       
   35578             :     }
   35579             :   }
   35580          15 :   if (obj4) {
   35581           0 :     {
   35582             :       /* %typemap(in) ( void* callback_data=NULL)  */
   35583           0 :       psProgressInfo->psPyCallbackData = obj4 ;
   35584             :     }
   35585             :   }
   35586          15 :   {
   35587          15 :     const int bLocalUseExceptions = GetUseExceptions();
   35588          15 :     if ( bLocalUseExceptions ) {
   35589           5 :       pushErrorHandler();
   35590             :     }
   35591          15 :     {
   35592          15 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35593          15 :       result = (Statistics *)GDALMDArrayHS_GetStatistics(arg1,arg2,arg3,arg4,arg5);
   35594          15 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35595             :     }
   35596          15 :     if ( bLocalUseExceptions ) {
   35597           5 :       popErrorHandler();
   35598             :     }
   35599             : #ifndef SED_HACKS
   35600             :     if ( bLocalUseExceptions ) {
   35601             :       CPLErr eclass = CPLGetLastErrorType();
   35602             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35603             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35604             :       }
   35605             :     }
   35606             : #endif
   35607             :   }
   35608          15 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Statistics, 0 |  0 );
   35609          15 :   {
   35610             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   35611             :     
   35612          15 :     CPLFree(psProgressInfo);
   35613             :     
   35614             :   }
   35615          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; } }
   35616             :   return resultobj;
   35617           0 : fail:
   35618           0 :   {
   35619             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   35620             :     
   35621           0 :     CPLFree(psProgressInfo);
   35622             :     
   35623             :   }
   35624             :   return NULL;
   35625             : }
   35626             : 
   35627             : 
   35628           4 : SWIGINTERN PyObject *_wrap_MDArray_ComputeStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   35629           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35630           4 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35631           4 :   bool arg2 = (bool) FALSE ;
   35632           4 :   GDALProgressFunc arg3 = (GDALProgressFunc) NULL ;
   35633           4 :   void *arg4 = (void *) NULL ;
   35634           4 :   char **arg5 = (char **) 0 ;
   35635           4 :   void *argp1 = 0 ;
   35636           4 :   int res1 = 0 ;
   35637           4 :   bool val2 ;
   35638           4 :   int ecode2 = 0 ;
   35639           4 :   PyObject * obj0 = 0 ;
   35640           4 :   PyObject * obj1 = 0 ;
   35641           4 :   PyObject * obj2 = 0 ;
   35642           4 :   PyObject * obj3 = 0 ;
   35643           4 :   PyObject * obj4 = 0 ;
   35644           4 :   char * kwnames[] = {
   35645             :     (char *)"self",  (char *)"approx_ok",  (char *)"callback",  (char *)"callback_data",  (char *)"options",  NULL 
   35646             :   };
   35647           4 :   Statistics *result = 0 ;
   35648             :   
   35649             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   35650           4 :   PyProgressData *psProgressInfo;
   35651           4 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   35652           4 :   psProgressInfo->nLastReported = -1;
   35653           4 :   psProgressInfo->psPyCallback = NULL;
   35654           4 :   psProgressInfo->psPyCallbackData = NULL;
   35655           4 :   arg4 = psProgressInfo;
   35656           4 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOO:MDArray_ComputeStatistics", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   35657           4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35658           4 :   if (!SWIG_IsOK(res1)) {
   35659           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_ComputeStatistics" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35660             :   }
   35661           4 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35662           4 :   if (obj1) {
   35663           2 :     ecode2 = SWIG_AsVal_bool(obj1, &val2);
   35664           2 :     if (!SWIG_IsOK(ecode2)) {
   35665           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MDArray_ComputeStatistics" "', argument " "2"" of type '" "bool""'");
   35666             :     } 
   35667             :     arg2 = static_cast< bool >(val2);
   35668             :   }
   35669           4 :   if (obj2) {
   35670           0 :     {
   35671             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   35672             :       /* callback_func typemap */
   35673             :       
   35674             :       /* In some cases 0 is passed instead of None. */
   35675             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   35676           0 :       if ( PyLong_Check(obj2) || PyInt_Check(obj2) )
   35677             :       {
   35678           0 :         if( PyLong_AsLong(obj2) == 0 )
   35679             :         {
   35680           0 :           obj2 = Py_None;
   35681             :         }
   35682             :       }
   35683             :       
   35684           0 :       if (obj2 && obj2 != Py_None ) {
   35685           0 :         void* cbfunction = NULL;
   35686           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj2,
   35687             :             (void**)&cbfunction,
   35688             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   35689             :             SWIG_POINTER_EXCEPTION | 0 ));
   35690             :         
   35691           0 :         if ( cbfunction == GDALTermProgress ) {
   35692             :           arg3 = GDALTermProgress;
   35693             :         } else {
   35694           0 :           if (!PyCallable_Check(obj2)) {
   35695           0 :             PyErr_SetString( PyExc_RuntimeError,
   35696             :               "Object given is not a Python function" );
   35697           0 :             SWIG_fail;
   35698             :           }
   35699           0 :           psProgressInfo->psPyCallback = obj2;
   35700           0 :           arg3 = PyProgressProxy;
   35701             :         }
   35702             :         
   35703             :       }
   35704             :       
   35705             :     }
   35706             :   }
   35707           4 :   if (obj3) {
   35708           0 :     {
   35709             :       /* %typemap(in) ( void* callback_data=NULL)  */
   35710           0 :       psProgressInfo->psPyCallbackData = obj3 ;
   35711             :     }
   35712             :   }
   35713           4 :   if (obj4) {
   35714           2 :     {
   35715             :       /* %typemap(in) char **dict */
   35716           2 :       arg5 = NULL;
   35717           2 :       if ( PySequence_Check( obj4 ) ) {
   35718           2 :         int bErr = FALSE;
   35719           2 :         arg5 = CSLFromPySequence(obj4, &bErr);
   35720           2 :         if ( bErr )
   35721             :         {
   35722           0 :           SWIG_fail;
   35723             :         }
   35724             :       }
   35725           0 :       else if ( PyMapping_Check( obj4 ) ) {
   35726           0 :         int bErr = FALSE;
   35727           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   35728           0 :         if ( bErr )
   35729             :         {
   35730           0 :           SWIG_fail;
   35731             :         }
   35732             :       }
   35733             :       else {
   35734           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   35735           0 :         SWIG_fail;
   35736             :       }
   35737             :     }
   35738             :   }
   35739           4 :   {
   35740           4 :     const int bLocalUseExceptions = GetUseExceptions();
   35741           4 :     if ( bLocalUseExceptions ) {
   35742           2 :       pushErrorHandler();
   35743             :     }
   35744           4 :     {
   35745           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35746           4 :       result = (Statistics *)GDALMDArrayHS_ComputeStatistics(arg1,arg2,arg3,arg4,arg5);
   35747           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35748             :     }
   35749           4 :     if ( bLocalUseExceptions ) {
   35750           2 :       popErrorHandler();
   35751             :     }
   35752             : #ifndef SED_HACKS
   35753             :     if ( bLocalUseExceptions ) {
   35754             :       CPLErr eclass = CPLGetLastErrorType();
   35755             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35756             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35757             :       }
   35758             :     }
   35759             : #endif
   35760             :   }
   35761           4 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Statistics, 0 |  0 );
   35762           4 :   {
   35763             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   35764             :     
   35765           4 :     CPLFree(psProgressInfo);
   35766             :     
   35767             :   }
   35768           4 :   {
   35769             :     /* %typemap(freearg) char **dict */
   35770           4 :     CSLDestroy( arg5 );
   35771             :   }
   35772           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; } }
   35773             :   return resultobj;
   35774           0 : fail:
   35775           0 :   {
   35776             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   35777             :     
   35778           0 :     CPLFree(psProgressInfo);
   35779             :     
   35780             :   }
   35781           0 :   {
   35782             :     /* %typemap(freearg) char **dict */
   35783           0 :     CSLDestroy( arg5 );
   35784             :   }
   35785             :   return NULL;
   35786             : }
   35787             : 
   35788             : 
   35789          34 : SWIGINTERN PyObject *_wrap_MDArray_GetResampled(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35790          34 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35791          34 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   35792          34 :   int arg2 ;
   35793          34 :   GDALDimensionHS **arg3 = (GDALDimensionHS **) 0 ;
   35794          34 :   GDALRIOResampleAlg arg4 ;
   35795          34 :   OSRSpatialReferenceShadow **arg5 = (OSRSpatialReferenceShadow **) 0 ;
   35796          34 :   char **arg6 = (char **) 0 ;
   35797          34 :   void *argp1 = 0 ;
   35798          34 :   int res1 = 0 ;
   35799          34 :   OSRSpatialReferenceShadow *val5 ;
   35800          34 :   PyObject *swig_obj[5] ;
   35801          34 :   GDALMDArrayHS *result = 0 ;
   35802             :   
   35803          34 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_GetResampled", 4, 5, swig_obj)) SWIG_fail;
   35804          34 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   35805          34 :   if (!SWIG_IsOK(res1)) {
   35806           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_GetResampled" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   35807             :   }
   35808          34 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   35809          34 :   {
   35810             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDimensionHS *optional_##GDALDimensionHS)*/
   35811          34 :     if ( !PySequence_Check(swig_obj[1]) ) {
   35812           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   35813           0 :       SWIG_fail;
   35814             :     }
   35815          34 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   35816          34 :     if( size > (Py_ssize_t)INT_MAX ) {
   35817           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   35818           0 :       SWIG_fail;
   35819             :     }
   35820          34 :     if( (size_t)size > SIZE_MAX / sizeof(GDALDimensionHS*) ) {
   35821           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   35822           0 :       SWIG_fail;
   35823             :     }
   35824          34 :     arg2 = (int)size;
   35825          34 :     arg3 = (GDALDimensionHS**) VSIMalloc(arg2*sizeof(GDALDimensionHS*));
   35826          34 :     if( !arg3) {
   35827           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   35828           0 :       SWIG_fail;
   35829             :     }
   35830             :     
   35831         112 :     for( int i = 0; i<arg2; i++ ) {
   35832          78 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   35833          78 :       GDALDimensionHS* rawobjectpointer = NULL;
   35834          78 :       if( o != Py_None )
   35835             :       {
   35836           8 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDimensionHS, SWIG_POINTER_EXCEPTION | 0 ));
   35837           8 :         if (!rawobjectpointer) {
   35838           0 :           Py_DECREF(o);
   35839           0 :           PyErr_SetString(PyExc_TypeError, "object of wrong GDALDimensionHS");
   35840           0 :           SWIG_fail;
   35841             :         }
   35842             :       }
   35843          78 :       arg3[i] = rawobjectpointer;
   35844          78 :       Py_DECREF(o);
   35845             :       
   35846             :     }
   35847             :   }
   35848          34 :   {
   35849             :     // %typemap(in) GDALRIOResampleAlg
   35850          34 :     int val = 0;
   35851          34 :     int ecode = SWIG_AsVal_int(swig_obj[2], &val);
   35852          34 :     if (!SWIG_IsOK(ecode)) {
   35853           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALRIOResampleAlg");
   35854             :     }
   35855          34 :     if( val < 0 ||
   35856          34 :       ( val >= static_cast<int>(GRIORA_RESERVED_START) &&
   35857          34 :         val <= static_cast<int>(GRIORA_RESERVED_END) ) ||
   35858             :       val > static_cast<int>(GRIORA_LAST) )
   35859             :     {
   35860           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for resample_alg");
   35861             :     }
   35862          34 :     arg4 = static_cast< GDALRIOResampleAlg >(val);
   35863             :   }
   35864          34 :   {
   35865             :     /* %typemap(in) (OSRSpatialReferenceShadow** optional_OSRSpatialReferenceShadow) */
   35866          34 :     if ( swig_obj[3] == Py_None ) {
   35867             :       arg5 = NULL;
   35868             :     }
   35869             :     else {
   35870           1 :       void* argp = NULL;
   35871           1 :       int res = SWIG_ConvertPtr(swig_obj[3], &argp, SWIGTYPE_p_OSRSpatialReferenceShadow,  0  | 0);
   35872           1 :       if (!SWIG_IsOK(res)) {
   35873           0 :         SWIG_exception_fail(SWIG_ArgError(res), "argument of type != OSRSpatialReferenceShadow");
   35874             :       }
   35875           1 :       val5 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp);
   35876           1 :       arg5 = &val5;
   35877             :     }
   35878             :   }
   35879          34 :   if (swig_obj[4]) {
   35880           5 :     {
   35881             :       /* %typemap(in) char **dict */
   35882           5 :       arg6 = NULL;
   35883           5 :       if ( PySequence_Check( swig_obj[4] ) ) {
   35884           5 :         int bErr = FALSE;
   35885           5 :         arg6 = CSLFromPySequence(swig_obj[4], &bErr);
   35886           5 :         if ( bErr )
   35887             :         {
   35888           0 :           SWIG_fail;
   35889             :         }
   35890             :       }
   35891           0 :       else if ( PyMapping_Check( swig_obj[4] ) ) {
   35892           0 :         int bErr = FALSE;
   35893           0 :         arg6 = CSLFromPyMapping(swig_obj[4], &bErr);
   35894           0 :         if ( bErr )
   35895             :         {
   35896           0 :           SWIG_fail;
   35897             :         }
   35898             :       }
   35899             :       else {
   35900           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   35901           0 :         SWIG_fail;
   35902             :       }
   35903             :     }
   35904             :   }
   35905          34 :   {
   35906          34 :     const int bLocalUseExceptions = GetUseExceptions();
   35907          34 :     if ( bLocalUseExceptions ) {
   35908           0 :       pushErrorHandler();
   35909             :     }
   35910          34 :     {
   35911          34 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   35912          34 :       result = (GDALMDArrayHS *)GDALMDArrayHS_GetResampled(arg1,arg2,arg3,arg4,arg5,arg6);
   35913          34 :       SWIG_PYTHON_THREAD_END_ALLOW;
   35914             :     }
   35915          34 :     if ( bLocalUseExceptions ) {
   35916           0 :       popErrorHandler();
   35917             :     }
   35918             : #ifndef SED_HACKS
   35919             :     if ( bLocalUseExceptions ) {
   35920             :       CPLErr eclass = CPLGetLastErrorType();
   35921             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   35922             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   35923             :       }
   35924             :     }
   35925             : #endif
   35926             :   }
   35927          34 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   35928          34 :   {
   35929             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDimensionHS **poObjectsItemMaybeNull)*/
   35930          34 :     CPLFree( arg3 );
   35931             :   }
   35932          34 :   {
   35933             :     /* %typemap(freearg) char **dict */
   35934          34 :     CSLDestroy( arg6 );
   35935             :   }
   35936          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; } }
   35937             :   return resultobj;
   35938           0 : fail:
   35939           0 :   {
   35940             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDimensionHS **poObjectsItemMaybeNull)*/
   35941           0 :     CPLFree( arg3 );
   35942             :   }
   35943           0 :   {
   35944             :     /* %typemap(freearg) char **dict */
   35945           0 :     CSLDestroy( arg6 );
   35946             :   }
   35947             :   return NULL;
   35948             : }
   35949             : 
   35950             : 
   35951           7 : SWIGINTERN PyObject *_wrap_MDArray_GetMeshGrid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   35952           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   35953           7 :   int arg1 ;
   35954           7 :   GDALMDArrayHS **arg2 = (GDALMDArrayHS **) 0 ;
   35955           7 :   GDALMDArrayHS ***arg3 = (GDALMDArrayHS ***) 0 ;
   35956           7 :   size_t *arg4 = (size_t *) 0 ;
   35957           7 :   char **arg5 = (char **) 0 ;
   35958           7 :   GDALMDArrayHS **arrays3 = 0 ;
   35959           7 :   size_t nCount3 = 0 ;
   35960           7 :   PyObject *swig_obj[2] ;
   35961             :   
   35962           7 :   {
   35963             :     /* %typemap(in,numinputs=0) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   35964           7 :     arg3 = &arrays3;
   35965           7 :     arg4 = &nCount3;
   35966             :   }
   35967           7 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_GetMeshGrid", 1, 2, swig_obj)) SWIG_fail;
   35968           7 :   {
   35969             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALMDArrayHS *optional_##GDALMDArrayHS)*/
   35970           7 :     if ( !PySequence_Check(swig_obj[0]) ) {
   35971           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   35972           0 :       SWIG_fail;
   35973             :     }
   35974           7 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   35975           7 :     if( size > (Py_ssize_t)INT_MAX ) {
   35976           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   35977           0 :       SWIG_fail;
   35978             :     }
   35979           7 :     if( (size_t)size > SIZE_MAX / sizeof(GDALMDArrayHS*) ) {
   35980           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   35981           0 :       SWIG_fail;
   35982             :     }
   35983           7 :     arg1 = (int)size;
   35984           7 :     arg2 = (GDALMDArrayHS**) VSIMalloc(arg1*sizeof(GDALMDArrayHS*));
   35985           7 :     if( !arg2) {
   35986           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   35987           0 :       SWIG_fail;
   35988             :     }
   35989             :     
   35990          20 :     for( int i = 0; i<arg1; i++ ) {
   35991          13 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   35992          13 :       GDALMDArrayHS* rawobjectpointer = NULL;
   35993          13 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_EXCEPTION | 0 ));
   35994          13 :       if (!rawobjectpointer) {
   35995           0 :         Py_DECREF(o);
   35996           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALMDArrayHS");
   35997           0 :         SWIG_fail;
   35998             :       }
   35999          13 :       arg2[i] = rawobjectpointer;
   36000          13 :       Py_DECREF(o);
   36001             :       
   36002             :     }
   36003             :   }
   36004           7 :   if (swig_obj[1]) {
   36005           5 :     {
   36006             :       /* %typemap(in) char **dict */
   36007           5 :       arg5 = NULL;
   36008           5 :       if ( PySequence_Check( swig_obj[1] ) ) {
   36009           5 :         int bErr = FALSE;
   36010           5 :         arg5 = CSLFromPySequence(swig_obj[1], &bErr);
   36011           5 :         if ( bErr )
   36012             :         {
   36013           0 :           SWIG_fail;
   36014             :         }
   36015             :       }
   36016           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   36017           0 :         int bErr = FALSE;
   36018           0 :         arg5 = CSLFromPyMapping(swig_obj[1], &bErr);
   36019           0 :         if ( bErr )
   36020             :         {
   36021           0 :           SWIG_fail;
   36022             :         }
   36023             :       }
   36024             :       else {
   36025           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   36026           0 :         SWIG_fail;
   36027             :       }
   36028             :     }
   36029             :   }
   36030           7 :   {
   36031           7 :     const int bLocalUseExceptions = GetUseExceptions();
   36032           7 :     if ( bLocalUseExceptions ) {
   36033           7 :       pushErrorHandler();
   36034             :     }
   36035           7 :     {
   36036           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36037           7 :       GDALMDArrayHS_GetMeshGrid(arg1,arg2,arg3,arg4,arg5);
   36038           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36039             :     }
   36040           7 :     if ( bLocalUseExceptions ) {
   36041           7 :       popErrorHandler();
   36042             :     }
   36043             : #ifndef SED_HACKS
   36044             :     if ( bLocalUseExceptions ) {
   36045             :       CPLErr eclass = CPLGetLastErrorType();
   36046             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36047             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36048             :       }
   36049             :     }
   36050             : #endif
   36051             :   }
   36052           7 :   resultobj = SWIG_Py_Void();
   36053           7 :   {
   36054             :     /* %typemap(argout) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   36055           7 :     Py_DECREF(resultobj);
   36056           7 :     resultobj = PyList_New( *arg4 );
   36057           7 :     if( !resultobj ) {
   36058           0 :       SWIG_fail;
   36059             :     }
   36060          17 :     for( size_t i = 0; i < *arg4; i++ ) {
   36061          10 :       PyList_SetItem(resultobj, i,
   36062          10 :         SWIG_NewPointerObj((void*)(*arg3)[i],SWIGTYPE_p_GDALMDArrayHS,SWIG_POINTER_OWN) );
   36063             :       /* We have borrowed the GDALMDArrayHS */
   36064          10 :       (*arg3)[i] = NULL;
   36065             :     }
   36066             :   }
   36067           7 :   {
   36068             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALMDArrayHS **poObjects)*/
   36069           7 :     CPLFree( arg2 );
   36070             :   }
   36071           7 :   {
   36072             :     /* %typemap(freearg) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   36073           7 :     GDALReleaseArrays(*arg3, *arg4);
   36074             :   }
   36075           7 :   {
   36076             :     /* %typemap(freearg) char **dict */
   36077           7 :     CSLDestroy( arg5 );
   36078             :   }
   36079          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; } }
   36080             :   return resultobj;
   36081           0 : fail:
   36082           0 :   {
   36083             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALMDArrayHS **poObjects)*/
   36084           0 :     CPLFree( arg2 );
   36085             :   }
   36086           0 :   {
   36087             :     /* %typemap(freearg) (GDALMDArrayHS*** parrays, size_t* pnCount) */
   36088           0 :     GDALReleaseArrays(*arg3, *arg4);
   36089             :   }
   36090           0 :   {
   36091             :     /* %typemap(freearg) char **dict */
   36092           0 :     CSLDestroy( arg5 );
   36093             :   }
   36094             :   return NULL;
   36095             : }
   36096             : 
   36097             : 
   36098           7 : SWIGINTERN PyObject *_wrap_MDArray_Cache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36099           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36100           7 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   36101           7 :   char **arg2 = (char **) NULL ;
   36102           7 :   void *argp1 = 0 ;
   36103           7 :   int res1 = 0 ;
   36104           7 :   PyObject *swig_obj[2] ;
   36105           7 :   bool result;
   36106             :   
   36107           7 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_Cache", 1, 2, swig_obj)) SWIG_fail;
   36108           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   36109           7 :   if (!SWIG_IsOK(res1)) {
   36110           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Cache" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   36111             :   }
   36112           7 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   36113           7 :   if (swig_obj[1]) {
   36114           1 :     {
   36115             :       /* %typemap(in) char **dict */
   36116           1 :       arg2 = NULL;
   36117           1 :       if ( PySequence_Check( swig_obj[1] ) ) {
   36118           1 :         int bErr = FALSE;
   36119           1 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   36120           1 :         if ( bErr )
   36121             :         {
   36122           0 :           SWIG_fail;
   36123             :         }
   36124             :       }
   36125           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   36126           0 :         int bErr = FALSE;
   36127           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   36128           0 :         if ( bErr )
   36129             :         {
   36130           0 :           SWIG_fail;
   36131             :         }
   36132             :       }
   36133             :       else {
   36134           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   36135           0 :         SWIG_fail;
   36136             :       }
   36137             :     }
   36138             :   }
   36139           7 :   {
   36140           7 :     const int bLocalUseExceptions = GetUseExceptions();
   36141           7 :     if ( bLocalUseExceptions ) {
   36142           1 :       pushErrorHandler();
   36143             :     }
   36144           7 :     {
   36145           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36146           7 :       result = (bool)GDALMDArrayHS_Cache(arg1,arg2);
   36147           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36148             :     }
   36149           7 :     if ( bLocalUseExceptions ) {
   36150           1 :       popErrorHandler();
   36151             :     }
   36152             : #ifndef SED_HACKS
   36153             :     if ( bLocalUseExceptions ) {
   36154             :       CPLErr eclass = CPLGetLastErrorType();
   36155             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36156             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36157             :       }
   36158             :     }
   36159             : #endif
   36160             :   }
   36161           7 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   36162           7 :   {
   36163             :     /* %typemap(freearg) char **dict */
   36164           7 :     CSLDestroy( arg2 );
   36165             :   }
   36166           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; } }
   36167             :   return resultobj;
   36168           0 : fail:
   36169           0 :   {
   36170             :     /* %typemap(freearg) char **dict */
   36171           0 :     CSLDestroy( arg2 );
   36172             :   }
   36173             :   return NULL;
   36174             : }
   36175             : 
   36176             : 
   36177          28 : SWIGINTERN PyObject *_wrap_MDArray_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36178          28 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36179          28 :   GDALMDArrayHS *arg1 = (GDALMDArrayHS *) 0 ;
   36180          28 :   char *arg2 = (char *) 0 ;
   36181          28 :   void *argp1 = 0 ;
   36182          28 :   int res1 = 0 ;
   36183          28 :   int res2 ;
   36184          28 :   char *buf2 = 0 ;
   36185          28 :   int alloc2 = 0 ;
   36186          28 :   PyObject *swig_obj[2] ;
   36187          28 :   CPLErr result;
   36188             :   
   36189          28 :   if (!SWIG_Python_UnpackTuple(args, "MDArray_Rename", 2, 2, swig_obj)) SWIG_fail;
   36190          28 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   36191          28 :   if (!SWIG_IsOK(res1)) {
   36192           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MDArray_Rename" "', argument " "1"" of type '" "GDALMDArrayHS *""'"); 
   36193             :   }
   36194          28 :   arg1 = reinterpret_cast< GDALMDArrayHS * >(argp1);
   36195          28 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   36196          28 :   if (!SWIG_IsOK(res2)) {
   36197           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MDArray_Rename" "', argument " "2"" of type '" "char const *""'");
   36198             :   }
   36199          28 :   arg2 = reinterpret_cast< char * >(buf2);
   36200          28 :   {
   36201          28 :     const int bLocalUseExceptions = GetUseExceptions();
   36202          28 :     if ( bLocalUseExceptions ) {
   36203          28 :       pushErrorHandler();
   36204             :     }
   36205          28 :     {
   36206          28 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36207          28 :       result = (CPLErr)GDALMDArrayHS_Rename(arg1,(char const *)arg2);
   36208          28 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36209             :     }
   36210          28 :     if ( bLocalUseExceptions ) {
   36211          28 :       popErrorHandler();
   36212             :     }
   36213             : #ifndef SED_HACKS
   36214             :     if ( bLocalUseExceptions ) {
   36215             :       CPLErr eclass = CPLGetLastErrorType();
   36216             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36217             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36218             :       }
   36219             :     }
   36220             : #endif
   36221             :   }
   36222          28 :   resultobj = SWIG_From_int(static_cast< int >(result));
   36223          28 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   36224          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; } }
   36225             :   return resultobj;
   36226           0 : fail:
   36227           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   36228             :   return NULL;
   36229             : }
   36230             : 
   36231             : 
   36232         277 : SWIGINTERN PyObject *MDArray_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36233         277 :   PyObject *obj;
   36234         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   36235         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALMDArrayHS, SWIG_NewClientData(obj));
   36236         277 :   return SWIG_Py_Void();
   36237             : }
   36238             : 
   36239         737 : SWIGINTERN PyObject *_wrap_delete_Attribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36240         737 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36241         737 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36242         737 :   void *argp1 = 0 ;
   36243         737 :   int res1 = 0 ;
   36244         737 :   PyObject *swig_obj[1] ;
   36245             :   
   36246         737 :   if (!args) SWIG_fail;
   36247         737 :   swig_obj[0] = args;
   36248         737 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, SWIG_POINTER_DISOWN |  0 );
   36249         737 :   if (!SWIG_IsOK(res1)) {
   36250           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Attribute" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36251             :   }
   36252         737 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36253         737 :   {
   36254         737 :     const int bLocalUseExceptions = GetUseExceptions();
   36255         737 :     if ( bLocalUseExceptions ) {
   36256         372 :       pushErrorHandler();
   36257             :     }
   36258         737 :     {
   36259         737 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36260         737 :       delete_GDALAttributeHS(arg1);
   36261         737 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36262             :     }
   36263         737 :     if ( bLocalUseExceptions ) {
   36264         372 :       popErrorHandler();
   36265             :     }
   36266             : #ifndef SED_HACKS
   36267             :     if ( bLocalUseExceptions ) {
   36268             :       CPLErr eclass = CPLGetLastErrorType();
   36269             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36270             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36271             :       }
   36272             :     }
   36273             : #endif
   36274             :   }
   36275         737 :   resultobj = SWIG_Py_Void();
   36276         737 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   36277             :   return resultobj;
   36278             : fail:
   36279             :   return NULL;
   36280             : }
   36281             : 
   36282             : 
   36283         361 : SWIGINTERN PyObject *_wrap_Attribute_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36284         361 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36285         361 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36286         361 :   void *argp1 = 0 ;
   36287         361 :   int res1 = 0 ;
   36288         361 :   PyObject *swig_obj[1] ;
   36289         361 :   char *result = 0 ;
   36290             :   
   36291         361 :   if (!args) SWIG_fail;
   36292         361 :   swig_obj[0] = args;
   36293         361 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36294         361 :   if (!SWIG_IsOK(res1)) {
   36295           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetName" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36296             :   }
   36297         361 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36298         361 :   {
   36299         361 :     const int bLocalUseExceptions = GetUseExceptions();
   36300         361 :     if ( bLocalUseExceptions ) {
   36301         149 :       pushErrorHandler();
   36302             :     }
   36303         361 :     {
   36304         361 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36305         361 :       result = (char *)GDALAttributeHS_GetName(arg1);
   36306         361 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36307             :     }
   36308         361 :     if ( bLocalUseExceptions ) {
   36309         149 :       popErrorHandler();
   36310             :     }
   36311             : #ifndef SED_HACKS
   36312             :     if ( bLocalUseExceptions ) {
   36313             :       CPLErr eclass = CPLGetLastErrorType();
   36314             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36315             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36316             :       }
   36317             :     }
   36318             : #endif
   36319             :   }
   36320         361 :   resultobj = SWIG_FromCharPtr((const char *)result);
   36321         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; } }
   36322             :   return resultobj;
   36323             : fail:
   36324             :   return NULL;
   36325             : }
   36326             : 
   36327             : 
   36328          49 : SWIGINTERN PyObject *_wrap_Attribute_GetFullName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36329          49 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36330          49 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36331          49 :   void *argp1 = 0 ;
   36332          49 :   int res1 = 0 ;
   36333          49 :   PyObject *swig_obj[1] ;
   36334          49 :   char *result = 0 ;
   36335             :   
   36336          49 :   if (!args) SWIG_fail;
   36337          49 :   swig_obj[0] = args;
   36338          49 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36339          49 :   if (!SWIG_IsOK(res1)) {
   36340           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetFullName" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36341             :   }
   36342          49 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36343          49 :   {
   36344          49 :     const int bLocalUseExceptions = GetUseExceptions();
   36345          49 :     if ( bLocalUseExceptions ) {
   36346          41 :       pushErrorHandler();
   36347             :     }
   36348          49 :     {
   36349          49 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36350          49 :       result = (char *)GDALAttributeHS_GetFullName(arg1);
   36351          49 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36352             :     }
   36353          49 :     if ( bLocalUseExceptions ) {
   36354          41 :       popErrorHandler();
   36355             :     }
   36356             : #ifndef SED_HACKS
   36357             :     if ( bLocalUseExceptions ) {
   36358             :       CPLErr eclass = CPLGetLastErrorType();
   36359             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36360             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36361             :       }
   36362             :     }
   36363             : #endif
   36364             :   }
   36365          49 :   resultobj = SWIG_FromCharPtr((const char *)result);
   36366          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; } }
   36367             :   return resultobj;
   36368             : fail:
   36369             :   return NULL;
   36370             : }
   36371             : 
   36372             : 
   36373         176 : SWIGINTERN PyObject *_wrap_Attribute_GetTotalElementsCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36374         176 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36375         176 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36376         176 :   void *argp1 = 0 ;
   36377         176 :   int res1 = 0 ;
   36378         176 :   PyObject *swig_obj[1] ;
   36379         176 :   GUIntBig result;
   36380             :   
   36381         176 :   if (!args) SWIG_fail;
   36382         176 :   swig_obj[0] = args;
   36383         176 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36384         176 :   if (!SWIG_IsOK(res1)) {
   36385           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetTotalElementsCount" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36386             :   }
   36387         176 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36388         176 :   {
   36389         176 :     const int bLocalUseExceptions = GetUseExceptions();
   36390         176 :     if ( bLocalUseExceptions ) {
   36391          52 :       pushErrorHandler();
   36392             :     }
   36393         176 :     {
   36394         176 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36395         176 :       result = GDALAttributeHS_GetTotalElementsCount(arg1);
   36396         176 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36397             :     }
   36398         176 :     if ( bLocalUseExceptions ) {
   36399          52 :       popErrorHandler();
   36400             :     }
   36401             : #ifndef SED_HACKS
   36402             :     if ( bLocalUseExceptions ) {
   36403             :       CPLErr eclass = CPLGetLastErrorType();
   36404             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36405             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36406             :       }
   36407             :     }
   36408             : #endif
   36409             :   }
   36410         176 :   {
   36411         176 :     resultobj = PyLong_FromUnsignedLongLong(result);
   36412             :   }
   36413         176 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   36414             :   return resultobj;
   36415             : fail:
   36416             :   return NULL;
   36417             : }
   36418             : 
   36419             : 
   36420          12 : SWIGINTERN PyObject *_wrap_Attribute_GetDimensionCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36421          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36422          12 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36423          12 :   void *argp1 = 0 ;
   36424          12 :   int res1 = 0 ;
   36425          12 :   PyObject *swig_obj[1] ;
   36426          12 :   size_t result;
   36427             :   
   36428          12 :   if (!args) SWIG_fail;
   36429          12 :   swig_obj[0] = args;
   36430          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36431          12 :   if (!SWIG_IsOK(res1)) {
   36432           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetDimensionCount" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36433             :   }
   36434          12 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36435          12 :   {
   36436          12 :     const int bLocalUseExceptions = GetUseExceptions();
   36437          12 :     if ( bLocalUseExceptions ) {
   36438           6 :       pushErrorHandler();
   36439             :     }
   36440          12 :     {
   36441          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36442          12 :       result = GDALAttributeHS_GetDimensionCount(arg1);
   36443          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36444             :     }
   36445          12 :     if ( bLocalUseExceptions ) {
   36446           6 :       popErrorHandler();
   36447             :     }
   36448             : #ifndef SED_HACKS
   36449             :     if ( bLocalUseExceptions ) {
   36450             :       CPLErr eclass = CPLGetLastErrorType();
   36451             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36452             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36453             :       }
   36454             :     }
   36455             : #endif
   36456             :   }
   36457          12 :   resultobj = SWIG_From_size_t(static_cast< size_t >(result));
   36458          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; } }
   36459             :   return resultobj;
   36460             : fail:
   36461             :   return NULL;
   36462             : }
   36463             : 
   36464             : 
   36465          11 : SWIGINTERN PyObject *_wrap_Attribute_GetDimensionsSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36466          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36467          11 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36468          11 :   GUIntBig **arg2 = (GUIntBig **) 0 ;
   36469          11 :   size_t *arg3 = (size_t *) 0 ;
   36470          11 :   void *argp1 = 0 ;
   36471          11 :   int res1 = 0 ;
   36472          11 :   GUIntBig *vals2 = 0 ;
   36473          11 :   size_t nCount2 = 0 ;
   36474          11 :   PyObject *swig_obj[1] ;
   36475             :   
   36476          11 :   {
   36477             :     /* %typemap(in,numinputs=0) (GUIntBig** pvals, size_t* pnCount) */
   36478          11 :     arg2 = &vals2;
   36479          11 :     arg3 = &nCount2;
   36480             :   }
   36481          11 :   if (!args) SWIG_fail;
   36482          11 :   swig_obj[0] = args;
   36483          11 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36484          11 :   if (!SWIG_IsOK(res1)) {
   36485           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetDimensionsSize" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36486             :   }
   36487          11 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36488          11 :   {
   36489          11 :     const int bLocalUseExceptions = GetUseExceptions();
   36490          11 :     if ( bLocalUseExceptions ) {
   36491           5 :       pushErrorHandler();
   36492             :     }
   36493          11 :     {
   36494          11 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36495          11 :       GDALAttributeHS_GetDimensionsSize(arg1,arg2,arg3);
   36496          11 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36497             :     }
   36498          11 :     if ( bLocalUseExceptions ) {
   36499           5 :       popErrorHandler();
   36500             :     }
   36501             : #ifndef SED_HACKS
   36502             :     if ( bLocalUseExceptions ) {
   36503             :       CPLErr eclass = CPLGetLastErrorType();
   36504             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36505             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36506             :       }
   36507             :     }
   36508             : #endif
   36509             :   }
   36510          11 :   resultobj = SWIG_Py_Void();
   36511          11 :   {
   36512             :     /* %typemap(argout) (GUIntBig** pvals, size_t* pnCount) */
   36513          11 :     Py_DECREF(resultobj);
   36514          11 :     resultobj = PyList_New( *arg3 );
   36515          11 :     if( !resultobj ) {
   36516           0 :       SWIG_fail;
   36517             :     }
   36518          22 :     for( size_t i = 0; i < *arg3; i++ ) {
   36519          11 :       char szTmp[32];
   36520          11 :       snprintf(szTmp, sizeof(szTmp), CPL_FRMT_GUIB, (*arg2)[i]);
   36521          11 :       PyObject *o = PyLong_FromString(szTmp, NULL, 10);
   36522          11 :       PyList_SetItem(resultobj, i, o );
   36523             :     }
   36524             :   }
   36525          11 :   {
   36526             :     /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
   36527          11 :     CPLFree(*arg2);
   36528             :   }
   36529          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; } }
   36530             :   return resultobj;
   36531           0 : fail:
   36532           0 :   {
   36533             :     /* %typemap(freearg) (GUIntBig** pvals, size_t* pnCount) */
   36534           0 :     CPLFree(*arg2);
   36535             :   }
   36536             :   return NULL;
   36537             : }
   36538             : 
   36539             : 
   36540         418 : SWIGINTERN PyObject *_wrap_Attribute_GetDataType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36541         418 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36542         418 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36543         418 :   void *argp1 = 0 ;
   36544         418 :   int res1 = 0 ;
   36545         418 :   PyObject *swig_obj[1] ;
   36546         418 :   GDALExtendedDataTypeHS *result = 0 ;
   36547             :   
   36548         418 :   if (!args) SWIG_fail;
   36549         418 :   swig_obj[0] = args;
   36550         418 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36551         418 :   if (!SWIG_IsOK(res1)) {
   36552           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_GetDataType" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36553             :   }
   36554         418 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36555         418 :   {
   36556         418 :     const int bLocalUseExceptions = GetUseExceptions();
   36557         418 :     if ( bLocalUseExceptions ) {
   36558         203 :       pushErrorHandler();
   36559             :     }
   36560         418 :     {
   36561         418 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36562         418 :       result = (GDALExtendedDataTypeHS *)GDALAttributeHS_GetDataType(arg1);
   36563         418 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36564             :     }
   36565         418 :     if ( bLocalUseExceptions ) {
   36566         203 :       popErrorHandler();
   36567             :     }
   36568             : #ifndef SED_HACKS
   36569             :     if ( bLocalUseExceptions ) {
   36570             :       CPLErr eclass = CPLGetLastErrorType();
   36571             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36572             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36573             :       }
   36574             :     }
   36575             : #endif
   36576             :   }
   36577         418 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
   36578         418 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   36579             :   return resultobj;
   36580             : fail:
   36581             :   return NULL;
   36582             : }
   36583             : 
   36584             : 
   36585          10 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsRaw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36586          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36587          10 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36588          10 :   void **arg2 = (void **) 0 ;
   36589          10 :   void *argp1 = 0 ;
   36590          10 :   int res1 = 0 ;
   36591          10 :   void *pyObject2 = NULL ;
   36592          10 :   PyObject *swig_obj[1] ;
   36593          10 :   CPLErr result;
   36594             :   
   36595          10 :   {
   36596             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject2 = NULL ) */
   36597          10 :     arg2 = &pyObject2;
   36598             :   }
   36599          10 :   if (!args) SWIG_fail;
   36600          10 :   swig_obj[0] = args;
   36601          10 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36602          10 :   if (!SWIG_IsOK(res1)) {
   36603           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsRaw" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36604             :   }
   36605          10 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36606          10 :   {
   36607          10 :     const int bLocalUseExceptions = GetUseExceptions();
   36608          10 :     if ( bLocalUseExceptions ) {
   36609           4 :       pushErrorHandler();
   36610             :     }
   36611          10 :     {
   36612          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36613          10 :       result = (CPLErr)GDALAttributeHS_ReadAsRaw(arg1,arg2);
   36614          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36615             :     }
   36616          10 :     if ( bLocalUseExceptions ) {
   36617           4 :       popErrorHandler();
   36618             :     }
   36619             : #ifndef SED_HACKS
   36620             :     if ( bLocalUseExceptions ) {
   36621             :       CPLErr eclass = CPLGetLastErrorType();
   36622             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36623             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36624             :       }
   36625             :     }
   36626             : #endif
   36627             :   }
   36628          10 :   resultobj = SWIG_From_int(static_cast< int >(result));
   36629          10 :   {
   36630             :     /* %typemap(argout) ( void **outPythonObject ) */
   36631          10 :     Py_XDECREF(resultobj);
   36632          10 :     if (*arg2)
   36633             :     {
   36634             :       resultobj = (PyObject*)*arg2;
   36635             :     }
   36636             :     else
   36637             :     {
   36638           4 :       resultobj = Py_None;
   36639           4 :       Py_INCREF(resultobj);
   36640             :     }
   36641             :   }
   36642          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; } }
   36643             :   return resultobj;
   36644             : fail:
   36645             :   return NULL;
   36646             : }
   36647             : 
   36648             : 
   36649         107 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36650         107 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36651         107 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36652         107 :   void *argp1 = 0 ;
   36653         107 :   int res1 = 0 ;
   36654         107 :   PyObject *swig_obj[1] ;
   36655         107 :   char *result = 0 ;
   36656             :   
   36657         107 :   if (!args) SWIG_fail;
   36658         107 :   swig_obj[0] = args;
   36659         107 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36660         107 :   if (!SWIG_IsOK(res1)) {
   36661           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsString" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36662             :   }
   36663         107 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36664         107 :   {
   36665         107 :     const int bLocalUseExceptions = GetUseExceptions();
   36666         107 :     if ( bLocalUseExceptions ) {
   36667          31 :       pushErrorHandler();
   36668             :     }
   36669         107 :     {
   36670         107 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36671         107 :       result = (char *)GDALAttributeHS_ReadAsString(arg1);
   36672         107 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36673             :     }
   36674         107 :     if ( bLocalUseExceptions ) {
   36675          31 :       popErrorHandler();
   36676             :     }
   36677             : #ifndef SED_HACKS
   36678             :     if ( bLocalUseExceptions ) {
   36679             :       CPLErr eclass = CPLGetLastErrorType();
   36680             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36681             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36682             :       }
   36683             :     }
   36684             : #endif
   36685             :   }
   36686         107 :   resultobj = SWIG_FromCharPtr((const char *)result);
   36687         107 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   36688             :   return resultobj;
   36689             : fail:
   36690             :   return NULL;
   36691             : }
   36692             : 
   36693             : 
   36694          22 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsInt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36695          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36696          22 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36697          22 :   void *argp1 = 0 ;
   36698          22 :   int res1 = 0 ;
   36699          22 :   PyObject *swig_obj[1] ;
   36700          22 :   int result;
   36701             :   
   36702          22 :   if (!args) SWIG_fail;
   36703          22 :   swig_obj[0] = args;
   36704          22 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36705          22 :   if (!SWIG_IsOK(res1)) {
   36706           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsInt" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36707             :   }
   36708          22 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36709          22 :   {
   36710          22 :     const int bLocalUseExceptions = GetUseExceptions();
   36711          22 :     if ( bLocalUseExceptions ) {
   36712           9 :       pushErrorHandler();
   36713             :     }
   36714          22 :     {
   36715          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36716          22 :       result = (int)GDALAttributeHS_ReadAsInt(arg1);
   36717          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36718             :     }
   36719          22 :     if ( bLocalUseExceptions ) {
   36720           9 :       popErrorHandler();
   36721             :     }
   36722             : #ifndef SED_HACKS
   36723             :     if ( bLocalUseExceptions ) {
   36724             :       CPLErr eclass = CPLGetLastErrorType();
   36725             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36726             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36727             :       }
   36728             :     }
   36729             : #endif
   36730             :   }
   36731          22 :   resultobj = SWIG_From_int(static_cast< int >(result));
   36732          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; } }
   36733             :   return resultobj;
   36734             : fail:
   36735             :   return NULL;
   36736             : }
   36737             : 
   36738             : 
   36739          15 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36740          15 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36741          15 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36742          15 :   void *argp1 = 0 ;
   36743          15 :   int res1 = 0 ;
   36744          15 :   PyObject *swig_obj[1] ;
   36745          15 :   long long result;
   36746             :   
   36747          15 :   if (!args) SWIG_fail;
   36748          15 :   swig_obj[0] = args;
   36749          15 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36750          15 :   if (!SWIG_IsOK(res1)) {
   36751           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsInt64" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36752             :   }
   36753          15 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36754          15 :   {
   36755          15 :     const int bLocalUseExceptions = GetUseExceptions();
   36756          15 :     if ( bLocalUseExceptions ) {
   36757           1 :       pushErrorHandler();
   36758             :     }
   36759          15 :     {
   36760          15 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36761          15 :       result = (long long)GDALAttributeHS_ReadAsInt64(arg1);
   36762          15 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36763             :     }
   36764          15 :     if ( bLocalUseExceptions ) {
   36765           1 :       popErrorHandler();
   36766             :     }
   36767             : #ifndef SED_HACKS
   36768             :     if ( bLocalUseExceptions ) {
   36769             :       CPLErr eclass = CPLGetLastErrorType();
   36770             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36771             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36772             :       }
   36773             :     }
   36774             : #endif
   36775             :   }
   36776          15 :   resultobj = SWIG_From_long_SS_long(static_cast< long long >(result));
   36777          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; } }
   36778             :   return resultobj;
   36779             : fail:
   36780             :   return NULL;
   36781             : }
   36782             : 
   36783             : 
   36784          40 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36785          40 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36786          40 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36787          40 :   void *argp1 = 0 ;
   36788          40 :   int res1 = 0 ;
   36789          40 :   PyObject *swig_obj[1] ;
   36790          40 :   double result;
   36791             :   
   36792          40 :   if (!args) SWIG_fail;
   36793          40 :   swig_obj[0] = args;
   36794          40 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36795          40 :   if (!SWIG_IsOK(res1)) {
   36796           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsDouble" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36797             :   }
   36798          40 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36799          40 :   {
   36800          40 :     const int bLocalUseExceptions = GetUseExceptions();
   36801          40 :     if ( bLocalUseExceptions ) {
   36802           6 :       pushErrorHandler();
   36803             :     }
   36804          40 :     {
   36805          40 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36806          40 :       result = (double)GDALAttributeHS_ReadAsDouble(arg1);
   36807          40 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36808             :     }
   36809          40 :     if ( bLocalUseExceptions ) {
   36810           6 :       popErrorHandler();
   36811             :     }
   36812             : #ifndef SED_HACKS
   36813             :     if ( bLocalUseExceptions ) {
   36814             :       CPLErr eclass = CPLGetLastErrorType();
   36815             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36816             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36817             :       }
   36818             :     }
   36819             : #endif
   36820             :   }
   36821          40 :   resultobj = SWIG_From_double(static_cast< double >(result));
   36822          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; } }
   36823             :   return resultobj;
   36824             : fail:
   36825             :   return NULL;
   36826             : }
   36827             : 
   36828             : 
   36829          19 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsStringArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36830          19 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36831          19 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36832          19 :   void *argp1 = 0 ;
   36833          19 :   int res1 = 0 ;
   36834          19 :   PyObject *swig_obj[1] ;
   36835          19 :   char **result = 0 ;
   36836             :   
   36837          19 :   if (!args) SWIG_fail;
   36838          19 :   swig_obj[0] = args;
   36839          19 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36840          19 :   if (!SWIG_IsOK(res1)) {
   36841           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsStringArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36842             :   }
   36843          19 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36844          19 :   {
   36845          19 :     const int bLocalUseExceptions = GetUseExceptions();
   36846          19 :     if ( bLocalUseExceptions ) {
   36847           4 :       pushErrorHandler();
   36848             :     }
   36849          19 :     {
   36850          19 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36851          19 :       result = (char **)GDALAttributeHS_ReadAsStringArray(arg1);
   36852          19 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36853             :     }
   36854          19 :     if ( bLocalUseExceptions ) {
   36855           4 :       popErrorHandler();
   36856             :     }
   36857             : #ifndef SED_HACKS
   36858             :     if ( bLocalUseExceptions ) {
   36859             :       CPLErr eclass = CPLGetLastErrorType();
   36860             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36861             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36862             :       }
   36863             :     }
   36864             : #endif
   36865             :   }
   36866          19 :   {
   36867             :     /* %typemap(out) char **CSL -> ( string ) */
   36868          19 :     bool bErr = false;
   36869          19 :     resultobj = CSLToList(result, &bErr);
   36870          19 :     CSLDestroy(result);
   36871          19 :     if( bErr ) {
   36872           0 :       SWIG_fail;
   36873             :     }
   36874             :   }
   36875          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; } }
   36876             :   return resultobj;
   36877             : fail:
   36878             :   return NULL;
   36879             : }
   36880             : 
   36881             : 
   36882          15 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsIntArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36883          15 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36884          15 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36885          15 :   int **arg2 = (int **) 0 ;
   36886          15 :   size_t *arg3 = (size_t *) 0 ;
   36887          15 :   void *argp1 = 0 ;
   36888          15 :   int res1 = 0 ;
   36889          15 :   int *vals2 = 0 ;
   36890          15 :   size_t nCount2 = 0 ;
   36891          15 :   PyObject *swig_obj[1] ;
   36892             :   
   36893          15 :   {
   36894             :     /* %typemap(in,numinputs=0) (int** pvals, size_t* pnCount) */
   36895          15 :     arg2 = &vals2;
   36896          15 :     arg3 = &nCount2;
   36897             :   }
   36898          15 :   if (!args) SWIG_fail;
   36899          15 :   swig_obj[0] = args;
   36900          15 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36901          15 :   if (!SWIG_IsOK(res1)) {
   36902           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsIntArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36903             :   }
   36904          15 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36905          15 :   {
   36906          15 :     const int bLocalUseExceptions = GetUseExceptions();
   36907          15 :     if ( bLocalUseExceptions ) {
   36908           4 :       pushErrorHandler();
   36909             :     }
   36910          15 :     {
   36911          15 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36912          15 :       GDALAttributeHS_ReadAsIntArray(arg1,arg2,arg3);
   36913          15 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36914             :     }
   36915          15 :     if ( bLocalUseExceptions ) {
   36916           4 :       popErrorHandler();
   36917             :     }
   36918             : #ifndef SED_HACKS
   36919             :     if ( bLocalUseExceptions ) {
   36920             :       CPLErr eclass = CPLGetLastErrorType();
   36921             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36922             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36923             :       }
   36924             :     }
   36925             : #endif
   36926             :   }
   36927          15 :   resultobj = SWIG_Py_Void();
   36928          15 :   {
   36929             :     /* %typemap(argout) (int** pvals, size_t* pnCount) */
   36930          15 :     PyObject *list = CreateTupleFromIntArray(*arg2, *arg3);
   36931          15 :     Py_DECREF(resultobj);
   36932          15 :     resultobj = list;
   36933             :   }
   36934          15 :   {
   36935             :     /* %typemap(freearg) (int** pvals, size_t* pnCount) */
   36936          15 :     CPLFree(*arg2);
   36937             :   }
   36938          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; } }
   36939             :   return resultobj;
   36940           0 : fail:
   36941           0 :   {
   36942             :     /* %typemap(freearg) (int** pvals, size_t* pnCount) */
   36943           0 :     CPLFree(*arg2);
   36944             :   }
   36945             :   return NULL;
   36946             : }
   36947             : 
   36948             : 
   36949          14 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsInt64Array(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   36950          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   36951          14 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   36952          14 :   long long **arg2 = (long long **) 0 ;
   36953          14 :   size_t *arg3 = (size_t *) 0 ;
   36954          14 :   void *argp1 = 0 ;
   36955          14 :   int res1 = 0 ;
   36956          14 :   long long *vals2 = 0 ;
   36957          14 :   size_t nCount2 = 0 ;
   36958          14 :   PyObject *swig_obj[1] ;
   36959             :   
   36960          14 :   {
   36961             :     /* %typemap(in,numinputs=0) (long long** pvals, size_t* pnCount) */
   36962          14 :     arg2 = &vals2;
   36963          14 :     arg3 = &nCount2;
   36964             :   }
   36965          14 :   if (!args) SWIG_fail;
   36966          14 :   swig_obj[0] = args;
   36967          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   36968          14 :   if (!SWIG_IsOK(res1)) {
   36969           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsInt64Array" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   36970             :   }
   36971          14 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   36972          14 :   {
   36973          14 :     const int bLocalUseExceptions = GetUseExceptions();
   36974          14 :     if ( bLocalUseExceptions ) {
   36975           1 :       pushErrorHandler();
   36976             :     }
   36977          14 :     {
   36978          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   36979          14 :       GDALAttributeHS_ReadAsInt64Array(arg1,arg2,arg3);
   36980          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   36981             :     }
   36982          14 :     if ( bLocalUseExceptions ) {
   36983           1 :       popErrorHandler();
   36984             :     }
   36985             : #ifndef SED_HACKS
   36986             :     if ( bLocalUseExceptions ) {
   36987             :       CPLErr eclass = CPLGetLastErrorType();
   36988             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   36989             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   36990             :       }
   36991             :     }
   36992             : #endif
   36993             :   }
   36994          14 :   resultobj = SWIG_Py_Void();
   36995          14 :   {
   36996             :     /* %typemap(argout) (int** pvals, size_t* pnCount) */
   36997          14 :     PyObject *list = CreateTupleFromInt64Array(*arg2, *arg3);
   36998          14 :     Py_DECREF(resultobj);
   36999          14 :     resultobj = list;
   37000             :   }
   37001          14 :   {
   37002             :     /* %typemap(freearg) (long long** pvals, size_t* pnCount) */
   37003          14 :     CPLFree(*arg2);
   37004             :   }
   37005          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; } }
   37006             :   return resultobj;
   37007           0 : fail:
   37008           0 :   {
   37009             :     /* %typemap(freearg) (long long** pvals, size_t* pnCount) */
   37010           0 :     CPLFree(*arg2);
   37011             :   }
   37012             :   return NULL;
   37013             : }
   37014             : 
   37015             : 
   37016          29 : SWIGINTERN PyObject *_wrap_Attribute_ReadAsDoubleArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37017          29 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37018          29 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37019          29 :   double **arg2 = (double **) 0 ;
   37020          29 :   size_t *arg3 = (size_t *) 0 ;
   37021          29 :   void *argp1 = 0 ;
   37022          29 :   int res1 = 0 ;
   37023          29 :   double *vals2 = 0 ;
   37024          29 :   size_t nCount2 = 0 ;
   37025          29 :   PyObject *swig_obj[1] ;
   37026             :   
   37027          29 :   {
   37028             :     /* %typemap(in,numinputs=0) (double** pvals, size_t* pnCount) */
   37029          29 :     arg2 = &vals2;
   37030          29 :     arg3 = &nCount2;
   37031             :   }
   37032          29 :   if (!args) SWIG_fail;
   37033          29 :   swig_obj[0] = args;
   37034          29 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37035          29 :   if (!SWIG_IsOK(res1)) {
   37036           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_ReadAsDoubleArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37037             :   }
   37038          29 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37039          29 :   {
   37040          29 :     const int bLocalUseExceptions = GetUseExceptions();
   37041          29 :     if ( bLocalUseExceptions ) {
   37042           3 :       pushErrorHandler();
   37043             :     }
   37044          29 :     {
   37045          29 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37046          29 :       GDALAttributeHS_ReadAsDoubleArray(arg1,arg2,arg3);
   37047          29 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37048             :     }
   37049          29 :     if ( bLocalUseExceptions ) {
   37050           3 :       popErrorHandler();
   37051             :     }
   37052             : #ifndef SED_HACKS
   37053             :     if ( bLocalUseExceptions ) {
   37054             :       CPLErr eclass = CPLGetLastErrorType();
   37055             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37056             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37057             :       }
   37058             :     }
   37059             : #endif
   37060             :   }
   37061          29 :   resultobj = SWIG_Py_Void();
   37062          29 :   {
   37063             :     /* %typemap(argout) (double** pvals, size_t* pnCount) */
   37064          29 :     PyObject *list = CreateTupleFromDoubleArray(*arg2, *arg3);
   37065          29 :     Py_DECREF(resultobj);
   37066          29 :     resultobj = list;
   37067             :   }
   37068          29 :   {
   37069             :     /* %typemap(freearg) (double** pvals, size_t* pnCount) */
   37070          29 :     CPLFree(*arg2);
   37071             :   }
   37072          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; } }
   37073             :   return resultobj;
   37074           0 : fail:
   37075           0 :   {
   37076             :     /* %typemap(freearg) (double** pvals, size_t* pnCount) */
   37077           0 :     CPLFree(*arg2);
   37078             :   }
   37079             :   return NULL;
   37080             : }
   37081             : 
   37082             : 
   37083           5 : SWIGINTERN PyObject *_wrap_Attribute_WriteRaw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37084           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37085           5 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37086           5 :   GIntBig arg2 ;
   37087           5 :   char *arg3 = (char *) 0 ;
   37088           5 :   void *argp1 = 0 ;
   37089           5 :   int res1 = 0 ;
   37090           5 :   int alloc2 = 0 ;
   37091           5 :   bool viewIsValid2 = false ;
   37092           5 :   Py_buffer view2 ;
   37093           5 :   PyObject *swig_obj[2] ;
   37094           5 :   CPLErr result;
   37095             :   
   37096           5 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteRaw", 2, 2, swig_obj)) SWIG_fail;
   37097           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37098           5 :   if (!SWIG_IsOK(res1)) {
   37099           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteRaw" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37100             :   }
   37101           5 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37102           5 :   {
   37103             :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   37104           5 :     char* ptr = NULL;
   37105           5 :     if( !GetBufferAsCharPtrGIntBigSize(swig_obj[1], &arg2, &ptr, &alloc2, &viewIsValid2, &view2) ) {
   37106           0 :       SWIG_fail;
   37107             :     }
   37108           5 :     arg3 = (char *)ptr;
   37109             :   }
   37110           5 :   {
   37111           5 :     const int bLocalUseExceptions = GetUseExceptions();
   37112           5 :     if ( bLocalUseExceptions ) {
   37113           4 :       pushErrorHandler();
   37114             :     }
   37115           5 :     {
   37116           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37117           5 :       result = (CPLErr)GDALAttributeHS_WriteRaw(arg1,arg2,arg3);
   37118           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37119             :     }
   37120           5 :     if ( bLocalUseExceptions ) {
   37121           4 :       popErrorHandler();
   37122             :     }
   37123             : #ifndef SED_HACKS
   37124             :     if ( bLocalUseExceptions ) {
   37125             :       CPLErr eclass = CPLGetLastErrorType();
   37126             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37127             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37128             :       }
   37129             :     }
   37130             : #endif
   37131             :   }
   37132           5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37133           5 :   {
   37134             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   37135           5 :     if( viewIsValid2 ) {
   37136           5 :       PyBuffer_Release(&view2);
   37137             :     }
   37138           0 :     else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
   37139           0 :       delete[] arg3;
   37140             :     }
   37141             :   }
   37142           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; } }
   37143             :   return resultobj;
   37144           0 : fail:
   37145           0 :   {
   37146             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   37147           0 :     if( viewIsValid2 ) {
   37148           0 :       PyBuffer_Release(&view2);
   37149             :     }
   37150           5 :     else if (ReturnSame(alloc2) == SWIG_NEWOBJ ) {
   37151             :       delete[] arg3;
   37152             :     }
   37153             :   }
   37154             :   return NULL;
   37155             : }
   37156             : 
   37157             : 
   37158         181 : SWIGINTERN PyObject *_wrap_Attribute_WriteString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37159         181 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37160         181 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37161         181 :   char *arg2 = (char *) 0 ;
   37162         181 :   void *argp1 = 0 ;
   37163         181 :   int res1 = 0 ;
   37164         181 :   int res2 ;
   37165         181 :   char *buf2 = 0 ;
   37166         181 :   int alloc2 = 0 ;
   37167         181 :   PyObject *swig_obj[2] ;
   37168         181 :   CPLErr result;
   37169             :   
   37170         181 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteString", 2, 2, swig_obj)) SWIG_fail;
   37171         181 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37172         181 :   if (!SWIG_IsOK(res1)) {
   37173           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteString" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37174             :   }
   37175         181 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37176         181 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   37177         181 :   if (!SWIG_IsOK(res2)) {
   37178           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Attribute_WriteString" "', argument " "2"" of type '" "char const *""'");
   37179             :   }
   37180         181 :   arg2 = reinterpret_cast< char * >(buf2);
   37181         181 :   {
   37182         181 :     const int bLocalUseExceptions = GetUseExceptions();
   37183         181 :     if ( bLocalUseExceptions ) {
   37184         138 :       pushErrorHandler();
   37185             :     }
   37186         181 :     {
   37187         181 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37188         181 :       result = (CPLErr)GDALAttributeHS_WriteString(arg1,(char const *)arg2);
   37189         181 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37190             :     }
   37191         181 :     if ( bLocalUseExceptions ) {
   37192         138 :       popErrorHandler();
   37193             :     }
   37194             : #ifndef SED_HACKS
   37195             :     if ( bLocalUseExceptions ) {
   37196             :       CPLErr eclass = CPLGetLastErrorType();
   37197             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37198             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37199             :       }
   37200             :     }
   37201             : #endif
   37202             :   }
   37203         181 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37204         181 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   37205         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; } }
   37206             :   return resultobj;
   37207           0 : fail:
   37208           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   37209             :   return NULL;
   37210             : }
   37211             : 
   37212             : 
   37213           8 : SWIGINTERN PyObject *_wrap_Attribute_WriteStringArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37214           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37215           8 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37216           8 :   char **arg2 = (char **) 0 ;
   37217           8 :   void *argp1 = 0 ;
   37218           8 :   int res1 = 0 ;
   37219           8 :   PyObject *swig_obj[2] ;
   37220           8 :   CPLErr result;
   37221             :   
   37222           8 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteStringArray", 2, 2, swig_obj)) SWIG_fail;
   37223           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37224           8 :   if (!SWIG_IsOK(res1)) {
   37225           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteStringArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37226             :   }
   37227           8 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37228           8 :   {
   37229             :     /* %typemap(in) char **dict */
   37230           8 :     arg2 = NULL;
   37231           8 :     if ( PySequence_Check( swig_obj[1] ) ) {
   37232           8 :       int bErr = FALSE;
   37233           8 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   37234           8 :       if ( bErr )
   37235             :       {
   37236           0 :         SWIG_fail;
   37237             :       }
   37238             :     }
   37239           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   37240           0 :       int bErr = FALSE;
   37241           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   37242           0 :       if ( bErr )
   37243             :       {
   37244           0 :         SWIG_fail;
   37245             :       }
   37246             :     }
   37247             :     else {
   37248           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   37249           0 :       SWIG_fail;
   37250             :     }
   37251             :   }
   37252           8 :   {
   37253           8 :     const int bLocalUseExceptions = GetUseExceptions();
   37254           8 :     if ( bLocalUseExceptions ) {
   37255           0 :       pushErrorHandler();
   37256             :     }
   37257           8 :     {
   37258           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37259           8 :       result = (CPLErr)GDALAttributeHS_WriteStringArray(arg1,arg2);
   37260           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37261             :     }
   37262           8 :     if ( bLocalUseExceptions ) {
   37263           0 :       popErrorHandler();
   37264             :     }
   37265             : #ifndef SED_HACKS
   37266             :     if ( bLocalUseExceptions ) {
   37267             :       CPLErr eclass = CPLGetLastErrorType();
   37268             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37269             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37270             :       }
   37271             :     }
   37272             : #endif
   37273             :   }
   37274           8 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37275           8 :   {
   37276             :     /* %typemap(freearg) char **dict */
   37277           8 :     CSLDestroy( arg2 );
   37278             :   }
   37279           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; } }
   37280             :   return resultobj;
   37281           0 : fail:
   37282           0 :   {
   37283             :     /* %typemap(freearg) char **dict */
   37284           0 :     CSLDestroy( arg2 );
   37285             :   }
   37286             :   return NULL;
   37287             : }
   37288             : 
   37289             : 
   37290          22 : SWIGINTERN PyObject *_wrap_Attribute_WriteInt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37291          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37292          22 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37293          22 :   int arg2 ;
   37294          22 :   void *argp1 = 0 ;
   37295          22 :   int res1 = 0 ;
   37296          22 :   int val2 ;
   37297          22 :   int ecode2 = 0 ;
   37298          22 :   PyObject *swig_obj[2] ;
   37299          22 :   CPLErr result;
   37300             :   
   37301          22 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteInt", 2, 2, swig_obj)) SWIG_fail;
   37302          22 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37303          22 :   if (!SWIG_IsOK(res1)) {
   37304           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteInt" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37305             :   }
   37306          22 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37307          22 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   37308          22 :   if (!SWIG_IsOK(ecode2)) {
   37309           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Attribute_WriteInt" "', argument " "2"" of type '" "int""'");
   37310             :   } 
   37311          22 :   arg2 = static_cast< int >(val2);
   37312          22 :   {
   37313          22 :     const int bLocalUseExceptions = GetUseExceptions();
   37314          22 :     if ( bLocalUseExceptions ) {
   37315           4 :       pushErrorHandler();
   37316             :     }
   37317          22 :     {
   37318          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37319          22 :       result = (CPLErr)GDALAttributeHS_WriteInt(arg1,arg2);
   37320          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37321             :     }
   37322          22 :     if ( bLocalUseExceptions ) {
   37323           4 :       popErrorHandler();
   37324             :     }
   37325             : #ifndef SED_HACKS
   37326             :     if ( bLocalUseExceptions ) {
   37327             :       CPLErr eclass = CPLGetLastErrorType();
   37328             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37329             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37330             :       }
   37331             :     }
   37332             : #endif
   37333             :   }
   37334          22 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37335          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; } }
   37336             :   return resultobj;
   37337             : fail:
   37338             :   return NULL;
   37339             : }
   37340             : 
   37341             : 
   37342          11 : SWIGINTERN PyObject *_wrap_Attribute_WriteInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37343          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37344          11 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37345          11 :   long long arg2 ;
   37346          11 :   void *argp1 = 0 ;
   37347          11 :   int res1 = 0 ;
   37348          11 :   long long val2 ;
   37349          11 :   int ecode2 = 0 ;
   37350          11 :   PyObject *swig_obj[2] ;
   37351          11 :   CPLErr result;
   37352             :   
   37353          11 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteInt64", 2, 2, swig_obj)) SWIG_fail;
   37354          11 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37355          11 :   if (!SWIG_IsOK(res1)) {
   37356           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteInt64" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37357             :   }
   37358          11 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37359          11 :   ecode2 = SWIG_AsVal_long_SS_long(swig_obj[1], &val2);
   37360          11 :   if (!SWIG_IsOK(ecode2)) {
   37361           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Attribute_WriteInt64" "', argument " "2"" of type '" "long long""'");
   37362             :   } 
   37363          11 :   arg2 = static_cast< long long >(val2);
   37364          11 :   {
   37365          11 :     const int bLocalUseExceptions = GetUseExceptions();
   37366          11 :     if ( bLocalUseExceptions ) {
   37367           0 :       pushErrorHandler();
   37368             :     }
   37369          11 :     {
   37370          11 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37371          11 :       result = (CPLErr)GDALAttributeHS_WriteInt64(arg1,arg2);
   37372          11 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37373             :     }
   37374          11 :     if ( bLocalUseExceptions ) {
   37375           0 :       popErrorHandler();
   37376             :     }
   37377             : #ifndef SED_HACKS
   37378             :     if ( bLocalUseExceptions ) {
   37379             :       CPLErr eclass = CPLGetLastErrorType();
   37380             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37381             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37382             :       }
   37383             :     }
   37384             : #endif
   37385             :   }
   37386          11 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37387          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; } }
   37388             :   return resultobj;
   37389             : fail:
   37390             :   return NULL;
   37391             : }
   37392             : 
   37393             : 
   37394          11 : SWIGINTERN PyObject *_wrap_Attribute_WriteDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37395          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37396          11 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37397          11 :   double arg2 ;
   37398          11 :   void *argp1 = 0 ;
   37399          11 :   int res1 = 0 ;
   37400          11 :   double val2 ;
   37401          11 :   int ecode2 = 0 ;
   37402          11 :   PyObject *swig_obj[2] ;
   37403          11 :   CPLErr result;
   37404             :   
   37405          11 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteDouble", 2, 2, swig_obj)) SWIG_fail;
   37406          11 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37407          11 :   if (!SWIG_IsOK(res1)) {
   37408           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteDouble" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37409             :   }
   37410          11 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37411          11 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   37412          11 :   if (!SWIG_IsOK(ecode2)) {
   37413           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Attribute_WriteDouble" "', argument " "2"" of type '" "double""'");
   37414             :   } 
   37415          11 :   arg2 = static_cast< double >(val2);
   37416          11 :   {
   37417          11 :     const int bLocalUseExceptions = GetUseExceptions();
   37418          11 :     if ( bLocalUseExceptions ) {
   37419           1 :       pushErrorHandler();
   37420             :     }
   37421          11 :     {
   37422          11 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37423          11 :       result = (CPLErr)GDALAttributeHS_WriteDouble(arg1,arg2);
   37424          11 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37425             :     }
   37426          11 :     if ( bLocalUseExceptions ) {
   37427           1 :       popErrorHandler();
   37428             :     }
   37429             : #ifndef SED_HACKS
   37430             :     if ( bLocalUseExceptions ) {
   37431             :       CPLErr eclass = CPLGetLastErrorType();
   37432             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37433             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37434             :       }
   37435             :     }
   37436             : #endif
   37437             :   }
   37438          11 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37439          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; } }
   37440             :   return resultobj;
   37441             : fail:
   37442             :   return NULL;
   37443             : }
   37444             : 
   37445             : 
   37446          11 : SWIGINTERN PyObject *_wrap_Attribute_WriteIntArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37447          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37448          11 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37449          11 :   int arg2 ;
   37450          11 :   int *arg3 = (int *) 0 ;
   37451          11 :   void *argp1 = 0 ;
   37452          11 :   int res1 = 0 ;
   37453          11 :   PyObject *swig_obj[2] ;
   37454          11 :   CPLErr result;
   37455             :   
   37456          11 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteIntArray", 2, 2, swig_obj)) SWIG_fail;
   37457          11 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37458          11 :   if (!SWIG_IsOK(res1)) {
   37459           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteIntArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37460             :   }
   37461          11 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37462          11 :   {
   37463             :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   37464          11 :     arg3 = CreateCIntListFromSequence(swig_obj[1], &arg2);
   37465          11 :     if( arg2 < 0 ) {
   37466           0 :       SWIG_fail;
   37467             :     }
   37468             :   }
   37469          11 :   {
   37470          11 :     const int bLocalUseExceptions = GetUseExceptions();
   37471          11 :     if ( bLocalUseExceptions ) {
   37472           3 :       pushErrorHandler();
   37473             :     }
   37474          11 :     {
   37475          11 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37476          11 :       result = (CPLErr)GDALAttributeHS_WriteIntArray(arg1,arg2,arg3);
   37477          11 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37478             :     }
   37479          11 :     if ( bLocalUseExceptions ) {
   37480           3 :       popErrorHandler();
   37481             :     }
   37482             : #ifndef SED_HACKS
   37483             :     if ( bLocalUseExceptions ) {
   37484             :       CPLErr eclass = CPLGetLastErrorType();
   37485             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37486             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37487             :       }
   37488             :     }
   37489             : #endif
   37490             :   }
   37491          11 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37492          11 :   {
   37493             :     /* %typemap(freearg) (int nList, int* pList) */
   37494          11 :     free(arg3);
   37495             :   }
   37496          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; } }
   37497             :   return resultobj;
   37498           0 : fail:
   37499           0 :   {
   37500             :     /* %typemap(freearg) (int nList, int* pList) */
   37501           0 :     free(arg3);
   37502             :   }
   37503           0 :   return NULL;
   37504             : }
   37505             : 
   37506             : 
   37507          10 : SWIGINTERN PyObject *_wrap_Attribute_WriteInt64Array(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37508          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37509          10 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37510          10 :   int arg2 ;
   37511          10 :   long long *arg3 = (long long *) 0 ;
   37512          10 :   void *argp1 = 0 ;
   37513          10 :   int res1 = 0 ;
   37514          10 :   PyObject *swig_obj[2] ;
   37515          10 :   CPLErr result;
   37516             :   
   37517          10 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteInt64Array", 2, 2, swig_obj)) SWIG_fail;
   37518          10 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37519          10 :   if (!SWIG_IsOK(res1)) {
   37520           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteInt64Array" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37521             :   }
   37522          10 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37523          10 :   {
   37524             :     /* %typemap(in,numinputs=1) (int nList, long long* pList)*/
   37525          10 :     arg3 = CreateCInt64ListFromSequence(swig_obj[1], &arg2);
   37526          10 :     if( arg2 < 0 ) {
   37527           0 :       SWIG_fail;
   37528             :     }
   37529             :   }
   37530          10 :   {
   37531          10 :     const int bLocalUseExceptions = GetUseExceptions();
   37532          10 :     if ( bLocalUseExceptions ) {
   37533           0 :       pushErrorHandler();
   37534             :     }
   37535          10 :     {
   37536          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37537          10 :       result = (CPLErr)GDALAttributeHS_WriteInt64Array(arg1,arg2,arg3);
   37538          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37539             :     }
   37540          10 :     if ( bLocalUseExceptions ) {
   37541           0 :       popErrorHandler();
   37542             :     }
   37543             : #ifndef SED_HACKS
   37544             :     if ( bLocalUseExceptions ) {
   37545             :       CPLErr eclass = CPLGetLastErrorType();
   37546             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37547             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37548             :       }
   37549             :     }
   37550             : #endif
   37551             :   }
   37552          10 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37553          10 :   {
   37554             :     /* %typemap(freearg) (int nList, long long* pList) */
   37555          10 :     free(arg3);
   37556             :   }
   37557          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; } }
   37558             :   return resultobj;
   37559           0 : fail:
   37560           0 :   {
   37561             :     /* %typemap(freearg) (int nList, long long* pList) */
   37562           0 :     free(arg3);
   37563             :   }
   37564           0 :   return NULL;
   37565             : }
   37566             : 
   37567             : 
   37568           7 : SWIGINTERN PyObject *_wrap_Attribute_WriteDoubleArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37569           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37570           7 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37571           7 :   int arg2 ;
   37572           7 :   double *arg3 = (double *) 0 ;
   37573           7 :   void *argp1 = 0 ;
   37574           7 :   int res1 = 0 ;
   37575           7 :   PyObject *swig_obj[2] ;
   37576           7 :   CPLErr result;
   37577             :   
   37578           7 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_WriteDoubleArray", 2, 2, swig_obj)) SWIG_fail;
   37579           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37580           7 :   if (!SWIG_IsOK(res1)) {
   37581           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_WriteDoubleArray" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37582             :   }
   37583           7 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37584           7 :   {
   37585             :     /* %typemap(in,numinputs=1) (int nList, double* pList)*/
   37586           7 :     arg3 = CreateCDoubleListFromSequence(swig_obj[1], &arg2);
   37587           7 :     if( arg2 < 0 ) {
   37588           0 :       SWIG_fail;
   37589             :     }
   37590             :   }
   37591           7 :   {
   37592           7 :     const int bLocalUseExceptions = GetUseExceptions();
   37593           7 :     if ( bLocalUseExceptions ) {
   37594           0 :       pushErrorHandler();
   37595             :     }
   37596           7 :     {
   37597           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37598           7 :       result = (CPLErr)GDALAttributeHS_WriteDoubleArray(arg1,arg2,arg3);
   37599           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37600             :     }
   37601           7 :     if ( bLocalUseExceptions ) {
   37602           0 :       popErrorHandler();
   37603             :     }
   37604             : #ifndef SED_HACKS
   37605             :     if ( bLocalUseExceptions ) {
   37606             :       CPLErr eclass = CPLGetLastErrorType();
   37607             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37608             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37609             :       }
   37610             :     }
   37611             : #endif
   37612             :   }
   37613           7 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37614           7 :   {
   37615             :     /* %typemap(freearg) (int nList, double* pList) */
   37616           7 :     free(arg3);
   37617             :   }
   37618           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; } }
   37619             :   return resultobj;
   37620           0 : fail:
   37621           0 :   {
   37622             :     /* %typemap(freearg) (int nList, double* pList) */
   37623           0 :     free(arg3);
   37624             :   }
   37625           0 :   return NULL;
   37626             : }
   37627             : 
   37628             : 
   37629          27 : SWIGINTERN PyObject *_wrap_Attribute_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37630          27 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37631          27 :   GDALAttributeHS *arg1 = (GDALAttributeHS *) 0 ;
   37632          27 :   char *arg2 = (char *) 0 ;
   37633          27 :   void *argp1 = 0 ;
   37634          27 :   int res1 = 0 ;
   37635          27 :   int res2 ;
   37636          27 :   char *buf2 = 0 ;
   37637          27 :   int alloc2 = 0 ;
   37638          27 :   PyObject *swig_obj[2] ;
   37639          27 :   CPLErr result;
   37640             :   
   37641          27 :   if (!SWIG_Python_UnpackTuple(args, "Attribute_Rename", 2, 2, swig_obj)) SWIG_fail;
   37642          27 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAttributeHS, 0 |  0 );
   37643          27 :   if (!SWIG_IsOK(res1)) {
   37644           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Attribute_Rename" "', argument " "1"" of type '" "GDALAttributeHS *""'"); 
   37645             :   }
   37646          27 :   arg1 = reinterpret_cast< GDALAttributeHS * >(argp1);
   37647          27 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   37648          27 :   if (!SWIG_IsOK(res2)) {
   37649           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Attribute_Rename" "', argument " "2"" of type '" "char const *""'");
   37650             :   }
   37651          27 :   arg2 = reinterpret_cast< char * >(buf2);
   37652          27 :   {
   37653          27 :     const int bLocalUseExceptions = GetUseExceptions();
   37654          27 :     if ( bLocalUseExceptions ) {
   37655          27 :       pushErrorHandler();
   37656             :     }
   37657          27 :     {
   37658          27 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37659          27 :       result = (CPLErr)GDALAttributeHS_Rename(arg1,(char const *)arg2);
   37660          27 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37661             :     }
   37662          27 :     if ( bLocalUseExceptions ) {
   37663          27 :       popErrorHandler();
   37664             :     }
   37665             : #ifndef SED_HACKS
   37666             :     if ( bLocalUseExceptions ) {
   37667             :       CPLErr eclass = CPLGetLastErrorType();
   37668             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37669             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37670             :       }
   37671             :     }
   37672             : #endif
   37673             :   }
   37674          27 :   resultobj = SWIG_From_int(static_cast< int >(result));
   37675          27 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   37676          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; } }
   37677             :   return resultobj;
   37678           0 : fail:
   37679           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   37680             :   return NULL;
   37681             : }
   37682             : 
   37683             : 
   37684         277 : SWIGINTERN PyObject *Attribute_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37685         277 :   PyObject *obj;
   37686         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   37687         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALAttributeHS, SWIG_NewClientData(obj));
   37688         277 :   return SWIG_Py_Void();
   37689             : }
   37690             : 
   37691        4912 : SWIGINTERN PyObject *_wrap_delete_Dimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37692        4912 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37693        4912 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   37694        4912 :   void *argp1 = 0 ;
   37695        4912 :   int res1 = 0 ;
   37696        4912 :   PyObject *swig_obj[1] ;
   37697             :   
   37698        4912 :   if (!args) SWIG_fail;
   37699        4912 :   swig_obj[0] = args;
   37700        4912 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, SWIG_POINTER_DISOWN |  0 );
   37701        4912 :   if (!SWIG_IsOK(res1)) {
   37702           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Dimension" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   37703             :   }
   37704        4912 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   37705        4912 :   {
   37706        4912 :     const int bLocalUseExceptions = GetUseExceptions();
   37707        4912 :     if ( bLocalUseExceptions ) {
   37708         725 :       pushErrorHandler();
   37709             :     }
   37710        4912 :     {
   37711        4912 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37712        4912 :       delete_GDALDimensionHS(arg1);
   37713        4912 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37714             :     }
   37715        4912 :     if ( bLocalUseExceptions ) {
   37716         725 :       popErrorHandler();
   37717             :     }
   37718             : #ifndef SED_HACKS
   37719             :     if ( bLocalUseExceptions ) {
   37720             :       CPLErr eclass = CPLGetLastErrorType();
   37721             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37722             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37723             :       }
   37724             :     }
   37725             : #endif
   37726             :   }
   37727        4912 :   resultobj = SWIG_Py_Void();
   37728        4912 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   37729             :   return resultobj;
   37730             : fail:
   37731             :   return NULL;
   37732             : }
   37733             : 
   37734             : 
   37735         274 : SWIGINTERN PyObject *_wrap_Dimension_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37736         274 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37737         274 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   37738         274 :   void *argp1 = 0 ;
   37739         274 :   int res1 = 0 ;
   37740         274 :   PyObject *swig_obj[1] ;
   37741         274 :   char *result = 0 ;
   37742             :   
   37743         274 :   if (!args) SWIG_fail;
   37744         274 :   swig_obj[0] = args;
   37745         274 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   37746         274 :   if (!SWIG_IsOK(res1)) {
   37747           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetName" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   37748             :   }
   37749         274 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   37750         274 :   {
   37751         274 :     const int bLocalUseExceptions = GetUseExceptions();
   37752         274 :     if ( bLocalUseExceptions ) {
   37753         132 :       pushErrorHandler();
   37754             :     }
   37755         274 :     {
   37756         274 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37757         274 :       result = (char *)GDALDimensionHS_GetName(arg1);
   37758         274 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37759             :     }
   37760         274 :     if ( bLocalUseExceptions ) {
   37761         132 :       popErrorHandler();
   37762             :     }
   37763             : #ifndef SED_HACKS
   37764             :     if ( bLocalUseExceptions ) {
   37765             :       CPLErr eclass = CPLGetLastErrorType();
   37766             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37767             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37768             :       }
   37769             :     }
   37770             : #endif
   37771             :   }
   37772         274 :   resultobj = SWIG_FromCharPtr((const char *)result);
   37773         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; } }
   37774             :   return resultobj;
   37775             : fail:
   37776             :   return NULL;
   37777             : }
   37778             : 
   37779             : 
   37780          80 : SWIGINTERN PyObject *_wrap_Dimension_GetFullName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37781          80 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37782          80 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   37783          80 :   void *argp1 = 0 ;
   37784          80 :   int res1 = 0 ;
   37785          80 :   PyObject *swig_obj[1] ;
   37786          80 :   char *result = 0 ;
   37787             :   
   37788          80 :   if (!args) SWIG_fail;
   37789          80 :   swig_obj[0] = args;
   37790          80 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   37791          80 :   if (!SWIG_IsOK(res1)) {
   37792           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetFullName" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   37793             :   }
   37794          80 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   37795          80 :   {
   37796          80 :     const int bLocalUseExceptions = GetUseExceptions();
   37797          80 :     if ( bLocalUseExceptions ) {
   37798          49 :       pushErrorHandler();
   37799             :     }
   37800          80 :     {
   37801          80 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37802          80 :       result = (char *)GDALDimensionHS_GetFullName(arg1);
   37803          80 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37804             :     }
   37805          80 :     if ( bLocalUseExceptions ) {
   37806          49 :       popErrorHandler();
   37807             :     }
   37808             : #ifndef SED_HACKS
   37809             :     if ( bLocalUseExceptions ) {
   37810             :       CPLErr eclass = CPLGetLastErrorType();
   37811             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37812             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37813             :       }
   37814             :     }
   37815             : #endif
   37816             :   }
   37817          80 :   resultobj = SWIG_FromCharPtr((const char *)result);
   37818          80 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   37819             :   return resultobj;
   37820             : fail:
   37821             :   return NULL;
   37822             : }
   37823             : 
   37824             : 
   37825          52 : SWIGINTERN PyObject *_wrap_Dimension_GetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37826          52 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37827          52 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   37828          52 :   void *argp1 = 0 ;
   37829          52 :   int res1 = 0 ;
   37830          52 :   PyObject *swig_obj[1] ;
   37831          52 :   char *result = 0 ;
   37832             :   
   37833          52 :   if (!args) SWIG_fail;
   37834          52 :   swig_obj[0] = args;
   37835          52 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   37836          52 :   if (!SWIG_IsOK(res1)) {
   37837           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetType" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   37838             :   }
   37839          52 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   37840          52 :   {
   37841          52 :     const int bLocalUseExceptions = GetUseExceptions();
   37842          52 :     if ( bLocalUseExceptions ) {
   37843           6 :       pushErrorHandler();
   37844             :     }
   37845          52 :     {
   37846          52 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37847          52 :       result = (char *)GDALDimensionHS_GetType(arg1);
   37848          52 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37849             :     }
   37850          52 :     if ( bLocalUseExceptions ) {
   37851           6 :       popErrorHandler();
   37852             :     }
   37853             : #ifndef SED_HACKS
   37854             :     if ( bLocalUseExceptions ) {
   37855             :       CPLErr eclass = CPLGetLastErrorType();
   37856             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37857             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37858             :       }
   37859             :     }
   37860             : #endif
   37861             :   }
   37862          52 :   resultobj = SWIG_FromCharPtr((const char *)result);
   37863          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; } }
   37864             :   return resultobj;
   37865             : fail:
   37866             :   return NULL;
   37867             : }
   37868             : 
   37869             : 
   37870          22 : SWIGINTERN PyObject *_wrap_Dimension_GetDirection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37871          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37872          22 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   37873          22 :   void *argp1 = 0 ;
   37874          22 :   int res1 = 0 ;
   37875          22 :   PyObject *swig_obj[1] ;
   37876          22 :   char *result = 0 ;
   37877             :   
   37878          22 :   if (!args) SWIG_fail;
   37879          22 :   swig_obj[0] = args;
   37880          22 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   37881          22 :   if (!SWIG_IsOK(res1)) {
   37882           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetDirection" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   37883             :   }
   37884          22 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   37885          22 :   {
   37886          22 :     const int bLocalUseExceptions = GetUseExceptions();
   37887          22 :     if ( bLocalUseExceptions ) {
   37888           2 :       pushErrorHandler();
   37889             :     }
   37890          22 :     {
   37891          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37892          22 :       result = (char *)GDALDimensionHS_GetDirection(arg1);
   37893          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37894             :     }
   37895          22 :     if ( bLocalUseExceptions ) {
   37896           2 :       popErrorHandler();
   37897             :     }
   37898             : #ifndef SED_HACKS
   37899             :     if ( bLocalUseExceptions ) {
   37900             :       CPLErr eclass = CPLGetLastErrorType();
   37901             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37902             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37903             :       }
   37904             :     }
   37905             : #endif
   37906             :   }
   37907          22 :   resultobj = SWIG_FromCharPtr((const char *)result);
   37908          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; } }
   37909             :   return resultobj;
   37910             : fail:
   37911             :   return NULL;
   37912             : }
   37913             : 
   37914             : 
   37915        3675 : SWIGINTERN PyObject *_wrap_Dimension_GetSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37916        3675 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37917        3675 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   37918        3675 :   void *argp1 = 0 ;
   37919        3675 :   int res1 = 0 ;
   37920        3675 :   PyObject *swig_obj[1] ;
   37921        3675 :   GUIntBig result;
   37922             :   
   37923        3675 :   if (!args) SWIG_fail;
   37924        3675 :   swig_obj[0] = args;
   37925        3675 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   37926        3675 :   if (!SWIG_IsOK(res1)) {
   37927           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetSize" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   37928             :   }
   37929        3675 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   37930        3675 :   {
   37931        3675 :     const int bLocalUseExceptions = GetUseExceptions();
   37932        3675 :     if ( bLocalUseExceptions ) {
   37933         484 :       pushErrorHandler();
   37934             :     }
   37935        3675 :     {
   37936        3675 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37937        3675 :       result = GDALDimensionHS_GetSize(arg1);
   37938        3675 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37939             :     }
   37940        3675 :     if ( bLocalUseExceptions ) {
   37941         484 :       popErrorHandler();
   37942             :     }
   37943             : #ifndef SED_HACKS
   37944             :     if ( bLocalUseExceptions ) {
   37945             :       CPLErr eclass = CPLGetLastErrorType();
   37946             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37947             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37948             :       }
   37949             :     }
   37950             : #endif
   37951             :   }
   37952        3675 :   {
   37953        3675 :     resultobj = PyLong_FromUnsignedLongLong(result);
   37954             :   }
   37955        3675 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   37956             :   return resultobj;
   37957             : fail:
   37958             :   return NULL;
   37959             : }
   37960             : 
   37961             : 
   37962         118 : SWIGINTERN PyObject *_wrap_Dimension_GetIndexingVariable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   37963         118 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   37964         118 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   37965         118 :   void *argp1 = 0 ;
   37966         118 :   int res1 = 0 ;
   37967         118 :   PyObject *swig_obj[1] ;
   37968         118 :   GDALMDArrayHS *result = 0 ;
   37969             :   
   37970         118 :   if (!args) SWIG_fail;
   37971         118 :   swig_obj[0] = args;
   37972         118 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   37973         118 :   if (!SWIG_IsOK(res1)) {
   37974           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_GetIndexingVariable" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   37975             :   }
   37976         118 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   37977         118 :   {
   37978         118 :     const int bLocalUseExceptions = GetUseExceptions();
   37979         118 :     if ( bLocalUseExceptions ) {
   37980          44 :       pushErrorHandler();
   37981             :     }
   37982         118 :     {
   37983         118 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   37984         118 :       result = (GDALMDArrayHS *)GDALDimensionHS_GetIndexingVariable(arg1);
   37985         118 :       SWIG_PYTHON_THREAD_END_ALLOW;
   37986             :     }
   37987         118 :     if ( bLocalUseExceptions ) {
   37988          44 :       popErrorHandler();
   37989             :     }
   37990             : #ifndef SED_HACKS
   37991             :     if ( bLocalUseExceptions ) {
   37992             :       CPLErr eclass = CPLGetLastErrorType();
   37993             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   37994             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   37995             :       }
   37996             :     }
   37997             : #endif
   37998             :   }
   37999         118 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   38000         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; } }
   38001             :   return resultobj;
   38002             : fail:
   38003             :   return NULL;
   38004             : }
   38005             : 
   38006             : 
   38007          23 : SWIGINTERN PyObject *_wrap_Dimension_SetIndexingVariable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38008          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38009          23 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   38010          23 :   GDALMDArrayHS *arg2 = (GDALMDArrayHS *) 0 ;
   38011          23 :   void *argp1 = 0 ;
   38012          23 :   int res1 = 0 ;
   38013          23 :   void *argp2 = 0 ;
   38014          23 :   int res2 = 0 ;
   38015          23 :   PyObject *swig_obj[2] ;
   38016          23 :   bool result;
   38017             :   
   38018          23 :   if (!SWIG_Python_UnpackTuple(args, "Dimension_SetIndexingVariable", 2, 2, swig_obj)) SWIG_fail;
   38019          23 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   38020          23 :   if (!SWIG_IsOK(res1)) {
   38021           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_SetIndexingVariable" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   38022             :   }
   38023          23 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   38024          23 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALMDArrayHS, 0 |  0 );
   38025          23 :   if (!SWIG_IsOK(res2)) {
   38026           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dimension_SetIndexingVariable" "', argument " "2"" of type '" "GDALMDArrayHS *""'"); 
   38027             :   }
   38028          23 :   arg2 = reinterpret_cast< GDALMDArrayHS * >(argp2);
   38029          23 :   {
   38030          23 :     const int bLocalUseExceptions = GetUseExceptions();
   38031          23 :     if ( bLocalUseExceptions ) {
   38032           9 :       pushErrorHandler();
   38033             :     }
   38034          23 :     {
   38035          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38036          23 :       result = (bool)GDALDimensionHS_SetIndexingVariable(arg1,arg2);
   38037          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38038             :     }
   38039          23 :     if ( bLocalUseExceptions ) {
   38040           9 :       popErrorHandler();
   38041             :     }
   38042             : #ifndef SED_HACKS
   38043             :     if ( bLocalUseExceptions ) {
   38044             :       CPLErr eclass = CPLGetLastErrorType();
   38045             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38046             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38047             :       }
   38048             :     }
   38049             : #endif
   38050             :   }
   38051          23 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   38052          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; } }
   38053             :   return resultobj;
   38054             : fail:
   38055             :   return NULL;
   38056             : }
   38057             : 
   38058             : 
   38059          31 : SWIGINTERN PyObject *_wrap_Dimension_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38060          31 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38061          31 :   GDALDimensionHS *arg1 = (GDALDimensionHS *) 0 ;
   38062          31 :   char *arg2 = (char *) 0 ;
   38063          31 :   void *argp1 = 0 ;
   38064          31 :   int res1 = 0 ;
   38065          31 :   int res2 ;
   38066          31 :   char *buf2 = 0 ;
   38067          31 :   int alloc2 = 0 ;
   38068          31 :   PyObject *swig_obj[2] ;
   38069          31 :   CPLErr result;
   38070             :   
   38071          31 :   if (!SWIG_Python_UnpackTuple(args, "Dimension_Rename", 2, 2, swig_obj)) SWIG_fail;
   38072          31 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDimensionHS, 0 |  0 );
   38073          31 :   if (!SWIG_IsOK(res1)) {
   38074           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dimension_Rename" "', argument " "1"" of type '" "GDALDimensionHS *""'"); 
   38075             :   }
   38076          31 :   arg1 = reinterpret_cast< GDALDimensionHS * >(argp1);
   38077          31 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   38078          31 :   if (!SWIG_IsOK(res2)) {
   38079           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dimension_Rename" "', argument " "2"" of type '" "char const *""'");
   38080             :   }
   38081          31 :   arg2 = reinterpret_cast< char * >(buf2);
   38082          31 :   {
   38083          31 :     const int bLocalUseExceptions = GetUseExceptions();
   38084          31 :     if ( bLocalUseExceptions ) {
   38085          31 :       pushErrorHandler();
   38086             :     }
   38087          31 :     {
   38088          31 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38089          31 :       result = (CPLErr)GDALDimensionHS_Rename(arg1,(char const *)arg2);
   38090          31 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38091             :     }
   38092          31 :     if ( bLocalUseExceptions ) {
   38093          31 :       popErrorHandler();
   38094             :     }
   38095             : #ifndef SED_HACKS
   38096             :     if ( bLocalUseExceptions ) {
   38097             :       CPLErr eclass = CPLGetLastErrorType();
   38098             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38099             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38100             :       }
   38101             :     }
   38102             : #endif
   38103             :   }
   38104          31 :   resultobj = SWIG_From_int(static_cast< int >(result));
   38105          31 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   38106          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; } }
   38107             :   return resultobj;
   38108           0 : fail:
   38109           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   38110             :   return NULL;
   38111             : }
   38112             : 
   38113             : 
   38114         277 : SWIGINTERN PyObject *Dimension_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38115         277 :   PyObject *obj;
   38116         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   38117         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALDimensionHS, SWIG_NewClientData(obj));
   38118         277 :   return SWIG_Py_Void();
   38119             : }
   38120             : 
   38121        4600 : SWIGINTERN PyObject *_wrap_delete_ExtendedDataType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38122        4600 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38123        4600 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38124        4600 :   void *argp1 = 0 ;
   38125        4600 :   int res1 = 0 ;
   38126        4600 :   PyObject *swig_obj[1] ;
   38127             :   
   38128        4600 :   if (!args) SWIG_fail;
   38129        4600 :   swig_obj[0] = args;
   38130        4600 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_DISOWN |  0 );
   38131        4600 :   if (!SWIG_IsOK(res1)) {
   38132           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ExtendedDataType" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38133             :   }
   38134        4600 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38135        4600 :   {
   38136        4600 :     const int bLocalUseExceptions = GetUseExceptions();
   38137        4600 :     if ( bLocalUseExceptions ) {
   38138        1123 :       pushErrorHandler();
   38139             :     }
   38140        4600 :     {
   38141        4600 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38142        4600 :       delete_GDALExtendedDataTypeHS(arg1);
   38143        4600 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38144             :     }
   38145        4600 :     if ( bLocalUseExceptions ) {
   38146        1123 :       popErrorHandler();
   38147             :     }
   38148             : #ifndef SED_HACKS
   38149             :     if ( bLocalUseExceptions ) {
   38150             :       CPLErr eclass = CPLGetLastErrorType();
   38151             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38152             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38153             :       }
   38154             :     }
   38155             : #endif
   38156             :   }
   38157        4600 :   resultobj = SWIG_Py_Void();
   38158        4600 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   38159             :   return resultobj;
   38160             : fail:
   38161             :   return NULL;
   38162             : }
   38163             : 
   38164             : 
   38165        1970 : SWIGINTERN PyObject *_wrap_ExtendedDataType_Create(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38166        1970 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38167        1970 :   GDALDataType arg1 ;
   38168        1970 :   PyObject *swig_obj[1] ;
   38169        1970 :   GDALExtendedDataTypeHS *result = 0 ;
   38170             :   
   38171        1970 :   if (!args) SWIG_fail;
   38172        1970 :   swig_obj[0] = args;
   38173        1970 :   {
   38174             :     // %typemap(in) GDALDataType
   38175        1970 :     int val = 0;
   38176        1970 :     int ecode = SWIG_AsVal_int(swig_obj[0], &val);
   38177        1970 :     if (!SWIG_IsOK(ecode)) {
   38178           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   38179             :     }
   38180        1970 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   38181             :     {
   38182           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   38183             :     }
   38184        1970 :     arg1 = static_cast<GDALDataType>(val);
   38185             :   }
   38186        1970 :   {
   38187        1970 :     const int bLocalUseExceptions = GetUseExceptions();
   38188        1970 :     if ( bLocalUseExceptions ) {
   38189         391 :       pushErrorHandler();
   38190             :     }
   38191        1970 :     {
   38192        1970 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38193        1970 :       result = (GDALExtendedDataTypeHS *)GDALExtendedDataTypeHS_Create(arg1);
   38194        1970 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38195             :     }
   38196        1970 :     if ( bLocalUseExceptions ) {
   38197         391 :       popErrorHandler();
   38198             :     }
   38199             : #ifndef SED_HACKS
   38200             :     if ( bLocalUseExceptions ) {
   38201             :       CPLErr eclass = CPLGetLastErrorType();
   38202             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38203             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38204             :       }
   38205             :     }
   38206             : #endif
   38207             :   }
   38208        1970 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
   38209        1970 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   38210             :   return resultobj;
   38211             : fail:
   38212             :   return NULL;
   38213             : }
   38214             : 
   38215             : 
   38216         195 : SWIGINTERN PyObject *_wrap_ExtendedDataType_CreateString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38217         195 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38218         195 :   size_t arg1 = (size_t) 0 ;
   38219         195 :   GDALExtendedDataTypeSubType arg2 = (GDALExtendedDataTypeSubType) GEDTST_NONE ;
   38220         195 :   size_t val1 ;
   38221         195 :   int ecode1 = 0 ;
   38222         195 :   int val2 ;
   38223         195 :   int ecode2 = 0 ;
   38224         195 :   PyObject *swig_obj[2] ;
   38225         195 :   GDALExtendedDataTypeHS *result = 0 ;
   38226             :   
   38227         195 :   if (!SWIG_Python_UnpackTuple(args, "ExtendedDataType_CreateString", 0, 2, swig_obj)) SWIG_fail;
   38228         195 :   if (swig_obj[0]) {
   38229          11 :     ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1);
   38230          11 :     if (!SWIG_IsOK(ecode1)) {
   38231           0 :       SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ExtendedDataType_CreateString" "', argument " "1"" of type '" "size_t""'");
   38232             :     } 
   38233             :     arg1 = static_cast< size_t >(val1);
   38234             :   }
   38235         195 :   if (swig_obj[1]) {
   38236           4 :     ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   38237           4 :     if (!SWIG_IsOK(ecode2)) {
   38238           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ExtendedDataType_CreateString" "', argument " "2"" of type '" "GDALExtendedDataTypeSubType""'");
   38239             :     } 
   38240           4 :     arg2 = static_cast< GDALExtendedDataTypeSubType >(val2);
   38241             :   }
   38242         195 :   {
   38243         195 :     const int bLocalUseExceptions = GetUseExceptions();
   38244         195 :     if ( bLocalUseExceptions ) {
   38245         120 :       pushErrorHandler();
   38246             :     }
   38247         195 :     {
   38248         195 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38249         195 :       result = (GDALExtendedDataTypeHS *)GDALExtendedDataTypeHS_CreateString(arg1,arg2);
   38250         195 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38251             :     }
   38252         195 :     if ( bLocalUseExceptions ) {
   38253         120 :       popErrorHandler();
   38254             :     }
   38255             : #ifndef SED_HACKS
   38256             :     if ( bLocalUseExceptions ) {
   38257             :       CPLErr eclass = CPLGetLastErrorType();
   38258             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38259             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38260             :       }
   38261             :     }
   38262             : #endif
   38263             :   }
   38264         195 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
   38265         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; } }
   38266             :   return resultobj;
   38267             : fail:
   38268             :   return NULL;
   38269             : }
   38270             : 
   38271             : 
   38272          22 : SWIGINTERN PyObject *_wrap_ExtendedDataType_CreateCompound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38273          22 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38274          22 :   char *arg1 = (char *) 0 ;
   38275          22 :   size_t arg2 ;
   38276          22 :   int arg3 ;
   38277          22 :   GDALEDTComponentHS **arg4 = (GDALEDTComponentHS **) 0 ;
   38278          22 :   int res1 ;
   38279          22 :   char *buf1 = 0 ;
   38280          22 :   int alloc1 = 0 ;
   38281          22 :   size_t val2 ;
   38282          22 :   int ecode2 = 0 ;
   38283          22 :   PyObject *swig_obj[3] ;
   38284          22 :   GDALExtendedDataTypeHS *result = 0 ;
   38285             :   
   38286          22 :   if (!SWIG_Python_UnpackTuple(args, "ExtendedDataType_CreateCompound", 3, 3, swig_obj)) SWIG_fail;
   38287          22 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   38288          22 :   if (!SWIG_IsOK(res1)) {
   38289           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_CreateCompound" "', argument " "1"" of type '" "char const *""'");
   38290             :   }
   38291          22 :   arg1 = reinterpret_cast< char * >(buf1);
   38292          22 :   ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
   38293          22 :   if (!SWIG_IsOK(ecode2)) {
   38294           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ExtendedDataType_CreateCompound" "', argument " "2"" of type '" "size_t""'");
   38295             :   } 
   38296          22 :   arg2 = static_cast< size_t >(val2);
   38297          22 :   {
   38298             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALEDTComponentHS *optional_##GDALEDTComponentHS)*/
   38299          22 :     if ( !PySequence_Check(swig_obj[2]) ) {
   38300           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   38301           0 :       SWIG_fail;
   38302             :     }
   38303          22 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   38304          22 :     if( size > (Py_ssize_t)INT_MAX ) {
   38305           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   38306           0 :       SWIG_fail;
   38307             :     }
   38308          22 :     if( (size_t)size > SIZE_MAX / sizeof(GDALEDTComponentHS*) ) {
   38309           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   38310           0 :       SWIG_fail;
   38311             :     }
   38312          22 :     arg3 = (int)size;
   38313          22 :     arg4 = (GDALEDTComponentHS**) VSIMalloc(arg3*sizeof(GDALEDTComponentHS*));
   38314          22 :     if( !arg4) {
   38315           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   38316           0 :       SWIG_fail;
   38317             :     }
   38318             :     
   38319          54 :     for( int i = 0; i<arg3; i++ ) {
   38320          32 :       PyObject *o = PySequence_GetItem(swig_obj[2],i);
   38321          32 :       GDALEDTComponentHS* rawobjectpointer = NULL;
   38322          32 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALEDTComponentHS, SWIG_POINTER_EXCEPTION | 0 ));
   38323          32 :       if (!rawobjectpointer) {
   38324           0 :         Py_DECREF(o);
   38325           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALEDTComponentHS");
   38326           0 :         SWIG_fail;
   38327             :       }
   38328          32 :       arg4[i] = rawobjectpointer;
   38329          32 :       Py_DECREF(o);
   38330             :       
   38331             :     }
   38332             :   }
   38333          22 :   {
   38334          22 :     if (!arg1) {
   38335           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   38336             :     }
   38337             :   }
   38338          22 :   {
   38339          22 :     const int bLocalUseExceptions = GetUseExceptions();
   38340          22 :     if ( bLocalUseExceptions ) {
   38341           6 :       pushErrorHandler();
   38342             :     }
   38343          22 :     {
   38344          22 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38345          22 :       result = (GDALExtendedDataTypeHS *)GDALExtendedDataTypeHS_CreateCompound((char const *)arg1,arg2,arg3,arg4);
   38346          22 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38347             :     }
   38348          22 :     if ( bLocalUseExceptions ) {
   38349           6 :       popErrorHandler();
   38350             :     }
   38351             : #ifndef SED_HACKS
   38352             :     if ( bLocalUseExceptions ) {
   38353             :       CPLErr eclass = CPLGetLastErrorType();
   38354             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38355             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38356             :       }
   38357             :     }
   38358             : #endif
   38359             :   }
   38360          22 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
   38361          22 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   38362          22 :   {
   38363             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALEDTComponentHS **poObjects)*/
   38364          22 :     CPLFree( arg4 );
   38365             :   }
   38366          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; } }
   38367             :   return resultobj;
   38368           0 : fail:
   38369           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   38370           0 :   {
   38371             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALEDTComponentHS **poObjects)*/
   38372           0 :     CPLFree( arg4 );
   38373             :   }
   38374             :   return NULL;
   38375             : }
   38376             : 
   38377             : 
   38378           8 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38379           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38380           8 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38381           8 :   void *argp1 = 0 ;
   38382           8 :   int res1 = 0 ;
   38383           8 :   PyObject *swig_obj[1] ;
   38384           8 :   char *result = 0 ;
   38385             :   
   38386           8 :   if (!args) SWIG_fail;
   38387           8 :   swig_obj[0] = args;
   38388           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38389           8 :   if (!SWIG_IsOK(res1)) {
   38390           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetName" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38391             :   }
   38392           8 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38393           8 :   {
   38394           8 :     const int bLocalUseExceptions = GetUseExceptions();
   38395           8 :     if ( bLocalUseExceptions ) {
   38396           2 :       pushErrorHandler();
   38397             :     }
   38398           8 :     {
   38399           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38400           8 :       result = (char *)GDALExtendedDataTypeHS_GetName(arg1);
   38401           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38402             :     }
   38403           8 :     if ( bLocalUseExceptions ) {
   38404           2 :       popErrorHandler();
   38405             :     }
   38406             : #ifndef SED_HACKS
   38407             :     if ( bLocalUseExceptions ) {
   38408             :       CPLErr eclass = CPLGetLastErrorType();
   38409             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38410             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38411             :       }
   38412             :     }
   38413             : #endif
   38414             :   }
   38415           8 :   resultobj = SWIG_FromCharPtr((const char *)result);
   38416           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; } }
   38417             :   return resultobj;
   38418             : fail:
   38419             :   return NULL;
   38420             : }
   38421             : 
   38422             : 
   38423        2891 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetClass(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38424        2891 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38425        2891 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38426        2891 :   void *argp1 = 0 ;
   38427        2891 :   int res1 = 0 ;
   38428        2891 :   PyObject *swig_obj[1] ;
   38429        2891 :   GDALExtendedDataTypeClass result;
   38430             :   
   38431        2891 :   if (!args) SWIG_fail;
   38432        2891 :   swig_obj[0] = args;
   38433        2891 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38434        2891 :   if (!SWIG_IsOK(res1)) {
   38435           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetClass" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38436             :   }
   38437        2891 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38438        2891 :   {
   38439        2891 :     const int bLocalUseExceptions = GetUseExceptions();
   38440        2891 :     if ( bLocalUseExceptions ) {
   38441         625 :       pushErrorHandler();
   38442             :     }
   38443        2891 :     {
   38444        2891 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38445        2891 :       result = (GDALExtendedDataTypeClass)GDALExtendedDataTypeHS_GetClass(arg1);
   38446        2891 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38447             :     }
   38448        2891 :     if ( bLocalUseExceptions ) {
   38449         625 :       popErrorHandler();
   38450             :     }
   38451             : #ifndef SED_HACKS
   38452             :     if ( bLocalUseExceptions ) {
   38453             :       CPLErr eclass = CPLGetLastErrorType();
   38454             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38455             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38456             :       }
   38457             :     }
   38458             : #endif
   38459             :   }
   38460        2891 :   resultobj = SWIG_From_int(static_cast< int >(result));
   38461        2891 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   38462             :   return resultobj;
   38463             : fail:
   38464             :   return NULL;
   38465             : }
   38466             : 
   38467             : 
   38468        2069 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetNumericDataType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38469        2069 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38470        2069 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38471        2069 :   void *argp1 = 0 ;
   38472        2069 :   int res1 = 0 ;
   38473        2069 :   PyObject *swig_obj[1] ;
   38474        2069 :   GDALDataType result;
   38475             :   
   38476        2069 :   if (!args) SWIG_fail;
   38477        2069 :   swig_obj[0] = args;
   38478        2069 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38479        2069 :   if (!SWIG_IsOK(res1)) {
   38480           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetNumericDataType" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38481             :   }
   38482        2069 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38483        2069 :   {
   38484        2069 :     const int bLocalUseExceptions = GetUseExceptions();
   38485        2069 :     if ( bLocalUseExceptions ) {
   38486         419 :       pushErrorHandler();
   38487             :     }
   38488        2069 :     {
   38489        2069 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38490        2069 :       result = (GDALDataType)GDALExtendedDataTypeHS_GetNumericDataType(arg1);
   38491        2069 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38492             :     }
   38493        2069 :     if ( bLocalUseExceptions ) {
   38494         419 :       popErrorHandler();
   38495             :     }
   38496             : #ifndef SED_HACKS
   38497             :     if ( bLocalUseExceptions ) {
   38498             :       CPLErr eclass = CPLGetLastErrorType();
   38499             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38500             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38501             :       }
   38502             :     }
   38503             : #endif
   38504             :   }
   38505        2069 :   resultobj = SWIG_From_int(static_cast< int >(result));
   38506        2069 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   38507             :   return resultobj;
   38508             : fail:
   38509             :   return NULL;
   38510             : }
   38511             : 
   38512             : 
   38513          51 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38514          51 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38515          51 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38516          51 :   void *argp1 = 0 ;
   38517          51 :   int res1 = 0 ;
   38518          51 :   PyObject *swig_obj[1] ;
   38519          51 :   size_t result;
   38520             :   
   38521          51 :   if (!args) SWIG_fail;
   38522          51 :   swig_obj[0] = args;
   38523          51 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38524          51 :   if (!SWIG_IsOK(res1)) {
   38525           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetSize" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38526             :   }
   38527          51 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38528          51 :   {
   38529          51 :     const int bLocalUseExceptions = GetUseExceptions();
   38530          51 :     if ( bLocalUseExceptions ) {
   38531          34 :       pushErrorHandler();
   38532             :     }
   38533          51 :     {
   38534          51 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38535          51 :       result = GDALExtendedDataTypeHS_GetSize(arg1);
   38536          51 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38537             :     }
   38538          51 :     if ( bLocalUseExceptions ) {
   38539          34 :       popErrorHandler();
   38540             :     }
   38541             : #ifndef SED_HACKS
   38542             :     if ( bLocalUseExceptions ) {
   38543             :       CPLErr eclass = CPLGetLastErrorType();
   38544             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38545             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38546             :       }
   38547             :     }
   38548             : #endif
   38549             :   }
   38550          51 :   resultobj = SWIG_From_size_t(static_cast< size_t >(result));
   38551          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; } }
   38552             :   return resultobj;
   38553             : fail:
   38554             :   return NULL;
   38555             : }
   38556             : 
   38557             : 
   38558           3 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetMaxStringLength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38559           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38560           3 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38561           3 :   void *argp1 = 0 ;
   38562           3 :   int res1 = 0 ;
   38563           3 :   PyObject *swig_obj[1] ;
   38564           3 :   size_t result;
   38565             :   
   38566           3 :   if (!args) SWIG_fail;
   38567           3 :   swig_obj[0] = args;
   38568           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38569           3 :   if (!SWIG_IsOK(res1)) {
   38570           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetMaxStringLength" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38571             :   }
   38572           3 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38573           3 :   {
   38574           3 :     const int bLocalUseExceptions = GetUseExceptions();
   38575           3 :     if ( bLocalUseExceptions ) {
   38576           0 :       pushErrorHandler();
   38577             :     }
   38578           3 :     {
   38579           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38580           3 :       result = GDALExtendedDataTypeHS_GetMaxStringLength(arg1);
   38581           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38582             :     }
   38583           3 :     if ( bLocalUseExceptions ) {
   38584           0 :       popErrorHandler();
   38585             :     }
   38586             : #ifndef SED_HACKS
   38587             :     if ( bLocalUseExceptions ) {
   38588             :       CPLErr eclass = CPLGetLastErrorType();
   38589             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38590             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38591             :       }
   38592             :     }
   38593             : #endif
   38594             :   }
   38595           3 :   resultobj = SWIG_From_size_t(static_cast< size_t >(result));
   38596           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; } }
   38597             :   return resultobj;
   38598             : fail:
   38599             :   return NULL;
   38600             : }
   38601             : 
   38602             : 
   38603         104 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetSubType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38604         104 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38605         104 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38606         104 :   void *argp1 = 0 ;
   38607         104 :   int res1 = 0 ;
   38608         104 :   PyObject *swig_obj[1] ;
   38609         104 :   GDALExtendedDataTypeSubType result;
   38610             :   
   38611         104 :   if (!args) SWIG_fail;
   38612         104 :   swig_obj[0] = args;
   38613         104 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38614         104 :   if (!SWIG_IsOK(res1)) {
   38615           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetSubType" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38616             :   }
   38617         104 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38618         104 :   {
   38619         104 :     const int bLocalUseExceptions = GetUseExceptions();
   38620         104 :     if ( bLocalUseExceptions ) {
   38621          29 :       pushErrorHandler();
   38622             :     }
   38623         104 :     {
   38624         104 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38625         104 :       result = (GDALExtendedDataTypeSubType)GDALExtendedDataTypeHS_GetSubType(arg1);
   38626         104 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38627             :     }
   38628         104 :     if ( bLocalUseExceptions ) {
   38629          29 :       popErrorHandler();
   38630             :     }
   38631             : #ifndef SED_HACKS
   38632             :     if ( bLocalUseExceptions ) {
   38633             :       CPLErr eclass = CPLGetLastErrorType();
   38634             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38635             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38636             :       }
   38637             :     }
   38638             : #endif
   38639             :   }
   38640         104 :   resultobj = SWIG_From_int(static_cast< int >(result));
   38641         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; } }
   38642             :   return resultobj;
   38643             : fail:
   38644             :   return NULL;
   38645             : }
   38646             : 
   38647             : 
   38648           1 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetRAT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38649           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38650           1 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38651           1 :   void *argp1 = 0 ;
   38652           1 :   int res1 = 0 ;
   38653           1 :   PyObject *swig_obj[1] ;
   38654           1 :   GDALRasterAttributeTableShadow *result = 0 ;
   38655             :   
   38656           1 :   if (!args) SWIG_fail;
   38657           1 :   swig_obj[0] = args;
   38658           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38659           1 :   if (!SWIG_IsOK(res1)) {
   38660           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetRAT" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38661             :   }
   38662           1 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38663           1 :   {
   38664           1 :     const int bLocalUseExceptions = GetUseExceptions();
   38665           1 :     if ( bLocalUseExceptions ) {
   38666           1 :       pushErrorHandler();
   38667             :     }
   38668           1 :     {
   38669           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38670           1 :       result = (GDALRasterAttributeTableShadow *)GDALExtendedDataTypeHS_GetRAT(arg1);
   38671           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38672             :     }
   38673           1 :     if ( bLocalUseExceptions ) {
   38674           1 :       popErrorHandler();
   38675             :     }
   38676             : #ifndef SED_HACKS
   38677             :     if ( bLocalUseExceptions ) {
   38678             :       CPLErr eclass = CPLGetLastErrorType();
   38679             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38680             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38681             :       }
   38682             :     }
   38683             : #endif
   38684             :   }
   38685           1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   38686           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; } }
   38687             :   return resultobj;
   38688             : fail:
   38689             :   return NULL;
   38690             : }
   38691             : 
   38692             : 
   38693          21 : SWIGINTERN PyObject *_wrap_ExtendedDataType_GetComponents(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38694          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38695          21 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38696          21 :   GDALEDTComponentHS ***arg2 = (GDALEDTComponentHS ***) 0 ;
   38697          21 :   size_t *arg3 = (size_t *) 0 ;
   38698          21 :   void *argp1 = 0 ;
   38699          21 :   int res1 = 0 ;
   38700          21 :   GDALEDTComponentHS **comps2 = 0 ;
   38701          21 :   size_t nCount2 = 0 ;
   38702          21 :   PyObject *swig_obj[1] ;
   38703             :   
   38704          21 :   {
   38705             :     /* %typemap(in,numinputs=0) (GDALEDTComponentHS*** pcomps, size_t* pnCount) */
   38706          21 :     arg2 = &comps2;
   38707          21 :     arg3 = &nCount2;
   38708             :   }
   38709          21 :   if (!args) SWIG_fail;
   38710          21 :   swig_obj[0] = args;
   38711          21 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38712          21 :   if (!SWIG_IsOK(res1)) {
   38713           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_GetComponents" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38714             :   }
   38715          21 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38716          21 :   {
   38717          21 :     const int bLocalUseExceptions = GetUseExceptions();
   38718          21 :     if ( bLocalUseExceptions ) {
   38719           6 :       pushErrorHandler();
   38720             :     }
   38721          21 :     {
   38722          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38723          21 :       GDALExtendedDataTypeHS_GetComponents(arg1,arg2,arg3);
   38724          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38725             :     }
   38726          21 :     if ( bLocalUseExceptions ) {
   38727           6 :       popErrorHandler();
   38728             :     }
   38729             : #ifndef SED_HACKS
   38730             :     if ( bLocalUseExceptions ) {
   38731             :       CPLErr eclass = CPLGetLastErrorType();
   38732             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38733             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38734             :       }
   38735             :     }
   38736             : #endif
   38737             :   }
   38738          21 :   resultobj = SWIG_Py_Void();
   38739          21 :   {
   38740             :     /* %typemap(argout) (GDALEDTComponentHS*** pcomps, size_t* pnCount) */
   38741          21 :     Py_DECREF(resultobj);
   38742          21 :     resultobj = PyList_New( *arg3 );
   38743          21 :     if( !resultobj ) {
   38744           0 :       SWIG_fail;
   38745             :     }
   38746          62 :     for( size_t i = 0; i < *arg3; i++ ) {
   38747          41 :       PyList_SetItem(resultobj, i,
   38748          41 :         SWIG_NewPointerObj((void*)(*arg2)[i],SWIGTYPE_p_GDALEDTComponentHS,SWIG_POINTER_OWN) );
   38749             :       /* We have borrowed the GDALEDTComponentHS */
   38750          41 :       (*arg2)[i] = NULL;
   38751             :     }
   38752             :   }
   38753          21 :   {
   38754             :     /* %typemap(freearg) (GDALEDTComponentHS*** pcomps, size_t* pnCount) */
   38755          21 :     GDALExtendedDataTypeFreeComponents(*arg2, *arg3);
   38756             :   }
   38757          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; } }
   38758             :   return resultobj;
   38759           0 : fail:
   38760           0 :   {
   38761             :     /* %typemap(freearg) (GDALEDTComponentHS*** pcomps, size_t* pnCount) */
   38762           0 :     GDALExtendedDataTypeFreeComponents(*arg2, *arg3);
   38763             :   }
   38764             :   return NULL;
   38765             : }
   38766             : 
   38767             : 
   38768           8 : SWIGINTERN PyObject *_wrap_ExtendedDataType_CanConvertTo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38769           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38770           8 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38771           8 :   GDALExtendedDataTypeHS *arg2 = (GDALExtendedDataTypeHS *) 0 ;
   38772           8 :   void *argp1 = 0 ;
   38773           8 :   int res1 = 0 ;
   38774           8 :   void *argp2 = 0 ;
   38775           8 :   int res2 = 0 ;
   38776           8 :   PyObject *swig_obj[2] ;
   38777           8 :   bool result;
   38778             :   
   38779           8 :   if (!SWIG_Python_UnpackTuple(args, "ExtendedDataType_CanConvertTo", 2, 2, swig_obj)) SWIG_fail;
   38780           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38781           8 :   if (!SWIG_IsOK(res1)) {
   38782           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_CanConvertTo" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38783             :   }
   38784           8 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38785           8 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38786           8 :   if (!SWIG_IsOK(res2)) {
   38787           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExtendedDataType_CanConvertTo" "', argument " "2"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38788             :   }
   38789           8 :   arg2 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp2);
   38790           8 :   {
   38791           8 :     if (!arg2) {
   38792           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   38793             :     }
   38794             :   }
   38795           7 :   {
   38796           7 :     const int bLocalUseExceptions = GetUseExceptions();
   38797           7 :     if ( bLocalUseExceptions ) {
   38798           0 :       pushErrorHandler();
   38799             :     }
   38800           7 :     {
   38801           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38802           7 :       result = (bool)GDALExtendedDataTypeHS_CanConvertTo(arg1,arg2);
   38803           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38804             :     }
   38805           7 :     if ( bLocalUseExceptions ) {
   38806           0 :       popErrorHandler();
   38807             :     }
   38808             : #ifndef SED_HACKS
   38809             :     if ( bLocalUseExceptions ) {
   38810             :       CPLErr eclass = CPLGetLastErrorType();
   38811             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38812             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38813             :       }
   38814             :     }
   38815             : #endif
   38816             :   }
   38817           7 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   38818           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; } }
   38819             :   return resultobj;
   38820             : fail:
   38821             :   return NULL;
   38822             : }
   38823             : 
   38824             : 
   38825         101 : SWIGINTERN PyObject *_wrap_ExtendedDataType_Equals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38826         101 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38827         101 :   GDALExtendedDataTypeHS *arg1 = (GDALExtendedDataTypeHS *) 0 ;
   38828         101 :   GDALExtendedDataTypeHS *arg2 = (GDALExtendedDataTypeHS *) 0 ;
   38829         101 :   void *argp1 = 0 ;
   38830         101 :   int res1 = 0 ;
   38831         101 :   void *argp2 = 0 ;
   38832         101 :   int res2 = 0 ;
   38833         101 :   PyObject *swig_obj[2] ;
   38834         101 :   bool result;
   38835             :   
   38836         101 :   if (!SWIG_Python_UnpackTuple(args, "ExtendedDataType_Equals", 2, 2, swig_obj)) SWIG_fail;
   38837         101 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38838         101 :   if (!SWIG_IsOK(res1)) {
   38839           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExtendedDataType_Equals" "', argument " "1"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38840             :   }
   38841         101 :   arg1 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp1);
   38842         101 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38843         101 :   if (!SWIG_IsOK(res2)) {
   38844           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExtendedDataType_Equals" "', argument " "2"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38845             :   }
   38846         101 :   arg2 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp2);
   38847         101 :   {
   38848         101 :     if (!arg2) {
   38849           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   38850             :     }
   38851             :   }
   38852         100 :   {
   38853         100 :     const int bLocalUseExceptions = GetUseExceptions();
   38854         100 :     if ( bLocalUseExceptions ) {
   38855          38 :       pushErrorHandler();
   38856             :     }
   38857         100 :     {
   38858         100 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38859         100 :       result = (bool)GDALExtendedDataTypeHS_Equals(arg1,arg2);
   38860         100 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38861             :     }
   38862         100 :     if ( bLocalUseExceptions ) {
   38863          38 :       popErrorHandler();
   38864             :     }
   38865             : #ifndef SED_HACKS
   38866             :     if ( bLocalUseExceptions ) {
   38867             :       CPLErr eclass = CPLGetLastErrorType();
   38868             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38869             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38870             :       }
   38871             :     }
   38872             : #endif
   38873             :   }
   38874         100 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   38875         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; } }
   38876             :   return resultobj;
   38877             : fail:
   38878             :   return NULL;
   38879             : }
   38880             : 
   38881             : 
   38882         277 : SWIGINTERN PyObject *ExtendedDataType_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38883         277 :   PyObject *obj;
   38884         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   38885         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_NewClientData(obj));
   38886         277 :   return SWIG_Py_Void();
   38887             : }
   38888             : 
   38889          61 : SWIGINTERN PyObject *_wrap_delete_EDTComponent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38890          61 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38891          61 :   GDALEDTComponentHS *arg1 = (GDALEDTComponentHS *) 0 ;
   38892          61 :   void *argp1 = 0 ;
   38893          61 :   int res1 = 0 ;
   38894          61 :   PyObject *swig_obj[1] ;
   38895             :   
   38896          61 :   if (!args) SWIG_fail;
   38897          61 :   swig_obj[0] = args;
   38898          61 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALEDTComponentHS, SWIG_POINTER_DISOWN |  0 );
   38899          61 :   if (!SWIG_IsOK(res1)) {
   38900           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EDTComponent" "', argument " "1"" of type '" "GDALEDTComponentHS *""'"); 
   38901             :   }
   38902          61 :   arg1 = reinterpret_cast< GDALEDTComponentHS * >(argp1);
   38903          61 :   {
   38904          61 :     const int bLocalUseExceptions = GetUseExceptions();
   38905          61 :     if ( bLocalUseExceptions ) {
   38906          23 :       pushErrorHandler();
   38907             :     }
   38908          61 :     {
   38909          61 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38910          61 :       delete_GDALEDTComponentHS(arg1);
   38911          61 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38912             :     }
   38913          61 :     if ( bLocalUseExceptions ) {
   38914          23 :       popErrorHandler();
   38915             :     }
   38916             : #ifndef SED_HACKS
   38917             :     if ( bLocalUseExceptions ) {
   38918             :       CPLErr eclass = CPLGetLastErrorType();
   38919             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38920             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38921             :       }
   38922             :     }
   38923             : #endif
   38924             :   }
   38925          61 :   resultobj = SWIG_Py_Void();
   38926          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; } }
   38927             :   return resultobj;
   38928             : fail:
   38929             :   return NULL;
   38930             : }
   38931             : 
   38932             : 
   38933          20 : SWIGINTERN PyObject *_wrap_EDTComponent_Create(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   38934          20 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   38935          20 :   char *arg1 = (char *) 0 ;
   38936          20 :   size_t arg2 ;
   38937          20 :   GDALExtendedDataTypeHS *arg3 = (GDALExtendedDataTypeHS *) 0 ;
   38938          20 :   int res1 ;
   38939          20 :   char *buf1 = 0 ;
   38940          20 :   int alloc1 = 0 ;
   38941          20 :   size_t val2 ;
   38942          20 :   int ecode2 = 0 ;
   38943          20 :   void *argp3 = 0 ;
   38944          20 :   int res3 = 0 ;
   38945          20 :   PyObject *swig_obj[3] ;
   38946          20 :   GDALEDTComponentHS *result = 0 ;
   38947             :   
   38948          20 :   if (!SWIG_Python_UnpackTuple(args, "EDTComponent_Create", 3, 3, swig_obj)) SWIG_fail;
   38949          20 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   38950          20 :   if (!SWIG_IsOK(res1)) {
   38951           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EDTComponent_Create" "', argument " "1"" of type '" "char const *""'");
   38952             :   }
   38953          20 :   arg1 = reinterpret_cast< char * >(buf1);
   38954          20 :   ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
   38955          20 :   if (!SWIG_IsOK(ecode2)) {
   38956           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "EDTComponent_Create" "', argument " "2"" of type '" "size_t""'");
   38957             :   } 
   38958          20 :   arg2 = static_cast< size_t >(val2);
   38959          20 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALExtendedDataTypeHS, 0 |  0 );
   38960          20 :   if (!SWIG_IsOK(res3)) {
   38961           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "EDTComponent_Create" "', argument " "3"" of type '" "GDALExtendedDataTypeHS *""'"); 
   38962             :   }
   38963          20 :   arg3 = reinterpret_cast< GDALExtendedDataTypeHS * >(argp3);
   38964          20 :   {
   38965          20 :     if (!arg1) {
   38966           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   38967             :     }
   38968             :   }
   38969          20 :   {
   38970          20 :     if (!arg3) {
   38971           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   38972             :     }
   38973             :   }
   38974          20 :   {
   38975          20 :     const int bLocalUseExceptions = GetUseExceptions();
   38976          20 :     if ( bLocalUseExceptions ) {
   38977          10 :       pushErrorHandler();
   38978             :     }
   38979          20 :     {
   38980          20 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   38981          20 :       result = (GDALEDTComponentHS *)GDALEDTComponentHS_Create((char const *)arg1,arg2,arg3);
   38982          20 :       SWIG_PYTHON_THREAD_END_ALLOW;
   38983             :     }
   38984          20 :     if ( bLocalUseExceptions ) {
   38985          10 :       popErrorHandler();
   38986             :     }
   38987             : #ifndef SED_HACKS
   38988             :     if ( bLocalUseExceptions ) {
   38989             :       CPLErr eclass = CPLGetLastErrorType();
   38990             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   38991             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   38992             :       }
   38993             :     }
   38994             : #endif
   38995             :   }
   38996          20 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALEDTComponentHS, SWIG_POINTER_OWN |  0 );
   38997          20 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   38998          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; } }
   38999             :   return resultobj;
   39000           0 : fail:
   39001           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   39002             :   return NULL;
   39003             : }
   39004             : 
   39005             : 
   39006          33 : SWIGINTERN PyObject *_wrap_EDTComponent_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39007          33 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39008          33 :   GDALEDTComponentHS *arg1 = (GDALEDTComponentHS *) 0 ;
   39009          33 :   void *argp1 = 0 ;
   39010          33 :   int res1 = 0 ;
   39011          33 :   PyObject *swig_obj[1] ;
   39012          33 :   char *result = 0 ;
   39013             :   
   39014          33 :   if (!args) SWIG_fail;
   39015          33 :   swig_obj[0] = args;
   39016          33 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALEDTComponentHS, 0 |  0 );
   39017          33 :   if (!SWIG_IsOK(res1)) {
   39018           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EDTComponent_GetName" "', argument " "1"" of type '" "GDALEDTComponentHS *""'"); 
   39019             :   }
   39020          33 :   arg1 = reinterpret_cast< GDALEDTComponentHS * >(argp1);
   39021          33 :   {
   39022          33 :     const int bLocalUseExceptions = GetUseExceptions();
   39023          33 :     if ( bLocalUseExceptions ) {
   39024          13 :       pushErrorHandler();
   39025             :     }
   39026          33 :     {
   39027          33 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39028          33 :       result = (char *)GDALEDTComponentHS_GetName(arg1);
   39029          33 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39030             :     }
   39031          33 :     if ( bLocalUseExceptions ) {
   39032          13 :       popErrorHandler();
   39033             :     }
   39034             : #ifndef SED_HACKS
   39035             :     if ( bLocalUseExceptions ) {
   39036             :       CPLErr eclass = CPLGetLastErrorType();
   39037             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39038             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39039             :       }
   39040             :     }
   39041             : #endif
   39042             :   }
   39043          33 :   resultobj = SWIG_FromCharPtr((const char *)result);
   39044          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; } }
   39045             :   return resultobj;
   39046             : fail:
   39047             :   return NULL;
   39048             : }
   39049             : 
   39050             : 
   39051          31 : SWIGINTERN PyObject *_wrap_EDTComponent_GetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39052          31 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39053          31 :   GDALEDTComponentHS *arg1 = (GDALEDTComponentHS *) 0 ;
   39054          31 :   void *argp1 = 0 ;
   39055          31 :   int res1 = 0 ;
   39056          31 :   PyObject *swig_obj[1] ;
   39057          31 :   size_t result;
   39058             :   
   39059          31 :   if (!args) SWIG_fail;
   39060          31 :   swig_obj[0] = args;
   39061          31 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALEDTComponentHS, 0 |  0 );
   39062          31 :   if (!SWIG_IsOK(res1)) {
   39063           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EDTComponent_GetOffset" "', argument " "1"" of type '" "GDALEDTComponentHS *""'"); 
   39064             :   }
   39065          31 :   arg1 = reinterpret_cast< GDALEDTComponentHS * >(argp1);
   39066          31 :   {
   39067          31 :     const int bLocalUseExceptions = GetUseExceptions();
   39068          31 :     if ( bLocalUseExceptions ) {
   39069          13 :       pushErrorHandler();
   39070             :     }
   39071          31 :     {
   39072          31 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39073          31 :       result = GDALEDTComponentHS_GetOffset(arg1);
   39074          31 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39075             :     }
   39076          31 :     if ( bLocalUseExceptions ) {
   39077          13 :       popErrorHandler();
   39078             :     }
   39079             : #ifndef SED_HACKS
   39080             :     if ( bLocalUseExceptions ) {
   39081             :       CPLErr eclass = CPLGetLastErrorType();
   39082             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39083             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39084             :       }
   39085             :     }
   39086             : #endif
   39087             :   }
   39088          31 :   resultobj = SWIG_From_size_t(static_cast< size_t >(result));
   39089          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; } }
   39090             :   return resultobj;
   39091             : fail:
   39092             :   return NULL;
   39093             : }
   39094             : 
   39095             : 
   39096          49 : SWIGINTERN PyObject *_wrap_EDTComponent_GetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39097          49 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39098          49 :   GDALEDTComponentHS *arg1 = (GDALEDTComponentHS *) 0 ;
   39099          49 :   void *argp1 = 0 ;
   39100          49 :   int res1 = 0 ;
   39101          49 :   PyObject *swig_obj[1] ;
   39102          49 :   GDALExtendedDataTypeHS *result = 0 ;
   39103             :   
   39104          49 :   if (!args) SWIG_fail;
   39105          49 :   swig_obj[0] = args;
   39106          49 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALEDTComponentHS, 0 |  0 );
   39107          49 :   if (!SWIG_IsOK(res1)) {
   39108           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EDTComponent_GetType" "', argument " "1"" of type '" "GDALEDTComponentHS *""'"); 
   39109             :   }
   39110          49 :   arg1 = reinterpret_cast< GDALEDTComponentHS * >(argp1);
   39111          49 :   {
   39112          49 :     const int bLocalUseExceptions = GetUseExceptions();
   39113          49 :     if ( bLocalUseExceptions ) {
   39114          21 :       pushErrorHandler();
   39115             :     }
   39116          49 :     {
   39117          49 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39118          49 :       result = (GDALExtendedDataTypeHS *)GDALEDTComponentHS_GetType(arg1);
   39119          49 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39120             :     }
   39121          49 :     if ( bLocalUseExceptions ) {
   39122          21 :       popErrorHandler();
   39123             :     }
   39124             : #ifndef SED_HACKS
   39125             :     if ( bLocalUseExceptions ) {
   39126             :       CPLErr eclass = CPLGetLastErrorType();
   39127             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39128             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39129             :       }
   39130             :     }
   39131             : #endif
   39132             :   }
   39133          49 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALExtendedDataTypeHS, SWIG_POINTER_OWN |  0 );
   39134          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; } }
   39135             :   return resultobj;
   39136             : fail:
   39137             :   return NULL;
   39138             : }
   39139             : 
   39140             : 
   39141         277 : SWIGINTERN PyObject *EDTComponent_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39142         277 :   PyObject *obj;
   39143         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   39144         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALEDTComponentHS, SWIG_NewClientData(obj));
   39145         277 :   return SWIG_Py_Void();
   39146             : }
   39147             : 
   39148          13 : SWIGINTERN PyObject *_wrap_CreateRasterAttributeTableFromMDArrays(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39149          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39150          13 :   GDALRATTableType arg1 ;
   39151          13 :   int arg2 ;
   39152          13 :   GDALMDArrayHS **arg3 = (GDALMDArrayHS **) 0 ;
   39153          13 :   int arg4 = (int) 0 ;
   39154          13 :   GDALRATFieldUsage *arg5 = (GDALRATFieldUsage *) NULL ;
   39155          13 :   int val1 ;
   39156          13 :   int ecode1 = 0 ;
   39157          13 :   PyObject *swig_obj[3] ;
   39158          13 :   GDALRasterAttributeTableShadow *result = 0 ;
   39159             :   
   39160          13 :   if (!SWIG_Python_UnpackTuple(args, "CreateRasterAttributeTableFromMDArrays", 2, 3, swig_obj)) SWIG_fail;
   39161          13 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   39162          13 :   if (!SWIG_IsOK(ecode1)) {
   39163           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "CreateRasterAttributeTableFromMDArrays" "', argument " "1"" of type '" "GDALRATTableType""'");
   39164             :   } 
   39165          13 :   arg1 = static_cast< GDALRATTableType >(val1);
   39166          13 :   {
   39167             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALMDArrayHS *optional_##GDALMDArrayHS)*/
   39168          13 :     if ( !PySequence_Check(swig_obj[1]) ) {
   39169           1 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   39170           1 :       SWIG_fail;
   39171             :     }
   39172          12 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   39173          12 :     if( size > (Py_ssize_t)INT_MAX ) {
   39174           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   39175           0 :       SWIG_fail;
   39176             :     }
   39177          12 :     if( (size_t)size > SIZE_MAX / sizeof(GDALMDArrayHS*) ) {
   39178           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   39179           0 :       SWIG_fail;
   39180             :     }
   39181          12 :     arg2 = (int)size;
   39182          12 :     arg3 = (GDALMDArrayHS**) VSIMalloc(arg2*sizeof(GDALMDArrayHS*));
   39183          12 :     if( !arg3) {
   39184           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   39185           0 :       SWIG_fail;
   39186             :     }
   39187             :     
   39188          26 :     for( int i = 0; i<arg2; i++ ) {
   39189          16 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   39190          16 :       GDALMDArrayHS* rawobjectpointer = NULL;
   39191          16 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_EXCEPTION | 0 ));
   39192          16 :       if (!rawobjectpointer) {
   39193           2 :         Py_DECREF(o);
   39194           2 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALMDArrayHS");
   39195           2 :         SWIG_fail;
   39196             :       }
   39197          14 :       arg3[i] = rawobjectpointer;
   39198          14 :       Py_DECREF(o);
   39199             :       
   39200             :     }
   39201             :   }
   39202          10 :   if (swig_obj[2]) {
   39203           6 :     {
   39204             :       /*  %typemap(in) (int nUsages, GDALRATFieldUsage *paeUsages)*/
   39205           6 :       if ( !PySequence_Check(swig_obj[2]) ) {
   39206           1 :         PyErr_SetString(PyExc_TypeError, "not a sequence");
   39207           1 :         SWIG_fail;
   39208             :       }
   39209           5 :       Py_ssize_t size = PySequence_Size(swig_obj[2]);
   39210           5 :       if( size > (Py_ssize_t)INT_MAX ) {
   39211           0 :         PyErr_SetString(PyExc_TypeError, "too big sequence");
   39212           0 :         SWIG_fail;
   39213             :       }
   39214           5 :       if( (size_t)size > SIZE_MAX / sizeof(int) ) {
   39215           0 :         PyErr_SetString(PyExc_TypeError, "too big sequence");
   39216           0 :         SWIG_fail;
   39217             :       }
   39218           5 :       arg4 = (int)size;
   39219           5 :       arg5 = (GDALRATFieldUsage*) VSIMalloc(arg4*sizeof(GDALRATFieldUsage));
   39220           5 :       if( !arg5) {
   39221           0 :         PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   39222           0 :         SWIG_fail;
   39223             :       }
   39224             :       
   39225          10 :       for( int i = 0; i<arg4; i++ ) {
   39226           8 :         PyObject *o = PySequence_GetItem(swig_obj[2],i);
   39227           8 :         int nVal = 0;
   39228           8 :         if ( !PyArg_Parse(o,"i",&nVal) ) {
   39229           1 :           PyErr_SetString(PyExc_TypeError, "not a valid GDALRATFieldUsage");
   39230           1 :           Py_DECREF(o);
   39231           3 :           SWIG_fail;
   39232             :         }
   39233           7 :         Py_DECREF(o);
   39234           7 :         if( nVal < 0 || nVal >= GFU_MaxCount )
   39235             :         {
   39236           2 :           PyErr_SetString(PyExc_TypeError, "not a valid GDALRATFieldUsage");
   39237           2 :           SWIG_fail;
   39238             :         }
   39239           5 :         (arg5)[i] = static_cast<GDALRATFieldUsage>(nVal);
   39240             :       }
   39241             :     }
   39242             :   }
   39243           6 :   {
   39244           6 :     const int bLocalUseExceptions = GetUseExceptions();
   39245           6 :     if ( bLocalUseExceptions ) {
   39246           6 :       pushErrorHandler();
   39247             :     }
   39248           6 :     {
   39249           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39250           6 :       result = (GDALRasterAttributeTableShadow *)CreateRasterAttributeTableFromMDArrays(arg1,arg2,arg3,arg4,arg5);
   39251           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39252             :     }
   39253           6 :     if ( bLocalUseExceptions ) {
   39254           6 :       popErrorHandler();
   39255             :     }
   39256             : #ifndef SED_HACKS
   39257             :     if ( bLocalUseExceptions ) {
   39258             :       CPLErr eclass = CPLGetLastErrorType();
   39259             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39260             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39261             :       }
   39262             :     }
   39263             : #endif
   39264             :   }
   39265           6 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_POINTER_OWN |  0 );
   39266           6 :   {
   39267             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALMDArrayHS **poObjects)*/
   39268           6 :     CPLFree( arg3 );
   39269             :   }
   39270           6 :   {
   39271             :     /* %typemap(freearg) (int nUsages, GDALRATFieldUsage *paeUsages)*/
   39272           6 :     CPLFree( arg5 );
   39273             :   }
   39274          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; } }
   39275             :   return resultobj;
   39276           7 : fail:
   39277           7 :   {
   39278             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALMDArrayHS **poObjects)*/
   39279           7 :     CPLFree( arg3 );
   39280             :   }
   39281           7 :   {
   39282             :     /* %typemap(freearg) (int nUsages, GDALRATFieldUsage *paeUsages)*/
   39283           7 :     CPLFree( arg5 );
   39284             :   }
   39285             :   return NULL;
   39286             : }
   39287             : 
   39288             : 
   39289       17910 : SWIGINTERN PyObject *_wrap_Band_XSize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39290       17910 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39291       17910 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39292       17910 :   void *argp1 = 0 ;
   39293       17910 :   int res1 = 0 ;
   39294       17910 :   PyObject *swig_obj[1] ;
   39295       17910 :   int result;
   39296             :   
   39297       17910 :   if (!args) SWIG_fail;
   39298       17910 :   swig_obj[0] = args;
   39299       17910 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39300       17910 :   if (!SWIG_IsOK(res1)) {
   39301           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_XSize_get" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39302             :   }
   39303       17910 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39304       17910 :   {
   39305       17910 :     const int bLocalUseExceptions = GetUseExceptions();
   39306       17910 :     if ( bLocalUseExceptions ) {
   39307       14772 :       pushErrorHandler();
   39308             :     }
   39309       17910 :     {
   39310       17910 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39311       17910 :       result = (int)GDALRasterBandShadow_XSize_get(arg1);
   39312       17910 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39313             :     }
   39314       17910 :     if ( bLocalUseExceptions ) {
   39315       14772 :       popErrorHandler();
   39316             :     }
   39317             : #ifndef SED_HACKS
   39318             :     if ( bLocalUseExceptions ) {
   39319             :       CPLErr eclass = CPLGetLastErrorType();
   39320             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39321             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39322             :       }
   39323             :     }
   39324             : #endif
   39325             :   }
   39326       17910 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39327       17910 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   39328             :   return resultobj;
   39329             : fail:
   39330             :   return NULL;
   39331             : }
   39332             : 
   39333             : 
   39334       16771 : SWIGINTERN PyObject *_wrap_Band_YSize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39335       16771 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39336       16771 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39337       16771 :   void *argp1 = 0 ;
   39338       16771 :   int res1 = 0 ;
   39339       16771 :   PyObject *swig_obj[1] ;
   39340       16771 :   int result;
   39341             :   
   39342       16771 :   if (!args) SWIG_fail;
   39343       16771 :   swig_obj[0] = args;
   39344       16771 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39345       16771 :   if (!SWIG_IsOK(res1)) {
   39346           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_YSize_get" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39347             :   }
   39348       16771 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39349       16771 :   {
   39350       16771 :     const int bLocalUseExceptions = GetUseExceptions();
   39351       16771 :     if ( bLocalUseExceptions ) {
   39352       13695 :       pushErrorHandler();
   39353             :     }
   39354       16771 :     {
   39355       16771 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39356       16771 :       result = (int)GDALRasterBandShadow_YSize_get(arg1);
   39357       16771 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39358             :     }
   39359       16771 :     if ( bLocalUseExceptions ) {
   39360       13695 :       popErrorHandler();
   39361             :     }
   39362             : #ifndef SED_HACKS
   39363             :     if ( bLocalUseExceptions ) {
   39364             :       CPLErr eclass = CPLGetLastErrorType();
   39365             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39366             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39367             :       }
   39368             :     }
   39369             : #endif
   39370             :   }
   39371       16771 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39372       16771 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   39373             :   return resultobj;
   39374             : fail:
   39375             :   return NULL;
   39376             : }
   39377             : 
   39378             : 
   39379      849087 : SWIGINTERN PyObject *_wrap_Band_DataType_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39380      849087 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39381      849087 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39382      849087 :   void *argp1 = 0 ;
   39383      849087 :   int res1 = 0 ;
   39384      849087 :   PyObject *swig_obj[1] ;
   39385      849087 :   GDALDataType result;
   39386             :   
   39387      849087 :   if (!args) SWIG_fail;
   39388      849087 :   swig_obj[0] = args;
   39389      849087 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39390      849087 :   if (!SWIG_IsOK(res1)) {
   39391           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_DataType_get" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39392             :   }
   39393      849087 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39394      849087 :   {
   39395      849087 :     const int bLocalUseExceptions = GetUseExceptions();
   39396      849087 :     if ( bLocalUseExceptions ) {
   39397      837061 :       pushErrorHandler();
   39398             :     }
   39399      849087 :     {
   39400      849087 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39401      849087 :       result = (GDALDataType)GDALRasterBandShadow_DataType_get(arg1);
   39402      849087 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39403             :     }
   39404      849087 :     if ( bLocalUseExceptions ) {
   39405      837061 :       popErrorHandler();
   39406             :     }
   39407             : #ifndef SED_HACKS
   39408             :     if ( bLocalUseExceptions ) {
   39409             :       CPLErr eclass = CPLGetLastErrorType();
   39410             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39411             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39412             :       }
   39413             :     }
   39414             : #endif
   39415             :   }
   39416      849087 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39417      849087 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   39418             :   return resultobj;
   39419             : fail:
   39420             :   return NULL;
   39421             : }
   39422             : 
   39423             : 
   39424          68 : SWIGINTERN PyObject *_wrap_Band_GetDataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39425          68 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39426          68 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39427          68 :   void *argp1 = 0 ;
   39428          68 :   int res1 = 0 ;
   39429          68 :   PyObject *swig_obj[1] ;
   39430          68 :   GDALDatasetShadow *result = 0 ;
   39431             :   
   39432          68 :   if (!args) SWIG_fail;
   39433          68 :   swig_obj[0] = args;
   39434          68 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39435          68 :   if (!SWIG_IsOK(res1)) {
   39436           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetDataset" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39437             :   }
   39438          68 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39439          68 :   {
   39440          68 :     const int bLocalUseExceptions = GetUseExceptions();
   39441          68 :     if ( bLocalUseExceptions ) {
   39442           8 :       pushErrorHandler();
   39443             :     }
   39444          68 :     {
   39445          68 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39446          68 :       result = (GDALDatasetShadow *)GDALRasterBandShadow_GetDataset(arg1);
   39447          68 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39448             :     }
   39449          68 :     if ( bLocalUseExceptions ) {
   39450           8 :       popErrorHandler();
   39451             :     }
   39452             : #ifndef SED_HACKS
   39453             :     if ( bLocalUseExceptions ) {
   39454             :       CPLErr eclass = CPLGetLastErrorType();
   39455             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39456             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39457             :       }
   39458             :     }
   39459             : #endif
   39460             :   }
   39461          68 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   39462          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; } }
   39463             :   return resultobj;
   39464             : fail:
   39465             :   return NULL;
   39466             : }
   39467             : 
   39468             : 
   39469           8 : SWIGINTERN PyObject *_wrap_Band_GetBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39470           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39471           8 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39472           8 :   void *argp1 = 0 ;
   39473           8 :   int res1 = 0 ;
   39474           8 :   PyObject *swig_obj[1] ;
   39475           8 :   int result;
   39476             :   
   39477           8 :   if (!args) SWIG_fail;
   39478           8 :   swig_obj[0] = args;
   39479           8 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39480           8 :   if (!SWIG_IsOK(res1)) {
   39481           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39482             :   }
   39483           8 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39484           8 :   {
   39485           8 :     const int bLocalUseExceptions = GetUseExceptions();
   39486           8 :     if ( bLocalUseExceptions ) {
   39487           8 :       pushErrorHandler();
   39488             :     }
   39489           8 :     {
   39490           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39491           8 :       result = (int)GDALRasterBandShadow_GetBand(arg1);
   39492           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39493             :     }
   39494           8 :     if ( bLocalUseExceptions ) {
   39495           8 :       popErrorHandler();
   39496             :     }
   39497             : #ifndef SED_HACKS
   39498             :     if ( bLocalUseExceptions ) {
   39499             :       CPLErr eclass = CPLGetLastErrorType();
   39500             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39501             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39502             :       }
   39503             :     }
   39504             : #endif
   39505             :   }
   39506           8 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39507           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; } }
   39508             :   return resultobj;
   39509             : fail:
   39510             :   return NULL;
   39511             : }
   39512             : 
   39513             : 
   39514         493 : SWIGINTERN PyObject *_wrap_Band_GetBlockSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39515         493 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39516         493 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39517         493 :   int *arg2 = (int *) 0 ;
   39518         493 :   int *arg3 = (int *) 0 ;
   39519         493 :   void *argp1 = 0 ;
   39520         493 :   int res1 = 0 ;
   39521         493 :   int temp2 ;
   39522         493 :   int res2 = SWIG_TMPOBJ ;
   39523         493 :   int temp3 ;
   39524         493 :   int res3 = SWIG_TMPOBJ ;
   39525         493 :   PyObject *swig_obj[1] ;
   39526             :   
   39527         493 :   arg2 = &temp2;
   39528         493 :   arg3 = &temp3;
   39529         493 :   if (!args) SWIG_fail;
   39530         493 :   swig_obj[0] = args;
   39531         493 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39532         493 :   if (!SWIG_IsOK(res1)) {
   39533           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetBlockSize" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39534             :   }
   39535         493 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39536         493 :   {
   39537         493 :     const int bLocalUseExceptions = GetUseExceptions();
   39538         493 :     if ( bLocalUseExceptions ) {
   39539         206 :       pushErrorHandler();
   39540             :     }
   39541         493 :     {
   39542         493 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39543         493 :       GDALRasterBandShadow_GetBlockSize(arg1,arg2,arg3);
   39544         493 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39545             :     }
   39546         493 :     if ( bLocalUseExceptions ) {
   39547         206 :       popErrorHandler();
   39548             :     }
   39549             : #ifndef SED_HACKS
   39550             :     if ( bLocalUseExceptions ) {
   39551             :       CPLErr eclass = CPLGetLastErrorType();
   39552             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39553             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39554             :       }
   39555             :     }
   39556             : #endif
   39557             :   }
   39558         493 :   resultobj = SWIG_Py_Void();
   39559         493 :   if (ReturnSame(SWIG_IsTmpObj(res2))) {
   39560         493 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2)));
   39561             :   } else {
   39562           0 :     int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   39563           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags));
   39564             :   }
   39565         493 :   if (ReturnSame(SWIG_IsTmpObj(res3))) {
   39566         493 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3)));
   39567             :   } else {
   39568           0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   39569           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags));
   39570             :   }
   39571         493 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   39572             :   return resultobj;
   39573             : fail:
   39574             :   return NULL;
   39575             : }
   39576             : 
   39577             : 
   39578           6 : SWIGINTERN PyObject *_wrap_Band_GetActualBlockSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39579           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39580           6 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39581           6 :   int arg2 ;
   39582           6 :   int arg3 ;
   39583           6 :   int *arg4 = (int *) 0 ;
   39584           6 :   int *arg5 = (int *) 0 ;
   39585           6 :   int *arg6 = (int *) 0 ;
   39586           6 :   void *argp1 = 0 ;
   39587           6 :   int res1 = 0 ;
   39588           6 :   int val2 ;
   39589           6 :   int ecode2 = 0 ;
   39590           6 :   int val3 ;
   39591           6 :   int ecode3 = 0 ;
   39592           6 :   int nxvalid4 = 0 ;
   39593           6 :   int nyvalid4 = 0 ;
   39594           6 :   int isvalid4 = 0 ;
   39595           6 :   PyObject *swig_obj[3] ;
   39596             :   
   39597           6 :   {
   39598             :     /* %typemap(in) (int *pnxvalid, int *pnyvalid, int* pisvalid) */
   39599           6 :     arg4 = &nxvalid4;
   39600           6 :     arg5 = &nyvalid4;
   39601           6 :     arg6 = &isvalid4;
   39602             :   }
   39603           6 :   if (!SWIG_Python_UnpackTuple(args, "Band_GetActualBlockSize", 3, 3, swig_obj)) SWIG_fail;
   39604           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39605           6 :   if (!SWIG_IsOK(res1)) {
   39606           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetActualBlockSize" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39607             :   }
   39608           6 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39609           6 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   39610           6 :   if (!SWIG_IsOK(ecode2)) {
   39611           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetActualBlockSize" "', argument " "2"" of type '" "int""'");
   39612             :   } 
   39613           6 :   arg2 = static_cast< int >(val2);
   39614           6 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   39615           6 :   if (!SWIG_IsOK(ecode3)) {
   39616           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetActualBlockSize" "', argument " "3"" of type '" "int""'");
   39617             :   } 
   39618           6 :   arg3 = static_cast< int >(val3);
   39619           6 :   {
   39620           6 :     const int bLocalUseExceptions = GetUseExceptions();
   39621           6 :     if ( bLocalUseExceptions ) {
   39622           0 :       pushErrorHandler();
   39623             :     }
   39624           6 :     {
   39625           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39626           6 :       GDALRasterBandShadow_GetActualBlockSize(arg1,arg2,arg3,arg4,arg5,arg6);
   39627           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39628             :     }
   39629           6 :     if ( bLocalUseExceptions ) {
   39630           0 :       popErrorHandler();
   39631             :     }
   39632             : #ifndef SED_HACKS
   39633             :     if ( bLocalUseExceptions ) {
   39634             :       CPLErr eclass = CPLGetLastErrorType();
   39635             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39636             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39637             :       }
   39638             :     }
   39639             : #endif
   39640             :   }
   39641           6 :   resultobj = SWIG_Py_Void();
   39642           6 :   {
   39643             :     /* %typemap(argout) (int *pnxvalid, int *pnyvalid, int* pisvalid)  */
   39644           6 :     PyObject *r;
   39645           6 :     if ( !*arg6 ) {
   39646           4 :       Py_INCREF(Py_None);
   39647           4 :       r = Py_None;
   39648             :     }
   39649             :     else {
   39650           2 :       r = PyTuple_New( 2 );
   39651           2 :       PyTuple_SetItem( r, 0, PyLong_FromLong(*arg4) );
   39652           2 :       PyTuple_SetItem( r, 1, PyLong_FromLong(*arg5) );
   39653             :     }
   39654             : #if SWIG_VERSION >= 0x040300
   39655             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   39656             : #else
   39657           6 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   39658             : #endif
   39659             :   }
   39660           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; } }
   39661             :   return resultobj;
   39662             : fail:
   39663             :   return NULL;
   39664             : }
   39665             : 
   39666             : 
   39667         796 : SWIGINTERN PyObject *_wrap_Band_GetColorInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39668         796 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39669         796 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39670         796 :   void *argp1 = 0 ;
   39671         796 :   int res1 = 0 ;
   39672         796 :   PyObject *swig_obj[1] ;
   39673         796 :   GDALColorInterp result;
   39674             :   
   39675         796 :   if (!args) SWIG_fail;
   39676         796 :   swig_obj[0] = args;
   39677         796 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39678         796 :   if (!SWIG_IsOK(res1)) {
   39679           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39680             :   }
   39681         796 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39682         796 :   {
   39683         796 :     const int bLocalUseExceptions = GetUseExceptions();
   39684         796 :     if ( bLocalUseExceptions ) {
   39685         250 :       pushErrorHandler();
   39686             :     }
   39687         796 :     {
   39688         796 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39689         796 :       result = (GDALColorInterp)GDALRasterBandShadow_GetColorInterpretation(arg1);
   39690         796 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39691             :     }
   39692         796 :     if ( bLocalUseExceptions ) {
   39693         250 :       popErrorHandler();
   39694             :     }
   39695             : #ifndef SED_HACKS
   39696             :     if ( bLocalUseExceptions ) {
   39697             :       CPLErr eclass = CPLGetLastErrorType();
   39698             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39699             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39700             :       }
   39701             :     }
   39702             : #endif
   39703             :   }
   39704         796 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39705         796 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   39706             :   return resultobj;
   39707             : fail:
   39708             :   return NULL;
   39709             : }
   39710             : 
   39711             : 
   39712         182 : SWIGINTERN PyObject *_wrap_Band_GetRasterColorInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39713         182 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39714         182 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39715         182 :   void *argp1 = 0 ;
   39716         182 :   int res1 = 0 ;
   39717         182 :   PyObject *swig_obj[1] ;
   39718         182 :   GDALColorInterp result;
   39719             :   
   39720         182 :   if (!args) SWIG_fail;
   39721         182 :   swig_obj[0] = args;
   39722         182 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39723         182 :   if (!SWIG_IsOK(res1)) {
   39724           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetRasterColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39725             :   }
   39726         182 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39727         182 :   {
   39728         182 :     const int bLocalUseExceptions = GetUseExceptions();
   39729         182 :     if ( bLocalUseExceptions ) {
   39730          64 :       pushErrorHandler();
   39731             :     }
   39732         182 :     {
   39733         182 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39734         182 :       result = (GDALColorInterp)GDALRasterBandShadow_GetRasterColorInterpretation(arg1);
   39735         182 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39736             :     }
   39737         182 :     if ( bLocalUseExceptions ) {
   39738          64 :       popErrorHandler();
   39739             :     }
   39740             : #ifndef SED_HACKS
   39741             :     if ( bLocalUseExceptions ) {
   39742             :       CPLErr eclass = CPLGetLastErrorType();
   39743             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39744             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39745             :       }
   39746             :     }
   39747             : #endif
   39748             :   }
   39749         182 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39750         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; } }
   39751             :   return resultobj;
   39752             : fail:
   39753             :   return NULL;
   39754             : }
   39755             : 
   39756             : 
   39757         673 : SWIGINTERN PyObject *_wrap_Band_SetColorInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39758         673 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39759         673 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39760         673 :   GDALColorInterp arg2 ;
   39761         673 :   void *argp1 = 0 ;
   39762         673 :   int res1 = 0 ;
   39763         673 :   int val2 ;
   39764         673 :   int ecode2 = 0 ;
   39765         673 :   PyObject *swig_obj[2] ;
   39766         673 :   CPLErr result;
   39767             :   
   39768         673 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetColorInterpretation", 2, 2, swig_obj)) SWIG_fail;
   39769         673 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39770         673 :   if (!SWIG_IsOK(res1)) {
   39771           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39772             :   }
   39773         673 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39774         673 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   39775         673 :   if (!SWIG_IsOK(ecode2)) {
   39776           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetColorInterpretation" "', argument " "2"" of type '" "GDALColorInterp""'");
   39777             :   } 
   39778         673 :   arg2 = static_cast< GDALColorInterp >(val2);
   39779         673 :   {
   39780         673 :     const int bLocalUseExceptions = GetUseExceptions();
   39781         673 :     if ( bLocalUseExceptions ) {
   39782         313 :       pushErrorHandler();
   39783             :     }
   39784         673 :     {
   39785         673 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39786         673 :       result = (CPLErr)GDALRasterBandShadow_SetColorInterpretation(arg1,arg2);
   39787         673 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39788             :     }
   39789         673 :     if ( bLocalUseExceptions ) {
   39790         313 :       popErrorHandler();
   39791             :     }
   39792             : #ifndef SED_HACKS
   39793             :     if ( bLocalUseExceptions ) {
   39794             :       CPLErr eclass = CPLGetLastErrorType();
   39795             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39796             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39797             :       }
   39798             :     }
   39799             : #endif
   39800             :   }
   39801         673 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39802         673 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   39803             :   return resultobj;
   39804             : fail:
   39805             :   return NULL;
   39806             : }
   39807             : 
   39808             : 
   39809         409 : SWIGINTERN PyObject *_wrap_Band_SetRasterColorInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39810         409 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39811         409 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39812         409 :   GDALColorInterp arg2 ;
   39813         409 :   void *argp1 = 0 ;
   39814         409 :   int res1 = 0 ;
   39815         409 :   int val2 ;
   39816         409 :   int ecode2 = 0 ;
   39817         409 :   PyObject *swig_obj[2] ;
   39818         409 :   CPLErr result;
   39819             :   
   39820         409 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetRasterColorInterpretation", 2, 2, swig_obj)) SWIG_fail;
   39821         409 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39822         409 :   if (!SWIG_IsOK(res1)) {
   39823           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetRasterColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39824             :   }
   39825         409 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39826         409 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   39827         409 :   if (!SWIG_IsOK(ecode2)) {
   39828           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetRasterColorInterpretation" "', argument " "2"" of type '" "GDALColorInterp""'");
   39829             :   } 
   39830         409 :   arg2 = static_cast< GDALColorInterp >(val2);
   39831         409 :   {
   39832         409 :     const int bLocalUseExceptions = GetUseExceptions();
   39833         409 :     if ( bLocalUseExceptions ) {
   39834         355 :       pushErrorHandler();
   39835             :     }
   39836         409 :     {
   39837         409 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39838         409 :       result = (CPLErr)GDALRasterBandShadow_SetRasterColorInterpretation(arg1,arg2);
   39839         409 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39840             :     }
   39841         409 :     if ( bLocalUseExceptions ) {
   39842         355 :       popErrorHandler();
   39843             :     }
   39844             : #ifndef SED_HACKS
   39845             :     if ( bLocalUseExceptions ) {
   39846             :       CPLErr eclass = CPLGetLastErrorType();
   39847             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39848             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39849             :       }
   39850             :     }
   39851             : #endif
   39852             :   }
   39853         409 :   resultobj = SWIG_From_int(static_cast< int >(result));
   39854         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; } }
   39855             :   return resultobj;
   39856             : fail:
   39857             :   return NULL;
   39858             : }
   39859             : 
   39860             : 
   39861      410179 : SWIGINTERN PyObject *_wrap_Band_GetNoDataValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39862      410179 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39863      410179 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39864      410179 :   double *arg2 = (double *) 0 ;
   39865      410179 :   int *arg3 = (int *) 0 ;
   39866      410179 :   void *argp1 = 0 ;
   39867      410179 :   int res1 = 0 ;
   39868      410179 :   double tmpval2 ;
   39869      410179 :   int tmphasval2 ;
   39870      410179 :   PyObject *swig_obj[1] ;
   39871             :   
   39872      410179 :   {
   39873             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   39874      410179 :     arg2 = &tmpval2;
   39875      410179 :     arg3 = &tmphasval2;
   39876             :   }
   39877      410179 :   if (!args) SWIG_fail;
   39878      410179 :   swig_obj[0] = args;
   39879      410179 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39880      410179 :   if (!SWIG_IsOK(res1)) {
   39881           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetNoDataValue" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39882             :   }
   39883      410179 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39884      410179 :   {
   39885      410179 :     const int bLocalUseExceptions = GetUseExceptions();
   39886      410179 :     if ( bLocalUseExceptions ) {
   39887      409992 :       pushErrorHandler();
   39888             :     }
   39889      410179 :     {
   39890      410179 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39891      410179 :       GDALRasterBandShadow_GetNoDataValue(arg1,arg2,arg3);
   39892      410179 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39893             :     }
   39894      410179 :     if ( bLocalUseExceptions ) {
   39895      409992 :       popErrorHandler();
   39896             :     }
   39897             : #ifndef SED_HACKS
   39898             :     if ( bLocalUseExceptions ) {
   39899             :       CPLErr eclass = CPLGetLastErrorType();
   39900             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39901             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39902             :       }
   39903             :     }
   39904             : #endif
   39905             :   }
   39906      410179 :   resultobj = SWIG_Py_Void();
   39907      410179 :   {
   39908             :     /* %typemap(python,argout) (double *val, int *hasval) */
   39909      410179 :     PyObject *r;
   39910      410179 :     if ( !*arg3 ) {
   39911         460 :       Py_INCREF(Py_None);
   39912         460 :       r = Py_None;
   39913             :     }
   39914             :     else {
   39915      409719 :       r = PyFloat_FromDouble( *arg2 );
   39916             :     }
   39917             : #if SWIG_VERSION >= 0x040300
   39918             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   39919             : #else
   39920      410179 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   39921             : #endif
   39922             :   }
   39923      410179 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   39924             :   return resultobj;
   39925             : fail:
   39926             :   return NULL;
   39927             : }
   39928             : 
   39929             : 
   39930          27 : SWIGINTERN PyObject *_wrap_Band_GetNoDataValueAsInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   39931          27 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   39932          27 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   39933          27 :   GIntBig *arg2 = (GIntBig *) 0 ;
   39934          27 :   int *arg3 = (int *) 0 ;
   39935          27 :   void *argp1 = 0 ;
   39936          27 :   int res1 = 0 ;
   39937          27 :   GIntBig tmpval2 ;
   39938          27 :   int tmphasval2 ;
   39939          27 :   PyObject *swig_obj[1] ;
   39940             :   
   39941          27 :   {
   39942             :     /* %typemap(python,in,numinputs=0) (GIntBig *val, int *hasval) */
   39943          27 :     arg2 = &tmpval2;
   39944          27 :     arg3 = &tmphasval2;
   39945             :   }
   39946          27 :   if (!args) SWIG_fail;
   39947          27 :   swig_obj[0] = args;
   39948          27 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   39949          27 :   if (!SWIG_IsOK(res1)) {
   39950           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetNoDataValueAsInt64" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   39951             :   }
   39952          27 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   39953          27 :   {
   39954          27 :     const int bLocalUseExceptions = GetUseExceptions();
   39955          27 :     if ( bLocalUseExceptions ) {
   39956          22 :       pushErrorHandler();
   39957             :     }
   39958          27 :     {
   39959          27 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   39960          27 :       GDALRasterBandShadow_GetNoDataValueAsInt64(arg1,arg2,arg3);
   39961          27 :       SWIG_PYTHON_THREAD_END_ALLOW;
   39962             :     }
   39963          27 :     if ( bLocalUseExceptions ) {
   39964          22 :       popErrorHandler();
   39965             :     }
   39966             : #ifndef SED_HACKS
   39967             :     if ( bLocalUseExceptions ) {
   39968             :       CPLErr eclass = CPLGetLastErrorType();
   39969             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   39970             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   39971             :       }
   39972             :     }
   39973             : #endif
   39974             :   }
   39975          27 :   resultobj = SWIG_Py_Void();
   39976          27 :   {
   39977             :     /* %typemap(python,argout) (GIntBig *val, int *hasval) */
   39978          27 :     PyObject *r;
   39979          27 :     if ( !*arg3 ) {
   39980          10 :       Py_INCREF(Py_None);
   39981          10 :       r = Py_None;
   39982             :     }
   39983             :     else {
   39984          17 :       r = PyLong_FromLongLong( *arg2 );
   39985             :     }
   39986             : #if SWIG_VERSION >= 0x040300
   39987             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   39988             : #else
   39989          27 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   39990             : #endif
   39991             :   }
   39992          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; } }
   39993             :   return resultobj;
   39994             : fail:
   39995             :   return NULL;
   39996             : }
   39997             : 
   39998             : 
   39999          18 : SWIGINTERN PyObject *_wrap_Band_GetNoDataValueAsUInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40000          18 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40001          18 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40002          18 :   GUIntBig *arg2 = (GUIntBig *) 0 ;
   40003          18 :   int *arg3 = (int *) 0 ;
   40004          18 :   void *argp1 = 0 ;
   40005          18 :   int res1 = 0 ;
   40006          18 :   GUIntBig tmpval2 ;
   40007          18 :   int tmphasval2 ;
   40008          18 :   PyObject *swig_obj[1] ;
   40009             :   
   40010          18 :   {
   40011             :     /* %typemap(python,in,numinputs=0) (GUIntBig *val, int *hasval) */
   40012          18 :     arg2 = &tmpval2;
   40013          18 :     arg3 = &tmphasval2;
   40014             :   }
   40015          18 :   if (!args) SWIG_fail;
   40016          18 :   swig_obj[0] = args;
   40017          18 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40018          18 :   if (!SWIG_IsOK(res1)) {
   40019           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetNoDataValueAsUInt64" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40020             :   }
   40021          18 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40022          18 :   {
   40023          18 :     const int bLocalUseExceptions = GetUseExceptions();
   40024          18 :     if ( bLocalUseExceptions ) {
   40025          13 :       pushErrorHandler();
   40026             :     }
   40027          18 :     {
   40028          18 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40029          18 :       GDALRasterBandShadow_GetNoDataValueAsUInt64(arg1,arg2,arg3);
   40030          18 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40031             :     }
   40032          18 :     if ( bLocalUseExceptions ) {
   40033          13 :       popErrorHandler();
   40034             :     }
   40035             : #ifndef SED_HACKS
   40036             :     if ( bLocalUseExceptions ) {
   40037             :       CPLErr eclass = CPLGetLastErrorType();
   40038             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40039             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40040             :       }
   40041             :     }
   40042             : #endif
   40043             :   }
   40044          18 :   resultobj = SWIG_Py_Void();
   40045          18 :   {
   40046             :     /* %typemap(python,argout) (GUIntBig *val, int *hasval) */
   40047          18 :     PyObject *r;
   40048          18 :     if ( !*arg3 ) {
   40049           4 :       Py_INCREF(Py_None);
   40050           4 :       r = Py_None;
   40051             :     }
   40052             :     else {
   40053          14 :       r = PyLong_FromUnsignedLongLong( *arg2 );
   40054             :     }
   40055             : #if SWIG_VERSION >= 0x040300
   40056             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   40057             : #else
   40058          18 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   40059             : #endif
   40060             :   }
   40061          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; } }
   40062             :   return resultobj;
   40063             : fail:
   40064             :   return NULL;
   40065             : }
   40066             : 
   40067             : 
   40068         594 : SWIGINTERN PyObject *_wrap_Band_SetNoDataValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40069         594 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40070         594 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40071         594 :   double arg2 ;
   40072         594 :   void *argp1 = 0 ;
   40073         594 :   int res1 = 0 ;
   40074         594 :   double val2 ;
   40075         594 :   int ecode2 = 0 ;
   40076         594 :   PyObject *swig_obj[2] ;
   40077         594 :   CPLErr result;
   40078             :   
   40079         594 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetNoDataValue", 2, 2, swig_obj)) SWIG_fail;
   40080         594 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40081         594 :   if (!SWIG_IsOK(res1)) {
   40082           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetNoDataValue" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40083             :   }
   40084         594 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40085         594 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   40086         594 :   if (!SWIG_IsOK(ecode2)) {
   40087           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetNoDataValue" "', argument " "2"" of type '" "double""'");
   40088             :   } 
   40089         594 :   arg2 = static_cast< double >(val2);
   40090         594 :   {
   40091         594 :     const int bLocalUseExceptions = GetUseExceptions();
   40092         594 :     if ( bLocalUseExceptions ) {
   40093         433 :       pushErrorHandler();
   40094             :     }
   40095         594 :     {
   40096         594 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40097         594 :       result = (CPLErr)GDALRasterBandShadow_SetNoDataValue(arg1,arg2);
   40098         594 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40099             :     }
   40100         594 :     if ( bLocalUseExceptions ) {
   40101         433 :       popErrorHandler();
   40102             :     }
   40103             : #ifndef SED_HACKS
   40104             :     if ( bLocalUseExceptions ) {
   40105             :       CPLErr eclass = CPLGetLastErrorType();
   40106             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40107             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40108             :       }
   40109             :     }
   40110             : #endif
   40111             :   }
   40112         594 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40113         606 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   40114             :   return resultobj;
   40115             : fail:
   40116             :   return NULL;
   40117             : }
   40118             : 
   40119             : 
   40120          19 : SWIGINTERN PyObject *_wrap_Band_SetNoDataValueAsInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40121          19 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40122          19 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40123          19 :   GIntBig arg2 ;
   40124          19 :   void *argp1 = 0 ;
   40125          19 :   int res1 = 0 ;
   40126          19 :   PyObject *swig_obj[2] ;
   40127          19 :   CPLErr result;
   40128             :   
   40129          19 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetNoDataValueAsInt64", 2, 2, swig_obj)) SWIG_fail;
   40130          19 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40131          19 :   if (!SWIG_IsOK(res1)) {
   40132           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetNoDataValueAsInt64" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40133             :   }
   40134          19 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40135          19 :   {
   40136          19 :     arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
   40137             :   }
   40138          19 :   {
   40139          19 :     const int bLocalUseExceptions = GetUseExceptions();
   40140          19 :     if ( bLocalUseExceptions ) {
   40141          10 :       pushErrorHandler();
   40142             :     }
   40143          19 :     {
   40144          19 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40145          19 :       result = (CPLErr)GDALRasterBandShadow_SetNoDataValueAsInt64(arg1,arg2);
   40146          19 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40147             :     }
   40148          19 :     if ( bLocalUseExceptions ) {
   40149          10 :       popErrorHandler();
   40150             :     }
   40151             : #ifndef SED_HACKS
   40152             :     if ( bLocalUseExceptions ) {
   40153             :       CPLErr eclass = CPLGetLastErrorType();
   40154             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40155             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40156             :       }
   40157             :     }
   40158             : #endif
   40159             :   }
   40160          19 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40161          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; } }
   40162             :   return resultobj;
   40163             : fail:
   40164             :   return NULL;
   40165             : }
   40166             : 
   40167             : 
   40168          18 : SWIGINTERN PyObject *_wrap_Band_SetNoDataValueAsUInt64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40169          18 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40170          18 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40171          18 :   GUIntBig arg2 ;
   40172          18 :   void *argp1 = 0 ;
   40173          18 :   int res1 = 0 ;
   40174          18 :   PyObject *swig_obj[2] ;
   40175          18 :   CPLErr result;
   40176             :   
   40177          18 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetNoDataValueAsUInt64", 2, 2, swig_obj)) SWIG_fail;
   40178          18 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40179          18 :   if (!SWIG_IsOK(res1)) {
   40180           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetNoDataValueAsUInt64" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40181             :   }
   40182          18 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40183          18 :   {
   40184          18 :     arg2 = (GIntBig)PyLong_AsUnsignedLongLong(swig_obj[1]);
   40185             :   }
   40186          18 :   {
   40187          18 :     const int bLocalUseExceptions = GetUseExceptions();
   40188          18 :     if ( bLocalUseExceptions ) {
   40189           9 :       pushErrorHandler();
   40190             :     }
   40191          18 :     {
   40192          18 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40193          18 :       result = (CPLErr)GDALRasterBandShadow_SetNoDataValueAsUInt64(arg1,arg2);
   40194          18 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40195             :     }
   40196          18 :     if ( bLocalUseExceptions ) {
   40197           9 :       popErrorHandler();
   40198             :     }
   40199             : #ifndef SED_HACKS
   40200             :     if ( bLocalUseExceptions ) {
   40201             :       CPLErr eclass = CPLGetLastErrorType();
   40202             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40203             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40204             :       }
   40205             :     }
   40206             : #endif
   40207             :   }
   40208          18 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40209          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; } }
   40210             :   return resultobj;
   40211             : fail:
   40212             :   return NULL;
   40213             : }
   40214             : 
   40215             : 
   40216          53 : SWIGINTERN PyObject *_wrap_Band_DeleteNoDataValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40217          53 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40218          53 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40219          53 :   void *argp1 = 0 ;
   40220          53 :   int res1 = 0 ;
   40221          53 :   PyObject *swig_obj[1] ;
   40222          53 :   CPLErr result;
   40223             :   
   40224          53 :   if (!args) SWIG_fail;
   40225          53 :   swig_obj[0] = args;
   40226          53 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40227          53 :   if (!SWIG_IsOK(res1)) {
   40228           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_DeleteNoDataValue" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40229             :   }
   40230          53 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40231          53 :   {
   40232          53 :     const int bLocalUseExceptions = GetUseExceptions();
   40233          53 :     if ( bLocalUseExceptions ) {
   40234          42 :       pushErrorHandler();
   40235             :     }
   40236          53 :     {
   40237          53 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40238          53 :       result = (CPLErr)GDALRasterBandShadow_DeleteNoDataValue(arg1);
   40239          53 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40240             :     }
   40241          53 :     if ( bLocalUseExceptions ) {
   40242          42 :       popErrorHandler();
   40243             :     }
   40244             : #ifndef SED_HACKS
   40245             :     if ( bLocalUseExceptions ) {
   40246             :       CPLErr eclass = CPLGetLastErrorType();
   40247             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40248             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40249             :       }
   40250             :     }
   40251             : #endif
   40252             :   }
   40253          53 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40254          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; } }
   40255             :   return resultobj;
   40256             : fail:
   40257             :   return NULL;
   40258             : }
   40259             : 
   40260             : 
   40261          69 : SWIGINTERN PyObject *_wrap_Band_GetUnitType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40262          69 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40263          69 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40264          69 :   void *argp1 = 0 ;
   40265          69 :   int res1 = 0 ;
   40266          69 :   PyObject *swig_obj[1] ;
   40267          69 :   char *result = 0 ;
   40268             :   
   40269          69 :   if (!args) SWIG_fail;
   40270          69 :   swig_obj[0] = args;
   40271          69 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40272          69 :   if (!SWIG_IsOK(res1)) {
   40273           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetUnitType" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40274             :   }
   40275          69 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40276          69 :   {
   40277          69 :     const int bLocalUseExceptions = GetUseExceptions();
   40278          69 :     if ( bLocalUseExceptions ) {
   40279          38 :       pushErrorHandler();
   40280             :     }
   40281          69 :     {
   40282          69 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40283          69 :       result = (char *)GDALRasterBandShadow_GetUnitType(arg1);
   40284          69 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40285             :     }
   40286          69 :     if ( bLocalUseExceptions ) {
   40287          38 :       popErrorHandler();
   40288             :     }
   40289             : #ifndef SED_HACKS
   40290             :     if ( bLocalUseExceptions ) {
   40291             :       CPLErr eclass = CPLGetLastErrorType();
   40292             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40293             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40294             :       }
   40295             :     }
   40296             : #endif
   40297             :   }
   40298          69 :   resultobj = SWIG_FromCharPtr((const char *)result);
   40299          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; } }
   40300             :   return resultobj;
   40301             : fail:
   40302             :   return NULL;
   40303             : }
   40304             : 
   40305             : 
   40306          27 : SWIGINTERN PyObject *_wrap_Band_SetUnitType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40307          27 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40308          27 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40309          27 :   char *arg2 = (char *) 0 ;
   40310          27 :   void *argp1 = 0 ;
   40311          27 :   int res1 = 0 ;
   40312          27 :   int res2 ;
   40313          27 :   char *buf2 = 0 ;
   40314          27 :   int alloc2 = 0 ;
   40315          27 :   PyObject *swig_obj[2] ;
   40316          27 :   CPLErr result;
   40317             :   
   40318          27 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetUnitType", 2, 2, swig_obj)) SWIG_fail;
   40319          27 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40320          27 :   if (!SWIG_IsOK(res1)) {
   40321           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetUnitType" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40322             :   }
   40323          27 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40324          27 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   40325          27 :   if (!SWIG_IsOK(res2)) {
   40326           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetUnitType" "', argument " "2"" of type '" "char const *""'");
   40327             :   }
   40328          27 :   arg2 = reinterpret_cast< char * >(buf2);
   40329          27 :   {
   40330          27 :     const int bLocalUseExceptions = GetUseExceptions();
   40331          27 :     if ( bLocalUseExceptions ) {
   40332          18 :       pushErrorHandler();
   40333             :     }
   40334          27 :     {
   40335          27 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40336          27 :       result = (CPLErr)GDALRasterBandShadow_SetUnitType(arg1,(char const *)arg2);
   40337          27 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40338             :     }
   40339          27 :     if ( bLocalUseExceptions ) {
   40340          18 :       popErrorHandler();
   40341             :     }
   40342             : #ifndef SED_HACKS
   40343             :     if ( bLocalUseExceptions ) {
   40344             :       CPLErr eclass = CPLGetLastErrorType();
   40345             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40346             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40347             :       }
   40348             :     }
   40349             : #endif
   40350             :   }
   40351          27 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40352          27 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   40353          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; } }
   40354             :   return resultobj;
   40355           0 : fail:
   40356           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   40357             :   return NULL;
   40358             : }
   40359             : 
   40360             : 
   40361          17 : SWIGINTERN PyObject *_wrap_Band_GetRasterCategoryNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40362          17 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40363          17 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40364          17 :   void *argp1 = 0 ;
   40365          17 :   int res1 = 0 ;
   40366          17 :   PyObject *swig_obj[1] ;
   40367          17 :   char **result = 0 ;
   40368             :   
   40369          17 :   if (!args) SWIG_fail;
   40370          17 :   swig_obj[0] = args;
   40371          17 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40372          17 :   if (!SWIG_IsOK(res1)) {
   40373           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetRasterCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40374             :   }
   40375          17 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40376          17 :   {
   40377          17 :     const int bLocalUseExceptions = GetUseExceptions();
   40378          17 :     if ( bLocalUseExceptions ) {
   40379           0 :       pushErrorHandler();
   40380             :     }
   40381          17 :     {
   40382          17 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40383          17 :       result = (char **)GDALRasterBandShadow_GetRasterCategoryNames(arg1);
   40384          17 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40385             :     }
   40386          17 :     if ( bLocalUseExceptions ) {
   40387           0 :       popErrorHandler();
   40388             :     }
   40389             : #ifndef SED_HACKS
   40390             :     if ( bLocalUseExceptions ) {
   40391             :       CPLErr eclass = CPLGetLastErrorType();
   40392             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40393             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40394             :       }
   40395             :     }
   40396             : #endif
   40397             :   }
   40398          17 :   {
   40399             :     /* %typemap(out) char **options -> ( string ) */
   40400          17 :     bool bErr = false;
   40401          17 :     resultobj = CSLToList(result, &bErr);
   40402          17 :     if( bErr ) {
   40403           0 :       SWIG_fail;
   40404             :     }
   40405             :   }
   40406          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; } }
   40407             :   return resultobj;
   40408             : fail:
   40409             :   return NULL;
   40410             : }
   40411             : 
   40412             : 
   40413           0 : SWIGINTERN PyObject *_wrap_Band_SetRasterCategoryNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40414           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40415           0 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40416           0 :   char **arg2 = (char **) 0 ;
   40417           0 :   void *argp1 = 0 ;
   40418           0 :   int res1 = 0 ;
   40419           0 :   PyObject *swig_obj[2] ;
   40420           0 :   CPLErr result;
   40421             :   
   40422           0 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetRasterCategoryNames", 2, 2, swig_obj)) SWIG_fail;
   40423           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40424           0 :   if (!SWIG_IsOK(res1)) {
   40425           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetRasterCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40426             :   }
   40427           0 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40428           0 :   {
   40429             :     /* %typemap(in) char **dict */
   40430           0 :     arg2 = NULL;
   40431           0 :     if ( PySequence_Check( swig_obj[1] ) ) {
   40432           0 :       int bErr = FALSE;
   40433           0 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   40434           0 :       if ( bErr )
   40435             :       {
   40436           0 :         SWIG_fail;
   40437             :       }
   40438             :     }
   40439           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   40440           0 :       int bErr = FALSE;
   40441           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   40442           0 :       if ( bErr )
   40443             :       {
   40444           0 :         SWIG_fail;
   40445             :       }
   40446             :     }
   40447             :     else {
   40448           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   40449           0 :       SWIG_fail;
   40450             :     }
   40451             :   }
   40452           0 :   {
   40453           0 :     const int bLocalUseExceptions = GetUseExceptions();
   40454           0 :     if ( bLocalUseExceptions ) {
   40455           0 :       pushErrorHandler();
   40456             :     }
   40457           0 :     {
   40458           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40459           0 :       result = (CPLErr)GDALRasterBandShadow_SetRasterCategoryNames(arg1,arg2);
   40460           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40461             :     }
   40462           0 :     if ( bLocalUseExceptions ) {
   40463           0 :       popErrorHandler();
   40464             :     }
   40465             : #ifndef SED_HACKS
   40466             :     if ( bLocalUseExceptions ) {
   40467             :       CPLErr eclass = CPLGetLastErrorType();
   40468             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40469             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40470             :       }
   40471             :     }
   40472             : #endif
   40473             :   }
   40474           0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40475           0 :   {
   40476             :     /* %typemap(freearg) char **dict */
   40477           0 :     CSLDestroy( arg2 );
   40478             :   }
   40479           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; } }
   40480             :   return resultobj;
   40481           0 : fail:
   40482           0 :   {
   40483             :     /* %typemap(freearg) char **dict */
   40484           0 :     CSLDestroy( arg2 );
   40485             :   }
   40486             :   return NULL;
   40487             : }
   40488             : 
   40489             : 
   40490          62 : SWIGINTERN PyObject *_wrap_Band_GetMinimum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40491          62 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40492          62 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40493          62 :   double *arg2 = (double *) 0 ;
   40494          62 :   int *arg3 = (int *) 0 ;
   40495          62 :   void *argp1 = 0 ;
   40496          62 :   int res1 = 0 ;
   40497          62 :   double tmpval2 ;
   40498          62 :   int tmphasval2 ;
   40499          62 :   PyObject *swig_obj[1] ;
   40500             :   
   40501          62 :   {
   40502             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   40503          62 :     arg2 = &tmpval2;
   40504          62 :     arg3 = &tmphasval2;
   40505             :   }
   40506          62 :   if (!args) SWIG_fail;
   40507          62 :   swig_obj[0] = args;
   40508          62 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40509          62 :   if (!SWIG_IsOK(res1)) {
   40510           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMinimum" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40511             :   }
   40512          62 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40513          62 :   {
   40514          62 :     const int bLocalUseExceptions = GetUseExceptions();
   40515          62 :     if ( bLocalUseExceptions ) {
   40516          26 :       pushErrorHandler();
   40517             :     }
   40518          62 :     {
   40519          62 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40520          62 :       GDALRasterBandShadow_GetMinimum(arg1,arg2,arg3);
   40521          62 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40522             :     }
   40523          62 :     if ( bLocalUseExceptions ) {
   40524          26 :       popErrorHandler();
   40525             :     }
   40526             : #ifndef SED_HACKS
   40527             :     if ( bLocalUseExceptions ) {
   40528             :       CPLErr eclass = CPLGetLastErrorType();
   40529             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40530             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40531             :       }
   40532             :     }
   40533             : #endif
   40534             :   }
   40535          62 :   resultobj = SWIG_Py_Void();
   40536          62 :   {
   40537             :     /* %typemap(python,argout) (double *val, int *hasval) */
   40538          62 :     PyObject *r;
   40539          62 :     if ( !*arg3 ) {
   40540          27 :       Py_INCREF(Py_None);
   40541          27 :       r = Py_None;
   40542             :     }
   40543             :     else {
   40544          35 :       r = PyFloat_FromDouble( *arg2 );
   40545             :     }
   40546             : #if SWIG_VERSION >= 0x040300
   40547             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   40548             : #else
   40549          62 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   40550             : #endif
   40551             :   }
   40552          62 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   40553             :   return resultobj;
   40554             : fail:
   40555             :   return NULL;
   40556             : }
   40557             : 
   40558             : 
   40559          52 : SWIGINTERN PyObject *_wrap_Band_GetMaximum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40560          52 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40561          52 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40562          52 :   double *arg2 = (double *) 0 ;
   40563          52 :   int *arg3 = (int *) 0 ;
   40564          52 :   void *argp1 = 0 ;
   40565          52 :   int res1 = 0 ;
   40566          52 :   double tmpval2 ;
   40567          52 :   int tmphasval2 ;
   40568          52 :   PyObject *swig_obj[1] ;
   40569             :   
   40570          52 :   {
   40571             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   40572          52 :     arg2 = &tmpval2;
   40573          52 :     arg3 = &tmphasval2;
   40574             :   }
   40575          52 :   if (!args) SWIG_fail;
   40576          52 :   swig_obj[0] = args;
   40577          52 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40578          52 :   if (!SWIG_IsOK(res1)) {
   40579           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMaximum" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40580             :   }
   40581          52 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40582          52 :   {
   40583          52 :     const int bLocalUseExceptions = GetUseExceptions();
   40584          52 :     if ( bLocalUseExceptions ) {
   40585          22 :       pushErrorHandler();
   40586             :     }
   40587          52 :     {
   40588          52 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40589          52 :       GDALRasterBandShadow_GetMaximum(arg1,arg2,arg3);
   40590          52 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40591             :     }
   40592          52 :     if ( bLocalUseExceptions ) {
   40593          22 :       popErrorHandler();
   40594             :     }
   40595             : #ifndef SED_HACKS
   40596             :     if ( bLocalUseExceptions ) {
   40597             :       CPLErr eclass = CPLGetLastErrorType();
   40598             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40599             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40600             :       }
   40601             :     }
   40602             : #endif
   40603             :   }
   40604          52 :   resultobj = SWIG_Py_Void();
   40605          52 :   {
   40606             :     /* %typemap(python,argout) (double *val, int *hasval) */
   40607          52 :     PyObject *r;
   40608          52 :     if ( !*arg3 ) {
   40609          24 :       Py_INCREF(Py_None);
   40610          24 :       r = Py_None;
   40611             :     }
   40612             :     else {
   40613          28 :       r = PyFloat_FromDouble( *arg2 );
   40614             :     }
   40615             : #if SWIG_VERSION >= 0x040300
   40616             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   40617             : #else
   40618          52 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   40619             : #endif
   40620             :   }
   40621          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; } }
   40622             :   return resultobj;
   40623             : fail:
   40624             :   return NULL;
   40625             : }
   40626             : 
   40627             : 
   40628         151 : SWIGINTERN PyObject *_wrap_Band_GetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40629         151 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40630         151 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40631         151 :   double *arg2 = (double *) 0 ;
   40632         151 :   int *arg3 = (int *) 0 ;
   40633         151 :   void *argp1 = 0 ;
   40634         151 :   int res1 = 0 ;
   40635         151 :   double tmpval2 ;
   40636         151 :   int tmphasval2 ;
   40637         151 :   PyObject *swig_obj[1] ;
   40638             :   
   40639         151 :   {
   40640             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   40641         151 :     arg2 = &tmpval2;
   40642         151 :     arg3 = &tmphasval2;
   40643             :   }
   40644         151 :   if (!args) SWIG_fail;
   40645         151 :   swig_obj[0] = args;
   40646         151 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40647         151 :   if (!SWIG_IsOK(res1)) {
   40648           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetOffset" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40649             :   }
   40650         151 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40651         151 :   {
   40652         151 :     const int bLocalUseExceptions = GetUseExceptions();
   40653         151 :     if ( bLocalUseExceptions ) {
   40654          98 :       pushErrorHandler();
   40655             :     }
   40656         151 :     {
   40657         151 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40658         151 :       GDALRasterBandShadow_GetOffset(arg1,arg2,arg3);
   40659         151 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40660             :     }
   40661         151 :     if ( bLocalUseExceptions ) {
   40662          98 :       popErrorHandler();
   40663             :     }
   40664             : #ifndef SED_HACKS
   40665             :     if ( bLocalUseExceptions ) {
   40666             :       CPLErr eclass = CPLGetLastErrorType();
   40667             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40668             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40669             :       }
   40670             :     }
   40671             : #endif
   40672             :   }
   40673         151 :   resultobj = SWIG_Py_Void();
   40674         151 :   {
   40675             :     /* %typemap(python,argout) (double *val, int *hasval) */
   40676         151 :     PyObject *r;
   40677         151 :     if ( !*arg3 ) {
   40678          47 :       Py_INCREF(Py_None);
   40679          47 :       r = Py_None;
   40680             :     }
   40681             :     else {
   40682         104 :       r = PyFloat_FromDouble( *arg2 );
   40683             :     }
   40684             : #if SWIG_VERSION >= 0x040300
   40685             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   40686             : #else
   40687         151 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   40688             : #endif
   40689             :   }
   40690         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; } }
   40691             :   return resultobj;
   40692             : fail:
   40693             :   return NULL;
   40694             : }
   40695             : 
   40696             : 
   40697         149 : SWIGINTERN PyObject *_wrap_Band_GetScale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40698         149 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40699         149 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40700         149 :   double *arg2 = (double *) 0 ;
   40701         149 :   int *arg3 = (int *) 0 ;
   40702         149 :   void *argp1 = 0 ;
   40703         149 :   int res1 = 0 ;
   40704         149 :   double tmpval2 ;
   40705         149 :   int tmphasval2 ;
   40706         149 :   PyObject *swig_obj[1] ;
   40707             :   
   40708         149 :   {
   40709             :     /* %typemap(python,in,numinputs=0) (double *val, int *hasval) */
   40710         149 :     arg2 = &tmpval2;
   40711         149 :     arg3 = &tmphasval2;
   40712             :   }
   40713         149 :   if (!args) SWIG_fail;
   40714         149 :   swig_obj[0] = args;
   40715         149 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40716         149 :   if (!SWIG_IsOK(res1)) {
   40717           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetScale" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40718             :   }
   40719         149 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40720         149 :   {
   40721         149 :     const int bLocalUseExceptions = GetUseExceptions();
   40722         149 :     if ( bLocalUseExceptions ) {
   40723          97 :       pushErrorHandler();
   40724             :     }
   40725         149 :     {
   40726         149 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40727         149 :       GDALRasterBandShadow_GetScale(arg1,arg2,arg3);
   40728         149 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40729             :     }
   40730         149 :     if ( bLocalUseExceptions ) {
   40731          97 :       popErrorHandler();
   40732             :     }
   40733             : #ifndef SED_HACKS
   40734             :     if ( bLocalUseExceptions ) {
   40735             :       CPLErr eclass = CPLGetLastErrorType();
   40736             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40737             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40738             :       }
   40739             :     }
   40740             : #endif
   40741             :   }
   40742         149 :   resultobj = SWIG_Py_Void();
   40743         149 :   {
   40744             :     /* %typemap(python,argout) (double *val, int *hasval) */
   40745         149 :     PyObject *r;
   40746         149 :     if ( !*arg3 ) {
   40747          47 :       Py_INCREF(Py_None);
   40748          47 :       r = Py_None;
   40749             :     }
   40750             :     else {
   40751         102 :       r = PyFloat_FromDouble( *arg2 );
   40752             :     }
   40753             : #if SWIG_VERSION >= 0x040300
   40754             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   40755             : #else
   40756         149 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   40757             : #endif
   40758             :   }
   40759         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; } }
   40760             :   return resultobj;
   40761             : fail:
   40762             :   return NULL;
   40763             : }
   40764             : 
   40765             : 
   40766          75 : SWIGINTERN PyObject *_wrap_Band_SetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40767          75 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40768          75 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40769          75 :   double arg2 ;
   40770          75 :   void *argp1 = 0 ;
   40771          75 :   int res1 = 0 ;
   40772          75 :   double val2 ;
   40773          75 :   int ecode2 = 0 ;
   40774          75 :   PyObject *swig_obj[2] ;
   40775          75 :   CPLErr result;
   40776             :   
   40777          75 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetOffset", 2, 2, swig_obj)) SWIG_fail;
   40778          75 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40779          75 :   if (!SWIG_IsOK(res1)) {
   40780           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetOffset" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40781             :   }
   40782          75 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40783          75 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   40784          75 :   if (!SWIG_IsOK(ecode2)) {
   40785           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetOffset" "', argument " "2"" of type '" "double""'");
   40786             :   } 
   40787          75 :   arg2 = static_cast< double >(val2);
   40788          75 :   {
   40789          75 :     const int bLocalUseExceptions = GetUseExceptions();
   40790          75 :     if ( bLocalUseExceptions ) {
   40791          64 :       pushErrorHandler();
   40792             :     }
   40793          75 :     {
   40794          75 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40795          75 :       result = (CPLErr)GDALRasterBandShadow_SetOffset(arg1,arg2);
   40796          75 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40797             :     }
   40798          75 :     if ( bLocalUseExceptions ) {
   40799          64 :       popErrorHandler();
   40800             :     }
   40801             : #ifndef SED_HACKS
   40802             :     if ( bLocalUseExceptions ) {
   40803             :       CPLErr eclass = CPLGetLastErrorType();
   40804             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40805             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40806             :       }
   40807             :     }
   40808             : #endif
   40809             :   }
   40810          75 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40811          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; } }
   40812             :   return resultobj;
   40813             : fail:
   40814             :   return NULL;
   40815             : }
   40816             : 
   40817             : 
   40818          76 : SWIGINTERN PyObject *_wrap_Band_SetScale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40819          76 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40820          76 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40821          76 :   double arg2 ;
   40822          76 :   void *argp1 = 0 ;
   40823          76 :   int res1 = 0 ;
   40824          76 :   double val2 ;
   40825          76 :   int ecode2 = 0 ;
   40826          76 :   PyObject *swig_obj[2] ;
   40827          76 :   CPLErr result;
   40828             :   
   40829          76 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetScale", 2, 2, swig_obj)) SWIG_fail;
   40830          76 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40831          76 :   if (!SWIG_IsOK(res1)) {
   40832           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetScale" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40833             :   }
   40834          76 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40835          76 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   40836          76 :   if (!SWIG_IsOK(ecode2)) {
   40837           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetScale" "', argument " "2"" of type '" "double""'");
   40838             :   } 
   40839          76 :   arg2 = static_cast< double >(val2);
   40840          76 :   {
   40841          76 :     const int bLocalUseExceptions = GetUseExceptions();
   40842          76 :     if ( bLocalUseExceptions ) {
   40843          64 :       pushErrorHandler();
   40844             :     }
   40845          76 :     {
   40846          76 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40847          76 :       result = (CPLErr)GDALRasterBandShadow_SetScale(arg1,arg2);
   40848          76 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40849             :     }
   40850          76 :     if ( bLocalUseExceptions ) {
   40851          64 :       popErrorHandler();
   40852             :     }
   40853             : #ifndef SED_HACKS
   40854             :     if ( bLocalUseExceptions ) {
   40855             :       CPLErr eclass = CPLGetLastErrorType();
   40856             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40857             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40858             :       }
   40859             :     }
   40860             : #endif
   40861             :   }
   40862          76 :   resultobj = SWIG_From_int(static_cast< int >(result));
   40863          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; } }
   40864             :   return resultobj;
   40865             : fail:
   40866             :   return NULL;
   40867             : }
   40868             : 
   40869             : 
   40870         112 : SWIGINTERN PyObject *_wrap_Band_GetStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   40871         112 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40872         112 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40873         112 :   int arg2 ;
   40874         112 :   int arg3 ;
   40875         112 :   double *arg4 = (double *) 0 ;
   40876         112 :   double *arg5 = (double *) 0 ;
   40877         112 :   double *arg6 = (double *) 0 ;
   40878         112 :   double *arg7 = (double *) 0 ;
   40879         112 :   void *argp1 = 0 ;
   40880         112 :   int res1 = 0 ;
   40881         112 :   int val2 ;
   40882         112 :   int ecode2 = 0 ;
   40883         112 :   int val3 ;
   40884         112 :   int ecode3 = 0 ;
   40885         112 :   double temp4 ;
   40886         112 :   int res4 = SWIG_TMPOBJ ;
   40887         112 :   double temp5 ;
   40888         112 :   int res5 = SWIG_TMPOBJ ;
   40889         112 :   double temp6 ;
   40890         112 :   int res6 = SWIG_TMPOBJ ;
   40891         112 :   double temp7 ;
   40892         112 :   int res7 = SWIG_TMPOBJ ;
   40893         112 :   PyObject *swig_obj[3] ;
   40894         112 :   CPLErr result;
   40895             :   
   40896         112 :   arg4 = &temp4;
   40897         112 :   arg5 = &temp5;
   40898         112 :   arg6 = &temp6;
   40899         112 :   arg7 = &temp7;
   40900         112 :   if (!SWIG_Python_UnpackTuple(args, "Band_GetStatistics", 3, 3, swig_obj)) SWIG_fail;
   40901         112 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   40902         112 :   if (!SWIG_IsOK(res1)) {
   40903           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetStatistics" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   40904             :   }
   40905         112 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   40906         112 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   40907         112 :   if (!SWIG_IsOK(ecode2)) {
   40908           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetStatistics" "', argument " "2"" of type '" "int""'");
   40909             :   } 
   40910         112 :   arg2 = static_cast< int >(val2);
   40911         112 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   40912         112 :   if (!SWIG_IsOK(ecode3)) {
   40913           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetStatistics" "', argument " "3"" of type '" "int""'");
   40914             :   } 
   40915         112 :   arg3 = static_cast< int >(val3);
   40916         112 :   {
   40917         112 :     const int bLocalUseExceptions = GetUseExceptions();
   40918         112 :     if ( bLocalUseExceptions ) {
   40919          80 :       pushErrorHandler();
   40920             :     }
   40921         112 :     {
   40922         112 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   40923         112 :       result = (CPLErr)GDALRasterBandShadow_GetStatistics(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   40924         112 :       SWIG_PYTHON_THREAD_END_ALLOW;
   40925             :     }
   40926         112 :     if ( bLocalUseExceptions ) {
   40927          80 :       popErrorHandler();
   40928             :     }
   40929             : #ifndef SED_HACKS
   40930             :     if ( bLocalUseExceptions ) {
   40931             :       CPLErr eclass = CPLGetLastErrorType();
   40932             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   40933             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   40934             :       }
   40935             :     }
   40936             : #endif
   40937             :   }
   40938         112 :   {
   40939             :     /* %typemap(out) IF_ERROR_RETURN_NONE */
   40940             :   }
   40941         112 :   if (ReturnSame(SWIG_IsTmpObj(res4))) {
   40942         112 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
   40943             :   } else {
   40944           0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   40945           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
   40946             :   }
   40947         112 :   if (ReturnSame(SWIG_IsTmpObj(res5))) {
   40948         112 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
   40949             :   } else {
   40950           0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   40951           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
   40952             :   }
   40953         112 :   if (ReturnSame(SWIG_IsTmpObj(res6))) {
   40954         112 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
   40955             :   } else {
   40956           0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   40957           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
   40958             :   }
   40959         112 :   if (ReturnSame(SWIG_IsTmpObj(res7))) {
   40960         112 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7)));
   40961             :   } else {
   40962           0 :     int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   40963           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags));
   40964             :   }
   40965         112 :   {
   40966             :     /* %typemap(ret) IF_ERROR_RETURN_NONE */
   40967         112 :     if (result != CE_None ) {
   40968          29 :       Py_XDECREF( resultobj );
   40969          29 :       resultobj = Py_None;
   40970          29 :       Py_INCREF(resultobj);
   40971             :     }
   40972             :   }
   40973         116 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   40974             :   return resultobj;
   40975             : fail:
   40976             :   return NULL;
   40977             : }
   40978             : 
   40979             : 
   40980         157 : SWIGINTERN PyObject *_wrap_Band_ComputeStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   40981         157 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   40982         157 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   40983         157 :   bool arg2 ;
   40984         157 :   double *arg3 = (double *) 0 ;
   40985         157 :   double *arg4 = (double *) 0 ;
   40986         157 :   double *arg5 = (double *) 0 ;
   40987         157 :   double *arg6 = (double *) 0 ;
   40988         157 :   GDALProgressFunc arg7 = (GDALProgressFunc) NULL ;
   40989         157 :   void *arg8 = (void *) NULL ;
   40990         157 :   void *argp1 = 0 ;
   40991         157 :   int res1 = 0 ;
   40992         157 :   bool val2 ;
   40993         157 :   int ecode2 = 0 ;
   40994         157 :   double temp3 ;
   40995         157 :   int res3 = SWIG_TMPOBJ ;
   40996         157 :   double temp4 ;
   40997         157 :   int res4 = SWIG_TMPOBJ ;
   40998         157 :   double temp5 ;
   40999         157 :   int res5 = SWIG_TMPOBJ ;
   41000         157 :   double temp6 ;
   41001         157 :   int res6 = SWIG_TMPOBJ ;
   41002         157 :   PyObject * obj0 = 0 ;
   41003         157 :   PyObject * obj1 = 0 ;
   41004         157 :   PyObject * obj2 = 0 ;
   41005         157 :   PyObject * obj3 = 0 ;
   41006         157 :   char * kwnames[] = {
   41007             :     (char *)"self",  (char *)"approx_ok",  (char *)"callback",  (char *)"callback_data",  NULL 
   41008             :   };
   41009         157 :   CPLErr result;
   41010             :   
   41011             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   41012         157 :   PyProgressData *psProgressInfo;
   41013         157 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   41014         157 :   psProgressInfo->nLastReported = -1;
   41015         157 :   psProgressInfo->psPyCallback = NULL;
   41016         157 :   psProgressInfo->psPyCallbackData = NULL;
   41017         157 :   arg8 = psProgressInfo;
   41018         157 :   arg3 = &temp3;
   41019         157 :   arg4 = &temp4;
   41020         157 :   arg5 = &temp5;
   41021         157 :   arg6 = &temp6;
   41022         157 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OO:Band_ComputeStatistics", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
   41023         157 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41024         157 :   if (!SWIG_IsOK(res1)) {
   41025           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ComputeStatistics" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41026             :   }
   41027         157 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41028         157 :   ecode2 = SWIG_AsVal_bool(obj1, &val2);
   41029         157 :   if (!SWIG_IsOK(ecode2)) {
   41030           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_ComputeStatistics" "', argument " "2"" of type '" "bool""'");
   41031             :   } 
   41032         157 :   arg2 = static_cast< bool >(val2);
   41033         157 :   if (obj2) {
   41034           3 :     {
   41035             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   41036             :       /* callback_func typemap */
   41037             :       
   41038             :       /* In some cases 0 is passed instead of None. */
   41039             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   41040           3 :       if ( PyLong_Check(obj2) || PyInt_Check(obj2) )
   41041             :       {
   41042           0 :         if( PyLong_AsLong(obj2) == 0 )
   41043             :         {
   41044           0 :           obj2 = Py_None;
   41045             :         }
   41046             :       }
   41047             :       
   41048           3 :       if (obj2 && obj2 != Py_None ) {
   41049           3 :         void* cbfunction = NULL;
   41050           3 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj2,
   41051             :             (void**)&cbfunction,
   41052             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   41053             :             SWIG_POINTER_EXCEPTION | 0 ));
   41054             :         
   41055           3 :         if ( cbfunction == GDALTermProgress ) {
   41056             :           arg7 = GDALTermProgress;
   41057             :         } else {
   41058           3 :           if (!PyCallable_Check(obj2)) {
   41059           0 :             PyErr_SetString( PyExc_RuntimeError,
   41060             :               "Object given is not a Python function" );
   41061           0 :             SWIG_fail;
   41062             :           }
   41063           3 :           psProgressInfo->psPyCallback = obj2;
   41064           3 :           arg7 = PyProgressProxy;
   41065             :         }
   41066             :         
   41067             :       }
   41068             :       
   41069             :     }
   41070             :   }
   41071         157 :   if (obj3) {
   41072           3 :     {
   41073             :       /* %typemap(in) ( void* callback_data=NULL)  */
   41074           3 :       psProgressInfo->psPyCallbackData = obj3 ;
   41075             :     }
   41076             :   }
   41077         157 :   {
   41078         157 :     const int bLocalUseExceptions = GetUseExceptions();
   41079         157 :     if ( bLocalUseExceptions ) {
   41080          71 :       pushErrorHandler();
   41081             :     }
   41082         157 :     {
   41083         157 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41084         157 :       result = (CPLErr)GDALRasterBandShadow_ComputeStatistics(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
   41085         157 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41086             :     }
   41087         157 :     if ( bLocalUseExceptions ) {
   41088          71 :       popErrorHandler();
   41089             :     }
   41090             : #ifndef SED_HACKS
   41091             :     if ( bLocalUseExceptions ) {
   41092             :       CPLErr eclass = CPLGetLastErrorType();
   41093             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41094             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41095             :       }
   41096             :     }
   41097             : #endif
   41098             :   }
   41099         157 :   {
   41100             :     /* %typemap(out) IF_ERROR_RETURN_NONE */
   41101             :   }
   41102         157 :   if (ReturnSame(SWIG_IsTmpObj(res3))) {
   41103         157 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
   41104             :   } else {
   41105           0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   41106           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
   41107             :   }
   41108         157 :   if (ReturnSame(SWIG_IsTmpObj(res4))) {
   41109         157 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
   41110             :   } else {
   41111           0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   41112           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
   41113             :   }
   41114         157 :   if (ReturnSame(SWIG_IsTmpObj(res5))) {
   41115         157 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
   41116             :   } else {
   41117           0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   41118           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
   41119             :   }
   41120         157 :   if (ReturnSame(SWIG_IsTmpObj(res6))) {
   41121         157 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
   41122             :   } else {
   41123           0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   41124           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
   41125             :   }
   41126         157 :   {
   41127             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   41128             :     
   41129         157 :     CPLFree(psProgressInfo);
   41130             :     
   41131             :   }
   41132         157 :   {
   41133             :     /* %typemap(ret) IF_ERROR_RETURN_NONE */
   41134         157 :     if (result != CE_None ) {
   41135           1 :       Py_XDECREF( resultobj );
   41136           1 :       resultobj = Py_None;
   41137           1 :       Py_INCREF(resultobj);
   41138             :     }
   41139             :   }
   41140         157 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   41141             :   return resultobj;
   41142           0 : fail:
   41143           0 :   {
   41144             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   41145             :     
   41146           0 :     CPLFree(psProgressInfo);
   41147             :     
   41148             :   }
   41149             :   return NULL;
   41150             : }
   41151             : 
   41152             : 
   41153           2 : SWIGINTERN PyObject *_wrap_Band_SetStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41154           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41155           2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41156           2 :   double arg2 ;
   41157           2 :   double arg3 ;
   41158           2 :   double arg4 ;
   41159           2 :   double arg5 ;
   41160           2 :   void *argp1 = 0 ;
   41161           2 :   int res1 = 0 ;
   41162           2 :   double val2 ;
   41163           2 :   int ecode2 = 0 ;
   41164           2 :   double val3 ;
   41165           2 :   int ecode3 = 0 ;
   41166           2 :   double val4 ;
   41167           2 :   int ecode4 = 0 ;
   41168           2 :   double val5 ;
   41169           2 :   int ecode5 = 0 ;
   41170           2 :   PyObject *swig_obj[5] ;
   41171           2 :   CPLErr result;
   41172             :   
   41173           2 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetStatistics", 5, 5, swig_obj)) SWIG_fail;
   41174           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41175           2 :   if (!SWIG_IsOK(res1)) {
   41176           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetStatistics" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41177             :   }
   41178           2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41179           2 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   41180           2 :   if (!SWIG_IsOK(ecode2)) {
   41181           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetStatistics" "', argument " "2"" of type '" "double""'");
   41182             :   } 
   41183           2 :   arg2 = static_cast< double >(val2);
   41184           2 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   41185           2 :   if (!SWIG_IsOK(ecode3)) {
   41186           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_SetStatistics" "', argument " "3"" of type '" "double""'");
   41187             :   } 
   41188           2 :   arg3 = static_cast< double >(val3);
   41189           2 :   ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
   41190           2 :   if (!SWIG_IsOK(ecode4)) {
   41191           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_SetStatistics" "', argument " "4"" of type '" "double""'");
   41192             :   } 
   41193           2 :   arg4 = static_cast< double >(val4);
   41194           2 :   ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
   41195           2 :   if (!SWIG_IsOK(ecode5)) {
   41196           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_SetStatistics" "', argument " "5"" of type '" "double""'");
   41197             :   } 
   41198           2 :   arg5 = static_cast< double >(val5);
   41199           2 :   {
   41200           2 :     const int bLocalUseExceptions = GetUseExceptions();
   41201           2 :     if ( bLocalUseExceptions ) {
   41202           2 :       pushErrorHandler();
   41203             :     }
   41204           2 :     {
   41205           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41206           2 :       result = (CPLErr)GDALRasterBandShadow_SetStatistics(arg1,arg2,arg3,arg4,arg5);
   41207           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41208             :     }
   41209           2 :     if ( bLocalUseExceptions ) {
   41210           2 :       popErrorHandler();
   41211             :     }
   41212             : #ifndef SED_HACKS
   41213             :     if ( bLocalUseExceptions ) {
   41214             :       CPLErr eclass = CPLGetLastErrorType();
   41215             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41216             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41217             :       }
   41218             :     }
   41219             : #endif
   41220             :   }
   41221           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   41222           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; } }
   41223             :   return resultobj;
   41224             : fail:
   41225             :   return NULL;
   41226             : }
   41227             : 
   41228             : 
   41229         532 : SWIGINTERN PyObject *_wrap_Band_GetOverviewCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41230         532 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41231         532 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41232         532 :   void *argp1 = 0 ;
   41233         532 :   int res1 = 0 ;
   41234         532 :   PyObject *swig_obj[1] ;
   41235         532 :   int result;
   41236             :   
   41237         532 :   if (!args) SWIG_fail;
   41238         532 :   swig_obj[0] = args;
   41239         532 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41240         532 :   if (!SWIG_IsOK(res1)) {
   41241           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetOverviewCount" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41242             :   }
   41243         532 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41244         532 :   {
   41245         532 :     const int bLocalUseExceptions = GetUseExceptions();
   41246         532 :     if ( bLocalUseExceptions ) {
   41247         339 :       pushErrorHandler();
   41248             :     }
   41249         532 :     {
   41250         532 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41251         532 :       result = (int)GDALRasterBandShadow_GetOverviewCount(arg1);
   41252         532 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41253             :     }
   41254         532 :     if ( bLocalUseExceptions ) {
   41255         339 :       popErrorHandler();
   41256             :     }
   41257             : #ifndef SED_HACKS
   41258             :     if ( bLocalUseExceptions ) {
   41259             :       CPLErr eclass = CPLGetLastErrorType();
   41260             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41261             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41262             :       }
   41263             :     }
   41264             : #endif
   41265             :   }
   41266         532 :   resultobj = SWIG_From_int(static_cast< int >(result));
   41267         542 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   41268             :   return resultobj;
   41269             : fail:
   41270             :   return NULL;
   41271             : }
   41272             : 
   41273             : 
   41274        5608 : SWIGINTERN PyObject *_wrap_Band_GetOverview(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41275        5608 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41276        5608 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41277        5608 :   int arg2 ;
   41278        5608 :   void *argp1 = 0 ;
   41279        5608 :   int res1 = 0 ;
   41280        5608 :   int val2 ;
   41281        5608 :   int ecode2 = 0 ;
   41282        5608 :   PyObject *swig_obj[2] ;
   41283        5608 :   GDALRasterBandShadow *result = 0 ;
   41284             :   
   41285        5608 :   if (!SWIG_Python_UnpackTuple(args, "Band_GetOverview", 2, 2, swig_obj)) SWIG_fail;
   41286        5608 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41287        5608 :   if (!SWIG_IsOK(res1)) {
   41288           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetOverview" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41289             :   }
   41290        5608 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41291        5608 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   41292        5608 :   if (!SWIG_IsOK(ecode2)) {
   41293           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetOverview" "', argument " "2"" of type '" "int""'");
   41294             :   } 
   41295        5608 :   arg2 = static_cast< int >(val2);
   41296        5608 :   {
   41297        5608 :     const int bLocalUseExceptions = GetUseExceptions();
   41298        5608 :     if ( bLocalUseExceptions ) {
   41299        4588 :       pushErrorHandler();
   41300             :     }
   41301        5608 :     {
   41302        5608 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41303        5608 :       result = (GDALRasterBandShadow *)GDALRasterBandShadow_GetOverview(arg1,arg2);
   41304        5608 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41305             :     }
   41306        5608 :     if ( bLocalUseExceptions ) {
   41307        4588 :       popErrorHandler();
   41308             :     }
   41309             : #ifndef SED_HACKS
   41310             :     if ( bLocalUseExceptions ) {
   41311             :       CPLErr eclass = CPLGetLastErrorType();
   41312             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41313             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41314             :       }
   41315             :     }
   41316             : #endif
   41317             :   }
   41318        5608 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41319        5610 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   41320             :   return resultobj;
   41321             : fail:
   41322             :   return NULL;
   41323             : }
   41324             : 
   41325             : 
   41326        2000 : SWIGINTERN PyObject *_wrap_Band_GetSampleOverview(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41327        2000 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41328        2000 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41329        2000 :   GUIntBig arg2 ;
   41330        2000 :   void *argp1 = 0 ;
   41331        2000 :   int res1 = 0 ;
   41332        2000 :   PyObject *swig_obj[2] ;
   41333        2000 :   GDALRasterBandShadow *result = 0 ;
   41334             :   
   41335        2000 :   if (!SWIG_Python_UnpackTuple(args, "Band_GetSampleOverview", 2, 2, swig_obj)) SWIG_fail;
   41336        2000 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41337        2000 :   if (!SWIG_IsOK(res1)) {
   41338           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetSampleOverview" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41339             :   }
   41340        2000 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41341        2000 :   {
   41342        2000 :     arg2 = (GIntBig)PyLong_AsUnsignedLongLong(swig_obj[1]);
   41343             :   }
   41344        2000 :   {
   41345        2000 :     const int bLocalUseExceptions = GetUseExceptions();
   41346        2000 :     if ( bLocalUseExceptions ) {
   41347        2000 :       pushErrorHandler();
   41348             :     }
   41349        2000 :     {
   41350        2000 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41351        2000 :       result = (GDALRasterBandShadow *)GDALRasterBandShadow_GetSampleOverview(arg1,arg2);
   41352        2000 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41353             :     }
   41354        2000 :     if ( bLocalUseExceptions ) {
   41355        2000 :       popErrorHandler();
   41356             :     }
   41357             : #ifndef SED_HACKS
   41358             :     if ( bLocalUseExceptions ) {
   41359             :       CPLErr eclass = CPLGetLastErrorType();
   41360             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41361             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41362             :       }
   41363             :     }
   41364             : #endif
   41365             :   }
   41366        2000 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41367        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; } }
   41368             :   return resultobj;
   41369             : fail:
   41370             :   return NULL;
   41371             : }
   41372             : 
   41373             : 
   41374       38655 : SWIGINTERN PyObject *_wrap_Band_Checksum(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   41375       38655 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41376       38655 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41377       38655 :   int arg2 = (int) 0 ;
   41378       38655 :   int arg3 = (int) 0 ;
   41379       38655 :   int *arg4 = (int *) 0 ;
   41380       38655 :   int *arg5 = (int *) 0 ;
   41381       38655 :   void *argp1 = 0 ;
   41382       38655 :   int res1 = 0 ;
   41383       38655 :   int val2 ;
   41384       38655 :   int ecode2 = 0 ;
   41385       38655 :   int val3 ;
   41386       38655 :   int ecode3 = 0 ;
   41387       38655 :   int val4 ;
   41388       38655 :   int val5 ;
   41389       38655 :   PyObject * obj0 = 0 ;
   41390       38655 :   PyObject * obj1 = 0 ;
   41391       38655 :   PyObject * obj2 = 0 ;
   41392       38655 :   PyObject * obj3 = 0 ;
   41393       38655 :   PyObject * obj4 = 0 ;
   41394       38655 :   char * kwnames[] = {
   41395             :     (char *)"self",  (char *)"xoff",  (char *)"yoff",  (char *)"xsize",  (char *)"ysize",  NULL 
   41396             :   };
   41397       38655 :   int result;
   41398             :   
   41399       38655 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOO:Band_Checksum", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   41400       38655 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41401       38655 :   if (!SWIG_IsOK(res1)) {
   41402          12 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_Checksum" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41403             :   }
   41404       38649 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41405       38649 :   if (obj1) {
   41406         366 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   41407         366 :     if (!SWIG_IsOK(ecode2)) {
   41408           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_Checksum" "', argument " "2"" of type '" "int""'");
   41409             :     } 
   41410             :     arg2 = static_cast< int >(val2);
   41411             :   }
   41412       38649 :   if (obj2) {
   41413         366 :     ecode3 = SWIG_AsVal_int(obj2, &val3);
   41414         366 :     if (!SWIG_IsOK(ecode3)) {
   41415           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_Checksum" "', argument " "3"" of type '" "int""'");
   41416             :     } 
   41417             :     arg3 = static_cast< int >(val3);
   41418             :   }
   41419       38649 :   if (obj3) {
   41420         366 :     {
   41421             :       /* %typemap(in) (int *optional_##int) */
   41422         366 :       if ( obj3 == Py_None ) {
   41423             :         arg4 = 0;
   41424             :       }
   41425         366 :       else if ( PyArg_Parse( obj3,"i" ,&val4 ) ) {
   41426             :         arg4 = (int *) &val4;
   41427             :       }
   41428             :       else {
   41429           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   41430           0 :         SWIG_fail;
   41431             :       }
   41432             :     }
   41433             :   }
   41434       38649 :   if (obj4) {
   41435         366 :     {
   41436             :       /* %typemap(in) (int *optional_##int) */
   41437         366 :       if ( obj4 == Py_None ) {
   41438             :         arg5 = 0;
   41439             :       }
   41440         366 :       else if ( PyArg_Parse( obj4,"i" ,&val5 ) ) {
   41441             :         arg5 = (int *) &val5;
   41442             :       }
   41443             :       else {
   41444           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   41445           0 :         SWIG_fail;
   41446             :       }
   41447             :     }
   41448             :   }
   41449       38649 :   {
   41450       38649 :     const int bLocalUseExceptions = GetUseExceptions();
   41451       38649 :     if ( bLocalUseExceptions ) {
   41452       35053 :       pushErrorHandler();
   41453             :     }
   41454       38649 :     {
   41455       38649 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41456       38649 :       result = (int)GDALRasterBandShadow_Checksum(arg1,arg2,arg3,arg4,arg5);
   41457       38649 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41458             :     }
   41459       38649 :     if ( bLocalUseExceptions ) {
   41460       35053 :       popErrorHandler();
   41461             :     }
   41462             : #ifndef SED_HACKS
   41463             :     if ( bLocalUseExceptions ) {
   41464             :       CPLErr eclass = CPLGetLastErrorType();
   41465             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41466             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41467             :       }
   41468             :     }
   41469             : #endif
   41470             :   }
   41471       38649 :   resultobj = SWIG_From_int(static_cast< int >(result));
   41472       38773 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   41473             :   return resultobj;
   41474             : fail:
   41475             :   return NULL;
   41476             : }
   41477             : 
   41478             : 
   41479        1498 : SWIGINTERN PyObject *_wrap_Band_ComputeRasterMinMax(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   41480        1498 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41481        1498 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41482        1498 :   double *arg2 ;
   41483        1498 :   int *arg3 = (int *) 0 ;
   41484        1498 :   bool arg4 = (bool) false ;
   41485        1498 :   bool arg5 = (bool) false ;
   41486        1498 :   void *argp1 = 0 ;
   41487        1498 :   int res1 = 0 ;
   41488        1498 :   double argout2[2] ;
   41489        1498 :   int isvalid2 ;
   41490        1498 :   bool val4 ;
   41491        1498 :   int ecode4 = 0 ;
   41492        1498 :   bool val5 ;
   41493        1498 :   int ecode5 = 0 ;
   41494        1498 :   PyObject * obj0 = 0 ;
   41495        1498 :   PyObject * obj1 = 0 ;
   41496        1498 :   PyObject * obj2 = 0 ;
   41497        1498 :   char * kwnames[] = {
   41498             :     (char *)"self",  (char *)"approx_ok",  (char *)"can_return_none",  NULL 
   41499             :   };
   41500             :   
   41501        1498 :   {
   41502             :     /* %typemap(in,numinputs=0) (double argout2[2], int* isvalid2) */
   41503        1498 :     arg2 = argout2;
   41504        1498 :     arg3 = &isvalid2;
   41505             :   }
   41506        1498 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OO:Band_ComputeRasterMinMax", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   41507        1498 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41508        1498 :   if (!SWIG_IsOK(res1)) {
   41509           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ComputeRasterMinMax" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41510             :   }
   41511        1498 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41512        1498 :   if (obj1) {
   41513         201 :     ecode4 = SWIG_AsVal_bool(obj1, &val4);
   41514         201 :     if (!SWIG_IsOK(ecode4)) {
   41515           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_ComputeRasterMinMax" "', argument " "4"" of type '" "bool""'");
   41516             :     } 
   41517             :     arg4 = static_cast< bool >(val4);
   41518             :   }
   41519        1498 :   if (obj2) {
   41520          13 :     ecode5 = SWIG_AsVal_bool(obj2, &val5);
   41521          13 :     if (!SWIG_IsOK(ecode5)) {
   41522           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_ComputeRasterMinMax" "', argument " "5"" of type '" "bool""'");
   41523             :     } 
   41524             :     arg5 = static_cast< bool >(val5);
   41525             :   }
   41526        1498 :   {
   41527        1498 :     const int bLocalUseExceptions = GetUseExceptions();
   41528        1498 :     if ( bLocalUseExceptions ) {
   41529         989 :       pushErrorHandler();
   41530             :     }
   41531        1498 :     {
   41532        1498 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41533        1498 :       GDALRasterBandShadow_ComputeRasterMinMax(arg1,arg2,arg3,arg4,arg5);
   41534        1498 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41535             :     }
   41536        1498 :     if ( bLocalUseExceptions ) {
   41537         989 :       popErrorHandler();
   41538             :     }
   41539             : #ifndef SED_HACKS
   41540             :     if ( bLocalUseExceptions ) {
   41541             :       CPLErr eclass = CPLGetLastErrorType();
   41542             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41543             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41544             :       }
   41545             :     }
   41546             : #endif
   41547             :   }
   41548        1498 :   resultobj = SWIG_Py_Void();
   41549        1498 :   {
   41550             :     /* %typemap(argout) (double argout[2], int* isvalid)  */
   41551        1498 :     PyObject *r;
   41552        1498 :     if ( !*arg3 ) {
   41553           6 :       Py_INCREF(Py_None);
   41554           6 :       r = Py_None;
   41555             :     }
   41556             :     else {
   41557        1492 :       r = CreateTupleFromDoubleArray(arg2, 2);
   41558             :     }
   41559             : #if 0x040001 >= 0x040300
   41560             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   41561             : #else
   41562        1498 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   41563             : #endif
   41564             :   }
   41565        1512 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   41566             :   return resultobj;
   41567             : fail:
   41568             :   return NULL;
   41569             : }
   41570             : 
   41571             : 
   41572          18 : SWIGINTERN PyObject *_wrap_Band_ComputeBandStats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41573          18 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41574          18 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41575          18 :   double *arg2 ;
   41576          18 :   int arg3 = (int) 1 ;
   41577          18 :   void *argp1 = 0 ;
   41578          18 :   int res1 = 0 ;
   41579          18 :   double argout2[2] ;
   41580          18 :   int val3 ;
   41581          18 :   int ecode3 = 0 ;
   41582          18 :   PyObject *swig_obj[2] ;
   41583             :   
   41584          18 :   {
   41585             :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   41586          18 :     memset(argout2, 0, sizeof(argout2));
   41587          18 :     arg2 = argout2;
   41588             :   }
   41589          18 :   if (!SWIG_Python_UnpackTuple(args, "Band_ComputeBandStats", 1, 2, swig_obj)) SWIG_fail;
   41590          18 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41591          18 :   if (!SWIG_IsOK(res1)) {
   41592           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ComputeBandStats" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41593             :   }
   41594          18 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41595          18 :   if (swig_obj[1]) {
   41596           0 :     ecode3 = SWIG_AsVal_int(swig_obj[1], &val3);
   41597           0 :     if (!SWIG_IsOK(ecode3)) {
   41598           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_ComputeBandStats" "', argument " "3"" of type '" "int""'");
   41599             :     } 
   41600             :     arg3 = static_cast< int >(val3);
   41601             :   }
   41602          18 :   {
   41603          18 :     const int bLocalUseExceptions = GetUseExceptions();
   41604          18 :     if ( bLocalUseExceptions ) {
   41605          11 :       pushErrorHandler();
   41606             :     }
   41607          18 :     {
   41608          18 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41609          18 :       GDALRasterBandShadow_ComputeBandStats(arg1,arg2,arg3);
   41610          18 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41611             :     }
   41612          18 :     if ( bLocalUseExceptions ) {
   41613          11 :       popErrorHandler();
   41614             :     }
   41615             : #ifndef SED_HACKS
   41616             :     if ( bLocalUseExceptions ) {
   41617             :       CPLErr eclass = CPLGetLastErrorType();
   41618             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41619             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41620             :       }
   41621             :     }
   41622             : #endif
   41623             :   }
   41624          18 :   resultobj = SWIG_Py_Void();
   41625          18 :   {
   41626             :     /* %typemap(argout) (double argout[ANY]) */
   41627          18 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 2 );
   41628             : #if SWIG_VERSION >= 0x040300
   41629             :     resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
   41630             : #else
   41631          18 :     resultobj = SWIG_Python_AppendOutput(resultobj,out);
   41632             : #endif
   41633             :   }
   41634          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; } }
   41635             :   return resultobj;
   41636             : fail:
   41637             :   return NULL;
   41638             : }
   41639             : 
   41640             : 
   41641      268555 : SWIGINTERN PyObject *_wrap_Band_Fill(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41642      268555 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41643      268555 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41644      268555 :   double arg2 ;
   41645      268555 :   double arg3 = (double) 0.0 ;
   41646      268555 :   void *argp1 = 0 ;
   41647      268555 :   int res1 = 0 ;
   41648      268555 :   double val2 ;
   41649      268555 :   int ecode2 = 0 ;
   41650      268555 :   double val3 ;
   41651      268555 :   int ecode3 = 0 ;
   41652      268555 :   PyObject *swig_obj[3] ;
   41653      268555 :   CPLErr result;
   41654             :   
   41655      268555 :   if (!SWIG_Python_UnpackTuple(args, "Band_Fill", 2, 3, swig_obj)) SWIG_fail;
   41656      268555 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41657      268555 :   if (!SWIG_IsOK(res1)) {
   41658           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_Fill" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41659             :   }
   41660      268555 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41661      268555 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   41662      268555 :   if (!SWIG_IsOK(ecode2)) {
   41663           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_Fill" "', argument " "2"" of type '" "double""'");
   41664             :   } 
   41665      268555 :   arg2 = static_cast< double >(val2);
   41666      268555 :   if (swig_obj[2]) {
   41667         266 :     ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   41668         266 :     if (!SWIG_IsOK(ecode3)) {
   41669           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_Fill" "', argument " "3"" of type '" "double""'");
   41670             :     } 
   41671         266 :     arg3 = static_cast< double >(val3);
   41672             :   }
   41673      268555 :   {
   41674      268555 :     const int bLocalUseExceptions = GetUseExceptions();
   41675      268555 :     if ( bLocalUseExceptions ) {
   41676      168672 :       pushErrorHandler();
   41677             :     }
   41678      268555 :     {
   41679      268555 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41680      268555 :       result = (CPLErr)GDALRasterBandShadow_Fill(arg1,arg2,arg3);
   41681      268555 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41682             :     }
   41683      268555 :     if ( bLocalUseExceptions ) {
   41684      168672 :       popErrorHandler();
   41685             :     }
   41686             : #ifndef SED_HACKS
   41687             :     if ( bLocalUseExceptions ) {
   41688             :       CPLErr eclass = CPLGetLastErrorType();
   41689             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41690             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41691             :       }
   41692             :     }
   41693             : #endif
   41694             :   }
   41695      268555 :   resultobj = SWIG_From_int(static_cast< int >(result));
   41696      268565 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   41697             :   return resultobj;
   41698             : fail:
   41699             :   return NULL;
   41700             : }
   41701             : 
   41702             : 
   41703        8847 : SWIGINTERN PyObject *_wrap_Band_WriteRaster(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   41704        8847 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41705        8847 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41706        8847 :   int arg2 ;
   41707        8847 :   int arg3 ;
   41708        8847 :   int arg4 ;
   41709        8847 :   int arg5 ;
   41710        8847 :   GIntBig arg6 ;
   41711        8847 :   char *arg7 = (char *) 0 ;
   41712        8847 :   int *arg8 = (int *) 0 ;
   41713        8847 :   int *arg9 = (int *) 0 ;
   41714        8847 :   GDALDataType *arg10 = (GDALDataType *) 0 ;
   41715        8847 :   GIntBig *arg11 = (GIntBig *) 0 ;
   41716        8847 :   GIntBig *arg12 = (GIntBig *) 0 ;
   41717        8847 :   void *argp1 = 0 ;
   41718        8847 :   int res1 = 0 ;
   41719        8847 :   int val2 ;
   41720        8847 :   int ecode2 = 0 ;
   41721        8847 :   int val3 ;
   41722        8847 :   int ecode3 = 0 ;
   41723        8847 :   int val4 ;
   41724        8847 :   int ecode4 = 0 ;
   41725        8847 :   int val5 ;
   41726        8847 :   int ecode5 = 0 ;
   41727        8847 :   int alloc6 = 0 ;
   41728        8847 :   bool viewIsValid6 = false ;
   41729        8847 :   Py_buffer view6 ;
   41730        8847 :   int val8 ;
   41731        8847 :   int val9 ;
   41732        8847 :   GDALDataType val10 ;
   41733        8847 :   GIntBig val11 ;
   41734        8847 :   GIntBig val12 ;
   41735        8847 :   PyObject * obj0 = 0 ;
   41736        8847 :   PyObject * obj1 = 0 ;
   41737        8847 :   PyObject * obj2 = 0 ;
   41738        8847 :   PyObject * obj3 = 0 ;
   41739        8847 :   PyObject * obj4 = 0 ;
   41740        8847 :   PyObject * obj5 = 0 ;
   41741        8847 :   PyObject * obj6 = 0 ;
   41742        8847 :   PyObject * obj7 = 0 ;
   41743        8847 :   PyObject * obj8 = 0 ;
   41744        8847 :   PyObject * obj9 = 0 ;
   41745        8847 :   PyObject * obj10 = 0 ;
   41746        8847 :   char * kwnames[] = {
   41747             :     (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 
   41748             :   };
   41749        8847 :   CPLErr result;
   41750             :   
   41751        8847 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO|OOOOO:Band_WriteRaster", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10)) SWIG_fail;
   41752        8847 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41753        8847 :   if (!SWIG_IsOK(res1)) {
   41754           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_WriteRaster" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41755             :   }
   41756        8847 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41757        8847 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   41758        8847 :   if (!SWIG_IsOK(ecode2)) {
   41759           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_WriteRaster" "', argument " "2"" of type '" "int""'");
   41760             :   } 
   41761        8847 :   arg2 = static_cast< int >(val2);
   41762        8847 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   41763        8847 :   if (!SWIG_IsOK(ecode3)) {
   41764           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_WriteRaster" "', argument " "3"" of type '" "int""'");
   41765             :   } 
   41766        8847 :   arg3 = static_cast< int >(val3);
   41767        8847 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   41768        8847 :   if (!SWIG_IsOK(ecode4)) {
   41769           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_WriteRaster" "', argument " "4"" of type '" "int""'");
   41770             :   } 
   41771        8847 :   arg4 = static_cast< int >(val4);
   41772        8847 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   41773        8847 :   if (!SWIG_IsOK(ecode5)) {
   41774           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_WriteRaster" "', argument " "5"" of type '" "int""'");
   41775             :   } 
   41776        8847 :   arg5 = static_cast< int >(val5);
   41777        8847 :   {
   41778             :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   41779        8847 :     char* ptr = NULL;
   41780        8847 :     if( !GetBufferAsCharPtrGIntBigSize(obj5, &arg6, &ptr, &alloc6, &viewIsValid6, &view6) ) {
   41781           1 :       SWIG_fail;
   41782             :     }
   41783        8846 :     arg7 = (char *)ptr;
   41784             :   }
   41785        8846 :   if (obj6) {
   41786        8846 :     {
   41787             :       /* %typemap(in) (int *optional_##int) */
   41788        8846 :       if ( obj6 == Py_None ) {
   41789             :         arg8 = 0;
   41790             :       }
   41791        8846 :       else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
   41792             :         arg8 = (int *) &val8;
   41793             :       }
   41794             :       else {
   41795           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   41796           0 :         SWIG_fail;
   41797             :       }
   41798             :     }
   41799             :   }
   41800        8846 :   if (obj7) {
   41801        8846 :     {
   41802             :       /* %typemap(in) (int *optional_##int) */
   41803        8846 :       if ( obj7 == Py_None ) {
   41804             :         arg9 = 0;
   41805             :       }
   41806        8846 :       else if ( PyArg_Parse( obj7,"i" ,&val9 ) ) {
   41807             :         arg9 = (int *) &val9;
   41808             :       }
   41809             :       else {
   41810           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   41811           0 :         SWIG_fail;
   41812             :       }
   41813             :     }
   41814             :   }
   41815        8846 :   if (obj8) {
   41816        8846 :     {
   41817             :       /* %typemap(in) (GDALDataType *optional_GDALDataType) */
   41818        8846 :       int intval = 0;
   41819        8846 :       if ( obj8 == Py_None ) {
   41820             :         arg10 = NULL;
   41821             :       }
   41822       17692 :       else if ( SWIG_IsOK(SWIG_AsVal_int(obj8, &intval)) ) {
   41823        8846 :         if( intval < GDT_Unknown || intval >= GDT_TypeCount )
   41824             :         {
   41825           0 :           SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   41826             :         }
   41827        8846 :         val10 = static_cast<GDALDataType>(intval);
   41828        8846 :         arg10 = &val10;
   41829             :       }
   41830             :       else {
   41831           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   41832           0 :         SWIG_fail;
   41833             :       }
   41834             :     }
   41835             :   }
   41836        8846 :   if (obj9) {
   41837        8846 :     {
   41838             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   41839        8846 :       if ( obj9 == Py_None ) {
   41840             :         arg11 = 0;
   41841             :       }
   41842          16 :       else if ( PyArg_Parse( obj9,"L" ,&val11 ) ) {
   41843             :         arg11 = (GIntBig *) &val11;
   41844             :       }
   41845             :       else {
   41846           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   41847           0 :         SWIG_fail;
   41848             :       }
   41849             :     }
   41850             :   }
   41851        8846 :   if (obj10) {
   41852        8846 :     {
   41853             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   41854        8846 :       if ( obj10 == Py_None ) {
   41855             :         arg12 = 0;
   41856             :       }
   41857          12 :       else if ( PyArg_Parse( obj10,"L" ,&val12 ) ) {
   41858             :         arg12 = (GIntBig *) &val12;
   41859             :       }
   41860             :       else {
   41861           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   41862           0 :         SWIG_fail;
   41863             :       }
   41864             :     }
   41865             :   }
   41866        8846 :   {
   41867        8846 :     const int bLocalUseExceptions = GetUseExceptions();
   41868        8846 :     if ( bLocalUseExceptions ) {
   41869        8098 :       pushErrorHandler();
   41870             :     }
   41871        8846 :     {
   41872        8846 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41873        8846 :       result = (CPLErr)GDALRasterBandShadow_WriteRaster(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
   41874        8846 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41875             :     }
   41876        8846 :     if ( bLocalUseExceptions ) {
   41877        8098 :       popErrorHandler();
   41878             :     }
   41879             : #ifndef SED_HACKS
   41880             :     if ( bLocalUseExceptions ) {
   41881             :       CPLErr eclass = CPLGetLastErrorType();
   41882             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41883             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41884             :       }
   41885             :     }
   41886             : #endif
   41887             :   }
   41888        8846 :   resultobj = SWIG_From_int(static_cast< int >(result));
   41889        8846 :   {
   41890             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   41891        8846 :     if( viewIsValid6 ) {
   41892        2784 :       PyBuffer_Release(&view6);
   41893             :     }
   41894        6062 :     else if (ReturnSame(alloc6) == SWIG_NEWOBJ ) {
   41895        6062 :       delete[] arg7;
   41896             :     }
   41897             :   }
   41898        8854 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   41899             :   return resultobj;
   41900           1 : fail:
   41901           1 :   {
   41902             :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   41903           1 :     if( viewIsValid6 ) {
   41904           0 :       PyBuffer_Release(&view6);
   41905             :     }
   41906        8847 :     else if (ReturnSame(alloc6) == SWIG_NEWOBJ ) {
   41907           0 :       delete[] arg7;
   41908             :     }
   41909             :   }
   41910             :   return NULL;
   41911             : }
   41912             : 
   41913             : 
   41914         391 : SWIGINTERN PyObject *_wrap_Band_FlushCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41915         391 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41916         391 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41917         391 :   void *argp1 = 0 ;
   41918         391 :   int res1 = 0 ;
   41919         391 :   PyObject *swig_obj[1] ;
   41920             :   
   41921         391 :   if (!args) SWIG_fail;
   41922         391 :   swig_obj[0] = args;
   41923         391 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41924         391 :   if (!SWIG_IsOK(res1)) {
   41925           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_FlushCache" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41926             :   }
   41927         391 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41928         391 :   {
   41929         391 :     const int bLocalUseExceptions = GetUseExceptions();
   41930         391 :     if ( bLocalUseExceptions ) {
   41931           5 :       pushErrorHandler();
   41932             :     }
   41933         391 :     {
   41934         391 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41935         391 :       GDALRasterBandShadow_FlushCache(arg1);
   41936         391 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41937             :     }
   41938         391 :     if ( bLocalUseExceptions ) {
   41939           5 :       popErrorHandler();
   41940             :     }
   41941             : #ifndef SED_HACKS
   41942             :     if ( bLocalUseExceptions ) {
   41943             :       CPLErr eclass = CPLGetLastErrorType();
   41944             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41945             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41946             :       }
   41947             :     }
   41948             : #endif
   41949             :   }
   41950         391 :   resultobj = SWIG_Py_Void();
   41951         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; } }
   41952             :   return resultobj;
   41953             : fail:
   41954             :   return NULL;
   41955             : }
   41956             : 
   41957             : 
   41958         130 : SWIGINTERN PyObject *_wrap_Band_GetRasterColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   41959         130 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   41960         130 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   41961         130 :   void *argp1 = 0 ;
   41962         130 :   int res1 = 0 ;
   41963         130 :   PyObject *swig_obj[1] ;
   41964         130 :   GDALColorTableShadow *result = 0 ;
   41965             :   
   41966         130 :   if (!args) SWIG_fail;
   41967         130 :   swig_obj[0] = args;
   41968         130 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   41969         130 :   if (!SWIG_IsOK(res1)) {
   41970           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetRasterColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   41971             :   }
   41972         130 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   41973         130 :   {
   41974         130 :     const int bLocalUseExceptions = GetUseExceptions();
   41975         130 :     if ( bLocalUseExceptions ) {
   41976          91 :       pushErrorHandler();
   41977             :     }
   41978         130 :     {
   41979         130 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   41980         130 :       result = (GDALColorTableShadow *)GDALRasterBandShadow_GetRasterColorTable(arg1);
   41981         130 :       SWIG_PYTHON_THREAD_END_ALLOW;
   41982             :     }
   41983         130 :     if ( bLocalUseExceptions ) {
   41984          91 :       popErrorHandler();
   41985             :     }
   41986             : #ifndef SED_HACKS
   41987             :     if ( bLocalUseExceptions ) {
   41988             :       CPLErr eclass = CPLGetLastErrorType();
   41989             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   41990             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   41991             :       }
   41992             :     }
   41993             : #endif
   41994             :   }
   41995         130 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   41996         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; } }
   41997             :   return resultobj;
   41998             : fail:
   41999             :   return NULL;
   42000             : }
   42001             : 
   42002             : 
   42003          80 : SWIGINTERN PyObject *_wrap_Band_GetColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42004          80 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42005          80 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42006          80 :   void *argp1 = 0 ;
   42007          80 :   int res1 = 0 ;
   42008          80 :   PyObject *swig_obj[1] ;
   42009          80 :   GDALColorTableShadow *result = 0 ;
   42010             :   
   42011          80 :   if (!args) SWIG_fail;
   42012          80 :   swig_obj[0] = args;
   42013          80 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42014          80 :   if (!SWIG_IsOK(res1)) {
   42015           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42016             :   }
   42017          80 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42018          80 :   {
   42019          80 :     const int bLocalUseExceptions = GetUseExceptions();
   42020          80 :     if ( bLocalUseExceptions ) {
   42021          56 :       pushErrorHandler();
   42022             :     }
   42023          80 :     {
   42024          80 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42025          80 :       result = (GDALColorTableShadow *)GDALRasterBandShadow_GetColorTable(arg1);
   42026          80 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42027             :     }
   42028          80 :     if ( bLocalUseExceptions ) {
   42029          56 :       popErrorHandler();
   42030             :     }
   42031             : #ifndef SED_HACKS
   42032             :     if ( bLocalUseExceptions ) {
   42033             :       CPLErr eclass = CPLGetLastErrorType();
   42034             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42035             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42036             :       }
   42037             :     }
   42038             : #endif
   42039             :   }
   42040          80 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   42041          80 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   42042             :   return resultobj;
   42043             : fail:
   42044             :   return NULL;
   42045             : }
   42046             : 
   42047             : 
   42048          46 : SWIGINTERN PyObject *_wrap_Band_SetRasterColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42049          46 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42050          46 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42051          46 :   GDALColorTableShadow *arg2 = (GDALColorTableShadow *) 0 ;
   42052          46 :   void *argp1 = 0 ;
   42053          46 :   int res1 = 0 ;
   42054          46 :   void *argp2 = 0 ;
   42055          46 :   int res2 = 0 ;
   42056          46 :   PyObject *swig_obj[2] ;
   42057          46 :   int result;
   42058             :   
   42059          46 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetRasterColorTable", 2, 2, swig_obj)) SWIG_fail;
   42060          46 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42061          46 :   if (!SWIG_IsOK(res1)) {
   42062           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetRasterColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42063             :   }
   42064          46 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42065          46 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   42066          46 :   if (!SWIG_IsOK(res2)) {
   42067           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetRasterColorTable" "', argument " "2"" of type '" "GDALColorTableShadow *""'"); 
   42068             :   }
   42069          46 :   arg2 = reinterpret_cast< GDALColorTableShadow * >(argp2);
   42070          46 :   {
   42071          46 :     const int bLocalUseExceptions = GetUseExceptions();
   42072          46 :     if ( bLocalUseExceptions ) {
   42073          24 :       pushErrorHandler();
   42074             :     }
   42075          46 :     {
   42076          46 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42077          46 :       result = (int)GDALRasterBandShadow_SetRasterColorTable(arg1,arg2);
   42078          46 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42079             :     }
   42080          46 :     if ( bLocalUseExceptions ) {
   42081          24 :       popErrorHandler();
   42082             :     }
   42083             : #ifndef SED_HACKS
   42084             :     if ( bLocalUseExceptions ) {
   42085             :       CPLErr eclass = CPLGetLastErrorType();
   42086             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42087             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42088             :       }
   42089             :     }
   42090             : #endif
   42091             :   }
   42092          46 :   resultobj = SWIG_From_int(static_cast< int >(result));
   42093          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; } }
   42094             :   return resultobj;
   42095             : fail:
   42096             :   return NULL;
   42097             : }
   42098             : 
   42099             : 
   42100          30 : SWIGINTERN PyObject *_wrap_Band_SetColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42101          30 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42102          30 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42103          30 :   GDALColorTableShadow *arg2 = (GDALColorTableShadow *) 0 ;
   42104          30 :   void *argp1 = 0 ;
   42105          30 :   int res1 = 0 ;
   42106          30 :   void *argp2 = 0 ;
   42107          30 :   int res2 = 0 ;
   42108          30 :   PyObject *swig_obj[2] ;
   42109          30 :   int result;
   42110             :   
   42111          30 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetColorTable", 2, 2, swig_obj)) SWIG_fail;
   42112          30 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42113          30 :   if (!SWIG_IsOK(res1)) {
   42114           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42115             :   }
   42116          30 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42117          30 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   42118          30 :   if (!SWIG_IsOK(res2)) {
   42119           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetColorTable" "', argument " "2"" of type '" "GDALColorTableShadow *""'"); 
   42120             :   }
   42121          30 :   arg2 = reinterpret_cast< GDALColorTableShadow * >(argp2);
   42122          30 :   {
   42123          30 :     const int bLocalUseExceptions = GetUseExceptions();
   42124          30 :     if ( bLocalUseExceptions ) {
   42125          14 :       pushErrorHandler();
   42126             :     }
   42127          30 :     {
   42128          30 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42129          30 :       result = (int)GDALRasterBandShadow_SetColorTable(arg1,arg2);
   42130          30 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42131             :     }
   42132          30 :     if ( bLocalUseExceptions ) {
   42133          14 :       popErrorHandler();
   42134             :     }
   42135             : #ifndef SED_HACKS
   42136             :     if ( bLocalUseExceptions ) {
   42137             :       CPLErr eclass = CPLGetLastErrorType();
   42138             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42139             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42140             :       }
   42141             :     }
   42142             : #endif
   42143             :   }
   42144          30 :   resultobj = SWIG_From_int(static_cast< int >(result));
   42145          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; } }
   42146             :   return resultobj;
   42147             : fail:
   42148             :   return NULL;
   42149             : }
   42150             : 
   42151             : 
   42152          58 : SWIGINTERN PyObject *_wrap_Band_GetDefaultRAT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42153          58 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42154          58 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42155          58 :   void *argp1 = 0 ;
   42156          58 :   int res1 = 0 ;
   42157          58 :   PyObject *swig_obj[1] ;
   42158          58 :   GDALRasterAttributeTableShadow *result = 0 ;
   42159             :   
   42160          58 :   if (!args) SWIG_fail;
   42161          58 :   swig_obj[0] = args;
   42162          58 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42163          58 :   if (!SWIG_IsOK(res1)) {
   42164           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetDefaultRAT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42165             :   }
   42166          58 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42167          58 :   {
   42168          58 :     const int bLocalUseExceptions = GetUseExceptions();
   42169          58 :     if ( bLocalUseExceptions ) {
   42170          57 :       pushErrorHandler();
   42171             :     }
   42172          58 :     {
   42173          58 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42174          58 :       result = (GDALRasterAttributeTableShadow *)GDALRasterBandShadow_GetDefaultRAT(arg1);
   42175          58 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42176             :     }
   42177          58 :     if ( bLocalUseExceptions ) {
   42178          57 :       popErrorHandler();
   42179             :     }
   42180             : #ifndef SED_HACKS
   42181             :     if ( bLocalUseExceptions ) {
   42182             :       CPLErr eclass = CPLGetLastErrorType();
   42183             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42184             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42185             :       }
   42186             :     }
   42187             : #endif
   42188             :   }
   42189          58 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   42190          62 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   42191             :   return resultobj;
   42192             : fail:
   42193             :   return NULL;
   42194             : }
   42195             : 
   42196             : 
   42197          18 : SWIGINTERN PyObject *_wrap_Band_SetDefaultRAT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42198          18 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42199          18 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42200          18 :   GDALRasterAttributeTableShadow *arg2 = (GDALRasterAttributeTableShadow *) 0 ;
   42201          18 :   void *argp1 = 0 ;
   42202          18 :   int res1 = 0 ;
   42203          18 :   void *argp2 = 0 ;
   42204          18 :   int res2 = 0 ;
   42205          18 :   PyObject *swig_obj[2] ;
   42206          18 :   int result;
   42207             :   
   42208          18 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetDefaultRAT", 2, 2, swig_obj)) SWIG_fail;
   42209          18 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42210          18 :   if (!SWIG_IsOK(res1)) {
   42211           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetDefaultRAT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42212             :   }
   42213          18 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42214          18 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   42215          18 :   if (!SWIG_IsOK(res2)) {
   42216           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetDefaultRAT" "', argument " "2"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   42217             :   }
   42218          18 :   arg2 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp2);
   42219          18 :   {
   42220          18 :     const int bLocalUseExceptions = GetUseExceptions();
   42221          18 :     if ( bLocalUseExceptions ) {
   42222          18 :       pushErrorHandler();
   42223             :     }
   42224          18 :     {
   42225          18 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42226          18 :       result = (int)GDALRasterBandShadow_SetDefaultRAT(arg1,arg2);
   42227          18 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42228             :     }
   42229          18 :     if ( bLocalUseExceptions ) {
   42230          18 :       popErrorHandler();
   42231             :     }
   42232             : #ifndef SED_HACKS
   42233             :     if ( bLocalUseExceptions ) {
   42234             :       CPLErr eclass = CPLGetLastErrorType();
   42235             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42236             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42237             :       }
   42238             :     }
   42239             : #endif
   42240             :   }
   42241          18 :   resultobj = SWIG_From_int(static_cast< int >(result));
   42242          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; } }
   42243             :   return resultobj;
   42244             : fail:
   42245             :   return NULL;
   42246             : }
   42247             : 
   42248             : 
   42249       10825 : SWIGINTERN PyObject *_wrap_Band_GetMaskBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42250       10825 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42251       10825 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42252       10825 :   void *argp1 = 0 ;
   42253       10825 :   int res1 = 0 ;
   42254       10825 :   PyObject *swig_obj[1] ;
   42255       10825 :   GDALRasterBandShadow *result = 0 ;
   42256             :   
   42257       10825 :   if (!args) SWIG_fail;
   42258       10825 :   swig_obj[0] = args;
   42259       10825 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42260       10825 :   if (!SWIG_IsOK(res1)) {
   42261           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMaskBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42262             :   }
   42263       10825 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42264       10825 :   {
   42265       10825 :     const int bLocalUseExceptions = GetUseExceptions();
   42266       10825 :     if ( bLocalUseExceptions ) {
   42267       10459 :       pushErrorHandler();
   42268             :     }
   42269       10825 :     {
   42270       10825 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42271       10825 :       result = (GDALRasterBandShadow *)GDALRasterBandShadow_GetMaskBand(arg1);
   42272       10825 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42273             :     }
   42274       10825 :     if ( bLocalUseExceptions ) {
   42275       10459 :       popErrorHandler();
   42276             :     }
   42277             : #ifndef SED_HACKS
   42278             :     if ( bLocalUseExceptions ) {
   42279             :       CPLErr eclass = CPLGetLastErrorType();
   42280             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42281             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42282             :       }
   42283             :     }
   42284             : #endif
   42285             :   }
   42286       10825 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42287       10825 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   42288             :   return resultobj;
   42289             : fail:
   42290             :   return NULL;
   42291             : }
   42292             : 
   42293             : 
   42294         459 : SWIGINTERN PyObject *_wrap_Band_GetMaskFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42295         459 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42296         459 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42297         459 :   void *argp1 = 0 ;
   42298         459 :   int res1 = 0 ;
   42299         459 :   PyObject *swig_obj[1] ;
   42300         459 :   int result;
   42301             :   
   42302         459 :   if (!args) SWIG_fail;
   42303         459 :   swig_obj[0] = args;
   42304         459 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42305         459 :   if (!SWIG_IsOK(res1)) {
   42306           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMaskFlags" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42307             :   }
   42308         459 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42309         459 :   {
   42310         459 :     const int bLocalUseExceptions = GetUseExceptions();
   42311         459 :     if ( bLocalUseExceptions ) {
   42312         293 :       pushErrorHandler();
   42313             :     }
   42314         459 :     {
   42315         459 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42316         459 :       result = (int)GDALRasterBandShadow_GetMaskFlags(arg1);
   42317         459 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42318             :     }
   42319         459 :     if ( bLocalUseExceptions ) {
   42320         293 :       popErrorHandler();
   42321             :     }
   42322             : #ifndef SED_HACKS
   42323             :     if ( bLocalUseExceptions ) {
   42324             :       CPLErr eclass = CPLGetLastErrorType();
   42325             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42326             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42327             :       }
   42328             :     }
   42329             : #endif
   42330             :   }
   42331         459 :   resultobj = SWIG_From_int(static_cast< int >(result));
   42332         459 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   42333             :   return resultobj;
   42334             : fail:
   42335             :   return NULL;
   42336             : }
   42337             : 
   42338             : 
   42339          33 : SWIGINTERN PyObject *_wrap_Band_CreateMaskBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42340          33 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42341          33 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42342          33 :   int arg2 ;
   42343          33 :   void *argp1 = 0 ;
   42344          33 :   int res1 = 0 ;
   42345          33 :   int val2 ;
   42346          33 :   int ecode2 = 0 ;
   42347          33 :   PyObject *swig_obj[2] ;
   42348          33 :   CPLErr result;
   42349             :   
   42350          33 :   if (!SWIG_Python_UnpackTuple(args, "Band_CreateMaskBand", 2, 2, swig_obj)) SWIG_fail;
   42351          33 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42352          33 :   if (!SWIG_IsOK(res1)) {
   42353           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_CreateMaskBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42354             :   }
   42355          33 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42356          33 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   42357          33 :   if (!SWIG_IsOK(ecode2)) {
   42358           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_CreateMaskBand" "', argument " "2"" of type '" "int""'");
   42359             :   } 
   42360          33 :   arg2 = static_cast< int >(val2);
   42361          33 :   {
   42362          33 :     const int bLocalUseExceptions = GetUseExceptions();
   42363          33 :     if ( bLocalUseExceptions ) {
   42364          17 :       pushErrorHandler();
   42365             :     }
   42366          33 :     {
   42367          33 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42368          33 :       result = (CPLErr)GDALRasterBandShadow_CreateMaskBand(arg1,arg2);
   42369          33 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42370             :     }
   42371          33 :     if ( bLocalUseExceptions ) {
   42372          17 :       popErrorHandler();
   42373             :     }
   42374             : #ifndef SED_HACKS
   42375             :     if ( bLocalUseExceptions ) {
   42376             :       CPLErr eclass = CPLGetLastErrorType();
   42377             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42378             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42379             :       }
   42380             :     }
   42381             : #endif
   42382             :   }
   42383          33 :   resultobj = SWIG_From_int(static_cast< int >(result));
   42384          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; } }
   42385             :   return resultobj;
   42386             : fail:
   42387             :   return NULL;
   42388             : }
   42389             : 
   42390             : 
   42391          37 : SWIGINTERN PyObject *_wrap_Band_IsMaskBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42392          37 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42393          37 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42394          37 :   void *argp1 = 0 ;
   42395          37 :   int res1 = 0 ;
   42396          37 :   PyObject *swig_obj[1] ;
   42397          37 :   bool result;
   42398             :   
   42399          37 :   if (!args) SWIG_fail;
   42400          37 :   swig_obj[0] = args;
   42401          37 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42402          37 :   if (!SWIG_IsOK(res1)) {
   42403           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_IsMaskBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42404             :   }
   42405          37 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42406          37 :   {
   42407          37 :     const int bLocalUseExceptions = GetUseExceptions();
   42408          37 :     if ( bLocalUseExceptions ) {
   42409           9 :       pushErrorHandler();
   42410             :     }
   42411          37 :     {
   42412          37 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42413          37 :       result = (bool)GDALRasterBandShadow_IsMaskBand(arg1);
   42414          37 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42415             :     }
   42416          37 :     if ( bLocalUseExceptions ) {
   42417           9 :       popErrorHandler();
   42418             :     }
   42419             : #ifndef SED_HACKS
   42420             :     if ( bLocalUseExceptions ) {
   42421             :       CPLErr eclass = CPLGetLastErrorType();
   42422             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42423             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42424             :       }
   42425             :     }
   42426             : #endif
   42427             :   }
   42428          37 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   42429          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; } }
   42430             :   return resultobj;
   42431             : fail:
   42432             :   return NULL;
   42433             : }
   42434             : 
   42435             : 
   42436          27 : SWIGINTERN PyObject *_wrap_Band_GetHistogram(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   42437          27 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42438          27 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42439          27 :   double arg2 = (double) -0.5 ;
   42440          27 :   double arg3 = (double) 255.5 ;
   42441          27 :   int arg4 = (int) 256 ;
   42442          27 :   GUIntBig *arg5 = (GUIntBig *) NULL ;
   42443          27 :   int arg6 = (int) 0 ;
   42444          27 :   int arg7 = (int) 1 ;
   42445          27 :   GDALProgressFunc arg8 = (GDALProgressFunc) NULL ;
   42446          27 :   void *arg9 = (void *) NULL ;
   42447          27 :   void *argp1 = 0 ;
   42448          27 :   int res1 = 0 ;
   42449          27 :   double val2 ;
   42450          27 :   int ecode2 = 0 ;
   42451          27 :   double val3 ;
   42452          27 :   int ecode3 = 0 ;
   42453          27 :   int val6 ;
   42454          27 :   int ecode6 = 0 ;
   42455          27 :   int val7 ;
   42456          27 :   int ecode7 = 0 ;
   42457          27 :   PyObject * obj0 = 0 ;
   42458          27 :   PyObject * obj1 = 0 ;
   42459          27 :   PyObject * obj2 = 0 ;
   42460          27 :   PyObject * obj3 = 0 ;
   42461          27 :   PyObject * obj4 = 0 ;
   42462          27 :   PyObject * obj5 = 0 ;
   42463          27 :   PyObject * obj6 = 0 ;
   42464          27 :   PyObject * obj7 = 0 ;
   42465          27 :   char * kwnames[] = {
   42466             :     (char *)"self",  (char *)"min",  (char *)"max",  (char *)"buckets",  (char *)"include_out_of_range",  (char *)"approx_ok",  (char *)"callback",  (char *)"callback_data",  NULL 
   42467             :   };
   42468          27 :   CPLErr result;
   42469             :   
   42470          27 :   {
   42471             :     /* %typemap(in) int buckets, GUIntBig* panHistogram -> list */
   42472          27 :     arg5 = (GUIntBig *) VSICalloc(sizeof(GUIntBig),arg4);
   42473             :   }
   42474             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   42475          27 :   PyProgressData *psProgressInfo;
   42476          27 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   42477          27 :   psProgressInfo->nLastReported = -1;
   42478          27 :   psProgressInfo->psPyCallback = NULL;
   42479          27 :   psProgressInfo->psPyCallbackData = NULL;
   42480          27 :   arg9 = psProgressInfo;
   42481          27 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOOOOO:Band_GetHistogram", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
   42482          27 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42483          27 :   if (!SWIG_IsOK(res1)) {
   42484           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetHistogram" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42485             :   }
   42486          27 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42487          27 :   if (obj1) {
   42488          18 :     ecode2 = SWIG_AsVal_double(obj1, &val2);
   42489          18 :     if (!SWIG_IsOK(ecode2)) {
   42490           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetHistogram" "', argument " "2"" of type '" "double""'");
   42491             :     } 
   42492          18 :     arg2 = static_cast< double >(val2);
   42493             :   }
   42494          27 :   if (obj2) {
   42495          16 :     ecode3 = SWIG_AsVal_double(obj2, &val3);
   42496          16 :     if (!SWIG_IsOK(ecode3)) {
   42497           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetHistogram" "', argument " "3"" of type '" "double""'");
   42498             :     } 
   42499          16 :     arg3 = static_cast< double >(val3);
   42500             :   }
   42501          27 :   if (obj3) {
   42502          16 :     {
   42503             :       /* %typemap(in) int buckets, GUIntBig* panHistogram -> list */
   42504          16 :       int requested_buckets = 0;
   42505          32 :       CPL_IGNORE_RET_VAL(SWIG_AsVal_int(obj3, &requested_buckets));
   42506          16 :       if( requested_buckets != arg4 )
   42507             :       {
   42508          16 :         arg4 = requested_buckets;
   42509          16 :         if (requested_buckets <= 0 || (size_t)requested_buckets > SIZE_MAX / sizeof(GUIntBig))
   42510             :         {
   42511           1 :           PyErr_SetString( PyExc_RuntimeError, "Bad value for buckets" );
   42512           1 :           SWIG_fail;
   42513             :         }
   42514          15 :         void* tmp = VSIRealloc(arg5, sizeof(GUIntBig) * requested_buckets);
   42515          15 :         if( !tmp) {
   42516           0 :           PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   42517           0 :           SWIG_fail;
   42518             :         }
   42519             :         arg5 = (GUIntBig *)tmp;
   42520             :       }
   42521          15 :       if (arg5 == NULL)
   42522             :       {
   42523           0 :         PyErr_SetString( PyExc_RuntimeError, "Cannot allocate buckets" );
   42524           0 :         SWIG_fail;
   42525             :       }
   42526             :     }
   42527             :   }
   42528          26 :   if (obj4) {
   42529          15 :     ecode6 = SWIG_AsVal_int(obj4, &val6);
   42530          15 :     if (!SWIG_IsOK(ecode6)) {
   42531           0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetHistogram" "', argument " "6"" of type '" "int""'");
   42532             :     } 
   42533             :     arg6 = static_cast< int >(val6);
   42534             :   }
   42535          26 :   if (obj5) {
   42536          17 :     ecode7 = SWIG_AsVal_int(obj5, &val7);
   42537          17 :     if (!SWIG_IsOK(ecode7)) {
   42538           0 :       SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Band_GetHistogram" "', argument " "7"" of type '" "int""'");
   42539             :     } 
   42540             :     arg7 = static_cast< int >(val7);
   42541             :   }
   42542          26 :   if (obj6) {
   42543           0 :     {
   42544             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   42545             :       /* callback_func typemap */
   42546             :       
   42547             :       /* In some cases 0 is passed instead of None. */
   42548             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   42549           0 :       if ( PyLong_Check(obj6) || PyInt_Check(obj6) )
   42550             :       {
   42551           0 :         if( PyLong_AsLong(obj6) == 0 )
   42552             :         {
   42553           0 :           obj6 = Py_None;
   42554             :         }
   42555             :       }
   42556             :       
   42557           0 :       if (obj6 && obj6 != Py_None ) {
   42558           0 :         void* cbfunction = NULL;
   42559           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj6,
   42560             :             (void**)&cbfunction,
   42561             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   42562             :             SWIG_POINTER_EXCEPTION | 0 ));
   42563             :         
   42564           0 :         if ( cbfunction == GDALTermProgress ) {
   42565             :           arg8 = GDALTermProgress;
   42566             :         } else {
   42567           0 :           if (!PyCallable_Check(obj6)) {
   42568           0 :             PyErr_SetString( PyExc_RuntimeError,
   42569             :               "Object given is not a Python function" );
   42570           0 :             SWIG_fail;
   42571             :           }
   42572           0 :           psProgressInfo->psPyCallback = obj6;
   42573           0 :           arg8 = PyProgressProxy;
   42574             :         }
   42575             :         
   42576             :       }
   42577             :       
   42578             :     }
   42579             :   }
   42580          26 :   if (obj7) {
   42581           0 :     {
   42582             :       /* %typemap(in) ( void* callback_data=NULL)  */
   42583           0 :       psProgressInfo->psPyCallbackData = obj7 ;
   42584             :     }
   42585             :   }
   42586          26 :   {
   42587          26 :     const int bLocalUseExceptions = GetUseExceptions();
   42588          26 :     if ( bLocalUseExceptions ) {
   42589           4 :       pushErrorHandler();
   42590             :     }
   42591          26 :     {
   42592          26 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42593          26 :       result = (CPLErr)GDALRasterBandShadow_GetHistogram(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
   42594          26 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42595             :     }
   42596          26 :     if ( bLocalUseExceptions ) {
   42597           4 :       popErrorHandler();
   42598             :     }
   42599             : #ifndef SED_HACKS
   42600             :     if ( bLocalUseExceptions ) {
   42601             :       CPLErr eclass = CPLGetLastErrorType();
   42602             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42603             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42604             :       }
   42605             :     }
   42606             : #endif
   42607             :   }
   42608          26 :   resultobj = SWIG_From_int(static_cast< int >(result));
   42609          26 :   {
   42610             :     /* %typemap(out) int buckets, GUIntBig* panHistogram -> list */
   42611          26 :     GUIntBig *integerarray = arg5;
   42612          26 :     Py_DECREF( resultobj );
   42613          26 :     if ( integerarray == NULL ) {
   42614           0 :       resultobj = Py_None;
   42615           0 :       Py_INCREF( resultobj );
   42616             :     }
   42617             :     else {
   42618          26 :       resultobj = PyList_New( arg4 );
   42619          26 :       if( !resultobj ) {
   42620           0 :         SWIG_fail;
   42621             :       }
   42622        2924 :       for ( int i = 0; i < arg4; ++i ) {
   42623        2898 :         char szTmp[32];
   42624        2898 :         snprintf(szTmp, sizeof(szTmp), CPL_FRMT_GUIB, integerarray[i]);
   42625        2898 :         PyObject *o = PyLong_FromString(szTmp, NULL, 10);
   42626        2898 :         PyList_SetItem(resultobj, i, o );
   42627             :       }
   42628             :     }
   42629             :   }
   42630          26 :   {
   42631             :     /* %typemap(freearg) (int buckets, GUIntBig* panHistogram)*/
   42632          26 :     VSIFree( arg5 );
   42633             :   }
   42634          26 :   {
   42635             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   42636             :     
   42637          26 :     CPLFree(psProgressInfo);
   42638             :     
   42639             :   }
   42640          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; } }
   42641             :   return resultobj;
   42642           1 : fail:
   42643           1 :   {
   42644             :     /* %typemap(freearg) (int buckets, GUIntBig* panHistogram)*/
   42645           1 :     VSIFree( arg5 );
   42646             :   }
   42647           1 :   {
   42648             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   42649             :     
   42650           1 :     CPLFree(psProgressInfo);
   42651             :     
   42652             :   }
   42653             :   return NULL;
   42654             : }
   42655             : 
   42656             : 
   42657          11 : SWIGINTERN PyObject *_wrap_Band_GetDefaultHistogram(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   42658          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42659          11 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42660          11 :   double *arg2 = (double *) NULL ;
   42661          11 :   double *arg3 = (double *) NULL ;
   42662          11 :   int *arg4 = (int *) NULL ;
   42663          11 :   GUIntBig **arg5 = (GUIntBig **) NULL ;
   42664          11 :   int arg6 = (int) 1 ;
   42665          11 :   GDALProgressFunc arg7 = (GDALProgressFunc) NULL ;
   42666          11 :   void *arg8 = (void *) NULL ;
   42667          11 :   void *argp1 = 0 ;
   42668          11 :   int res1 = 0 ;
   42669          11 :   double val2 ;
   42670          11 :   double val3 ;
   42671          11 :   void *argp4 = 0 ;
   42672          11 :   int res4 = 0 ;
   42673          11 :   void *argp5 = 0 ;
   42674          11 :   int res5 = 0 ;
   42675          11 :   int val6 ;
   42676          11 :   int ecode6 = 0 ;
   42677          11 :   PyObject * obj0 = 0 ;
   42678          11 :   PyObject * obj1 = 0 ;
   42679          11 :   PyObject * obj2 = 0 ;
   42680          11 :   PyObject * obj3 = 0 ;
   42681          11 :   PyObject * obj4 = 0 ;
   42682          11 :   PyObject * obj5 = 0 ;
   42683          11 :   PyObject * obj6 = 0 ;
   42684          11 :   PyObject * obj7 = 0 ;
   42685          11 :   char * kwnames[] = {
   42686             :     (char *)"self",  (char *)"min_ret",  (char *)"max_ret",  (char *)"buckets_ret",  (char *)"ppanHistogram",  (char *)"force",  (char *)"callback",  (char *)"callback_data",  NULL 
   42687             :   };
   42688          11 :   CPLErr result;
   42689             :   
   42690          11 :   double min_val = 0.0, max_val = 0.0;
   42691          11 :   int buckets_val = 0;
   42692          11 :   GUIntBig *panHistogram = NULL;
   42693             :   
   42694          11 :   arg2 = &min_val;
   42695          11 :   arg3 = &max_val;
   42696          11 :   arg4 = &buckets_val;
   42697          11 :   arg5 = &panHistogram;
   42698             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   42699          11 :   PyProgressData *psProgressInfo;
   42700          11 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   42701          11 :   psProgressInfo->nLastReported = -1;
   42702          11 :   psProgressInfo->psPyCallback = NULL;
   42703          11 :   psProgressInfo->psPyCallbackData = NULL;
   42704          11 :   arg8 = psProgressInfo;
   42705          11 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOOOOO:Band_GetDefaultHistogram", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
   42706          11 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42707          11 :   if (!SWIG_IsOK(res1)) {
   42708           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetDefaultHistogram" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42709             :   }
   42710          11 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42711          11 :   if (obj1) {
   42712           0 :     {
   42713             :       /* %typemap(in) (double *optional_##double) */
   42714           0 :       if ( obj1 == Py_None ) {
   42715             :         arg2 = 0;
   42716             :       }
   42717           0 :       else if ( PyArg_Parse( obj1,"d" ,&val2 ) ) {
   42718             :         arg2 = (double *) &val2;
   42719             :       }
   42720             :       else {
   42721           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   42722           0 :         SWIG_fail;
   42723             :       }
   42724             :     }
   42725             :   }
   42726          11 :   if (obj2) {
   42727           0 :     {
   42728             :       /* %typemap(in) (double *optional_##double) */
   42729           0 :       if ( obj2 == Py_None ) {
   42730             :         arg3 = 0;
   42731             :       }
   42732           0 :       else if ( PyArg_Parse( obj2,"d" ,&val3 ) ) {
   42733             :         arg3 = (double *) &val3;
   42734             :       }
   42735             :       else {
   42736           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   42737           0 :         SWIG_fail;
   42738             :       }
   42739             :     }
   42740             :   }
   42741          11 :   if (obj3) {
   42742           0 :     res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_int, 0 |  0 );
   42743           0 :     if (!SWIG_IsOK(res4)) {
   42744           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Band_GetDefaultHistogram" "', argument " "4"" of type '" "int *""'"); 
   42745             :     }
   42746           0 :     arg4 = reinterpret_cast< int * >(argp4);
   42747             :   }
   42748          11 :   if (obj4) {
   42749           0 :     res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_p_GUIntBig, 0 |  0 );
   42750           0 :     if (!SWIG_IsOK(res5)) {
   42751           0 :       SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Band_GetDefaultHistogram" "', argument " "5"" of type '" "GUIntBig **""'"); 
   42752             :     }
   42753           0 :     arg5 = reinterpret_cast< GUIntBig ** >(argp5);
   42754             :   }
   42755          11 :   if (obj5) {
   42756           5 :     ecode6 = SWIG_AsVal_int(obj5, &val6);
   42757           5 :     if (!SWIG_IsOK(ecode6)) {
   42758           0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetDefaultHistogram" "', argument " "6"" of type '" "int""'");
   42759             :     } 
   42760             :     arg6 = static_cast< int >(val6);
   42761             :   }
   42762          11 :   if (obj6) {
   42763           1 :     {
   42764             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   42765             :       /* callback_func typemap */
   42766             :       
   42767             :       /* In some cases 0 is passed instead of None. */
   42768             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   42769           1 :       if ( PyLong_Check(obj6) || PyInt_Check(obj6) )
   42770             :       {
   42771           0 :         if( PyLong_AsLong(obj6) == 0 )
   42772             :         {
   42773           0 :           obj6 = Py_None;
   42774             :         }
   42775             :       }
   42776             :       
   42777           1 :       if (obj6 && obj6 != Py_None ) {
   42778           1 :         void* cbfunction = NULL;
   42779           1 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj6,
   42780             :             (void**)&cbfunction,
   42781             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   42782             :             SWIG_POINTER_EXCEPTION | 0 ));
   42783             :         
   42784           1 :         if ( cbfunction == GDALTermProgress ) {
   42785             :           arg7 = GDALTermProgress;
   42786             :         } else {
   42787           1 :           if (!PyCallable_Check(obj6)) {
   42788           0 :             PyErr_SetString( PyExc_RuntimeError,
   42789             :               "Object given is not a Python function" );
   42790           0 :             SWIG_fail;
   42791             :           }
   42792           1 :           psProgressInfo->psPyCallback = obj6;
   42793           1 :           arg7 = PyProgressProxy;
   42794             :         }
   42795             :         
   42796             :       }
   42797             :       
   42798             :     }
   42799             :   }
   42800          11 :   if (obj7) {
   42801           0 :     {
   42802             :       /* %typemap(in) ( void* callback_data=NULL)  */
   42803           0 :       psProgressInfo->psPyCallbackData = obj7 ;
   42804             :     }
   42805             :   }
   42806          11 :   {
   42807          11 :     const int bLocalUseExceptions = GetUseExceptions();
   42808          11 :     if ( bLocalUseExceptions ) {
   42809           4 :       pushErrorHandler();
   42810             :     }
   42811          11 :     {
   42812          11 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42813          11 :       result = (CPLErr)GDALRasterBandShadow_GetDefaultHistogram(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
   42814          11 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42815             :     }
   42816          11 :     if ( bLocalUseExceptions ) {
   42817           4 :       popErrorHandler();
   42818             :     }
   42819             : #ifndef SED_HACKS
   42820             :     if ( bLocalUseExceptions ) {
   42821             :       CPLErr eclass = CPLGetLastErrorType();
   42822             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42823             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42824             :       }
   42825             :     }
   42826             : #endif
   42827             :   }
   42828          11 :   resultobj = SWIG_From_int(static_cast< int >(result));
   42829          11 :   {
   42830          11 :     int i;
   42831          11 :     PyObject *psList = NULL;
   42832             :     
   42833          11 :     Py_XDECREF(resultobj);
   42834             :     
   42835          11 :     if (panHistogram)
   42836             :     {
   42837          10 :       psList = PyList_New(buckets_val);
   42838          10 :       if( !psList ) {
   42839           0 :         SWIG_fail;
   42840             :       }
   42841        2062 :       for( i = 0; i < buckets_val; i++ )
   42842        2052 :       PyList_SetItem(psList, i, Py_BuildValue("K", panHistogram[i] ));
   42843             :       
   42844          10 :       CPLFree( panHistogram );
   42845             :       
   42846          10 :       resultobj = Py_BuildValue( "(ddiO)", min_val, max_val, buckets_val, psList );
   42847          10 :       Py_XDECREF(psList);
   42848             :     }
   42849             :     else
   42850             :     {
   42851           1 :       resultobj = Py_None;
   42852           1 :       Py_INCREF(resultobj);
   42853             :     }
   42854             :   }
   42855          11 :   {
   42856             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   42857             :     
   42858          11 :     CPLFree(psProgressInfo);
   42859             :     
   42860             :   }
   42861          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; } }
   42862             :   return resultobj;
   42863           0 : fail:
   42864           0 :   {
   42865             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   42866             :     
   42867           0 :     CPLFree(psProgressInfo);
   42868             :     
   42869             :   }
   42870             :   return NULL;
   42871             : }
   42872             : 
   42873             : 
   42874           5 : SWIGINTERN PyObject *_wrap_Band_SetDefaultHistogram(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42875           5 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42876           5 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42877           5 :   double arg2 ;
   42878           5 :   double arg3 ;
   42879           5 :   int arg4 ;
   42880           5 :   GUIntBig *arg5 = (GUIntBig *) 0 ;
   42881           5 :   void *argp1 = 0 ;
   42882           5 :   int res1 = 0 ;
   42883           5 :   double val2 ;
   42884           5 :   int ecode2 = 0 ;
   42885           5 :   double val3 ;
   42886           5 :   int ecode3 = 0 ;
   42887           5 :   PyObject *swig_obj[4] ;
   42888           5 :   CPLErr result;
   42889             :   
   42890           5 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetDefaultHistogram", 4, 4, swig_obj)) SWIG_fail;
   42891           5 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42892           5 :   if (!SWIG_IsOK(res1)) {
   42893           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetDefaultHistogram" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42894             :   }
   42895           5 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42896           5 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   42897           5 :   if (!SWIG_IsOK(ecode2)) {
   42898           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetDefaultHistogram" "', argument " "2"" of type '" "double""'");
   42899             :   } 
   42900           5 :   arg2 = static_cast< double >(val2);
   42901           5 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   42902           5 :   if (!SWIG_IsOK(ecode3)) {
   42903           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_SetDefaultHistogram" "', argument " "3"" of type '" "double""'");
   42904             :   } 
   42905           5 :   arg3 = static_cast< double >(val3);
   42906           5 :   {
   42907             :     /* %typemap(in,numinputs=1) (int nList, GUIntBig* pList)*/
   42908           5 :     arg5 = CreateCGUIntBigListFromSequence(swig_obj[3], &arg4);
   42909           5 :     if( arg4 < 0 ) {
   42910           0 :       SWIG_fail;
   42911             :     }
   42912             :   }
   42913           5 :   {
   42914           5 :     const int bLocalUseExceptions = GetUseExceptions();
   42915           5 :     if ( bLocalUseExceptions ) {
   42916           5 :       pushErrorHandler();
   42917             :     }
   42918           5 :     {
   42919           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42920           5 :       result = (CPLErr)GDALRasterBandShadow_SetDefaultHistogram(arg1,arg2,arg3,arg4,arg5);
   42921           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42922             :     }
   42923           5 :     if ( bLocalUseExceptions ) {
   42924           5 :       popErrorHandler();
   42925             :     }
   42926             : #ifndef SED_HACKS
   42927             :     if ( bLocalUseExceptions ) {
   42928             :       CPLErr eclass = CPLGetLastErrorType();
   42929             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42930             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42931             :       }
   42932             :     }
   42933             : #endif
   42934             :   }
   42935           5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   42936           5 :   {
   42937             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   42938           5 :     free(arg5);
   42939             :   }
   42940           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; } }
   42941             :   return resultobj;
   42942           0 : fail:
   42943           0 :   {
   42944             :     /* %typemap(freearg) (int nList, GUIntBig* pList) */
   42945           0 :     free(arg5);
   42946             :   }
   42947           0 :   return NULL;
   42948             : }
   42949             : 
   42950             : 
   42951          17 : SWIGINTERN PyObject *_wrap_Band_HasArbitraryOverviews(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42952          17 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42953          17 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42954          17 :   void *argp1 = 0 ;
   42955          17 :   int res1 = 0 ;
   42956          17 :   PyObject *swig_obj[1] ;
   42957          17 :   bool result;
   42958             :   
   42959          17 :   if (!args) SWIG_fail;
   42960          17 :   swig_obj[0] = args;
   42961          17 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   42962          17 :   if (!SWIG_IsOK(res1)) {
   42963           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_HasArbitraryOverviews" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   42964             :   }
   42965          17 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   42966          17 :   {
   42967          17 :     const int bLocalUseExceptions = GetUseExceptions();
   42968          17 :     if ( bLocalUseExceptions ) {
   42969           0 :       pushErrorHandler();
   42970             :     }
   42971          17 :     {
   42972          17 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   42973          17 :       result = (bool)GDALRasterBandShadow_HasArbitraryOverviews(arg1);
   42974          17 :       SWIG_PYTHON_THREAD_END_ALLOW;
   42975             :     }
   42976          17 :     if ( bLocalUseExceptions ) {
   42977           0 :       popErrorHandler();
   42978             :     }
   42979             : #ifndef SED_HACKS
   42980             :     if ( bLocalUseExceptions ) {
   42981             :       CPLErr eclass = CPLGetLastErrorType();
   42982             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   42983             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   42984             :       }
   42985             :     }
   42986             : #endif
   42987             :   }
   42988          17 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   42989          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; } }
   42990             :   return resultobj;
   42991             : fail:
   42992             :   return NULL;
   42993             : }
   42994             : 
   42995             : 
   42996          10 : SWIGINTERN PyObject *_wrap_Band_GetCategoryNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   42997          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   42998          10 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   42999          10 :   void *argp1 = 0 ;
   43000          10 :   int res1 = 0 ;
   43001          10 :   PyObject *swig_obj[1] ;
   43002          10 :   char **result = 0 ;
   43003             :   
   43004          10 :   if (!args) SWIG_fail;
   43005          10 :   swig_obj[0] = args;
   43006          10 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43007          10 :   if (!SWIG_IsOK(res1)) {
   43008           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43009             :   }
   43010          10 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43011          10 :   {
   43012          10 :     const int bLocalUseExceptions = GetUseExceptions();
   43013          10 :     if ( bLocalUseExceptions ) {
   43014           8 :       pushErrorHandler();
   43015             :     }
   43016          10 :     {
   43017          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43018          10 :       result = (char **)GDALRasterBandShadow_GetCategoryNames(arg1);
   43019          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43020             :     }
   43021          10 :     if ( bLocalUseExceptions ) {
   43022           8 :       popErrorHandler();
   43023             :     }
   43024             : #ifndef SED_HACKS
   43025             :     if ( bLocalUseExceptions ) {
   43026             :       CPLErr eclass = CPLGetLastErrorType();
   43027             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43028             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43029             :       }
   43030             :     }
   43031             : #endif
   43032             :   }
   43033          10 :   {
   43034             :     /* %typemap(out) char **options -> ( string ) */
   43035          10 :     bool bErr = false;
   43036          10 :     resultobj = CSLToList(result, &bErr);
   43037          10 :     if( bErr ) {
   43038           0 :       SWIG_fail;
   43039             :     }
   43040             :   }
   43041          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; } }
   43042             :   return resultobj;
   43043             : fail:
   43044             :   return NULL;
   43045             : }
   43046             : 
   43047             : 
   43048           2 : SWIGINTERN PyObject *_wrap_Band_SetCategoryNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   43049           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43050           2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43051           2 :   char **arg2 = (char **) 0 ;
   43052           2 :   void *argp1 = 0 ;
   43053           2 :   int res1 = 0 ;
   43054           2 :   PyObject *swig_obj[2] ;
   43055           2 :   CPLErr result;
   43056             :   
   43057           2 :   if (!SWIG_Python_UnpackTuple(args, "Band_SetCategoryNames", 2, 2, swig_obj)) SWIG_fail;
   43058           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43059           2 :   if (!SWIG_IsOK(res1)) {
   43060           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43061             :   }
   43062           2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43063           2 :   {
   43064             :     /* %typemap(in) char **dict */
   43065           2 :     arg2 = NULL;
   43066           2 :     if ( PySequence_Check( swig_obj[1] ) ) {
   43067           2 :       int bErr = FALSE;
   43068           2 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   43069           2 :       if ( bErr )
   43070             :       {
   43071           0 :         SWIG_fail;
   43072             :       }
   43073             :     }
   43074           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   43075           0 :       int bErr = FALSE;
   43076           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   43077           0 :       if ( bErr )
   43078             :       {
   43079           0 :         SWIG_fail;
   43080             :       }
   43081             :     }
   43082             :     else {
   43083           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   43084           0 :       SWIG_fail;
   43085             :     }
   43086             :   }
   43087           2 :   {
   43088           2 :     const int bLocalUseExceptions = GetUseExceptions();
   43089           2 :     if ( bLocalUseExceptions ) {
   43090           2 :       pushErrorHandler();
   43091             :     }
   43092           2 :     {
   43093           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43094           2 :       result = (CPLErr)GDALRasterBandShadow_SetCategoryNames(arg1,arg2);
   43095           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43096             :     }
   43097           2 :     if ( bLocalUseExceptions ) {
   43098           2 :       popErrorHandler();
   43099             :     }
   43100             : #ifndef SED_HACKS
   43101             :     if ( bLocalUseExceptions ) {
   43102             :       CPLErr eclass = CPLGetLastErrorType();
   43103             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43104             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43105             :       }
   43106             :     }
   43107             : #endif
   43108             :   }
   43109           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   43110           2 :   {
   43111             :     /* %typemap(freearg) char **dict */
   43112           2 :     CSLDestroy( arg2 );
   43113             :   }
   43114           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; } }
   43115             :   return resultobj;
   43116           0 : fail:
   43117           0 :   {
   43118             :     /* %typemap(freearg) char **dict */
   43119           0 :     CSLDestroy( arg2 );
   43120             :   }
   43121             :   return NULL;
   43122             : }
   43123             : 
   43124             : 
   43125           1 : SWIGINTERN PyObject *_wrap_Band_GetVirtualMem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   43126           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43127           1 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43128           1 :   GDALRWFlag arg2 ;
   43129           1 :   int arg3 ;
   43130           1 :   int arg4 ;
   43131           1 :   int arg5 ;
   43132           1 :   int arg6 ;
   43133           1 :   int arg7 ;
   43134           1 :   int arg8 ;
   43135           1 :   GDALDataType arg9 ;
   43136           1 :   size_t arg10 ;
   43137           1 :   size_t arg11 ;
   43138           1 :   char **arg12 = (char **) NULL ;
   43139           1 :   void *argp1 = 0 ;
   43140           1 :   int res1 = 0 ;
   43141           1 :   int val2 ;
   43142           1 :   int ecode2 = 0 ;
   43143           1 :   int val3 ;
   43144           1 :   int ecode3 = 0 ;
   43145           1 :   int val4 ;
   43146           1 :   int ecode4 = 0 ;
   43147           1 :   int val5 ;
   43148           1 :   int ecode5 = 0 ;
   43149           1 :   int val6 ;
   43150           1 :   int ecode6 = 0 ;
   43151           1 :   int val7 ;
   43152           1 :   int ecode7 = 0 ;
   43153           1 :   int val8 ;
   43154           1 :   int ecode8 = 0 ;
   43155           1 :   size_t val10 ;
   43156           1 :   int ecode10 = 0 ;
   43157           1 :   size_t val11 ;
   43158           1 :   int ecode11 = 0 ;
   43159           1 :   PyObject * obj0 = 0 ;
   43160           1 :   PyObject * obj1 = 0 ;
   43161           1 :   PyObject * obj2 = 0 ;
   43162           1 :   PyObject * obj3 = 0 ;
   43163           1 :   PyObject * obj4 = 0 ;
   43164           1 :   PyObject * obj5 = 0 ;
   43165           1 :   PyObject * obj6 = 0 ;
   43166           1 :   PyObject * obj7 = 0 ;
   43167           1 :   PyObject * obj8 = 0 ;
   43168           1 :   PyObject * obj9 = 0 ;
   43169           1 :   PyObject * obj10 = 0 ;
   43170           1 :   PyObject * obj11 = 0 ;
   43171           1 :   char * kwnames[] = {
   43172             :     (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 
   43173             :   };
   43174           1 :   CPLVirtualMemShadow *result = 0 ;
   43175             :   
   43176           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;
   43177           1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43178           1 :   if (!SWIG_IsOK(res1)) {
   43179           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetVirtualMem" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43180             :   }
   43181           1 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43182           1 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   43183           1 :   if (!SWIG_IsOK(ecode2)) {
   43184           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetVirtualMem" "', argument " "2"" of type '" "GDALRWFlag""'");
   43185             :   } 
   43186           1 :   arg2 = static_cast< GDALRWFlag >(val2);
   43187           1 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   43188           1 :   if (!SWIG_IsOK(ecode3)) {
   43189           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetVirtualMem" "', argument " "3"" of type '" "int""'");
   43190             :   } 
   43191           1 :   arg3 = static_cast< int >(val3);
   43192           1 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   43193           1 :   if (!SWIG_IsOK(ecode4)) {
   43194           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_GetVirtualMem" "', argument " "4"" of type '" "int""'");
   43195             :   } 
   43196           1 :   arg4 = static_cast< int >(val4);
   43197           1 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   43198           1 :   if (!SWIG_IsOK(ecode5)) {
   43199           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_GetVirtualMem" "', argument " "5"" of type '" "int""'");
   43200             :   } 
   43201           1 :   arg5 = static_cast< int >(val5);
   43202           1 :   ecode6 = SWIG_AsVal_int(obj5, &val6);
   43203           1 :   if (!SWIG_IsOK(ecode6)) {
   43204           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetVirtualMem" "', argument " "6"" of type '" "int""'");
   43205             :   } 
   43206           1 :   arg6 = static_cast< int >(val6);
   43207           1 :   ecode7 = SWIG_AsVal_int(obj6, &val7);
   43208           1 :   if (!SWIG_IsOK(ecode7)) {
   43209           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Band_GetVirtualMem" "', argument " "7"" of type '" "int""'");
   43210             :   } 
   43211           1 :   arg7 = static_cast< int >(val7);
   43212           1 :   ecode8 = SWIG_AsVal_int(obj7, &val8);
   43213           1 :   if (!SWIG_IsOK(ecode8)) {
   43214           0 :     SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Band_GetVirtualMem" "', argument " "8"" of type '" "int""'");
   43215             :   } 
   43216           1 :   arg8 = static_cast< int >(val8);
   43217           1 :   {
   43218             :     // %typemap(in) GDALDataType
   43219           1 :     int val = 0;
   43220           1 :     int ecode = SWIG_AsVal_int(obj8, &val);
   43221           1 :     if (!SWIG_IsOK(ecode)) {
   43222           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   43223             :     }
   43224           1 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   43225             :     {
   43226           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   43227             :     }
   43228           1 :     arg9 = static_cast<GDALDataType>(val);
   43229             :   }
   43230           1 :   ecode10 = SWIG_AsVal_size_t(obj9, &val10);
   43231           1 :   if (!SWIG_IsOK(ecode10)) {
   43232           0 :     SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "Band_GetVirtualMem" "', argument " "10"" of type '" "size_t""'");
   43233             :   } 
   43234           1 :   arg10 = static_cast< size_t >(val10);
   43235           1 :   ecode11 = SWIG_AsVal_size_t(obj10, &val11);
   43236           1 :   if (!SWIG_IsOK(ecode11)) {
   43237           0 :     SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "Band_GetVirtualMem" "', argument " "11"" of type '" "size_t""'");
   43238             :   } 
   43239           1 :   arg11 = static_cast< size_t >(val11);
   43240           1 :   if (obj11) {
   43241           0 :     {
   43242             :       /* %typemap(in) char **dict */
   43243           0 :       arg12 = NULL;
   43244           0 :       if ( PySequence_Check( obj11 ) ) {
   43245           0 :         int bErr = FALSE;
   43246           0 :         arg12 = CSLFromPySequence(obj11, &bErr);
   43247           0 :         if ( bErr )
   43248             :         {
   43249           0 :           SWIG_fail;
   43250             :         }
   43251             :       }
   43252           0 :       else if ( PyMapping_Check( obj11 ) ) {
   43253           0 :         int bErr = FALSE;
   43254           0 :         arg12 = CSLFromPyMapping(obj11, &bErr);
   43255           0 :         if ( bErr )
   43256             :         {
   43257           0 :           SWIG_fail;
   43258             :         }
   43259             :       }
   43260             :       else {
   43261           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   43262           0 :         SWIG_fail;
   43263             :       }
   43264             :     }
   43265             :   }
   43266           1 :   {
   43267           1 :     const int bLocalUseExceptions = GetUseExceptions();
   43268           1 :     if ( bLocalUseExceptions ) {
   43269           1 :       pushErrorHandler();
   43270             :     }
   43271           1 :     {
   43272           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43273           1 :       result = (CPLVirtualMemShadow *)GDALRasterBandShadow_GetVirtualMem(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
   43274           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43275             :     }
   43276           1 :     if ( bLocalUseExceptions ) {
   43277           1 :       popErrorHandler();
   43278             :     }
   43279             : #ifndef SED_HACKS
   43280             :     if ( bLocalUseExceptions ) {
   43281             :       CPLErr eclass = CPLGetLastErrorType();
   43282             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43283             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43284             :       }
   43285             :     }
   43286             : #endif
   43287             :   }
   43288           1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_OWN |  0 );
   43289           1 :   {
   43290             :     /* %typemap(freearg) char **dict */
   43291           1 :     CSLDestroy( arg12 );
   43292             :   }
   43293           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; } }
   43294             :   return resultobj;
   43295           0 : fail:
   43296           0 :   {
   43297             :     /* %typemap(freearg) char **dict */
   43298           0 :     CSLDestroy( arg12 );
   43299             :   }
   43300             :   return NULL;
   43301             : }
   43302             : 
   43303             : 
   43304          21 : SWIGINTERN PyObject *_wrap_Band_GetVirtualMemAuto(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   43305          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43306          21 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43307          21 :   GDALRWFlag arg2 ;
   43308          21 :   char **arg3 = (char **) NULL ;
   43309          21 :   void *argp1 = 0 ;
   43310          21 :   int res1 = 0 ;
   43311          21 :   int val2 ;
   43312          21 :   int ecode2 = 0 ;
   43313          21 :   PyObject * obj0 = 0 ;
   43314          21 :   PyObject * obj1 = 0 ;
   43315          21 :   PyObject * obj2 = 0 ;
   43316          21 :   char * kwnames[] = {
   43317             :     (char *)"self",  (char *)"eRWFlag",  (char *)"options",  NULL 
   43318             :   };
   43319          21 :   CPLVirtualMemShadow *result = 0 ;
   43320             :   
   43321          21 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:Band_GetVirtualMemAuto", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   43322          21 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43323          21 :   if (!SWIG_IsOK(res1)) {
   43324           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetVirtualMemAuto" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43325             :   }
   43326          21 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43327          21 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   43328          21 :   if (!SWIG_IsOK(ecode2)) {
   43329           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetVirtualMemAuto" "', argument " "2"" of type '" "GDALRWFlag""'");
   43330             :   } 
   43331          21 :   arg2 = static_cast< GDALRWFlag >(val2);
   43332          21 :   if (obj2) {
   43333           0 :     {
   43334             :       /* %typemap(in) char **dict */
   43335           0 :       arg3 = NULL;
   43336           0 :       if ( PySequence_Check( obj2 ) ) {
   43337           0 :         int bErr = FALSE;
   43338           0 :         arg3 = CSLFromPySequence(obj2, &bErr);
   43339           0 :         if ( bErr )
   43340             :         {
   43341           0 :           SWIG_fail;
   43342             :         }
   43343             :       }
   43344           0 :       else if ( PyMapping_Check( obj2 ) ) {
   43345           0 :         int bErr = FALSE;
   43346           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   43347           0 :         if ( bErr )
   43348             :         {
   43349           0 :           SWIG_fail;
   43350             :         }
   43351             :       }
   43352             :       else {
   43353           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   43354           0 :         SWIG_fail;
   43355             :       }
   43356             :     }
   43357             :   }
   43358          21 :   {
   43359          21 :     const int bLocalUseExceptions = GetUseExceptions();
   43360          21 :     if ( bLocalUseExceptions ) {
   43361          21 :       pushErrorHandler();
   43362             :     }
   43363          21 :     {
   43364          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43365          21 :       result = (CPLVirtualMemShadow *)GDALRasterBandShadow_GetVirtualMemAuto(arg1,arg2,arg3);
   43366          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43367             :     }
   43368          21 :     if ( bLocalUseExceptions ) {
   43369          21 :       popErrorHandler();
   43370             :     }
   43371             : #ifndef SED_HACKS
   43372             :     if ( bLocalUseExceptions ) {
   43373             :       CPLErr eclass = CPLGetLastErrorType();
   43374             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43375             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43376             :       }
   43377             :     }
   43378             : #endif
   43379             :   }
   43380          21 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_OWN |  0 );
   43381          21 :   {
   43382             :     /* %typemap(freearg) char **dict */
   43383          21 :     CSLDestroy( arg3 );
   43384             :   }
   43385          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; } }
   43386             :   return resultobj;
   43387           0 : fail:
   43388           0 :   {
   43389             :     /* %typemap(freearg) char **dict */
   43390           0 :     CSLDestroy( arg3 );
   43391             :   }
   43392             :   return NULL;
   43393             : }
   43394             : 
   43395             : 
   43396           1 : SWIGINTERN PyObject *_wrap_Band_GetTiledVirtualMem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   43397           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43398           1 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43399           1 :   GDALRWFlag arg2 ;
   43400           1 :   int arg3 ;
   43401           1 :   int arg4 ;
   43402           1 :   int arg5 ;
   43403           1 :   int arg6 ;
   43404           1 :   int arg7 ;
   43405           1 :   int arg8 ;
   43406           1 :   GDALDataType arg9 ;
   43407           1 :   size_t arg10 ;
   43408           1 :   char **arg11 = (char **) NULL ;
   43409           1 :   void *argp1 = 0 ;
   43410           1 :   int res1 = 0 ;
   43411           1 :   int val2 ;
   43412           1 :   int ecode2 = 0 ;
   43413           1 :   int val3 ;
   43414           1 :   int ecode3 = 0 ;
   43415           1 :   int val4 ;
   43416           1 :   int ecode4 = 0 ;
   43417           1 :   int val5 ;
   43418           1 :   int ecode5 = 0 ;
   43419           1 :   int val6 ;
   43420           1 :   int ecode6 = 0 ;
   43421           1 :   int val7 ;
   43422           1 :   int ecode7 = 0 ;
   43423           1 :   int val8 ;
   43424           1 :   int ecode8 = 0 ;
   43425           1 :   size_t val10 ;
   43426           1 :   int ecode10 = 0 ;
   43427           1 :   PyObject * obj0 = 0 ;
   43428           1 :   PyObject * obj1 = 0 ;
   43429           1 :   PyObject * obj2 = 0 ;
   43430           1 :   PyObject * obj3 = 0 ;
   43431           1 :   PyObject * obj4 = 0 ;
   43432           1 :   PyObject * obj5 = 0 ;
   43433           1 :   PyObject * obj6 = 0 ;
   43434           1 :   PyObject * obj7 = 0 ;
   43435           1 :   PyObject * obj8 = 0 ;
   43436           1 :   PyObject * obj9 = 0 ;
   43437           1 :   PyObject * obj10 = 0 ;
   43438           1 :   char * kwnames[] = {
   43439             :     (char *)"self",  (char *)"eRWFlag",  (char *)"nXOff",  (char *)"nYOff",  (char *)"nXSize",  (char *)"nYSize",  (char *)"nTileXSize",  (char *)"nTileYSize",  (char *)"eBufType",  (char *)"nCacheSize",  (char *)"options",  NULL 
   43440             :   };
   43441           1 :   CPLVirtualMemShadow *result = 0 ;
   43442             :   
   43443           1 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOOOO|O:Band_GetTiledVirtualMem", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10)) SWIG_fail;
   43444           1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43445           1 :   if (!SWIG_IsOK(res1)) {
   43446           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetTiledVirtualMem" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43447             :   }
   43448           1 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43449           1 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   43450           1 :   if (!SWIG_IsOK(ecode2)) {
   43451           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetTiledVirtualMem" "', argument " "2"" of type '" "GDALRWFlag""'");
   43452             :   } 
   43453           1 :   arg2 = static_cast< GDALRWFlag >(val2);
   43454           1 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   43455           1 :   if (!SWIG_IsOK(ecode3)) {
   43456           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetTiledVirtualMem" "', argument " "3"" of type '" "int""'");
   43457             :   } 
   43458           1 :   arg3 = static_cast< int >(val3);
   43459           1 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   43460           1 :   if (!SWIG_IsOK(ecode4)) {
   43461           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_GetTiledVirtualMem" "', argument " "4"" of type '" "int""'");
   43462             :   } 
   43463           1 :   arg4 = static_cast< int >(val4);
   43464           1 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   43465           1 :   if (!SWIG_IsOK(ecode5)) {
   43466           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_GetTiledVirtualMem" "', argument " "5"" of type '" "int""'");
   43467             :   } 
   43468           1 :   arg5 = static_cast< int >(val5);
   43469           1 :   ecode6 = SWIG_AsVal_int(obj5, &val6);
   43470           1 :   if (!SWIG_IsOK(ecode6)) {
   43471           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetTiledVirtualMem" "', argument " "6"" of type '" "int""'");
   43472             :   } 
   43473           1 :   arg6 = static_cast< int >(val6);
   43474           1 :   ecode7 = SWIG_AsVal_int(obj6, &val7);
   43475           1 :   if (!SWIG_IsOK(ecode7)) {
   43476           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Band_GetTiledVirtualMem" "', argument " "7"" of type '" "int""'");
   43477             :   } 
   43478           1 :   arg7 = static_cast< int >(val7);
   43479           1 :   ecode8 = SWIG_AsVal_int(obj7, &val8);
   43480           1 :   if (!SWIG_IsOK(ecode8)) {
   43481           0 :     SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Band_GetTiledVirtualMem" "', argument " "8"" of type '" "int""'");
   43482             :   } 
   43483           1 :   arg8 = static_cast< int >(val8);
   43484           1 :   {
   43485             :     // %typemap(in) GDALDataType
   43486           1 :     int val = 0;
   43487           1 :     int ecode = SWIG_AsVal_int(obj8, &val);
   43488           1 :     if (!SWIG_IsOK(ecode)) {
   43489           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   43490             :     }
   43491           1 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   43492             :     {
   43493           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   43494             :     }
   43495           1 :     arg9 = static_cast<GDALDataType>(val);
   43496             :   }
   43497           1 :   ecode10 = SWIG_AsVal_size_t(obj9, &val10);
   43498           1 :   if (!SWIG_IsOK(ecode10)) {
   43499           0 :     SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "Band_GetTiledVirtualMem" "', argument " "10"" of type '" "size_t""'");
   43500             :   } 
   43501           1 :   arg10 = static_cast< size_t >(val10);
   43502           1 :   if (obj10) {
   43503           0 :     {
   43504             :       /* %typemap(in) char **dict */
   43505           0 :       arg11 = NULL;
   43506           0 :       if ( PySequence_Check( obj10 ) ) {
   43507           0 :         int bErr = FALSE;
   43508           0 :         arg11 = CSLFromPySequence(obj10, &bErr);
   43509           0 :         if ( bErr )
   43510             :         {
   43511           0 :           SWIG_fail;
   43512             :         }
   43513             :       }
   43514           0 :       else if ( PyMapping_Check( obj10 ) ) {
   43515           0 :         int bErr = FALSE;
   43516           0 :         arg11 = CSLFromPyMapping(obj10, &bErr);
   43517           0 :         if ( bErr )
   43518             :         {
   43519           0 :           SWIG_fail;
   43520             :         }
   43521             :       }
   43522             :       else {
   43523           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   43524           0 :         SWIG_fail;
   43525             :       }
   43526             :     }
   43527             :   }
   43528           1 :   {
   43529           1 :     const int bLocalUseExceptions = GetUseExceptions();
   43530           1 :     if ( bLocalUseExceptions ) {
   43531           1 :       pushErrorHandler();
   43532             :     }
   43533           1 :     {
   43534           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43535           1 :       result = (CPLVirtualMemShadow *)GDALRasterBandShadow_GetTiledVirtualMem(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
   43536           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43537             :     }
   43538           1 :     if ( bLocalUseExceptions ) {
   43539           1 :       popErrorHandler();
   43540             :     }
   43541             : #ifndef SED_HACKS
   43542             :     if ( bLocalUseExceptions ) {
   43543             :       CPLErr eclass = CPLGetLastErrorType();
   43544             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43545             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43546             :       }
   43547             :     }
   43548             : #endif
   43549             :   }
   43550           1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPLVirtualMemShadow, SWIG_POINTER_OWN |  0 );
   43551           1 :   {
   43552             :     /* %typemap(freearg) char **dict */
   43553           1 :     CSLDestroy( arg11 );
   43554             :   }
   43555           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; } }
   43556             :   return resultobj;
   43557           0 : fail:
   43558           0 :   {
   43559             :     /* %typemap(freearg) char **dict */
   43560           0 :     CSLDestroy( arg11 );
   43561             :   }
   43562             :   return NULL;
   43563             : }
   43564             : 
   43565             : 
   43566          26 : SWIGINTERN PyObject *_wrap_Band_GetDataCoverageStatus(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   43567          26 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43568          26 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43569          26 :   int arg2 ;
   43570          26 :   int arg3 ;
   43571          26 :   int arg4 ;
   43572          26 :   int arg5 ;
   43573          26 :   int arg6 = (int) 0 ;
   43574          26 :   double *arg7 = (double *) NULL ;
   43575          26 :   void *argp1 = 0 ;
   43576          26 :   int res1 = 0 ;
   43577          26 :   int val2 ;
   43578          26 :   int ecode2 = 0 ;
   43579          26 :   int val3 ;
   43580          26 :   int ecode3 = 0 ;
   43581          26 :   int val4 ;
   43582          26 :   int ecode4 = 0 ;
   43583          26 :   int val5 ;
   43584          26 :   int ecode5 = 0 ;
   43585          26 :   int val6 ;
   43586          26 :   int ecode6 = 0 ;
   43587          26 :   double temp7 ;
   43588          26 :   int res7 = SWIG_TMPOBJ ;
   43589          26 :   PyObject *swig_obj[6] ;
   43590          26 :   int result;
   43591             :   
   43592          26 :   arg7 = &temp7;
   43593          26 :   if (!SWIG_Python_UnpackTuple(args, "Band_GetDataCoverageStatus", 5, 6, swig_obj)) SWIG_fail;
   43594          26 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43595          26 :   if (!SWIG_IsOK(res1)) {
   43596           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetDataCoverageStatus" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43597             :   }
   43598          26 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43599          26 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   43600          26 :   if (!SWIG_IsOK(ecode2)) {
   43601           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetDataCoverageStatus" "', argument " "2"" of type '" "int""'");
   43602             :   } 
   43603          26 :   arg2 = static_cast< int >(val2);
   43604          26 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   43605          26 :   if (!SWIG_IsOK(ecode3)) {
   43606           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetDataCoverageStatus" "', argument " "3"" of type '" "int""'");
   43607             :   } 
   43608          26 :   arg3 = static_cast< int >(val3);
   43609          26 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   43610          26 :   if (!SWIG_IsOK(ecode4)) {
   43611           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_GetDataCoverageStatus" "', argument " "4"" of type '" "int""'");
   43612             :   } 
   43613          26 :   arg4 = static_cast< int >(val4);
   43614          26 :   ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
   43615          26 :   if (!SWIG_IsOK(ecode5)) {
   43616           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_GetDataCoverageStatus" "', argument " "5"" of type '" "int""'");
   43617             :   } 
   43618          26 :   arg5 = static_cast< int >(val5);
   43619          26 :   if (swig_obj[5]) {
   43620           0 :     ecode6 = SWIG_AsVal_int(swig_obj[5], &val6);
   43621           0 :     if (!SWIG_IsOK(ecode6)) {
   43622           0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetDataCoverageStatus" "', argument " "6"" of type '" "int""'");
   43623             :     } 
   43624             :     arg6 = static_cast< int >(val6);
   43625             :   }
   43626          26 :   {
   43627          26 :     const int bLocalUseExceptions = GetUseExceptions();
   43628          26 :     if ( bLocalUseExceptions ) {
   43629           6 :       pushErrorHandler();
   43630             :     }
   43631          26 :     {
   43632          26 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43633          26 :       result = (int)GDALRasterBandShadow_GetDataCoverageStatus(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   43634          26 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43635             :     }
   43636          26 :     if ( bLocalUseExceptions ) {
   43637           6 :       popErrorHandler();
   43638             :     }
   43639             : #ifndef SED_HACKS
   43640             :     if ( bLocalUseExceptions ) {
   43641             :       CPLErr eclass = CPLGetLastErrorType();
   43642             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43643             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43644             :       }
   43645             :     }
   43646             : #endif
   43647             :   }
   43648          26 :   resultobj = SWIG_From_int(static_cast< int >(result));
   43649          26 :   if (ReturnSame(SWIG_IsTmpObj(res7))) {
   43650          26 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7)));
   43651             :   } else {
   43652           0 :     int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   43653           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags));
   43654             :   }
   43655          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; } }
   43656             :   return resultobj;
   43657             : fail:
   43658             :   return NULL;
   43659             : }
   43660             : 
   43661             : 
   43662           2 : SWIGINTERN PyObject *_wrap_Band_AdviseRead(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   43663           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43664           2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43665           2 :   int arg2 ;
   43666           2 :   int arg3 ;
   43667           2 :   int arg4 ;
   43668           2 :   int arg5 ;
   43669           2 :   int *arg6 = (int *) 0 ;
   43670           2 :   int *arg7 = (int *) 0 ;
   43671           2 :   GDALDataType *arg8 = (GDALDataType *) 0 ;
   43672           2 :   char **arg9 = (char **) NULL ;
   43673           2 :   void *argp1 = 0 ;
   43674           2 :   int res1 = 0 ;
   43675           2 :   int val2 ;
   43676           2 :   int ecode2 = 0 ;
   43677           2 :   int val3 ;
   43678           2 :   int ecode3 = 0 ;
   43679           2 :   int val4 ;
   43680           2 :   int ecode4 = 0 ;
   43681           2 :   int val5 ;
   43682           2 :   int ecode5 = 0 ;
   43683           2 :   void *argp6 = 0 ;
   43684           2 :   int res6 = 0 ;
   43685           2 :   void *argp7 = 0 ;
   43686           2 :   int res7 = 0 ;
   43687           2 :   int val8 ;
   43688           2 :   PyObject *swig_obj[9] ;
   43689           2 :   CPLErr result;
   43690             :   
   43691           2 :   if (!SWIG_Python_UnpackTuple(args, "Band_AdviseRead", 5, 9, swig_obj)) SWIG_fail;
   43692           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43693           2 :   if (!SWIG_IsOK(res1)) {
   43694           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_AdviseRead" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43695             :   }
   43696           2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43697           2 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   43698           2 :   if (!SWIG_IsOK(ecode2)) {
   43699           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_AdviseRead" "', argument " "2"" of type '" "int""'");
   43700             :   } 
   43701           2 :   arg2 = static_cast< int >(val2);
   43702           2 :   ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   43703           2 :   if (!SWIG_IsOK(ecode3)) {
   43704           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_AdviseRead" "', argument " "3"" of type '" "int""'");
   43705             :   } 
   43706           2 :   arg3 = static_cast< int >(val3);
   43707           2 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   43708           2 :   if (!SWIG_IsOK(ecode4)) {
   43709           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_AdviseRead" "', argument " "4"" of type '" "int""'");
   43710             :   } 
   43711           2 :   arg4 = static_cast< int >(val4);
   43712           2 :   ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
   43713           2 :   if (!SWIG_IsOK(ecode5)) {
   43714           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_AdviseRead" "', argument " "5"" of type '" "int""'");
   43715             :   } 
   43716           2 :   arg5 = static_cast< int >(val5);
   43717           2 :   if (swig_obj[5]) {
   43718           0 :     res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_int, 0 |  0 );
   43719           0 :     if (!SWIG_IsOK(res6)) {
   43720           0 :       SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Band_AdviseRead" "', argument " "6"" of type '" "int *""'"); 
   43721             :     }
   43722           0 :     arg6 = reinterpret_cast< int * >(argp6);
   43723             :   }
   43724           2 :   if (swig_obj[6]) {
   43725           0 :     res7 = SWIG_ConvertPtr(swig_obj[6], &argp7,SWIGTYPE_p_int, 0 |  0 );
   43726           0 :     if (!SWIG_IsOK(res7)) {
   43727           0 :       SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "Band_AdviseRead" "', argument " "7"" of type '" "int *""'"); 
   43728             :     }
   43729           0 :     arg7 = reinterpret_cast< int * >(argp7);
   43730             :   }
   43731           2 :   if (swig_obj[7]) {
   43732           0 :     {
   43733             :       /* %typemap(in) (int *optional_##int) */
   43734           0 :       if ( swig_obj[7] == Py_None ) {
   43735             :         arg8 = 0;
   43736             :       }
   43737           0 :       else if ( PyArg_Parse( swig_obj[7],"i" ,&val8 ) ) {
   43738             :         arg8 = (GDALDataType *) &val8;
   43739             :       }
   43740             :       else {
   43741           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   43742           0 :         SWIG_fail;
   43743             :       }
   43744             :     }
   43745             :   }
   43746           2 :   if (swig_obj[8]) {
   43747           0 :     {
   43748             :       /* %typemap(in) char **dict */
   43749           0 :       arg9 = NULL;
   43750           0 :       if ( PySequence_Check( swig_obj[8] ) ) {
   43751           0 :         int bErr = FALSE;
   43752           0 :         arg9 = CSLFromPySequence(swig_obj[8], &bErr);
   43753           0 :         if ( bErr )
   43754             :         {
   43755           0 :           SWIG_fail;
   43756             :         }
   43757             :       }
   43758           0 :       else if ( PyMapping_Check( swig_obj[8] ) ) {
   43759           0 :         int bErr = FALSE;
   43760           0 :         arg9 = CSLFromPyMapping(swig_obj[8], &bErr);
   43761           0 :         if ( bErr )
   43762             :         {
   43763           0 :           SWIG_fail;
   43764             :         }
   43765             :       }
   43766             :       else {
   43767           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   43768           0 :         SWIG_fail;
   43769             :       }
   43770             :     }
   43771             :   }
   43772           2 :   {
   43773           2 :     const int bLocalUseExceptions = GetUseExceptions();
   43774           2 :     if ( bLocalUseExceptions ) {
   43775           0 :       pushErrorHandler();
   43776             :     }
   43777           2 :     {
   43778           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43779           2 :       result = (CPLErr)GDALRasterBandShadow_AdviseRead(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
   43780           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43781             :     }
   43782           2 :     if ( bLocalUseExceptions ) {
   43783           0 :       popErrorHandler();
   43784             :     }
   43785             : #ifndef SED_HACKS
   43786             :     if ( bLocalUseExceptions ) {
   43787             :       CPLErr eclass = CPLGetLastErrorType();
   43788             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43789             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43790             :       }
   43791             :     }
   43792             : #endif
   43793             :   }
   43794           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   43795           2 :   {
   43796             :     /* %typemap(freearg) char **dict */
   43797           2 :     CSLDestroy( arg9 );
   43798             :   }
   43799           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; } }
   43800             :   return resultobj;
   43801           0 : fail:
   43802           0 :   {
   43803             :     /* %typemap(freearg) char **dict */
   43804           0 :     CSLDestroy( arg9 );
   43805             :   }
   43806             :   return NULL;
   43807             : }
   43808             : 
   43809             : 
   43810          69 : SWIGINTERN PyObject *_wrap_Band_InterpolateAtPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   43811          69 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43812          69 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43813          69 :   double arg2 ;
   43814          69 :   double arg3 ;
   43815          69 :   GDALRIOResampleAlg arg4 ;
   43816          69 :   double *arg5 = (double *) 0 ;
   43817          69 :   double *arg6 = (double *) 0 ;
   43818          69 :   void *argp1 = 0 ;
   43819          69 :   int res1 = 0 ;
   43820          69 :   double val2 ;
   43821          69 :   int ecode2 = 0 ;
   43822          69 :   double val3 ;
   43823          69 :   int ecode3 = 0 ;
   43824          69 :   double temp5 ;
   43825          69 :   int res5 = SWIG_TMPOBJ ;
   43826          69 :   double temp6 ;
   43827          69 :   int res6 = SWIG_TMPOBJ ;
   43828          69 :   PyObject *swig_obj[4] ;
   43829          69 :   CPLErr result;
   43830             :   
   43831          69 :   arg5 = &temp5;
   43832          69 :   arg6 = &temp6;
   43833          69 :   if (!SWIG_Python_UnpackTuple(args, "Band_InterpolateAtPoint", 4, 4, swig_obj)) SWIG_fail;
   43834          69 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43835          69 :   if (!SWIG_IsOK(res1)) {
   43836           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_InterpolateAtPoint" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43837             :   }
   43838          69 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43839          69 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   43840          69 :   if (!SWIG_IsOK(ecode2)) {
   43841           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_InterpolateAtPoint" "', argument " "2"" of type '" "double""'");
   43842             :   } 
   43843          69 :   arg2 = static_cast< double >(val2);
   43844          69 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   43845          69 :   if (!SWIG_IsOK(ecode3)) {
   43846           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_InterpolateAtPoint" "', argument " "3"" of type '" "double""'");
   43847             :   } 
   43848          69 :   arg3 = static_cast< double >(val3);
   43849          69 :   {
   43850             :     // %typemap(in) GDALRIOResampleAlg
   43851          69 :     int val = 0;
   43852          69 :     int ecode = SWIG_AsVal_int(swig_obj[3], &val);
   43853          69 :     if (!SWIG_IsOK(ecode)) {
   43854           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALRIOResampleAlg");
   43855             :     }
   43856          69 :     if( val < 0 ||
   43857          69 :       ( val >= static_cast<int>(GRIORA_RESERVED_START) &&
   43858          69 :         val <= static_cast<int>(GRIORA_RESERVED_END) ) ||
   43859             :       val > static_cast<int>(GRIORA_LAST) )
   43860             :     {
   43861           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for resample_alg");
   43862             :     }
   43863          69 :     arg4 = static_cast< GDALRIOResampleAlg >(val);
   43864             :   }
   43865          69 :   {
   43866          69 :     const int bLocalUseExceptions = GetUseExceptions();
   43867          69 :     if ( bLocalUseExceptions ) {
   43868          68 :       pushErrorHandler();
   43869             :     }
   43870          69 :     {
   43871          69 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   43872          69 :       result = (CPLErr)GDALRasterBandShadow_InterpolateAtPoint(arg1,arg2,arg3,arg4,arg5,arg6);
   43873          69 :       SWIG_PYTHON_THREAD_END_ALLOW;
   43874             :     }
   43875          69 :     if ( bLocalUseExceptions ) {
   43876          68 :       popErrorHandler();
   43877             :     }
   43878             : #ifndef SED_HACKS
   43879             :     if ( bLocalUseExceptions ) {
   43880             :       CPLErr eclass = CPLGetLastErrorType();
   43881             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   43882             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   43883             :       }
   43884             :     }
   43885             : #endif
   43886             :   }
   43887          69 :   resultobj = SWIG_From_int(static_cast< int >(result));
   43888          69 :   if (ReturnSame(SWIG_IsTmpObj(res5))) {
   43889          69 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
   43890             :   } else {
   43891           0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   43892           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
   43893             :   }
   43894          69 :   if (ReturnSame(SWIG_IsTmpObj(res6))) {
   43895          69 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
   43896             :   } else {
   43897           0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   43898           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
   43899             :   }
   43900          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; } }
   43901             :   return resultobj;
   43902             : fail:
   43903             :   return NULL;
   43904             : }
   43905             : 
   43906             : 
   43907          15 : SWIGINTERN PyObject *_wrap_Band_InterpolateAtGeolocation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   43908          15 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   43909          15 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   43910          15 :   double arg2 ;
   43911          15 :   double arg3 ;
   43912          15 :   OSRSpatialReferenceShadow *arg4 = (OSRSpatialReferenceShadow *) 0 ;
   43913          15 :   GDALRIOResampleAlg arg5 ;
   43914          15 :   double *arg6 = (double *) 0 ;
   43915          15 :   double *arg7 = (double *) 0 ;
   43916          15 :   char **arg8 = (char **) NULL ;
   43917          15 :   void *argp1 = 0 ;
   43918          15 :   int res1 = 0 ;
   43919          15 :   double val2 ;
   43920          15 :   int ecode2 = 0 ;
   43921          15 :   double val3 ;
   43922          15 :   int ecode3 = 0 ;
   43923          15 :   void *argp4 = 0 ;
   43924          15 :   int res4 = 0 ;
   43925          15 :   double temp6 ;
   43926          15 :   int res6 = SWIG_TMPOBJ ;
   43927          15 :   double temp7 ;
   43928          15 :   int res7 = SWIG_TMPOBJ ;
   43929          15 :   PyObject *swig_obj[6] ;
   43930          15 :   CPLErr result;
   43931             :   
   43932          15 :   arg6 = &temp6;
   43933          15 :   arg7 = &temp7;
   43934          15 :   if (!SWIG_Python_UnpackTuple(args, "Band_InterpolateAtGeolocation", 5, 6, swig_obj)) SWIG_fail;
   43935          15 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   43936          15 :   if (!SWIG_IsOK(res1)) {
   43937           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_InterpolateAtGeolocation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   43938             :   }
   43939          15 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   43940          15 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   43941          15 :   if (!SWIG_IsOK(ecode2)) {
   43942           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_InterpolateAtGeolocation" "', argument " "2"" of type '" "double""'");
   43943             :   } 
   43944          15 :   arg2 = static_cast< double >(val2);
   43945          15 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   43946          15 :   if (!SWIG_IsOK(ecode3)) {
   43947           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_InterpolateAtGeolocation" "', argument " "3"" of type '" "double""'");
   43948             :   } 
   43949          15 :   arg3 = static_cast< double >(val3);
   43950          15 :   res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
   43951          15 :   if (!SWIG_IsOK(res4)) {
   43952           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Band_InterpolateAtGeolocation" "', argument " "4"" of type '" "OSRSpatialReferenceShadow *""'"); 
   43953             :   }
   43954          15 :   arg4 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp4);
   43955          15 :   {
   43956             :     // %typemap(in) GDALRIOResampleAlg
   43957          15 :     int val = 0;
   43958          15 :     int ecode = SWIG_AsVal_int(swig_obj[4], &val);
   43959          15 :     if (!SWIG_IsOK(ecode)) {
   43960           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALRIOResampleAlg");
   43961             :     }
   43962          15 :     if( val < 0 ||
   43963          15 :       ( val >= static_cast<int>(GRIORA_RESERVED_START) &&
   43964          15 :         val <= static_cast<int>(GRIORA_RESERVED_END) ) ||
   43965             :       val > static_cast<int>(GRIORA_LAST) )
   43966             :     {
   43967           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for resample_alg");
   43968             :     }
   43969          15 :     arg5 = static_cast< GDALRIOResampleAlg >(val);
   43970             :   }
   43971          15 :   if (swig_obj[5]) {
   43972           0 :     {
   43973             :       /* %typemap(in) char **dict */
   43974           0 :       arg8 = NULL;
   43975           0 :       if ( PySequence_Check( swig_obj[5] ) ) {
   43976           0 :         int bErr = FALSE;
   43977           0 :         arg8 = CSLFromPySequence(swig_obj[5], &bErr);
   43978           0 :         if ( bErr )
   43979             :         {
   43980           0 :           SWIG_fail;
   43981             :         }
   43982             :       }
   43983           0 :       else if ( PyMapping_Check( swig_obj[5] ) ) {
   43984           0 :         int bErr = FALSE;
   43985           0 :         arg8 = CSLFromPyMapping(swig_obj[5], &bErr);
   43986           0 :         if ( bErr )
   43987             :         {
   43988           0 :           SWIG_fail;
   43989             :         }
   43990             :       }
   43991             :       else {
   43992           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   43993           0 :         SWIG_fail;
   43994             :       }
   43995             :     }
   43996             :   }
   43997          15 :   {
   43998          15 :     const int bLocalUseExceptions = GetUseExceptions();
   43999          15 :     if ( bLocalUseExceptions ) {
   44000          15 :       pushErrorHandler();
   44001             :     }
   44002          15 :     {
   44003          15 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44004          15 :       result = (CPLErr)GDALRasterBandShadow_InterpolateAtGeolocation(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
   44005          15 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44006             :     }
   44007          15 :     if ( bLocalUseExceptions ) {
   44008          15 :       popErrorHandler();
   44009             :     }
   44010             : #ifndef SED_HACKS
   44011             :     if ( bLocalUseExceptions ) {
   44012             :       CPLErr eclass = CPLGetLastErrorType();
   44013             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44014             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44015             :       }
   44016             :     }
   44017             : #endif
   44018             :   }
   44019          15 :   resultobj = SWIG_From_int(static_cast< int >(result));
   44020          15 :   if (ReturnSame(SWIG_IsTmpObj(res6))) {
   44021          15 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
   44022             :   } else {
   44023           0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   44024           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
   44025             :   }
   44026          15 :   if (ReturnSame(SWIG_IsTmpObj(res7))) {
   44027          15 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7)));
   44028             :   } else {
   44029           0 :     int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   44030           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags));
   44031             :   }
   44032          15 :   {
   44033             :     /* %typemap(freearg) char **dict */
   44034          15 :     CSLDestroy( arg8 );
   44035             :   }
   44036          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; } }
   44037             :   return resultobj;
   44038           0 : fail:
   44039           0 :   {
   44040             :     /* %typemap(freearg) char **dict */
   44041           0 :     CSLDestroy( arg8 );
   44042             :   }
   44043             :   return NULL;
   44044             : }
   44045             : 
   44046             : 
   44047           2 : SWIGINTERN PyObject *_wrap_Band_ComputeMinMaxLocation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44048           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44049           2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44050           2 :   double *arg2 = (double *) 0 ;
   44051           2 :   double *arg3 = (double *) 0 ;
   44052           2 :   int *arg4 = (int *) 0 ;
   44053           2 :   int *arg5 = (int *) 0 ;
   44054           2 :   int *arg6 = (int *) 0 ;
   44055           2 :   int *arg7 = (int *) 0 ;
   44056           2 :   void *argp1 = 0 ;
   44057           2 :   int res1 = 0 ;
   44058           2 :   double temp2 ;
   44059           2 :   int res2 = SWIG_TMPOBJ ;
   44060           2 :   double temp3 ;
   44061           2 :   int res3 = SWIG_TMPOBJ ;
   44062           2 :   int temp4 ;
   44063           2 :   int res4 = SWIG_TMPOBJ ;
   44064           2 :   int temp5 ;
   44065           2 :   int res5 = SWIG_TMPOBJ ;
   44066           2 :   int temp6 ;
   44067           2 :   int res6 = SWIG_TMPOBJ ;
   44068           2 :   int temp7 ;
   44069           2 :   int res7 = SWIG_TMPOBJ ;
   44070           2 :   PyObject *swig_obj[1] ;
   44071           2 :   CPLErr result;
   44072             :   
   44073           2 :   arg2 = &temp2;
   44074           2 :   arg3 = &temp3;
   44075           2 :   arg4 = &temp4;
   44076           2 :   arg5 = &temp5;
   44077           2 :   arg6 = &temp6;
   44078           2 :   arg7 = &temp7;
   44079           2 :   if (!args) SWIG_fail;
   44080           2 :   swig_obj[0] = args;
   44081           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44082           2 :   if (!SWIG_IsOK(res1)) {
   44083           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ComputeMinMaxLocation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44084             :   }
   44085           2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44086           2 :   {
   44087           2 :     const int bLocalUseExceptions = GetUseExceptions();
   44088           2 :     if ( bLocalUseExceptions ) {
   44089           0 :       pushErrorHandler();
   44090             :     }
   44091           2 :     {
   44092           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44093           2 :       result = (CPLErr)GDALRasterBandShadow_ComputeMinMaxLocation(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   44094           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44095             :     }
   44096           2 :     if ( bLocalUseExceptions ) {
   44097           0 :       popErrorHandler();
   44098             :     }
   44099             : #ifndef SED_HACKS
   44100             :     if ( bLocalUseExceptions ) {
   44101             :       CPLErr eclass = CPLGetLastErrorType();
   44102             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44103             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44104             :       }
   44105             :     }
   44106             : #endif
   44107             :   }
   44108           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   44109           2 :   if (ReturnSame(SWIG_IsTmpObj(res2))) {
   44110           2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2)));
   44111             :   } else {
   44112           0 :     int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   44113           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags));
   44114             :   }
   44115           2 :   if (ReturnSame(SWIG_IsTmpObj(res3))) {
   44116           2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
   44117             :   } else {
   44118           0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   44119           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
   44120             :   }
   44121           2 :   if (ReturnSame(SWIG_IsTmpObj(res4))) {
   44122           2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4)));
   44123             :   } else {
   44124           0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   44125           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags));
   44126             :   }
   44127           2 :   if (ReturnSame(SWIG_IsTmpObj(res5))) {
   44128           2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5)));
   44129             :   } else {
   44130           0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   44131           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags));
   44132             :   }
   44133           2 :   if (ReturnSame(SWIG_IsTmpObj(res6))) {
   44134           2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6)));
   44135             :   } else {
   44136           0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   44137           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags));
   44138             :   }
   44139           2 :   if (ReturnSame(SWIG_IsTmpObj(res7))) {
   44140           2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg7)));
   44141             :   } else {
   44142           0 :     int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   44143           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_int, new_flags));
   44144             :   }
   44145           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; } }
   44146             :   return resultobj;
   44147             : fail:
   44148             :   return NULL;
   44149             : }
   44150             : 
   44151             : 
   44152          21 : SWIGINTERN PyObject *_wrap_Band_AsMDArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44153          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44154          21 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44155          21 :   void *argp1 = 0 ;
   44156          21 :   int res1 = 0 ;
   44157          21 :   PyObject *swig_obj[1] ;
   44158          21 :   GDALMDArrayHS *result = 0 ;
   44159             :   
   44160          21 :   if (!args) SWIG_fail;
   44161          21 :   swig_obj[0] = args;
   44162          21 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44163          21 :   if (!SWIG_IsOK(res1)) {
   44164           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_AsMDArray" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44165             :   }
   44166          21 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44167          21 :   {
   44168          21 :     const int bLocalUseExceptions = GetUseExceptions();
   44169          21 :     if ( bLocalUseExceptions ) {
   44170           0 :       pushErrorHandler();
   44171             :     }
   44172          21 :     {
   44173          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44174          21 :       result = (GDALMDArrayHS *)GDALRasterBandShadow_AsMDArray(arg1);
   44175          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44176             :     }
   44177          21 :     if ( bLocalUseExceptions ) {
   44178           0 :       popErrorHandler();
   44179             :     }
   44180             : #ifndef SED_HACKS
   44181             :     if ( bLocalUseExceptions ) {
   44182             :       CPLErr eclass = CPLGetLastErrorType();
   44183             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44184             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44185             :       }
   44186             :     }
   44187             : #endif
   44188             :   }
   44189          21 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMDArrayHS, SWIG_POINTER_OWN |  0 );
   44190          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; } }
   44191             :   return resultobj;
   44192             : fail:
   44193             :   return NULL;
   44194             : }
   44195             : 
   44196             : 
   44197        4878 : SWIGINTERN PyObject *_wrap_Band__EnablePixelTypeSignedByteWarning(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44198        4878 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44199        4878 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44200        4878 :   bool arg2 ;
   44201        4878 :   void *argp1 = 0 ;
   44202        4878 :   int res1 = 0 ;
   44203        4878 :   bool val2 ;
   44204        4878 :   int ecode2 = 0 ;
   44205        4878 :   PyObject *swig_obj[2] ;
   44206             :   
   44207        4878 :   if (!SWIG_Python_UnpackTuple(args, "Band__EnablePixelTypeSignedByteWarning", 2, 2, swig_obj)) SWIG_fail;
   44208        4878 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44209        4878 :   if (!SWIG_IsOK(res1)) {
   44210           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band__EnablePixelTypeSignedByteWarning" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44211             :   }
   44212        4878 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44213        4878 :   ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
   44214        4878 :   if (!SWIG_IsOK(ecode2)) {
   44215           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band__EnablePixelTypeSignedByteWarning" "', argument " "2"" of type '" "bool""'");
   44216             :   } 
   44217        4878 :   arg2 = static_cast< bool >(val2);
   44218        4878 :   {
   44219        4878 :     const int bLocalUseExceptions = GetUseExceptions();
   44220        4878 :     if ( bLocalUseExceptions ) {
   44221        4476 :       pushErrorHandler();
   44222             :     }
   44223        4878 :     {
   44224        4878 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44225        4878 :       GDALRasterBandShadow__EnablePixelTypeSignedByteWarning(arg1,arg2);
   44226        4878 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44227             :     }
   44228        4878 :     if ( bLocalUseExceptions ) {
   44229        4476 :       popErrorHandler();
   44230             :     }
   44231             : #ifndef SED_HACKS
   44232             :     if ( bLocalUseExceptions ) {
   44233             :       CPLErr eclass = CPLGetLastErrorType();
   44234             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44235             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44236             :       }
   44237             :     }
   44238             : #endif
   44239             :   }
   44240        4878 :   resultobj = SWIG_Py_Void();
   44241        4878 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   44242             :   return resultobj;
   44243             : fail:
   44244             :   return NULL;
   44245             : }
   44246             : 
   44247             : 
   44248           6 : SWIGINTERN PyObject *_wrap_Band_UnaryOp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44249           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44250           6 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44251           6 :   GDALRasterAlgebraUnaryOperation arg2 ;
   44252           6 :   void *argp1 = 0 ;
   44253           6 :   int res1 = 0 ;
   44254           6 :   int val2 ;
   44255           6 :   int ecode2 = 0 ;
   44256           6 :   PyObject *swig_obj[2] ;
   44257           6 :   GDALComputedRasterBandShadow *result = 0 ;
   44258             :   
   44259           6 :   if (!SWIG_Python_UnpackTuple(args, "Band_UnaryOp", 2, 2, swig_obj)) SWIG_fail;
   44260           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44261           6 :   if (!SWIG_IsOK(res1)) {
   44262           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_UnaryOp" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44263             :   }
   44264           6 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44265           6 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   44266           6 :   if (!SWIG_IsOK(ecode2)) {
   44267           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_UnaryOp" "', argument " "2"" of type '" "GDALRasterAlgebraUnaryOperation""'");
   44268             :   } 
   44269           6 :   arg2 = static_cast< GDALRasterAlgebraUnaryOperation >(val2);
   44270           6 :   {
   44271           6 :     const int bLocalUseExceptions = GetUseExceptions();
   44272           6 :     if ( bLocalUseExceptions ) {
   44273           6 :       pushErrorHandler();
   44274             :     }
   44275           6 :     {
   44276           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44277           6 :       result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_UnaryOp(arg1,arg2);
   44278           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44279             :     }
   44280           6 :     if ( bLocalUseExceptions ) {
   44281           6 :       popErrorHandler();
   44282             :     }
   44283             : #ifndef SED_HACKS
   44284             :     if ( bLocalUseExceptions ) {
   44285             :       CPLErr eclass = CPLGetLastErrorType();
   44286             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44287             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44288             :       }
   44289             :     }
   44290             : #endif
   44291             :   }
   44292           6 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
   44293           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; } }
   44294             :   return resultobj;
   44295             : fail:
   44296             :   return NULL;
   44297             : }
   44298             : 
   44299             : 
   44300          57 : SWIGINTERN PyObject *_wrap_Band_BinaryOpBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44301          57 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44302          57 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44303          57 :   GDALRasterAlgebraBinaryOperation arg2 ;
   44304          57 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   44305          57 :   void *argp1 = 0 ;
   44306          57 :   int res1 = 0 ;
   44307          57 :   int val2 ;
   44308          57 :   int ecode2 = 0 ;
   44309          57 :   void *argp3 = 0 ;
   44310          57 :   int res3 = 0 ;
   44311          57 :   PyObject *swig_obj[3] ;
   44312          57 :   GDALComputedRasterBandShadow *result = 0 ;
   44313             :   
   44314          57 :   if (!SWIG_Python_UnpackTuple(args, "Band_BinaryOpBand", 3, 3, swig_obj)) SWIG_fail;
   44315          57 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44316          57 :   if (!SWIG_IsOK(res1)) {
   44317           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_BinaryOpBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44318             :   }
   44319          57 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44320          57 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   44321          57 :   if (!SWIG_IsOK(ecode2)) {
   44322           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_BinaryOpBand" "', argument " "2"" of type '" "GDALRasterAlgebraBinaryOperation""'");
   44323             :   } 
   44324          57 :   arg2 = static_cast< GDALRasterAlgebraBinaryOperation >(val2);
   44325          57 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44326          57 :   if (!SWIG_IsOK(res3)) {
   44327           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Band_BinaryOpBand" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   44328             :   }
   44329          57 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   44330          57 :   {
   44331          57 :     if (!arg3) {
   44332           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   44333             :     }
   44334             :   }
   44335          57 :   {
   44336          57 :     const int bLocalUseExceptions = GetUseExceptions();
   44337          57 :     if ( bLocalUseExceptions ) {
   44338          57 :       pushErrorHandler();
   44339             :     }
   44340          57 :     {
   44341          57 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44342          57 :       result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_BinaryOpBand(arg1,arg2,arg3);
   44343          57 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44344             :     }
   44345          57 :     if ( bLocalUseExceptions ) {
   44346          57 :       popErrorHandler();
   44347             :     }
   44348             : #ifndef SED_HACKS
   44349             :     if ( bLocalUseExceptions ) {
   44350             :       CPLErr eclass = CPLGetLastErrorType();
   44351             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44352             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44353             :       }
   44354             :     }
   44355             : #endif
   44356             :   }
   44357          57 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
   44358          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; } }
   44359             :   return resultobj;
   44360             : fail:
   44361             :   return NULL;
   44362             : }
   44363             : 
   44364             : 
   44365          59 : SWIGINTERN PyObject *_wrap_Band_BinaryOpDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44366          59 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44367          59 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44368          59 :   GDALRasterAlgebraBinaryOperation arg2 ;
   44369          59 :   double arg3 ;
   44370          59 :   void *argp1 = 0 ;
   44371          59 :   int res1 = 0 ;
   44372          59 :   int val2 ;
   44373          59 :   int ecode2 = 0 ;
   44374          59 :   double val3 ;
   44375          59 :   int ecode3 = 0 ;
   44376          59 :   PyObject *swig_obj[3] ;
   44377          59 :   GDALComputedRasterBandShadow *result = 0 ;
   44378             :   
   44379          59 :   if (!SWIG_Python_UnpackTuple(args, "Band_BinaryOpDouble", 3, 3, swig_obj)) SWIG_fail;
   44380          59 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44381          59 :   if (!SWIG_IsOK(res1)) {
   44382           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_BinaryOpDouble" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44383             :   }
   44384          59 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44385          59 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   44386          59 :   if (!SWIG_IsOK(ecode2)) {
   44387           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_BinaryOpDouble" "', argument " "2"" of type '" "GDALRasterAlgebraBinaryOperation""'");
   44388             :   } 
   44389          59 :   arg2 = static_cast< GDALRasterAlgebraBinaryOperation >(val2);
   44390          59 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   44391          59 :   if (!SWIG_IsOK(ecode3)) {
   44392           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_BinaryOpDouble" "', argument " "3"" of type '" "double""'");
   44393             :   } 
   44394          59 :   arg3 = static_cast< double >(val3);
   44395          59 :   {
   44396          59 :     const int bLocalUseExceptions = GetUseExceptions();
   44397          59 :     if ( bLocalUseExceptions ) {
   44398          59 :       pushErrorHandler();
   44399             :     }
   44400          59 :     {
   44401          59 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44402          59 :       result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_BinaryOpDouble(arg1,arg2,arg3);
   44403          59 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44404             :     }
   44405          59 :     if ( bLocalUseExceptions ) {
   44406          59 :       popErrorHandler();
   44407             :     }
   44408             : #ifndef SED_HACKS
   44409             :     if ( bLocalUseExceptions ) {
   44410             :       CPLErr eclass = CPLGetLastErrorType();
   44411             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44412             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44413             :       }
   44414             :     }
   44415             : #endif
   44416             :   }
   44417          59 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
   44418          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; } }
   44419             :   return resultobj;
   44420             : fail:
   44421             :   return NULL;
   44422             : }
   44423             : 
   44424             : 
   44425          18 : SWIGINTERN PyObject *_wrap_Band_BinaryOpDoubleToBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44426          18 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44427          18 :   double arg1 ;
   44428          18 :   GDALRasterAlgebraBinaryOperation arg2 ;
   44429          18 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   44430          18 :   double val1 ;
   44431          18 :   int ecode1 = 0 ;
   44432          18 :   int val2 ;
   44433          18 :   int ecode2 = 0 ;
   44434          18 :   void *argp3 = 0 ;
   44435          18 :   int res3 = 0 ;
   44436          18 :   PyObject *swig_obj[3] ;
   44437          18 :   GDALComputedRasterBandShadow *result = 0 ;
   44438             :   
   44439          18 :   if (!SWIG_Python_UnpackTuple(args, "Band_BinaryOpDoubleToBand", 3, 3, swig_obj)) SWIG_fail;
   44440          18 :   ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
   44441          18 :   if (!SWIG_IsOK(ecode1)) {
   44442           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Band_BinaryOpDoubleToBand" "', argument " "1"" of type '" "double""'");
   44443             :   } 
   44444          18 :   arg1 = static_cast< double >(val1);
   44445          18 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   44446          18 :   if (!SWIG_IsOK(ecode2)) {
   44447           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_BinaryOpDoubleToBand" "', argument " "2"" of type '" "GDALRasterAlgebraBinaryOperation""'");
   44448             :   } 
   44449          18 :   arg2 = static_cast< GDALRasterAlgebraBinaryOperation >(val2);
   44450          18 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44451          18 :   if (!SWIG_IsOK(res3)) {
   44452           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Band_BinaryOpDoubleToBand" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   44453             :   }
   44454          18 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   44455          18 :   {
   44456          18 :     if (!arg3) {
   44457           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   44458             :     }
   44459             :   }
   44460          18 :   {
   44461          18 :     const int bLocalUseExceptions = GetUseExceptions();
   44462          18 :     if ( bLocalUseExceptions ) {
   44463          18 :       pushErrorHandler();
   44464             :     }
   44465          18 :     {
   44466          18 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44467          18 :       result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_BinaryOpDoubleToBand(arg1,arg2,arg3);
   44468          18 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44469             :     }
   44470          18 :     if ( bLocalUseExceptions ) {
   44471          18 :       popErrorHandler();
   44472             :     }
   44473             : #ifndef SED_HACKS
   44474             :     if ( bLocalUseExceptions ) {
   44475             :       CPLErr eclass = CPLGetLastErrorType();
   44476             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44477             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44478             :       }
   44479             :     }
   44480             : #endif
   44481             :   }
   44482          18 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
   44483          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; } }
   44484             :   return resultobj;
   44485             : fail:
   44486             :   return NULL;
   44487             : }
   44488             : 
   44489             : 
   44490          12 : SWIGINTERN PyObject *_wrap_Band_IfThenElse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44491          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44492          12 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44493          12 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   44494          12 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   44495          12 :   void *argp1 = 0 ;
   44496          12 :   int res1 = 0 ;
   44497          12 :   void *argp2 = 0 ;
   44498          12 :   int res2 = 0 ;
   44499          12 :   void *argp3 = 0 ;
   44500          12 :   int res3 = 0 ;
   44501          12 :   PyObject *swig_obj[3] ;
   44502          12 :   GDALComputedRasterBandShadow *result = 0 ;
   44503             :   
   44504          12 :   if (!SWIG_Python_UnpackTuple(args, "Band_IfThenElse", 3, 3, swig_obj)) SWIG_fail;
   44505          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44506          12 :   if (!SWIG_IsOK(res1)) {
   44507           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_IfThenElse" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44508             :   }
   44509          12 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44510          12 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44511          12 :   if (!SWIG_IsOK(res2)) {
   44512           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_IfThenElse" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   44513             :   }
   44514          12 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   44515          12 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44516          12 :   if (!SWIG_IsOK(res3)) {
   44517           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Band_IfThenElse" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   44518             :   }
   44519          12 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   44520          12 :   {
   44521          12 :     if (!arg1) {
   44522           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   44523             :     }
   44524             :   }
   44525          12 :   {
   44526          12 :     if (!arg2) {
   44527           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   44528             :     }
   44529             :   }
   44530          12 :   {
   44531          12 :     if (!arg3) {
   44532           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   44533             :     }
   44534             :   }
   44535          12 :   {
   44536          12 :     const int bLocalUseExceptions = GetUseExceptions();
   44537          12 :     if ( bLocalUseExceptions ) {
   44538          12 :       pushErrorHandler();
   44539             :     }
   44540          12 :     {
   44541          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44542          12 :       result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_IfThenElse(arg1,arg2,arg3);
   44543          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44544             :     }
   44545          12 :     if ( bLocalUseExceptions ) {
   44546          12 :       popErrorHandler();
   44547             :     }
   44548             : #ifndef SED_HACKS
   44549             :     if ( bLocalUseExceptions ) {
   44550             :       CPLErr eclass = CPLGetLastErrorType();
   44551             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44552             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44553             :       }
   44554             :     }
   44555             : #endif
   44556             :   }
   44557          12 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
   44558          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; } }
   44559             :   return resultobj;
   44560             : fail:
   44561             :   return NULL;
   44562             : }
   44563             : 
   44564             : 
   44565          16 : SWIGINTERN PyObject *_wrap_Band_AsType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44566          16 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44567          16 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44568          16 :   GDALDataType arg2 ;
   44569          16 :   void *argp1 = 0 ;
   44570          16 :   int res1 = 0 ;
   44571          16 :   PyObject *swig_obj[2] ;
   44572          16 :   GDALComputedRasterBandShadow *result = 0 ;
   44573             :   
   44574          16 :   if (!SWIG_Python_UnpackTuple(args, "Band_AsType", 2, 2, swig_obj)) SWIG_fail;
   44575          16 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44576          16 :   if (!SWIG_IsOK(res1)) {
   44577           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_AsType" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44578             :   }
   44579          16 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44580          16 :   {
   44581             :     // %typemap(in) GDALDataType
   44582          16 :     int val = 0;
   44583          16 :     int ecode = SWIG_AsVal_int(swig_obj[1], &val);
   44584          16 :     if (!SWIG_IsOK(ecode)) {
   44585           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   44586             :     }
   44587          16 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   44588             :     {
   44589           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   44590             :     }
   44591          16 :     arg2 = static_cast<GDALDataType>(val);
   44592             :   }
   44593          16 :   {
   44594          16 :     const int bLocalUseExceptions = GetUseExceptions();
   44595          16 :     if ( bLocalUseExceptions ) {
   44596          16 :       pushErrorHandler();
   44597             :     }
   44598          16 :     {
   44599          16 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44600          16 :       result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_AsType(arg1,arg2);
   44601          16 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44602             :     }
   44603          16 :     if ( bLocalUseExceptions ) {
   44604          16 :       popErrorHandler();
   44605             :     }
   44606             : #ifndef SED_HACKS
   44607             :     if ( bLocalUseExceptions ) {
   44608             :       CPLErr eclass = CPLGetLastErrorType();
   44609             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44610             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44611             :       }
   44612             :     }
   44613             : #endif
   44614             :   }
   44615          16 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
   44616          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; } }
   44617             :   return resultobj;
   44618             : fail:
   44619             :   return NULL;
   44620             : }
   44621             : 
   44622             : 
   44623           4 : SWIGINTERN PyObject *_wrap_Band_MaximumOfNBands(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44624           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44625           4 :   int arg1 ;
   44626           4 :   GDALRasterBandShadow **arg2 = (GDALRasterBandShadow **) 0 ;
   44627           4 :   PyObject *swig_obj[1] ;
   44628           4 :   GDALComputedRasterBandShadow *result = 0 ;
   44629             :   
   44630           4 :   if (!args) SWIG_fail;
   44631           4 :   swig_obj[0] = args;
   44632           4 :   {
   44633             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALRasterBandShadow *optional_##GDALRasterBandShadow)*/
   44634           4 :     if ( !PySequence_Check(swig_obj[0]) ) {
   44635           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   44636           0 :       SWIG_fail;
   44637             :     }
   44638           4 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   44639           4 :     if( size > (Py_ssize_t)INT_MAX ) {
   44640           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   44641           0 :       SWIG_fail;
   44642             :     }
   44643           4 :     if( (size_t)size > SIZE_MAX / sizeof(GDALRasterBandShadow*) ) {
   44644           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   44645           0 :       SWIG_fail;
   44646             :     }
   44647           4 :     arg1 = (int)size;
   44648           4 :     arg2 = (GDALRasterBandShadow**) VSIMalloc(arg1*sizeof(GDALRasterBandShadow*));
   44649           4 :     if( !arg2) {
   44650           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   44651           0 :       SWIG_fail;
   44652             :     }
   44653             :     
   44654          12 :     for( int i = 0; i<arg1; i++ ) {
   44655           8 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   44656           8 :       GDALRasterBandShadow* rawobjectpointer = NULL;
   44657           8 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0 ));
   44658           8 :       if (!rawobjectpointer) {
   44659           0 :         Py_DECREF(o);
   44660           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALRasterBandShadow");
   44661           0 :         SWIG_fail;
   44662             :       }
   44663           8 :       arg2[i] = rawobjectpointer;
   44664           8 :       Py_DECREF(o);
   44665             :       
   44666             :     }
   44667             :   }
   44668           4 :   {
   44669           4 :     const int bLocalUseExceptions = GetUseExceptions();
   44670           4 :     if ( bLocalUseExceptions ) {
   44671           4 :       pushErrorHandler();
   44672             :     }
   44673           4 :     {
   44674           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44675           4 :       result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_MaximumOfNBands(arg1,arg2);
   44676           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44677             :     }
   44678           4 :     if ( bLocalUseExceptions ) {
   44679           4 :       popErrorHandler();
   44680             :     }
   44681             : #ifndef SED_HACKS
   44682             :     if ( bLocalUseExceptions ) {
   44683             :       CPLErr eclass = CPLGetLastErrorType();
   44684             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44685             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44686             :       }
   44687             :     }
   44688             : #endif
   44689             :   }
   44690           4 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
   44691           4 :   {
   44692             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   44693           4 :     CPLFree( arg2 );
   44694             :   }
   44695           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; } }
   44696             :   return resultobj;
   44697           0 : fail:
   44698           0 :   {
   44699             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   44700           0 :     CPLFree( arg2 );
   44701             :   }
   44702             :   return NULL;
   44703             : }
   44704             : 
   44705             : 
   44706           2 : SWIGINTERN PyObject *_wrap_Band_MaxConstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44707           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44708           2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44709           2 :   double arg2 ;
   44710           2 :   void *argp1 = 0 ;
   44711           2 :   int res1 = 0 ;
   44712           2 :   double val2 ;
   44713           2 :   int ecode2 = 0 ;
   44714           2 :   PyObject *swig_obj[2] ;
   44715           2 :   GDALComputedRasterBandShadow *result = 0 ;
   44716             :   
   44717           2 :   if (!SWIG_Python_UnpackTuple(args, "Band_MaxConstant", 2, 2, swig_obj)) SWIG_fail;
   44718           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44719           2 :   if (!SWIG_IsOK(res1)) {
   44720           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_MaxConstant" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44721             :   }
   44722           2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44723           2 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   44724           2 :   if (!SWIG_IsOK(ecode2)) {
   44725           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_MaxConstant" "', argument " "2"" of type '" "double""'");
   44726             :   } 
   44727           2 :   arg2 = static_cast< double >(val2);
   44728           2 :   {
   44729           2 :     const int bLocalUseExceptions = GetUseExceptions();
   44730           2 :     if ( bLocalUseExceptions ) {
   44731           2 :       pushErrorHandler();
   44732             :     }
   44733           2 :     {
   44734           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44735           2 :       result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_MaxConstant(arg1,arg2);
   44736           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44737             :     }
   44738           2 :     if ( bLocalUseExceptions ) {
   44739           2 :       popErrorHandler();
   44740             :     }
   44741             : #ifndef SED_HACKS
   44742             :     if ( bLocalUseExceptions ) {
   44743             :       CPLErr eclass = CPLGetLastErrorType();
   44744             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44745             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44746             :       }
   44747             :     }
   44748             : #endif
   44749             :   }
   44750           2 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
   44751           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; } }
   44752             :   return resultobj;
   44753             : fail:
   44754             :   return NULL;
   44755             : }
   44756             : 
   44757             : 
   44758           4 : SWIGINTERN PyObject *_wrap_Band_MinimumOfNBands(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44759           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44760           4 :   int arg1 ;
   44761           4 :   GDALRasterBandShadow **arg2 = (GDALRasterBandShadow **) 0 ;
   44762           4 :   PyObject *swig_obj[1] ;
   44763           4 :   GDALComputedRasterBandShadow *result = 0 ;
   44764             :   
   44765           4 :   if (!args) SWIG_fail;
   44766           4 :   swig_obj[0] = args;
   44767           4 :   {
   44768             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALRasterBandShadow *optional_##GDALRasterBandShadow)*/
   44769           4 :     if ( !PySequence_Check(swig_obj[0]) ) {
   44770           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   44771           0 :       SWIG_fail;
   44772             :     }
   44773           4 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   44774           4 :     if( size > (Py_ssize_t)INT_MAX ) {
   44775           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   44776           0 :       SWIG_fail;
   44777             :     }
   44778           4 :     if( (size_t)size > SIZE_MAX / sizeof(GDALRasterBandShadow*) ) {
   44779           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   44780           0 :       SWIG_fail;
   44781             :     }
   44782           4 :     arg1 = (int)size;
   44783           4 :     arg2 = (GDALRasterBandShadow**) VSIMalloc(arg1*sizeof(GDALRasterBandShadow*));
   44784           4 :     if( !arg2) {
   44785           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   44786           0 :       SWIG_fail;
   44787             :     }
   44788             :     
   44789          12 :     for( int i = 0; i<arg1; i++ ) {
   44790           8 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   44791           8 :       GDALRasterBandShadow* rawobjectpointer = NULL;
   44792           8 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0 ));
   44793           8 :       if (!rawobjectpointer) {
   44794           0 :         Py_DECREF(o);
   44795           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALRasterBandShadow");
   44796           0 :         SWIG_fail;
   44797             :       }
   44798           8 :       arg2[i] = rawobjectpointer;
   44799           8 :       Py_DECREF(o);
   44800             :       
   44801             :     }
   44802             :   }
   44803           4 :   {
   44804           4 :     const int bLocalUseExceptions = GetUseExceptions();
   44805           4 :     if ( bLocalUseExceptions ) {
   44806           4 :       pushErrorHandler();
   44807             :     }
   44808           4 :     {
   44809           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44810           4 :       result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_MinimumOfNBands(arg1,arg2);
   44811           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44812             :     }
   44813           4 :     if ( bLocalUseExceptions ) {
   44814           4 :       popErrorHandler();
   44815             :     }
   44816             : #ifndef SED_HACKS
   44817             :     if ( bLocalUseExceptions ) {
   44818             :       CPLErr eclass = CPLGetLastErrorType();
   44819             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44820             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44821             :       }
   44822             :     }
   44823             : #endif
   44824             :   }
   44825           4 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
   44826           4 :   {
   44827             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   44828           4 :     CPLFree( arg2 );
   44829             :   }
   44830           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; } }
   44831             :   return resultobj;
   44832           0 : fail:
   44833           0 :   {
   44834             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   44835           0 :     CPLFree( arg2 );
   44836             :   }
   44837             :   return NULL;
   44838             : }
   44839             : 
   44840             : 
   44841           2 : SWIGINTERN PyObject *_wrap_Band_MinConstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44842           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44843           2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44844           2 :   double arg2 ;
   44845           2 :   void *argp1 = 0 ;
   44846           2 :   int res1 = 0 ;
   44847           2 :   double val2 ;
   44848           2 :   int ecode2 = 0 ;
   44849           2 :   PyObject *swig_obj[2] ;
   44850           2 :   GDALComputedRasterBandShadow *result = 0 ;
   44851             :   
   44852           2 :   if (!SWIG_Python_UnpackTuple(args, "Band_MinConstant", 2, 2, swig_obj)) SWIG_fail;
   44853           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   44854           2 :   if (!SWIG_IsOK(res1)) {
   44855           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_MinConstant" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   44856             :   }
   44857           2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   44858           2 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   44859           2 :   if (!SWIG_IsOK(ecode2)) {
   44860           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_MinConstant" "', argument " "2"" of type '" "double""'");
   44861             :   } 
   44862           2 :   arg2 = static_cast< double >(val2);
   44863           2 :   {
   44864           2 :     const int bLocalUseExceptions = GetUseExceptions();
   44865           2 :     if ( bLocalUseExceptions ) {
   44866           2 :       pushErrorHandler();
   44867             :     }
   44868           2 :     {
   44869           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44870           2 :       result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_MinConstant(arg1,arg2);
   44871           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44872             :     }
   44873           2 :     if ( bLocalUseExceptions ) {
   44874           2 :       popErrorHandler();
   44875             :     }
   44876             : #ifndef SED_HACKS
   44877             :     if ( bLocalUseExceptions ) {
   44878             :       CPLErr eclass = CPLGetLastErrorType();
   44879             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44880             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44881             :       }
   44882             :     }
   44883             : #endif
   44884             :   }
   44885           2 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
   44886           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; } }
   44887             :   return resultobj;
   44888             : fail:
   44889             :   return NULL;
   44890             : }
   44891             : 
   44892             : 
   44893           3 : SWIGINTERN PyObject *_wrap_Band_MeanOfNBands(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   44894           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44895           3 :   int arg1 ;
   44896           3 :   GDALRasterBandShadow **arg2 = (GDALRasterBandShadow **) 0 ;
   44897           3 :   PyObject *swig_obj[1] ;
   44898           3 :   GDALComputedRasterBandShadow *result = 0 ;
   44899             :   
   44900           3 :   if (!args) SWIG_fail;
   44901           3 :   swig_obj[0] = args;
   44902           3 :   {
   44903             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALRasterBandShadow *optional_##GDALRasterBandShadow)*/
   44904           3 :     if ( !PySequence_Check(swig_obj[0]) ) {
   44905           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   44906           0 :       SWIG_fail;
   44907             :     }
   44908           3 :     Py_ssize_t size = PySequence_Size(swig_obj[0]);
   44909           3 :     if( size > (Py_ssize_t)INT_MAX ) {
   44910           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   44911           0 :       SWIG_fail;
   44912             :     }
   44913           3 :     if( (size_t)size > SIZE_MAX / sizeof(GDALRasterBandShadow*) ) {
   44914           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   44915           0 :       SWIG_fail;
   44916             :     }
   44917           3 :     arg1 = (int)size;
   44918           3 :     arg2 = (GDALRasterBandShadow**) VSIMalloc(arg1*sizeof(GDALRasterBandShadow*));
   44919           3 :     if( !arg2) {
   44920           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   44921           0 :       SWIG_fail;
   44922             :     }
   44923             :     
   44924           7 :     for( int i = 0; i<arg1; i++ ) {
   44925           4 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   44926           4 :       GDALRasterBandShadow* rawobjectpointer = NULL;
   44927           4 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0 ));
   44928           4 :       if (!rawobjectpointer) {
   44929           0 :         Py_DECREF(o);
   44930           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALRasterBandShadow");
   44931           0 :         SWIG_fail;
   44932             :       }
   44933           4 :       arg2[i] = rawobjectpointer;
   44934           4 :       Py_DECREF(o);
   44935             :       
   44936             :     }
   44937             :   }
   44938           3 :   {
   44939           3 :     const int bLocalUseExceptions = GetUseExceptions();
   44940           3 :     if ( bLocalUseExceptions ) {
   44941           3 :       pushErrorHandler();
   44942             :     }
   44943           3 :     {
   44944           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   44945           3 :       result = (GDALComputedRasterBandShadow *)GDALRasterBandShadow_MeanOfNBands(arg1,arg2);
   44946           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   44947             :     }
   44948           3 :     if ( bLocalUseExceptions ) {
   44949           3 :       popErrorHandler();
   44950             :     }
   44951             : #ifndef SED_HACKS
   44952             :     if ( bLocalUseExceptions ) {
   44953             :       CPLErr eclass = CPLGetLastErrorType();
   44954             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   44955             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   44956             :       }
   44957             :     }
   44958             : #endif
   44959             :   }
   44960           3 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_OWN |  0 );
   44961           3 :   {
   44962             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   44963           3 :     CPLFree( arg2 );
   44964             :   }
   44965           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; } }
   44966             :   return resultobj;
   44967           0 : fail:
   44968           0 :   {
   44969             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   44970           0 :     CPLFree( arg2 );
   44971             :   }
   44972             :   return NULL;
   44973             : }
   44974             : 
   44975             : 
   44976        9925 : SWIGINTERN PyObject *_wrap_Band_ReadRaster1(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   44977        9925 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   44978        9925 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   44979        9925 :   double arg2 ;
   44980        9925 :   double arg3 ;
   44981        9925 :   double arg4 ;
   44982        9925 :   double arg5 ;
   44983        9925 :   void **arg6 = (void **) 0 ;
   44984        9925 :   int *arg7 = (int *) 0 ;
   44985        9925 :   int *arg8 = (int *) 0 ;
   44986        9925 :   GDALDataType *arg9 = (GDALDataType *) 0 ;
   44987        9925 :   GIntBig *arg10 = (GIntBig *) 0 ;
   44988        9925 :   GIntBig *arg11 = (GIntBig *) 0 ;
   44989        9925 :   GDALRIOResampleAlg arg12 = (GDALRIOResampleAlg) GRIORA_NearestNeighbour ;
   44990        9925 :   GDALProgressFunc arg13 = (GDALProgressFunc) NULL ;
   44991        9925 :   void *arg14 = (void *) NULL ;
   44992        9925 :   void *arg15 = (void *) NULL ;
   44993        9925 :   void *argp1 = 0 ;
   44994        9925 :   int res1 = 0 ;
   44995        9925 :   double val2 ;
   44996        9925 :   int ecode2 = 0 ;
   44997        9925 :   double val3 ;
   44998        9925 :   int ecode3 = 0 ;
   44999        9925 :   double val4 ;
   45000        9925 :   int ecode4 = 0 ;
   45001        9925 :   double val5 ;
   45002        9925 :   int ecode5 = 0 ;
   45003        9925 :   void *pyObject6 = NULL ;
   45004        9925 :   int val7 ;
   45005        9925 :   int val8 ;
   45006        9925 :   GDALDataType val9 ;
   45007        9925 :   GIntBig val10 ;
   45008        9925 :   GIntBig val11 ;
   45009        9925 :   PyObject * obj0 = 0 ;
   45010        9925 :   PyObject * obj1 = 0 ;
   45011        9925 :   PyObject * obj2 = 0 ;
   45012        9925 :   PyObject * obj3 = 0 ;
   45013        9925 :   PyObject * obj4 = 0 ;
   45014        9925 :   PyObject * obj5 = 0 ;
   45015        9925 :   PyObject * obj6 = 0 ;
   45016        9925 :   PyObject * obj7 = 0 ;
   45017        9925 :   PyObject * obj8 = 0 ;
   45018        9925 :   PyObject * obj9 = 0 ;
   45019        9925 :   PyObject * obj10 = 0 ;
   45020        9925 :   PyObject * obj11 = 0 ;
   45021        9925 :   PyObject * obj12 = 0 ;
   45022        9925 :   PyObject * obj13 = 0 ;
   45023        9925 :   char * kwnames[] = {
   45024             :     (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 
   45025             :   };
   45026        9925 :   CPLErr result;
   45027             :   
   45028             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   45029        9925 :   PyProgressData *psProgressInfo;
   45030        9925 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   45031        9925 :   psProgressInfo->nLastReported = -1;
   45032        9925 :   psProgressInfo->psPyCallback = NULL;
   45033        9925 :   psProgressInfo->psPyCallbackData = NULL;
   45034        9925 :   arg14 = psProgressInfo;
   45035        9925 :   {
   45036             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject6 = NULL ) */
   45037        9925 :     arg6 = &pyObject6;
   45038             :   }
   45039        9925 :   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;
   45040        9925 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   45041        9925 :   if (!SWIG_IsOK(res1)) {
   45042           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ReadRaster1" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   45043             :   }
   45044        9925 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   45045        9925 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   45046        9925 :   if (!SWIG_IsOK(ecode2)) {
   45047           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_ReadRaster1" "', argument " "2"" of type '" "double""'");
   45048             :   } 
   45049        9925 :   arg2 = static_cast< double >(val2);
   45050        9925 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   45051        9925 :   if (!SWIG_IsOK(ecode3)) {
   45052           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_ReadRaster1" "', argument " "3"" of type '" "double""'");
   45053             :   } 
   45054        9925 :   arg3 = static_cast< double >(val3);
   45055        9925 :   ecode4 = SWIG_AsVal_double(obj3, &val4);
   45056        9925 :   if (!SWIG_IsOK(ecode4)) {
   45057           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_ReadRaster1" "', argument " "4"" of type '" "double""'");
   45058             :   } 
   45059        9925 :   arg4 = static_cast< double >(val4);
   45060        9925 :   ecode5 = SWIG_AsVal_double(obj4, &val5);
   45061        9925 :   if (!SWIG_IsOK(ecode5)) {
   45062           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_ReadRaster1" "', argument " "5"" of type '" "double""'");
   45063             :   } 
   45064        9925 :   arg5 = static_cast< double >(val5);
   45065        9925 :   if (obj5) {
   45066        9925 :     {
   45067             :       /* %typemap(in) (int *optional_##int) */
   45068        9925 :       if ( obj5 == Py_None ) {
   45069             :         arg7 = 0;
   45070             :       }
   45071        1299 :       else if ( PyArg_Parse( obj5,"i" ,&val7 ) ) {
   45072             :         arg7 = (int *) &val7;
   45073             :       }
   45074             :       else {
   45075           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   45076           0 :         SWIG_fail;
   45077             :       }
   45078             :     }
   45079             :   }
   45080        9925 :   if (obj6) {
   45081        9925 :     {
   45082             :       /* %typemap(in) (int *optional_##int) */
   45083        9925 :       if ( obj6 == Py_None ) {
   45084             :         arg8 = 0;
   45085             :       }
   45086        1297 :       else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
   45087             :         arg8 = (int *) &val8;
   45088             :       }
   45089             :       else {
   45090           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   45091           0 :         SWIG_fail;
   45092             :       }
   45093             :     }
   45094             :   }
   45095        9925 :   if (obj7) {
   45096        9925 :     {
   45097             :       /* %typemap(in) (GDALDataType *optional_GDALDataType) */
   45098        9925 :       int intval = 0;
   45099        9925 :       if ( obj7 == Py_None ) {
   45100             :         arg9 = NULL;
   45101             :       }
   45102        2234 :       else if ( SWIG_IsOK(SWIG_AsVal_int(obj7, &intval)) ) {
   45103        1117 :         if( intval < GDT_Unknown || intval >= GDT_TypeCount )
   45104             :         {
   45105           0 :           SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   45106             :         }
   45107        1117 :         val9 = static_cast<GDALDataType>(intval);
   45108        1117 :         arg9 = &val9;
   45109             :       }
   45110             :       else {
   45111           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   45112           0 :         SWIG_fail;
   45113             :       }
   45114             :     }
   45115             :   }
   45116        9925 :   if (obj8) {
   45117        9925 :     {
   45118             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   45119        9925 :       if ( obj8 == Py_None ) {
   45120             :         arg10 = 0;
   45121             :       }
   45122         181 :       else if ( PyArg_Parse( obj8,"L" ,&val10 ) ) {
   45123             :         arg10 = (GIntBig *) &val10;
   45124             :       }
   45125             :       else {
   45126           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   45127           0 :         SWIG_fail;
   45128             :       }
   45129             :     }
   45130             :   }
   45131        9925 :   if (obj9) {
   45132        9925 :     {
   45133             :       /* %typemap(in) (GIntBig *optional_##GIntBig) */
   45134        9925 :       if ( obj9 == Py_None ) {
   45135             :         arg11 = 0;
   45136             :       }
   45137          36 :       else if ( PyArg_Parse( obj9,"L" ,&val11 ) ) {
   45138             :         arg11 = (GIntBig *) &val11;
   45139             :       }
   45140             :       else {
   45141           0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   45142           0 :         SWIG_fail;
   45143             :       }
   45144             :     }
   45145             :   }
   45146        9925 :   if (obj10) {
   45147        9925 :     {
   45148             :       // %typemap(in) GDALRIOResampleAlg
   45149        9925 :       int val = 0;
   45150        9925 :       int ecode = SWIG_AsVal_int(obj10, &val);
   45151        9925 :       if (!SWIG_IsOK(ecode)) {
   45152           1 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALRIOResampleAlg");
   45153             :       }
   45154        9924 :       if( val < 0 ||
   45155        9923 :         ( val >= static_cast<int>(GRIORA_RESERVED_START) &&
   45156        9922 :           val <= static_cast<int>(GRIORA_RESERVED_END) ) ||
   45157             :         val > static_cast<int>(GRIORA_LAST) )
   45158             :       {
   45159           2 :         SWIG_exception_fail(SWIG_ValueError, "Invalid value for resample_alg");
   45160             :       }
   45161             :       arg12 = static_cast< GDALRIOResampleAlg >(val);
   45162             :     }
   45163             :   }
   45164        9922 :   if (obj11) {
   45165        9922 :     {
   45166             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   45167             :       /* callback_func typemap */
   45168             :       
   45169             :       /* In some cases 0 is passed instead of None. */
   45170             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   45171        9922 :       if ( PyLong_Check(obj11) || PyInt_Check(obj11) )
   45172             :       {
   45173           0 :         if( PyLong_AsLong(obj11) == 0 )
   45174             :         {
   45175           0 :           obj11 = Py_None;
   45176             :         }
   45177             :       }
   45178             :       
   45179        9922 :       if (obj11 && obj11 != Py_None ) {
   45180          19 :         void* cbfunction = NULL;
   45181          19 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj11,
   45182             :             (void**)&cbfunction,
   45183             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   45184             :             SWIG_POINTER_EXCEPTION | 0 ));
   45185             :         
   45186          19 :         if ( cbfunction == GDALTermProgress ) {
   45187             :           arg13 = GDALTermProgress;
   45188             :         } else {
   45189          19 :           if (!PyCallable_Check(obj11)) {
   45190           0 :             PyErr_SetString( PyExc_RuntimeError,
   45191             :               "Object given is not a Python function" );
   45192           0 :             SWIG_fail;
   45193             :           }
   45194          19 :           psProgressInfo->psPyCallback = obj11;
   45195          19 :           arg13 = PyProgressProxy;
   45196             :         }
   45197             :         
   45198             :       }
   45199             :       
   45200             :     }
   45201             :   }
   45202        9922 :   if (obj12) {
   45203        9922 :     {
   45204             :       /* %typemap(in) ( void* callback_data=NULL)  */
   45205        9922 :       psProgressInfo->psPyCallbackData = obj12 ;
   45206             :     }
   45207             :   }
   45208        9922 :   if (obj13) {
   45209        9922 :     {
   45210             :       /* %typemap(in) ( void *inPythonObject ) */
   45211        9922 :       arg15 = obj13;
   45212             :     }
   45213             :   }
   45214        9922 :   {
   45215        9922 :     const int bLocalUseExceptions = GetUseExceptions();
   45216        9922 :     if ( bLocalUseExceptions ) {
   45217        4531 :       pushErrorHandler();
   45218             :     }
   45219        9922 :     {
   45220        9922 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45221        9922 :       result = (CPLErr)GDALRasterBandShadow_ReadRaster1(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
   45222        9922 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45223             :     }
   45224        9922 :     if ( bLocalUseExceptions ) {
   45225        4531 :       popErrorHandler();
   45226             :     }
   45227             : #ifndef SED_HACKS
   45228             :     if ( bLocalUseExceptions ) {
   45229             :       CPLErr eclass = CPLGetLastErrorType();
   45230             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45231             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45232             :       }
   45233             :     }
   45234             : #endif
   45235             :   }
   45236        9922 :   resultobj = SWIG_From_int(static_cast< int >(result));
   45237        9922 :   {
   45238             :     /* %typemap(argout) ( void **outPythonObject ) */
   45239        9922 :     Py_XDECREF(resultobj);
   45240        9922 :     if (*arg6)
   45241             :     {
   45242             :       resultobj = (PyObject*)*arg6;
   45243             :     }
   45244             :     else
   45245             :     {
   45246          50 :       resultobj = Py_None;
   45247          50 :       Py_INCREF(resultobj);
   45248             :     }
   45249             :   }
   45250        9922 :   {
   45251             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   45252             :     
   45253        9922 :     CPLFree(psProgressInfo);
   45254             :     
   45255             :   }
   45256        9937 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   45257             :   return resultobj;
   45258           3 : fail:
   45259           3 :   {
   45260             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   45261             :     
   45262           3 :     CPLFree(psProgressInfo);
   45263             :     
   45264             :   }
   45265             :   return NULL;
   45266             : }
   45267             : 
   45268             : 
   45269          90 : SWIGINTERN PyObject *_wrap_Band_ReadBlock(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   45270          90 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45271          90 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   45272          90 :   int arg2 ;
   45273          90 :   int arg3 ;
   45274          90 :   void **arg4 = (void **) 0 ;
   45275          90 :   void *arg5 = (void *) NULL ;
   45276          90 :   void *argp1 = 0 ;
   45277          90 :   int res1 = 0 ;
   45278          90 :   int val2 ;
   45279          90 :   int ecode2 = 0 ;
   45280          90 :   int val3 ;
   45281          90 :   int ecode3 = 0 ;
   45282          90 :   void *pyObject4 = NULL ;
   45283          90 :   PyObject * obj0 = 0 ;
   45284          90 :   PyObject * obj1 = 0 ;
   45285          90 :   PyObject * obj2 = 0 ;
   45286          90 :   PyObject * obj3 = 0 ;
   45287          90 :   char * kwnames[] = {
   45288             :     (char *)"self",  (char *)"xoff",  (char *)"yoff",  (char *)"buf_obj",  NULL 
   45289             :   };
   45290          90 :   CPLErr result;
   45291             :   
   45292          90 :   {
   45293             :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject4 = NULL ) */
   45294          90 :     arg4 = &pyObject4;
   45295             :   }
   45296          90 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|O:Band_ReadBlock", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
   45297          90 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   45298          90 :   if (!SWIG_IsOK(res1)) {
   45299           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ReadBlock" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   45300             :   }
   45301          90 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   45302          90 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   45303          90 :   if (!SWIG_IsOK(ecode2)) {
   45304           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_ReadBlock" "', argument " "2"" of type '" "int""'");
   45305             :   } 
   45306          90 :   arg2 = static_cast< int >(val2);
   45307          90 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   45308          90 :   if (!SWIG_IsOK(ecode3)) {
   45309           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_ReadBlock" "', argument " "3"" of type '" "int""'");
   45310             :   } 
   45311          90 :   arg3 = static_cast< int >(val3);
   45312          90 :   if (obj3) {
   45313          25 :     {
   45314             :       /* %typemap(in) ( void *inPythonObject ) */
   45315          25 :       arg5 = obj3;
   45316             :     }
   45317             :   }
   45318          90 :   {
   45319          90 :     const int bLocalUseExceptions = GetUseExceptions();
   45320          90 :     if ( bLocalUseExceptions ) {
   45321          34 :       pushErrorHandler();
   45322             :     }
   45323          90 :     {
   45324          90 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45325          90 :       result = (CPLErr)GDALRasterBandShadow_ReadBlock(arg1,arg2,arg3,arg4,arg5);
   45326          90 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45327             :     }
   45328          90 :     if ( bLocalUseExceptions ) {
   45329          34 :       popErrorHandler();
   45330             :     }
   45331             : #ifndef SED_HACKS
   45332             :     if ( bLocalUseExceptions ) {
   45333             :       CPLErr eclass = CPLGetLastErrorType();
   45334             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45335             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45336             :       }
   45337             :     }
   45338             : #endif
   45339             :   }
   45340          90 :   resultobj = SWIG_From_int(static_cast< int >(result));
   45341          90 :   {
   45342             :     /* %typemap(argout) ( void **outPythonObject ) */
   45343          90 :     Py_XDECREF(resultobj);
   45344          90 :     if (*arg4)
   45345             :     {
   45346             :       resultobj = (PyObject*)*arg4;
   45347             :     }
   45348             :     else
   45349             :     {
   45350          16 :       resultobj = Py_None;
   45351          16 :       Py_INCREF(resultobj);
   45352             :     }
   45353             :   }
   45354          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; } }
   45355             :   return resultobj;
   45356             : fail:
   45357             :   return NULL;
   45358             : }
   45359             : 
   45360             : 
   45361         277 : SWIGINTERN PyObject *Band_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45362         277 :   PyObject *obj;
   45363         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   45364         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALRasterBandShadow, SWIG_NewClientData(obj));
   45365         277 :   return SWIG_Py_Void();
   45366             : }
   45367             : 
   45368         163 : SWIGINTERN PyObject *_wrap_delete_ComputedBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45369         163 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45370         163 :   GDALComputedRasterBandShadow *arg1 = (GDALComputedRasterBandShadow *) 0 ;
   45371         163 :   void *argp1 = 0 ;
   45372         163 :   int res1 = 0 ;
   45373         163 :   PyObject *swig_obj[1] ;
   45374             :   
   45375         163 :   if (!args) SWIG_fail;
   45376         163 :   swig_obj[0] = args;
   45377         163 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_POINTER_DISOWN |  0 );
   45378         163 :   if (!SWIG_IsOK(res1)) {
   45379           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ComputedBand" "', argument " "1"" of type '" "GDALComputedRasterBandShadow *""'"); 
   45380             :   }
   45381         163 :   arg1 = reinterpret_cast< GDALComputedRasterBandShadow * >(argp1);
   45382         163 :   {
   45383         163 :     const int bLocalUseExceptions = GetUseExceptions();
   45384         163 :     if ( bLocalUseExceptions ) {
   45385         163 :       pushErrorHandler();
   45386             :     }
   45387         163 :     {
   45388         163 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45389         163 :       delete_GDALComputedRasterBandShadow(arg1);
   45390         163 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45391             :     }
   45392         163 :     if ( bLocalUseExceptions ) {
   45393         163 :       popErrorHandler();
   45394             :     }
   45395             : #ifndef SED_HACKS
   45396             :     if ( bLocalUseExceptions ) {
   45397             :       CPLErr eclass = CPLGetLastErrorType();
   45398             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45399             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45400             :       }
   45401             :     }
   45402             : #endif
   45403             :   }
   45404         163 :   resultobj = SWIG_Py_Void();
   45405         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; } }
   45406             :   return resultobj;
   45407             : fail:
   45408             :   return NULL;
   45409             : }
   45410             : 
   45411             : 
   45412         277 : SWIGINTERN PyObject *ComputedBand_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45413         277 :   PyObject *obj;
   45414         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   45415         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALComputedRasterBandShadow, SWIG_NewClientData(obj));
   45416         277 :   return SWIG_Py_Void();
   45417             : }
   45418             : 
   45419          56 : SWIGINTERN PyObject *_wrap_new_ColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   45420          56 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45421          56 :   GDALPaletteInterp arg1 = (GDALPaletteInterp) GPI_RGB ;
   45422          56 :   int val1 ;
   45423          56 :   int ecode1 = 0 ;
   45424          56 :   PyObject * obj0 = 0 ;
   45425          56 :   char * kwnames[] = {
   45426             :     (char *)"palette",  NULL 
   45427             :   };
   45428          56 :   GDALColorTableShadow *result = 0 ;
   45429             :   
   45430          56 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:new_ColorTable", kwnames, &obj0)) SWIG_fail;
   45431          56 :   if (obj0) {
   45432           0 :     ecode1 = SWIG_AsVal_int(obj0, &val1);
   45433           0 :     if (!SWIG_IsOK(ecode1)) {
   45434           0 :       SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ColorTable" "', argument " "1"" of type '" "GDALPaletteInterp""'");
   45435             :     } 
   45436           0 :     arg1 = static_cast< GDALPaletteInterp >(val1);
   45437             :   }
   45438          56 :   {
   45439          56 :     const int bLocalUseExceptions = GetUseExceptions();
   45440          56 :     if ( bLocalUseExceptions ) {
   45441          28 :       pushErrorHandler();
   45442             :     }
   45443          56 :     {
   45444          56 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45445          56 :       result = (GDALColorTableShadow *)new_GDALColorTableShadow(arg1);
   45446          56 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45447             :     }
   45448          56 :     if ( bLocalUseExceptions ) {
   45449          28 :       popErrorHandler();
   45450             :     }
   45451             : #ifndef SED_HACKS
   45452             :     if ( bLocalUseExceptions ) {
   45453             :       CPLErr eclass = CPLGetLastErrorType();
   45454             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45455             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45456             :       }
   45457             :     }
   45458             : #endif
   45459             :   }
   45460          56 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, SWIG_POINTER_NEW |  0 );
   45461          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; } }
   45462             :   return resultobj;
   45463             : fail:
   45464             :   return NULL;
   45465             : }
   45466             : 
   45467             : 
   45468          68 : SWIGINTERN PyObject *_wrap_delete_ColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45469          68 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45470          68 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   45471          68 :   void *argp1 = 0 ;
   45472          68 :   int res1 = 0 ;
   45473          68 :   PyObject *swig_obj[1] ;
   45474             :   
   45475          68 :   if (!args) SWIG_fail;
   45476          68 :   swig_obj[0] = args;
   45477          68 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, SWIG_POINTER_DISOWN |  0 );
   45478          68 :   if (!SWIG_IsOK(res1)) {
   45479           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ColorTable" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   45480             :   }
   45481          68 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   45482          68 :   {
   45483          68 :     const int bLocalUseExceptions = GetUseExceptions();
   45484          68 :     if ( bLocalUseExceptions ) {
   45485          36 :       pushErrorHandler();
   45486             :     }
   45487          68 :     {
   45488          68 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45489          68 :       delete_GDALColorTableShadow(arg1);
   45490          68 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45491             :     }
   45492          68 :     if ( bLocalUseExceptions ) {
   45493          36 :       popErrorHandler();
   45494             :     }
   45495             : #ifndef SED_HACKS
   45496             :     if ( bLocalUseExceptions ) {
   45497             :       CPLErr eclass = CPLGetLastErrorType();
   45498             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45499             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45500             :       }
   45501             :     }
   45502             : #endif
   45503             :   }
   45504          68 :   resultobj = SWIG_Py_Void();
   45505          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; } }
   45506             :   return resultobj;
   45507             : fail:
   45508             :   return NULL;
   45509             : }
   45510             : 
   45511             : 
   45512          12 : SWIGINTERN PyObject *_wrap_ColorTable_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45513          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45514          12 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   45515          12 :   void *argp1 = 0 ;
   45516          12 :   int res1 = 0 ;
   45517          12 :   PyObject *swig_obj[1] ;
   45518          12 :   GDALColorTableShadow *result = 0 ;
   45519             :   
   45520          12 :   if (!args) SWIG_fail;
   45521          12 :   swig_obj[0] = args;
   45522          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   45523          12 :   if (!SWIG_IsOK(res1)) {
   45524           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_Clone" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   45525             :   }
   45526          12 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   45527          12 :   {
   45528          12 :     const int bLocalUseExceptions = GetUseExceptions();
   45529          12 :     if ( bLocalUseExceptions ) {
   45530           8 :       pushErrorHandler();
   45531             :     }
   45532          12 :     {
   45533          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45534          12 :       result = (GDALColorTableShadow *)GDALColorTableShadow_Clone(arg1);
   45535          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45536             :     }
   45537          12 :     if ( bLocalUseExceptions ) {
   45538           8 :       popErrorHandler();
   45539             :     }
   45540             : #ifndef SED_HACKS
   45541             :     if ( bLocalUseExceptions ) {
   45542             :       CPLErr eclass = CPLGetLastErrorType();
   45543             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45544             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45545             :       }
   45546             :     }
   45547             : #endif
   45548             :   }
   45549          12 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, SWIG_POINTER_OWN |  0 );
   45550          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; } }
   45551             :   return resultobj;
   45552             : fail:
   45553             :   return NULL;
   45554             : }
   45555             : 
   45556             : 
   45557           2 : SWIGINTERN PyObject *_wrap_ColorTable_GetPaletteInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45558           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45559           2 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   45560           2 :   void *argp1 = 0 ;
   45561           2 :   int res1 = 0 ;
   45562           2 :   PyObject *swig_obj[1] ;
   45563           2 :   GDALPaletteInterp result;
   45564             :   
   45565           2 :   if (!args) SWIG_fail;
   45566           2 :   swig_obj[0] = args;
   45567           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   45568           2 :   if (!SWIG_IsOK(res1)) {
   45569           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetPaletteInterpretation" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   45570             :   }
   45571           2 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   45572           2 :   {
   45573           2 :     const int bLocalUseExceptions = GetUseExceptions();
   45574           2 :     if ( bLocalUseExceptions ) {
   45575           0 :       pushErrorHandler();
   45576             :     }
   45577           2 :     {
   45578           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45579           2 :       result = (GDALPaletteInterp)GDALColorTableShadow_GetPaletteInterpretation(arg1);
   45580           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45581             :     }
   45582           2 :     if ( bLocalUseExceptions ) {
   45583           0 :       popErrorHandler();
   45584             :     }
   45585             : #ifndef SED_HACKS
   45586             :     if ( bLocalUseExceptions ) {
   45587             :       CPLErr eclass = CPLGetLastErrorType();
   45588             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45589             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45590             :       }
   45591             :     }
   45592             : #endif
   45593             :   }
   45594           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   45595           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; } }
   45596             :   return resultobj;
   45597             : fail:
   45598             :   return NULL;
   45599             : }
   45600             : 
   45601             : 
   45602          73 : SWIGINTERN PyObject *_wrap_ColorTable_GetCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45603          73 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45604          73 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   45605          73 :   void *argp1 = 0 ;
   45606          73 :   int res1 = 0 ;
   45607          73 :   PyObject *swig_obj[1] ;
   45608          73 :   int result;
   45609             :   
   45610          73 :   if (!args) SWIG_fail;
   45611          73 :   swig_obj[0] = args;
   45612          73 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   45613          73 :   if (!SWIG_IsOK(res1)) {
   45614           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetCount" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   45615             :   }
   45616          73 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   45617          73 :   {
   45618          73 :     const int bLocalUseExceptions = GetUseExceptions();
   45619          73 :     if ( bLocalUseExceptions ) {
   45620          52 :       pushErrorHandler();
   45621             :     }
   45622          73 :     {
   45623          73 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45624          73 :       result = (int)GDALColorTableShadow_GetColorEntryCount(arg1);
   45625          73 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45626             :     }
   45627          73 :     if ( bLocalUseExceptions ) {
   45628          52 :       popErrorHandler();
   45629             :     }
   45630             : #ifndef SED_HACKS
   45631             :     if ( bLocalUseExceptions ) {
   45632             :       CPLErr eclass = CPLGetLastErrorType();
   45633             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45634             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45635             :       }
   45636             :     }
   45637             : #endif
   45638             :   }
   45639          73 :   resultobj = SWIG_From_int(static_cast< int >(result));
   45640          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; } }
   45641             :   return resultobj;
   45642             : fail:
   45643             :   return NULL;
   45644             : }
   45645             : 
   45646             : 
   45647        4669 : SWIGINTERN PyObject *_wrap_ColorTable_GetColorEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45648        4669 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45649        4669 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   45650        4669 :   int arg2 ;
   45651        4669 :   void *argp1 = 0 ;
   45652        4669 :   int res1 = 0 ;
   45653        4669 :   int val2 ;
   45654        4669 :   int ecode2 = 0 ;
   45655        4669 :   PyObject *swig_obj[2] ;
   45656        4669 :   GDALColorEntry *result = 0 ;
   45657             :   
   45658        4669 :   if (!SWIG_Python_UnpackTuple(args, "ColorTable_GetColorEntry", 2, 2, swig_obj)) SWIG_fail;
   45659        4669 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   45660        4669 :   if (!SWIG_IsOK(res1)) {
   45661           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetColorEntry" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   45662             :   }
   45663        4669 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   45664        4669 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   45665        4669 :   if (!SWIG_IsOK(ecode2)) {
   45666           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_GetColorEntry" "', argument " "2"" of type '" "int""'");
   45667             :   } 
   45668        4669 :   arg2 = static_cast< int >(val2);
   45669        4669 :   {
   45670        4669 :     const int bLocalUseExceptions = GetUseExceptions();
   45671        4669 :     if ( bLocalUseExceptions ) {
   45672        4584 :       pushErrorHandler();
   45673             :     }
   45674        4669 :     {
   45675        4669 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45676        4669 :       result = (GDALColorEntry *)GDALColorTableShadow_GetColorEntry(arg1,arg2);
   45677        4669 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45678             :     }
   45679        4669 :     if ( bLocalUseExceptions ) {
   45680        4584 :       popErrorHandler();
   45681             :     }
   45682             : #ifndef SED_HACKS
   45683             :     if ( bLocalUseExceptions ) {
   45684             :       CPLErr eclass = CPLGetLastErrorType();
   45685             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45686             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45687             :       }
   45688             :     }
   45689             : #endif
   45690             :   }
   45691        4669 :   {
   45692             :     /* %typemap(out) GDALColorEntry* */
   45693        4669 :     if ( result != NULL )
   45694        4669 :     resultobj = Py_BuildValue( "(hhhh)", (*result).c1,(*result).c2,(*result).c3,(*result).c4);
   45695             :     else
   45696             :     resultobj = NULL;
   45697             :   }
   45698        4669 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   45699             :   return resultobj;
   45700             : fail:
   45701             :   return NULL;
   45702             : }
   45703             : 
   45704             : 
   45705           0 : SWIGINTERN PyObject *_wrap_ColorTable_GetColorEntryAsRGB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45706           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45707           0 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   45708           0 :   int arg2 ;
   45709           0 :   GDALColorEntry *arg3 = (GDALColorEntry *) 0 ;
   45710           0 :   void *argp1 = 0 ;
   45711           0 :   int res1 = 0 ;
   45712           0 :   int val2 ;
   45713           0 :   int ecode2 = 0 ;
   45714           0 :   GDALColorEntry ce3 ;
   45715           0 :   PyObject *swig_obj[3] ;
   45716           0 :   int result;
   45717             :   
   45718           0 :   if (!SWIG_Python_UnpackTuple(args, "ColorTable_GetColorEntryAsRGB", 3, 3, swig_obj)) SWIG_fail;
   45719           0 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   45720           0 :   if (!SWIG_IsOK(res1)) {
   45721           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetColorEntryAsRGB" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   45722             :   }
   45723           0 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   45724           0 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   45725           0 :   if (!SWIG_IsOK(ecode2)) {
   45726           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_GetColorEntryAsRGB" "', argument " "2"" of type '" "int""'");
   45727             :   } 
   45728           0 :   arg2 = static_cast< int >(val2);
   45729           0 :   {
   45730             :     /* %typemap(in) GDALColorEntry* */
   45731           0 :     ce3.c4 = 255;
   45732           0 :     if (! PySequence_Check(swig_obj[2]) ) {
   45733           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   45734           0 :       SWIG_fail;
   45735             :     }
   45736           0 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   45737           0 :     if ( size > 4 ) {
   45738           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   45739           0 :       SWIG_fail;
   45740             :     }
   45741           0 :     if ( size < 3 ) {
   45742           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   45743           0 :       SWIG_fail;
   45744             :     }
   45745           0 :     if ( !PyArg_ParseTuple( swig_obj[2],"hhh|h", &ce3.c1, &ce3.c2, &ce3.c3, &ce3.c4 ) ) {
   45746           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   45747           0 :       SWIG_fail;
   45748             :     }
   45749           0 :     arg3 = &ce3;
   45750             :   }
   45751           0 :   {
   45752           0 :     const int bLocalUseExceptions = GetUseExceptions();
   45753           0 :     if ( bLocalUseExceptions ) {
   45754           0 :       pushErrorHandler();
   45755             :     }
   45756           0 :     {
   45757           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45758           0 :       result = (int)GDALColorTableShadow_GetColorEntryAsRGB(arg1,arg2,arg3);
   45759           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45760             :     }
   45761           0 :     if ( bLocalUseExceptions ) {
   45762           0 :       popErrorHandler();
   45763             :     }
   45764             : #ifndef SED_HACKS
   45765             :     if ( bLocalUseExceptions ) {
   45766             :       CPLErr eclass = CPLGetLastErrorType();
   45767             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45768             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45769             :       }
   45770             :     }
   45771             : #endif
   45772             :   }
   45773           0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   45774           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; } }
   45775             :   return resultobj;
   45776             : fail:
   45777             :   return NULL;
   45778             : }
   45779             : 
   45780             : 
   45781        1379 : SWIGINTERN PyObject *_wrap_ColorTable_SetColorEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45782        1379 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45783        1379 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   45784        1379 :   int arg2 ;
   45785        1379 :   GDALColorEntry *arg3 = (GDALColorEntry *) 0 ;
   45786        1379 :   void *argp1 = 0 ;
   45787        1379 :   int res1 = 0 ;
   45788        1379 :   int val2 ;
   45789        1379 :   int ecode2 = 0 ;
   45790        1379 :   GDALColorEntry ce3 ;
   45791        1379 :   PyObject *swig_obj[3] ;
   45792             :   
   45793        1379 :   if (!SWIG_Python_UnpackTuple(args, "ColorTable_SetColorEntry", 3, 3, swig_obj)) SWIG_fail;
   45794        1379 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   45795        1379 :   if (!SWIG_IsOK(res1)) {
   45796           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_SetColorEntry" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   45797             :   }
   45798        1379 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   45799        1379 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   45800        1379 :   if (!SWIG_IsOK(ecode2)) {
   45801           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_SetColorEntry" "', argument " "2"" of type '" "int""'");
   45802             :   } 
   45803        1379 :   arg2 = static_cast< int >(val2);
   45804        1379 :   {
   45805             :     /* %typemap(in) GDALColorEntry* */
   45806        1379 :     ce3.c4 = 255;
   45807        1379 :     if (! PySequence_Check(swig_obj[2]) ) {
   45808           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   45809           0 :       SWIG_fail;
   45810             :     }
   45811        1379 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   45812        1379 :     if ( size > 4 ) {
   45813           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   45814           0 :       SWIG_fail;
   45815             :     }
   45816        1379 :     if ( size < 3 ) {
   45817           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   45818           0 :       SWIG_fail;
   45819             :     }
   45820        1379 :     if ( !PyArg_ParseTuple( swig_obj[2],"hhh|h", &ce3.c1, &ce3.c2, &ce3.c3, &ce3.c4 ) ) {
   45821           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   45822           0 :       SWIG_fail;
   45823             :     }
   45824        1379 :     arg3 = &ce3;
   45825             :   }
   45826        1379 :   {
   45827        1379 :     const int bLocalUseExceptions = GetUseExceptions();
   45828        1379 :     if ( bLocalUseExceptions ) {
   45829        1313 :       pushErrorHandler();
   45830             :     }
   45831        1379 :     {
   45832        1379 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45833        1379 :       GDALColorTableShadow_SetColorEntry(arg1,arg2,(GDALColorEntry const *)arg3);
   45834        1379 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45835             :     }
   45836        1379 :     if ( bLocalUseExceptions ) {
   45837        1313 :       popErrorHandler();
   45838             :     }
   45839             : #ifndef SED_HACKS
   45840             :     if ( bLocalUseExceptions ) {
   45841             :       CPLErr eclass = CPLGetLastErrorType();
   45842             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45843             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45844             :       }
   45845             :     }
   45846             : #endif
   45847             :   }
   45848        1379 :   resultobj = SWIG_Py_Void();
   45849        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; } }
   45850             :   return resultobj;
   45851             : fail:
   45852             :   return NULL;
   45853             : }
   45854             : 
   45855             : 
   45856           1 : SWIGINTERN PyObject *_wrap_ColorTable_CreateColorRamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45857           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45858           1 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   45859           1 :   int arg2 ;
   45860           1 :   GDALColorEntry *arg3 = (GDALColorEntry *) 0 ;
   45861           1 :   int arg4 ;
   45862           1 :   GDALColorEntry *arg5 = (GDALColorEntry *) 0 ;
   45863           1 :   void *argp1 = 0 ;
   45864           1 :   int res1 = 0 ;
   45865           1 :   int val2 ;
   45866           1 :   int ecode2 = 0 ;
   45867           1 :   GDALColorEntry ce3 ;
   45868           1 :   int val4 ;
   45869           1 :   int ecode4 = 0 ;
   45870           1 :   GDALColorEntry ce5 ;
   45871           1 :   PyObject *swig_obj[5] ;
   45872             :   
   45873           1 :   if (!SWIG_Python_UnpackTuple(args, "ColorTable_CreateColorRamp", 5, 5, swig_obj)) SWIG_fail;
   45874           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   45875           1 :   if (!SWIG_IsOK(res1)) {
   45876           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_CreateColorRamp" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   45877             :   }
   45878           1 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   45879           1 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   45880           1 :   if (!SWIG_IsOK(ecode2)) {
   45881           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_CreateColorRamp" "', argument " "2"" of type '" "int""'");
   45882             :   } 
   45883           1 :   arg2 = static_cast< int >(val2);
   45884           1 :   {
   45885             :     /* %typemap(in) GDALColorEntry* */
   45886           1 :     ce3.c4 = 255;
   45887           1 :     if (! PySequence_Check(swig_obj[2]) ) {
   45888           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   45889           0 :       SWIG_fail;
   45890             :     }
   45891           1 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   45892           1 :     if ( size > 4 ) {
   45893           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   45894           0 :       SWIG_fail;
   45895             :     }
   45896           1 :     if ( size < 3 ) {
   45897           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   45898           0 :       SWIG_fail;
   45899             :     }
   45900           1 :     if ( !PyArg_ParseTuple( swig_obj[2],"hhh|h", &ce3.c1, &ce3.c2, &ce3.c3, &ce3.c4 ) ) {
   45901           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   45902           0 :       SWIG_fail;
   45903             :     }
   45904           1 :     arg3 = &ce3;
   45905             :   }
   45906           1 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   45907           1 :   if (!SWIG_IsOK(ecode4)) {
   45908           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ColorTable_CreateColorRamp" "', argument " "4"" of type '" "int""'");
   45909             :   } 
   45910           1 :   arg4 = static_cast< int >(val4);
   45911           1 :   {
   45912             :     /* %typemap(in) GDALColorEntry* */
   45913           1 :     ce5.c4 = 255;
   45914           1 :     if (! PySequence_Check(swig_obj[4]) ) {
   45915           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   45916           0 :       SWIG_fail;
   45917             :     }
   45918           1 :     Py_ssize_t size = PySequence_Size(swig_obj[4]);
   45919           1 :     if ( size > 4 ) {
   45920           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   45921           0 :       SWIG_fail;
   45922             :     }
   45923           1 :     if ( size < 3 ) {
   45924           0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   45925           0 :       SWIG_fail;
   45926             :     }
   45927           1 :     if ( !PyArg_ParseTuple( swig_obj[4],"hhh|h", &ce5.c1, &ce5.c2, &ce5.c3, &ce5.c4 ) ) {
   45928           0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   45929           0 :       SWIG_fail;
   45930             :     }
   45931           1 :     arg5 = &ce5;
   45932             :   }
   45933           1 :   {
   45934           1 :     const int bLocalUseExceptions = GetUseExceptions();
   45935           1 :     if ( bLocalUseExceptions ) {
   45936           1 :       pushErrorHandler();
   45937             :     }
   45938           1 :     {
   45939           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45940           1 :       GDALColorTableShadow_CreateColorRamp(arg1,arg2,(GDALColorEntry const *)arg3,arg4,(GDALColorEntry const *)arg5);
   45941           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45942             :     }
   45943           1 :     if ( bLocalUseExceptions ) {
   45944           1 :       popErrorHandler();
   45945             :     }
   45946             : #ifndef SED_HACKS
   45947             :     if ( bLocalUseExceptions ) {
   45948             :       CPLErr eclass = CPLGetLastErrorType();
   45949             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   45950             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   45951             :       }
   45952             :     }
   45953             : #endif
   45954             :   }
   45955           1 :   resultobj = SWIG_Py_Void();
   45956           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; } }
   45957             :   return resultobj;
   45958             : fail:
   45959             :   return NULL;
   45960             : }
   45961             : 
   45962             : 
   45963         277 : SWIGINTERN PyObject *ColorTable_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45964         277 :   PyObject *obj;
   45965         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   45966         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALColorTableShadow, SWIG_NewClientData(obj));
   45967         277 :   return SWIG_Py_Void();
   45968             : }
   45969             : 
   45970          56 : SWIGINTERN PyObject *ColorTable_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45971          56 :   return SWIG_Python_InitShadowInstance(args);
   45972             : }
   45973             : 
   45974          60 : SWIGINTERN PyObject *_wrap_delete_SubdatasetInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   45975          60 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   45976          60 :   GDALSubdatasetInfoShadow *arg1 = (GDALSubdatasetInfoShadow *) 0 ;
   45977          60 :   void *argp1 = 0 ;
   45978          60 :   int res1 = 0 ;
   45979          60 :   PyObject *swig_obj[1] ;
   45980             :   
   45981          60 :   if (!args) SWIG_fail;
   45982          60 :   swig_obj[0] = args;
   45983          60 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALSubdatasetInfo, SWIG_POINTER_DISOWN |  0 );
   45984          60 :   if (!SWIG_IsOK(res1)) {
   45985           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SubdatasetInfo" "', argument " "1"" of type '" "GDALSubdatasetInfoShadow *""'"); 
   45986             :   }
   45987          60 :   arg1 = reinterpret_cast< GDALSubdatasetInfoShadow * >(argp1);
   45988          60 :   {
   45989          60 :     const int bLocalUseExceptions = GetUseExceptions();
   45990          60 :     if ( bLocalUseExceptions ) {
   45991          36 :       pushErrorHandler();
   45992             :     }
   45993          60 :     {
   45994          60 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   45995          60 :       delete_GDALSubdatasetInfoShadow(arg1);
   45996          60 :       SWIG_PYTHON_THREAD_END_ALLOW;
   45997             :     }
   45998          60 :     if ( bLocalUseExceptions ) {
   45999          36 :       popErrorHandler();
   46000             :     }
   46001             : #ifndef SED_HACKS
   46002             :     if ( bLocalUseExceptions ) {
   46003             :       CPLErr eclass = CPLGetLastErrorType();
   46004             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46005             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46006             :       }
   46007             :     }
   46008             : #endif
   46009             :   }
   46010          60 :   resultobj = SWIG_Py_Void();
   46011          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; } }
   46012             :   return resultobj;
   46013             : fail:
   46014             :   return NULL;
   46015             : }
   46016             : 
   46017             : 
   46018          35 : SWIGINTERN PyObject *_wrap_SubdatasetInfo_GetPathComponent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46019          35 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46020          35 :   GDALSubdatasetInfoShadow *arg1 = (GDALSubdatasetInfoShadow *) 0 ;
   46021          35 :   void *argp1 = 0 ;
   46022          35 :   int res1 = 0 ;
   46023          35 :   PyObject *swig_obj[1] ;
   46024          35 :   retStringAndCPLFree *result = 0 ;
   46025             :   
   46026          35 :   if (!args) SWIG_fail;
   46027          35 :   swig_obj[0] = args;
   46028          35 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALSubdatasetInfo, 0 |  0 );
   46029          35 :   if (!SWIG_IsOK(res1)) {
   46030           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SubdatasetInfo_GetPathComponent" "', argument " "1"" of type '" "GDALSubdatasetInfoShadow *""'"); 
   46031             :   }
   46032          35 :   arg1 = reinterpret_cast< GDALSubdatasetInfoShadow * >(argp1);
   46033          35 :   {
   46034          35 :     const int bLocalUseExceptions = GetUseExceptions();
   46035          35 :     if ( bLocalUseExceptions ) {
   46036          19 :       pushErrorHandler();
   46037             :     }
   46038          35 :     {
   46039          35 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46040          35 :       result = (retStringAndCPLFree *)GDALSubdatasetInfoShadow_GetPathComponent(arg1);
   46041          35 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46042             :     }
   46043          35 :     if ( bLocalUseExceptions ) {
   46044          19 :       popErrorHandler();
   46045             :     }
   46046             : #ifndef SED_HACKS
   46047             :     if ( bLocalUseExceptions ) {
   46048             :       CPLErr eclass = CPLGetLastErrorType();
   46049             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46050             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46051             :       }
   46052             :     }
   46053             : #endif
   46054             :   }
   46055          35 :   {
   46056             :     /* %typemap(out) (retStringAndCPLFree*) */
   46057          35 :     Py_XDECREF(resultobj);
   46058          35 :     if(result)
   46059             :     {
   46060          35 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   46061          35 :       CPLFree(result);
   46062             :     }
   46063             :     else
   46064             :     {
   46065           0 :       resultobj = Py_None;
   46066           0 :       Py_INCREF(resultobj);
   46067             :     }
   46068             :   }
   46069          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; } }
   46070             :   return resultobj;
   46071             : fail:
   46072             :   return NULL;
   46073             : }
   46074             : 
   46075             : 
   46076          39 : SWIGINTERN PyObject *_wrap_SubdatasetInfo_GetSubdatasetComponent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46077          39 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46078          39 :   GDALSubdatasetInfoShadow *arg1 = (GDALSubdatasetInfoShadow *) 0 ;
   46079          39 :   void *argp1 = 0 ;
   46080          39 :   int res1 = 0 ;
   46081          39 :   PyObject *swig_obj[1] ;
   46082          39 :   retStringAndCPLFree *result = 0 ;
   46083             :   
   46084          39 :   if (!args) SWIG_fail;
   46085          39 :   swig_obj[0] = args;
   46086          39 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALSubdatasetInfo, 0 |  0 );
   46087          39 :   if (!SWIG_IsOK(res1)) {
   46088           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SubdatasetInfo_GetSubdatasetComponent" "', argument " "1"" of type '" "GDALSubdatasetInfoShadow *""'"); 
   46089             :   }
   46090          39 :   arg1 = reinterpret_cast< GDALSubdatasetInfoShadow * >(argp1);
   46091          39 :   {
   46092          39 :     const int bLocalUseExceptions = GetUseExceptions();
   46093          39 :     if ( bLocalUseExceptions ) {
   46094          23 :       pushErrorHandler();
   46095             :     }
   46096          39 :     {
   46097          39 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46098          39 :       result = (retStringAndCPLFree *)GDALSubdatasetInfoShadow_GetSubdatasetComponent(arg1);
   46099          39 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46100             :     }
   46101          39 :     if ( bLocalUseExceptions ) {
   46102          23 :       popErrorHandler();
   46103             :     }
   46104             : #ifndef SED_HACKS
   46105             :     if ( bLocalUseExceptions ) {
   46106             :       CPLErr eclass = CPLGetLastErrorType();
   46107             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46108             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46109             :       }
   46110             :     }
   46111             : #endif
   46112             :   }
   46113          39 :   {
   46114             :     /* %typemap(out) (retStringAndCPLFree*) */
   46115          39 :     Py_XDECREF(resultobj);
   46116          39 :     if(result)
   46117             :     {
   46118          39 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   46119          39 :       CPLFree(result);
   46120             :     }
   46121             :     else
   46122             :     {
   46123           0 :       resultobj = Py_None;
   46124           0 :       Py_INCREF(resultobj);
   46125             :     }
   46126             :   }
   46127          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; } }
   46128             :   return resultobj;
   46129             : fail:
   46130             :   return NULL;
   46131             : }
   46132             : 
   46133             : 
   46134          21 : SWIGINTERN PyObject *_wrap_SubdatasetInfo_ModifyPathComponent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46135          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46136          21 :   GDALSubdatasetInfoShadow *arg1 = (GDALSubdatasetInfoShadow *) 0 ;
   46137          21 :   char *arg2 = (char *) 0 ;
   46138          21 :   void *argp1 = 0 ;
   46139          21 :   int res1 = 0 ;
   46140          21 :   int res2 ;
   46141          21 :   char *buf2 = 0 ;
   46142          21 :   int alloc2 = 0 ;
   46143          21 :   PyObject *swig_obj[2] ;
   46144          21 :   retStringAndCPLFree *result = 0 ;
   46145             :   
   46146          21 :   if (!SWIG_Python_UnpackTuple(args, "SubdatasetInfo_ModifyPathComponent", 2, 2, swig_obj)) SWIG_fail;
   46147          21 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALSubdatasetInfo, 0 |  0 );
   46148          21 :   if (!SWIG_IsOK(res1)) {
   46149           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SubdatasetInfo_ModifyPathComponent" "', argument " "1"" of type '" "GDALSubdatasetInfoShadow *""'"); 
   46150             :   }
   46151          21 :   arg1 = reinterpret_cast< GDALSubdatasetInfoShadow * >(argp1);
   46152          21 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   46153          21 :   if (!SWIG_IsOK(res2)) {
   46154           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SubdatasetInfo_ModifyPathComponent" "', argument " "2"" of type '" "char const *""'");
   46155             :   }
   46156          21 :   arg2 = reinterpret_cast< char * >(buf2);
   46157          21 :   {
   46158          21 :     const int bLocalUseExceptions = GetUseExceptions();
   46159          21 :     if ( bLocalUseExceptions ) {
   46160          11 :       pushErrorHandler();
   46161             :     }
   46162          21 :     {
   46163          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46164          21 :       result = (retStringAndCPLFree *)GDALSubdatasetInfoShadow_ModifyPathComponent(arg1,(char const *)arg2);
   46165          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46166             :     }
   46167          21 :     if ( bLocalUseExceptions ) {
   46168          11 :       popErrorHandler();
   46169             :     }
   46170             : #ifndef SED_HACKS
   46171             :     if ( bLocalUseExceptions ) {
   46172             :       CPLErr eclass = CPLGetLastErrorType();
   46173             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46174             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46175             :       }
   46176             :     }
   46177             : #endif
   46178             :   }
   46179          21 :   {
   46180             :     /* %typemap(out) (retStringAndCPLFree*) */
   46181          21 :     Py_XDECREF(resultobj);
   46182          21 :     if(result)
   46183             :     {
   46184          21 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   46185          21 :       CPLFree(result);
   46186             :     }
   46187             :     else
   46188             :     {
   46189           0 :       resultobj = Py_None;
   46190           0 :       Py_INCREF(resultobj);
   46191             :     }
   46192             :   }
   46193          21 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   46194          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; } }
   46195             :   return resultobj;
   46196           0 : fail:
   46197           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   46198             :   return NULL;
   46199             : }
   46200             : 
   46201             : 
   46202         277 : SWIGINTERN PyObject *SubdatasetInfo_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46203         277 :   PyObject *obj;
   46204         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   46205         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALSubdatasetInfo, SWIG_NewClientData(obj));
   46206         277 :   return SWIG_Py_Void();
   46207             : }
   46208             : 
   46209          83 : SWIGINTERN PyObject *_wrap_GetSubdatasetInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46210          83 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46211          83 :   char *arg1 = (char *) 0 ;
   46212          83 :   int res1 ;
   46213          83 :   char *buf1 = 0 ;
   46214          83 :   int alloc1 = 0 ;
   46215          83 :   PyObject *swig_obj[1] ;
   46216          83 :   GDALSubdatasetInfoShadow *result = 0 ;
   46217             :   
   46218          83 :   if (!args) SWIG_fail;
   46219          83 :   swig_obj[0] = args;
   46220          83 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   46221          83 :   if (!SWIG_IsOK(res1)) {
   46222           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetSubdatasetInfo" "', argument " "1"" of type '" "char const *""'");
   46223             :   }
   46224          83 :   arg1 = reinterpret_cast< char * >(buf1);
   46225          83 :   {
   46226          83 :     const int bLocalUseExceptions = GetUseExceptions();
   46227          83 :     if ( bLocalUseExceptions ) {
   46228          51 :       pushErrorHandler();
   46229             :     }
   46230          83 :     {
   46231          83 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46232          83 :       result = (GDALSubdatasetInfoShadow *)GetSubdatasetInfo((char const *)arg1);
   46233          83 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46234             :     }
   46235          83 :     if ( bLocalUseExceptions ) {
   46236          51 :       popErrorHandler();
   46237             :     }
   46238             : #ifndef SED_HACKS
   46239             :     if ( bLocalUseExceptions ) {
   46240             :       CPLErr eclass = CPLGetLastErrorType();
   46241             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46242             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46243             :       }
   46244             :     }
   46245             : #endif
   46246             :   }
   46247          83 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALSubdatasetInfo, SWIG_POINTER_OWN |  0 );
   46248          83 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   46249          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; } }
   46250             :   return resultobj;
   46251           0 : fail:
   46252           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   46253             :   return NULL;
   46254             : }
   46255             : 
   46256             : 
   46257          30 : SWIGINTERN PyObject *_wrap_new_Relationship(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46258          30 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46259          30 :   char *arg1 = (char *) 0 ;
   46260          30 :   char *arg2 = (char *) 0 ;
   46261          30 :   char *arg3 = (char *) 0 ;
   46262          30 :   GDALRelationshipCardinality arg4 ;
   46263          30 :   int res1 ;
   46264          30 :   char *buf1 = 0 ;
   46265          30 :   int alloc1 = 0 ;
   46266          30 :   int res2 ;
   46267          30 :   char *buf2 = 0 ;
   46268          30 :   int alloc2 = 0 ;
   46269          30 :   int res3 ;
   46270          30 :   char *buf3 = 0 ;
   46271          30 :   int alloc3 = 0 ;
   46272          30 :   int val4 ;
   46273          30 :   int ecode4 = 0 ;
   46274          30 :   PyObject *swig_obj[4] ;
   46275          30 :   GDALRelationshipShadow *result = 0 ;
   46276             :   
   46277          30 :   if (!SWIG_Python_UnpackTuple(args, "new_Relationship", 4, 4, swig_obj)) SWIG_fail;
   46278          30 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   46279          30 :   if (!SWIG_IsOK(res1)) {
   46280           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Relationship" "', argument " "1"" of type '" "char const *""'");
   46281             :   }
   46282          30 :   arg1 = reinterpret_cast< char * >(buf1);
   46283          30 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   46284          30 :   if (!SWIG_IsOK(res2)) {
   46285           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Relationship" "', argument " "2"" of type '" "char const *""'");
   46286             :   }
   46287          30 :   arg2 = reinterpret_cast< char * >(buf2);
   46288          30 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   46289          30 :   if (!SWIG_IsOK(res3)) {
   46290           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Relationship" "', argument " "3"" of type '" "char const *""'");
   46291             :   }
   46292          30 :   arg3 = reinterpret_cast< char * >(buf3);
   46293          30 :   ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   46294          30 :   if (!SWIG_IsOK(ecode4)) {
   46295           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Relationship" "', argument " "4"" of type '" "GDALRelationshipCardinality""'");
   46296             :   } 
   46297          30 :   arg4 = static_cast< GDALRelationshipCardinality >(val4);
   46298          30 :   {
   46299          30 :     if (!arg1) {
   46300           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   46301             :     }
   46302             :   }
   46303          29 :   {
   46304          29 :     const int bLocalUseExceptions = GetUseExceptions();
   46305          29 :     if ( bLocalUseExceptions ) {
   46306           2 :       pushErrorHandler();
   46307             :     }
   46308          29 :     {
   46309          29 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46310          29 :       result = (GDALRelationshipShadow *)new_GDALRelationshipShadow((char const *)arg1,(char const *)arg2,(char const *)arg3,arg4);
   46311          29 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46312             :     }
   46313          29 :     if ( bLocalUseExceptions ) {
   46314           2 :       popErrorHandler();
   46315             :     }
   46316             : #ifndef SED_HACKS
   46317             :     if ( bLocalUseExceptions ) {
   46318             :       CPLErr eclass = CPLGetLastErrorType();
   46319             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46320             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46321             :       }
   46322             :     }
   46323             : #endif
   46324             :   }
   46325          29 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRelationshipShadow, SWIG_POINTER_NEW |  0 );
   46326          29 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   46327          29 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   46328          29 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   46329          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; } }
   46330             :   return resultobj;
   46331           1 : fail:
   46332           1 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   46333           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   46334           1 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   46335             :   return NULL;
   46336             : }
   46337             : 
   46338             : 
   46339          29 : SWIGINTERN PyObject *_wrap_delete_Relationship(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46340          29 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46341          29 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46342          29 :   void *argp1 = 0 ;
   46343          29 :   int res1 = 0 ;
   46344          29 :   PyObject *swig_obj[1] ;
   46345             :   
   46346          29 :   if (!args) SWIG_fail;
   46347          29 :   swig_obj[0] = args;
   46348          29 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, SWIG_POINTER_DISOWN |  0 );
   46349          29 :   if (!SWIG_IsOK(res1)) {
   46350           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Relationship" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46351             :   }
   46352          29 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46353          29 :   {
   46354          29 :     const int bLocalUseExceptions = GetUseExceptions();
   46355          29 :     if ( bLocalUseExceptions ) {
   46356           2 :       pushErrorHandler();
   46357             :     }
   46358          29 :     {
   46359          29 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46360          29 :       delete_GDALRelationshipShadow(arg1);
   46361          29 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46362             :     }
   46363          29 :     if ( bLocalUseExceptions ) {
   46364           2 :       popErrorHandler();
   46365             :     }
   46366             : #ifndef SED_HACKS
   46367             :     if ( bLocalUseExceptions ) {
   46368             :       CPLErr eclass = CPLGetLastErrorType();
   46369             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46370             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46371             :       }
   46372             :     }
   46373             : #endif
   46374             :   }
   46375          29 :   resultobj = SWIG_Py_Void();
   46376          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; } }
   46377             :   return resultobj;
   46378             : fail:
   46379             :   return NULL;
   46380             : }
   46381             : 
   46382             : 
   46383          31 : SWIGINTERN PyObject *_wrap_Relationship_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46384          31 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46385          31 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46386          31 :   void *argp1 = 0 ;
   46387          31 :   int res1 = 0 ;
   46388          31 :   PyObject *swig_obj[1] ;
   46389          31 :   char *result = 0 ;
   46390             :   
   46391          31 :   if (!args) SWIG_fail;
   46392          31 :   swig_obj[0] = args;
   46393          31 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46394          31 :   if (!SWIG_IsOK(res1)) {
   46395           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetName" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46396             :   }
   46397          31 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46398          31 :   {
   46399          31 :     const int bLocalUseExceptions = GetUseExceptions();
   46400          31 :     if ( bLocalUseExceptions ) {
   46401           8 :       pushErrorHandler();
   46402             :     }
   46403          31 :     {
   46404          31 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46405          31 :       result = (char *)GDALRelationshipShadow_GetName(arg1);
   46406          31 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46407             :     }
   46408          31 :     if ( bLocalUseExceptions ) {
   46409           8 :       popErrorHandler();
   46410             :     }
   46411             : #ifndef SED_HACKS
   46412             :     if ( bLocalUseExceptions ) {
   46413             :       CPLErr eclass = CPLGetLastErrorType();
   46414             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46415             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46416             :       }
   46417             :     }
   46418             : #endif
   46419             :   }
   46420          31 :   resultobj = SWIG_FromCharPtr((const char *)result);
   46421          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; } }
   46422             :   return resultobj;
   46423             : fail:
   46424             :   return NULL;
   46425             : }
   46426             : 
   46427             : 
   46428          47 : SWIGINTERN PyObject *_wrap_Relationship_GetCardinality(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46429          47 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46430          47 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46431          47 :   void *argp1 = 0 ;
   46432          47 :   int res1 = 0 ;
   46433          47 :   PyObject *swig_obj[1] ;
   46434          47 :   GDALRelationshipCardinality result;
   46435             :   
   46436          47 :   if (!args) SWIG_fail;
   46437          47 :   swig_obj[0] = args;
   46438          47 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46439          47 :   if (!SWIG_IsOK(res1)) {
   46440           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetCardinality" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46441             :   }
   46442          47 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46443          47 :   {
   46444          47 :     const int bLocalUseExceptions = GetUseExceptions();
   46445          47 :     if ( bLocalUseExceptions ) {
   46446           9 :       pushErrorHandler();
   46447             :     }
   46448          47 :     {
   46449          47 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46450          47 :       result = (GDALRelationshipCardinality)GDALRelationshipShadow_GetCardinality(arg1);
   46451          47 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46452             :     }
   46453          47 :     if ( bLocalUseExceptions ) {
   46454           9 :       popErrorHandler();
   46455             :     }
   46456             : #ifndef SED_HACKS
   46457             :     if ( bLocalUseExceptions ) {
   46458             :       CPLErr eclass = CPLGetLastErrorType();
   46459             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46460             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46461             :       }
   46462             :     }
   46463             : #endif
   46464             :   }
   46465          47 :   resultobj = SWIG_From_int(static_cast< int >(result));
   46466          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; } }
   46467             :   return resultobj;
   46468             : fail:
   46469             :   return NULL;
   46470             : }
   46471             : 
   46472             : 
   46473          49 : SWIGINTERN PyObject *_wrap_Relationship_GetLeftTableName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46474          49 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46475          49 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46476          49 :   void *argp1 = 0 ;
   46477          49 :   int res1 = 0 ;
   46478          49 :   PyObject *swig_obj[1] ;
   46479          49 :   char *result = 0 ;
   46480             :   
   46481          49 :   if (!args) SWIG_fail;
   46482          49 :   swig_obj[0] = args;
   46483          49 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46484          49 :   if (!SWIG_IsOK(res1)) {
   46485           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetLeftTableName" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46486             :   }
   46487          49 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46488          49 :   {
   46489          49 :     const int bLocalUseExceptions = GetUseExceptions();
   46490          49 :     if ( bLocalUseExceptions ) {
   46491          10 :       pushErrorHandler();
   46492             :     }
   46493          49 :     {
   46494          49 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46495          49 :       result = (char *)GDALRelationshipShadow_GetLeftTableName(arg1);
   46496          49 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46497             :     }
   46498          49 :     if ( bLocalUseExceptions ) {
   46499          10 :       popErrorHandler();
   46500             :     }
   46501             : #ifndef SED_HACKS
   46502             :     if ( bLocalUseExceptions ) {
   46503             :       CPLErr eclass = CPLGetLastErrorType();
   46504             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46505             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46506             :       }
   46507             :     }
   46508             : #endif
   46509             :   }
   46510          49 :   resultobj = SWIG_FromCharPtr((const char *)result);
   46511          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; } }
   46512             :   return resultobj;
   46513             : fail:
   46514             :   return NULL;
   46515             : }
   46516             : 
   46517             : 
   46518          49 : SWIGINTERN PyObject *_wrap_Relationship_GetRightTableName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46519          49 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46520          49 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46521          49 :   void *argp1 = 0 ;
   46522          49 :   int res1 = 0 ;
   46523          49 :   PyObject *swig_obj[1] ;
   46524          49 :   char *result = 0 ;
   46525             :   
   46526          49 :   if (!args) SWIG_fail;
   46527          49 :   swig_obj[0] = args;
   46528          49 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46529          49 :   if (!SWIG_IsOK(res1)) {
   46530           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetRightTableName" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46531             :   }
   46532          49 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46533          49 :   {
   46534          49 :     const int bLocalUseExceptions = GetUseExceptions();
   46535          49 :     if ( bLocalUseExceptions ) {
   46536          10 :       pushErrorHandler();
   46537             :     }
   46538          49 :     {
   46539          49 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46540          49 :       result = (char *)GDALRelationshipShadow_GetRightTableName(arg1);
   46541          49 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46542             :     }
   46543          49 :     if ( bLocalUseExceptions ) {
   46544          10 :       popErrorHandler();
   46545             :     }
   46546             : #ifndef SED_HACKS
   46547             :     if ( bLocalUseExceptions ) {
   46548             :       CPLErr eclass = CPLGetLastErrorType();
   46549             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46550             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46551             :       }
   46552             :     }
   46553             : #endif
   46554             :   }
   46555          49 :   resultobj = SWIG_FromCharPtr((const char *)result);
   46556          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; } }
   46557             :   return resultobj;
   46558             : fail:
   46559             :   return NULL;
   46560             : }
   46561             : 
   46562             : 
   46563          34 : SWIGINTERN PyObject *_wrap_Relationship_GetMappingTableName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46564          34 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46565          34 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46566          34 :   void *argp1 = 0 ;
   46567          34 :   int res1 = 0 ;
   46568          34 :   PyObject *swig_obj[1] ;
   46569          34 :   char *result = 0 ;
   46570             :   
   46571          34 :   if (!args) SWIG_fail;
   46572          34 :   swig_obj[0] = args;
   46573          34 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46574          34 :   if (!SWIG_IsOK(res1)) {
   46575           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetMappingTableName" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46576             :   }
   46577          34 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46578          34 :   {
   46579          34 :     const int bLocalUseExceptions = GetUseExceptions();
   46580          34 :     if ( bLocalUseExceptions ) {
   46581          11 :       pushErrorHandler();
   46582             :     }
   46583          34 :     {
   46584          34 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46585          34 :       result = (char *)GDALRelationshipShadow_GetMappingTableName(arg1);
   46586          34 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46587             :     }
   46588          34 :     if ( bLocalUseExceptions ) {
   46589          11 :       popErrorHandler();
   46590             :     }
   46591             : #ifndef SED_HACKS
   46592             :     if ( bLocalUseExceptions ) {
   46593             :       CPLErr eclass = CPLGetLastErrorType();
   46594             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46595             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46596             :       }
   46597             :     }
   46598             : #endif
   46599             :   }
   46600          34 :   resultobj = SWIG_FromCharPtr((const char *)result);
   46601          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; } }
   46602             :   return resultobj;
   46603             : fail:
   46604             :   return NULL;
   46605             : }
   46606             : 
   46607             : 
   46608          14 : SWIGINTERN PyObject *_wrap_Relationship_SetMappingTableName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46609          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46610          14 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46611          14 :   char *arg2 = (char *) 0 ;
   46612          14 :   void *argp1 = 0 ;
   46613          14 :   int res1 = 0 ;
   46614          14 :   PyObject *str2 = 0 ;
   46615          14 :   int bToFree2 = 0 ;
   46616          14 :   PyObject *swig_obj[2] ;
   46617             :   
   46618          14 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetMappingTableName", 2, 2, swig_obj)) SWIG_fail;
   46619          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46620          14 :   if (!SWIG_IsOK(res1)) {
   46621           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetMappingTableName" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46622             :   }
   46623          14 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46624          14 :   {
   46625             :     /* %typemap(in) (tostring argin) */
   46626          14 :     str2 = PyObject_Str( swig_obj[1] );
   46627          14 :     if ( str2 == 0 ) {
   46628           0 :       PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
   46629           0 :       SWIG_fail;
   46630             :     }
   46631             :     
   46632          14 :     arg2 = GDALPythonObjectToCStr(str2, &bToFree2);
   46633             :   }
   46634          14 :   {
   46635          14 :     const int bLocalUseExceptions = GetUseExceptions();
   46636          14 :     if ( bLocalUseExceptions ) {
   46637           1 :       pushErrorHandler();
   46638             :     }
   46639          14 :     {
   46640          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46641          14 :       GDALRelationshipShadow_SetMappingTableName(arg1,(char const *)arg2);
   46642          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46643             :     }
   46644          14 :     if ( bLocalUseExceptions ) {
   46645           1 :       popErrorHandler();
   46646             :     }
   46647             : #ifndef SED_HACKS
   46648             :     if ( bLocalUseExceptions ) {
   46649             :       CPLErr eclass = CPLGetLastErrorType();
   46650             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46651             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46652             :       }
   46653             :     }
   46654             : #endif
   46655             :   }
   46656          14 :   resultobj = SWIG_Py_Void();
   46657          14 :   {
   46658             :     /* %typemap(freearg) (tostring argin) */
   46659          14 :     if ( str2 != NULL)
   46660             :     {
   46661          14 :       Py_DECREF(str2);
   46662             :     }
   46663          14 :     GDALPythonFreeCStr(arg2, bToFree2);
   46664             :   }
   46665          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; } }
   46666             :   return resultobj;
   46667           0 : fail:
   46668           0 :   {
   46669             :     /* %typemap(freearg) (tostring argin) */
   46670           0 :     if ( str2 != NULL)
   46671             :     {
   46672           0 :       Py_DECREF(str2);
   46673             :     }
   46674          14 :     GDALPythonFreeCStr(arg2, bToFree2);
   46675             :   }
   46676             :   return NULL;
   46677             : }
   46678             : 
   46679             : 
   46680          48 : SWIGINTERN PyObject *_wrap_Relationship_GetLeftTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46681          48 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46682          48 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46683          48 :   void *argp1 = 0 ;
   46684          48 :   int res1 = 0 ;
   46685          48 :   PyObject *swig_obj[1] ;
   46686          48 :   char **result = 0 ;
   46687             :   
   46688          48 :   if (!args) SWIG_fail;
   46689          48 :   swig_obj[0] = args;
   46690          48 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46691          48 :   if (!SWIG_IsOK(res1)) {
   46692           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetLeftTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46693             :   }
   46694          48 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46695          48 :   {
   46696          48 :     const int bLocalUseExceptions = GetUseExceptions();
   46697          48 :     if ( bLocalUseExceptions ) {
   46698           9 :       pushErrorHandler();
   46699             :     }
   46700          48 :     {
   46701          48 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46702          48 :       result = (char **)GDALRelationshipShadow_GetLeftTableFields(arg1);
   46703          48 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46704             :     }
   46705          48 :     if ( bLocalUseExceptions ) {
   46706           9 :       popErrorHandler();
   46707             :     }
   46708             : #ifndef SED_HACKS
   46709             :     if ( bLocalUseExceptions ) {
   46710             :       CPLErr eclass = CPLGetLastErrorType();
   46711             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46712             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46713             :       }
   46714             :     }
   46715             : #endif
   46716             :   }
   46717          48 :   {
   46718             :     /* %typemap(out) char **CSL -> ( string ) */
   46719          48 :     bool bErr = false;
   46720          48 :     resultobj = CSLToList(result, &bErr);
   46721          48 :     CSLDestroy(result);
   46722          48 :     if( bErr ) {
   46723           0 :       SWIG_fail;
   46724             :     }
   46725             :   }
   46726          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; } }
   46727             :   return resultobj;
   46728             : fail:
   46729             :   return NULL;
   46730             : }
   46731             : 
   46732             : 
   46733          48 : SWIGINTERN PyObject *_wrap_Relationship_GetRightTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46734          48 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46735          48 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46736          48 :   void *argp1 = 0 ;
   46737          48 :   int res1 = 0 ;
   46738          48 :   PyObject *swig_obj[1] ;
   46739          48 :   char **result = 0 ;
   46740             :   
   46741          48 :   if (!args) SWIG_fail;
   46742          48 :   swig_obj[0] = args;
   46743          48 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46744          48 :   if (!SWIG_IsOK(res1)) {
   46745           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetRightTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46746             :   }
   46747          48 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46748          48 :   {
   46749          48 :     const int bLocalUseExceptions = GetUseExceptions();
   46750          48 :     if ( bLocalUseExceptions ) {
   46751           9 :       pushErrorHandler();
   46752             :     }
   46753          48 :     {
   46754          48 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46755          48 :       result = (char **)GDALRelationshipShadow_GetRightTableFields(arg1);
   46756          48 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46757             :     }
   46758          48 :     if ( bLocalUseExceptions ) {
   46759           9 :       popErrorHandler();
   46760             :     }
   46761             : #ifndef SED_HACKS
   46762             :     if ( bLocalUseExceptions ) {
   46763             :       CPLErr eclass = CPLGetLastErrorType();
   46764             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46765             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46766             :       }
   46767             :     }
   46768             : #endif
   46769             :   }
   46770          48 :   {
   46771             :     /* %typemap(out) char **CSL -> ( string ) */
   46772          48 :     bool bErr = false;
   46773          48 :     resultobj = CSLToList(result, &bErr);
   46774          48 :     CSLDestroy(result);
   46775          48 :     if( bErr ) {
   46776           0 :       SWIG_fail;
   46777             :     }
   46778             :   }
   46779          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; } }
   46780             :   return resultobj;
   46781             : fail:
   46782             :   return NULL;
   46783             : }
   46784             : 
   46785             : 
   46786          37 : SWIGINTERN PyObject *_wrap_Relationship_SetLeftTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46787          37 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46788          37 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46789          37 :   char **arg2 = (char **) 0 ;
   46790          37 :   void *argp1 = 0 ;
   46791          37 :   int res1 = 0 ;
   46792          37 :   PyObject *swig_obj[2] ;
   46793             :   
   46794          37 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetLeftTableFields", 2, 2, swig_obj)) SWIG_fail;
   46795          37 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46796          37 :   if (!SWIG_IsOK(res1)) {
   46797           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetLeftTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46798             :   }
   46799          37 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46800          37 :   {
   46801             :     /* %typemap(in) char **dict */
   46802          37 :     arg2 = NULL;
   46803          37 :     if ( PySequence_Check( swig_obj[1] ) ) {
   46804          37 :       int bErr = FALSE;
   46805          37 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   46806          37 :       if ( bErr )
   46807             :       {
   46808           0 :         SWIG_fail;
   46809             :       }
   46810             :     }
   46811           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   46812           0 :       int bErr = FALSE;
   46813           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   46814           0 :       if ( bErr )
   46815             :       {
   46816           0 :         SWIG_fail;
   46817             :       }
   46818             :     }
   46819             :     else {
   46820           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   46821           0 :       SWIG_fail;
   46822             :     }
   46823             :   }
   46824          37 :   {
   46825          37 :     const int bLocalUseExceptions = GetUseExceptions();
   46826          37 :     if ( bLocalUseExceptions ) {
   46827           1 :       pushErrorHandler();
   46828             :     }
   46829          37 :     {
   46830          37 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46831          37 :       GDALRelationshipShadow_SetLeftTableFields(arg1,arg2);
   46832          37 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46833             :     }
   46834          37 :     if ( bLocalUseExceptions ) {
   46835           1 :       popErrorHandler();
   46836             :     }
   46837             : #ifndef SED_HACKS
   46838             :     if ( bLocalUseExceptions ) {
   46839             :       CPLErr eclass = CPLGetLastErrorType();
   46840             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46841             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46842             :       }
   46843             :     }
   46844             : #endif
   46845             :   }
   46846          37 :   resultobj = SWIG_Py_Void();
   46847          37 :   {
   46848             :     /* %typemap(freearg) char **dict */
   46849          37 :     CSLDestroy( arg2 );
   46850             :   }
   46851          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; } }
   46852             :   return resultobj;
   46853           0 : fail:
   46854           0 :   {
   46855             :     /* %typemap(freearg) char **dict */
   46856           0 :     CSLDestroy( arg2 );
   46857             :   }
   46858             :   return NULL;
   46859             : }
   46860             : 
   46861             : 
   46862          38 : SWIGINTERN PyObject *_wrap_Relationship_SetRightTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46863          38 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46864          38 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46865          38 :   char **arg2 = (char **) 0 ;
   46866          38 :   void *argp1 = 0 ;
   46867          38 :   int res1 = 0 ;
   46868          38 :   PyObject *swig_obj[2] ;
   46869             :   
   46870          38 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetRightTableFields", 2, 2, swig_obj)) SWIG_fail;
   46871          38 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46872          38 :   if (!SWIG_IsOK(res1)) {
   46873           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetRightTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46874             :   }
   46875          38 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46876          38 :   {
   46877             :     /* %typemap(in) char **dict */
   46878          38 :     arg2 = NULL;
   46879          38 :     if ( PySequence_Check( swig_obj[1] ) ) {
   46880          38 :       int bErr = FALSE;
   46881          38 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   46882          38 :       if ( bErr )
   46883             :       {
   46884           0 :         SWIG_fail;
   46885             :       }
   46886             :     }
   46887           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   46888           0 :       int bErr = FALSE;
   46889           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   46890           0 :       if ( bErr )
   46891             :       {
   46892           0 :         SWIG_fail;
   46893             :       }
   46894             :     }
   46895             :     else {
   46896           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   46897           0 :       SWIG_fail;
   46898             :     }
   46899             :   }
   46900          38 :   {
   46901          38 :     const int bLocalUseExceptions = GetUseExceptions();
   46902          38 :     if ( bLocalUseExceptions ) {
   46903           1 :       pushErrorHandler();
   46904             :     }
   46905          38 :     {
   46906          38 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46907          38 :       GDALRelationshipShadow_SetRightTableFields(arg1,arg2);
   46908          38 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46909             :     }
   46910          38 :     if ( bLocalUseExceptions ) {
   46911           1 :       popErrorHandler();
   46912             :     }
   46913             : #ifndef SED_HACKS
   46914             :     if ( bLocalUseExceptions ) {
   46915             :       CPLErr eclass = CPLGetLastErrorType();
   46916             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46917             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46918             :       }
   46919             :     }
   46920             : #endif
   46921             :   }
   46922          38 :   resultobj = SWIG_Py_Void();
   46923          38 :   {
   46924             :     /* %typemap(freearg) char **dict */
   46925          38 :     CSLDestroy( arg2 );
   46926             :   }
   46927          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; } }
   46928             :   return resultobj;
   46929           0 : fail:
   46930           0 :   {
   46931             :     /* %typemap(freearg) char **dict */
   46932           0 :     CSLDestroy( arg2 );
   46933             :   }
   46934             :   return NULL;
   46935             : }
   46936             : 
   46937             : 
   46938          23 : SWIGINTERN PyObject *_wrap_Relationship_GetLeftMappingTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46939          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46940          23 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46941          23 :   void *argp1 = 0 ;
   46942          23 :   int res1 = 0 ;
   46943          23 :   PyObject *swig_obj[1] ;
   46944          23 :   char **result = 0 ;
   46945             :   
   46946          23 :   if (!args) SWIG_fail;
   46947          23 :   swig_obj[0] = args;
   46948          23 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   46949          23 :   if (!SWIG_IsOK(res1)) {
   46950           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetLeftMappingTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   46951             :   }
   46952          23 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   46953          23 :   {
   46954          23 :     const int bLocalUseExceptions = GetUseExceptions();
   46955          23 :     if ( bLocalUseExceptions ) {
   46956           5 :       pushErrorHandler();
   46957             :     }
   46958          23 :     {
   46959          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   46960          23 :       result = (char **)GDALRelationshipShadow_GetLeftMappingTableFields(arg1);
   46961          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   46962             :     }
   46963          23 :     if ( bLocalUseExceptions ) {
   46964           5 :       popErrorHandler();
   46965             :     }
   46966             : #ifndef SED_HACKS
   46967             :     if ( bLocalUseExceptions ) {
   46968             :       CPLErr eclass = CPLGetLastErrorType();
   46969             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   46970             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   46971             :       }
   46972             :     }
   46973             : #endif
   46974             :   }
   46975          23 :   {
   46976             :     /* %typemap(out) char **CSL -> ( string ) */
   46977          23 :     bool bErr = false;
   46978          23 :     resultobj = CSLToList(result, &bErr);
   46979          23 :     CSLDestroy(result);
   46980          23 :     if( bErr ) {
   46981           0 :       SWIG_fail;
   46982             :     }
   46983             :   }
   46984          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; } }
   46985             :   return resultobj;
   46986             : fail:
   46987             :   return NULL;
   46988             : }
   46989             : 
   46990             : 
   46991          23 : SWIGINTERN PyObject *_wrap_Relationship_GetRightMappingTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   46992          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   46993          23 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   46994          23 :   void *argp1 = 0 ;
   46995          23 :   int res1 = 0 ;
   46996          23 :   PyObject *swig_obj[1] ;
   46997          23 :   char **result = 0 ;
   46998             :   
   46999          23 :   if (!args) SWIG_fail;
   47000          23 :   swig_obj[0] = args;
   47001          23 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47002          23 :   if (!SWIG_IsOK(res1)) {
   47003           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetRightMappingTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47004             :   }
   47005          23 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47006          23 :   {
   47007          23 :     const int bLocalUseExceptions = GetUseExceptions();
   47008          23 :     if ( bLocalUseExceptions ) {
   47009           5 :       pushErrorHandler();
   47010             :     }
   47011          23 :     {
   47012          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47013          23 :       result = (char **)GDALRelationshipShadow_GetRightMappingTableFields(arg1);
   47014          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47015             :     }
   47016          23 :     if ( bLocalUseExceptions ) {
   47017           5 :       popErrorHandler();
   47018             :     }
   47019             : #ifndef SED_HACKS
   47020             :     if ( bLocalUseExceptions ) {
   47021             :       CPLErr eclass = CPLGetLastErrorType();
   47022             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47023             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47024             :       }
   47025             :     }
   47026             : #endif
   47027             :   }
   47028          23 :   {
   47029             :     /* %typemap(out) char **CSL -> ( string ) */
   47030          23 :     bool bErr = false;
   47031          23 :     resultobj = CSLToList(result, &bErr);
   47032          23 :     CSLDestroy(result);
   47033          23 :     if( bErr ) {
   47034           0 :       SWIG_fail;
   47035             :     }
   47036             :   }
   47037          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; } }
   47038             :   return resultobj;
   47039             : fail:
   47040             :   return NULL;
   47041             : }
   47042             : 
   47043             : 
   47044           9 : SWIGINTERN PyObject *_wrap_Relationship_SetLeftMappingTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47045           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47046           9 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47047           9 :   char **arg2 = (char **) 0 ;
   47048           9 :   void *argp1 = 0 ;
   47049           9 :   int res1 = 0 ;
   47050           9 :   PyObject *swig_obj[2] ;
   47051             :   
   47052           9 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetLeftMappingTableFields", 2, 2, swig_obj)) SWIG_fail;
   47053           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47054           9 :   if (!SWIG_IsOK(res1)) {
   47055           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetLeftMappingTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47056             :   }
   47057           9 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47058           9 :   {
   47059             :     /* %typemap(in) char **dict */
   47060           9 :     arg2 = NULL;
   47061           9 :     if ( PySequence_Check( swig_obj[1] ) ) {
   47062           9 :       int bErr = FALSE;
   47063           9 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   47064           9 :       if ( bErr )
   47065             :       {
   47066           0 :         SWIG_fail;
   47067             :       }
   47068             :     }
   47069           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   47070           0 :       int bErr = FALSE;
   47071           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   47072           0 :       if ( bErr )
   47073             :       {
   47074           0 :         SWIG_fail;
   47075             :       }
   47076             :     }
   47077             :     else {
   47078           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   47079           0 :       SWIG_fail;
   47080             :     }
   47081             :   }
   47082           9 :   {
   47083           9 :     const int bLocalUseExceptions = GetUseExceptions();
   47084           9 :     if ( bLocalUseExceptions ) {
   47085           1 :       pushErrorHandler();
   47086             :     }
   47087           9 :     {
   47088           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47089           9 :       GDALRelationshipShadow_SetLeftMappingTableFields(arg1,arg2);
   47090           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47091             :     }
   47092           9 :     if ( bLocalUseExceptions ) {
   47093           1 :       popErrorHandler();
   47094             :     }
   47095             : #ifndef SED_HACKS
   47096             :     if ( bLocalUseExceptions ) {
   47097             :       CPLErr eclass = CPLGetLastErrorType();
   47098             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47099             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47100             :       }
   47101             :     }
   47102             : #endif
   47103             :   }
   47104           9 :   resultobj = SWIG_Py_Void();
   47105           9 :   {
   47106             :     /* %typemap(freearg) char **dict */
   47107           9 :     CSLDestroy( arg2 );
   47108             :   }
   47109           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; } }
   47110             :   return resultobj;
   47111           0 : fail:
   47112           0 :   {
   47113             :     /* %typemap(freearg) char **dict */
   47114           0 :     CSLDestroy( arg2 );
   47115             :   }
   47116             :   return NULL;
   47117             : }
   47118             : 
   47119             : 
   47120           9 : SWIGINTERN PyObject *_wrap_Relationship_SetRightMappingTableFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47121           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47122           9 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47123           9 :   char **arg2 = (char **) 0 ;
   47124           9 :   void *argp1 = 0 ;
   47125           9 :   int res1 = 0 ;
   47126           9 :   PyObject *swig_obj[2] ;
   47127             :   
   47128           9 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetRightMappingTableFields", 2, 2, swig_obj)) SWIG_fail;
   47129           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47130           9 :   if (!SWIG_IsOK(res1)) {
   47131           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetRightMappingTableFields" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47132             :   }
   47133           9 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47134           9 :   {
   47135             :     /* %typemap(in) char **dict */
   47136           9 :     arg2 = NULL;
   47137           9 :     if ( PySequence_Check( swig_obj[1] ) ) {
   47138           9 :       int bErr = FALSE;
   47139           9 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   47140           9 :       if ( bErr )
   47141             :       {
   47142           0 :         SWIG_fail;
   47143             :       }
   47144             :     }
   47145           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   47146           0 :       int bErr = FALSE;
   47147           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   47148           0 :       if ( bErr )
   47149             :       {
   47150           0 :         SWIG_fail;
   47151             :       }
   47152             :     }
   47153             :     else {
   47154           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   47155           0 :       SWIG_fail;
   47156             :     }
   47157             :   }
   47158           9 :   {
   47159           9 :     const int bLocalUseExceptions = GetUseExceptions();
   47160           9 :     if ( bLocalUseExceptions ) {
   47161           1 :       pushErrorHandler();
   47162             :     }
   47163           9 :     {
   47164           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47165           9 :       GDALRelationshipShadow_SetRightMappingTableFields(arg1,arg2);
   47166           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47167             :     }
   47168           9 :     if ( bLocalUseExceptions ) {
   47169           1 :       popErrorHandler();
   47170             :     }
   47171             : #ifndef SED_HACKS
   47172             :     if ( bLocalUseExceptions ) {
   47173             :       CPLErr eclass = CPLGetLastErrorType();
   47174             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47175             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47176             :       }
   47177             :     }
   47178             : #endif
   47179             :   }
   47180           9 :   resultobj = SWIG_Py_Void();
   47181           9 :   {
   47182             :     /* %typemap(freearg) char **dict */
   47183           9 :     CSLDestroy( arg2 );
   47184             :   }
   47185           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; } }
   47186             :   return resultobj;
   47187           0 : fail:
   47188           0 :   {
   47189             :     /* %typemap(freearg) char **dict */
   47190           0 :     CSLDestroy( arg2 );
   47191             :   }
   47192             :   return NULL;
   47193             : }
   47194             : 
   47195             : 
   47196          47 : SWIGINTERN PyObject *_wrap_Relationship_GetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47197          47 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47198          47 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47199          47 :   void *argp1 = 0 ;
   47200          47 :   int res1 = 0 ;
   47201          47 :   PyObject *swig_obj[1] ;
   47202          47 :   GDALRelationshipType result;
   47203             :   
   47204          47 :   if (!args) SWIG_fail;
   47205          47 :   swig_obj[0] = args;
   47206          47 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47207          47 :   if (!SWIG_IsOK(res1)) {
   47208           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetType" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47209             :   }
   47210          47 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47211          47 :   {
   47212          47 :     const int bLocalUseExceptions = GetUseExceptions();
   47213          47 :     if ( bLocalUseExceptions ) {
   47214           9 :       pushErrorHandler();
   47215             :     }
   47216          47 :     {
   47217          47 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47218          47 :       result = (GDALRelationshipType)GDALRelationshipShadow_GetType(arg1);
   47219          47 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47220             :     }
   47221          47 :     if ( bLocalUseExceptions ) {
   47222           9 :       popErrorHandler();
   47223             :     }
   47224             : #ifndef SED_HACKS
   47225             :     if ( bLocalUseExceptions ) {
   47226             :       CPLErr eclass = CPLGetLastErrorType();
   47227             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47228             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47229             :       }
   47230             :     }
   47231             : #endif
   47232             :   }
   47233          47 :   resultobj = SWIG_From_int(static_cast< int >(result));
   47234          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; } }
   47235             :   return resultobj;
   47236             : fail:
   47237             :   return NULL;
   47238             : }
   47239             : 
   47240             : 
   47241          10 : SWIGINTERN PyObject *_wrap_Relationship_SetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47242          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47243          10 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47244          10 :   GDALRelationshipType arg2 ;
   47245          10 :   void *argp1 = 0 ;
   47246          10 :   int res1 = 0 ;
   47247          10 :   int val2 ;
   47248          10 :   int ecode2 = 0 ;
   47249          10 :   PyObject *swig_obj[2] ;
   47250             :   
   47251          10 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetType", 2, 2, swig_obj)) SWIG_fail;
   47252          10 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47253          10 :   if (!SWIG_IsOK(res1)) {
   47254           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetType" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47255             :   }
   47256          10 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47257          10 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   47258          10 :   if (!SWIG_IsOK(ecode2)) {
   47259           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Relationship_SetType" "', argument " "2"" of type '" "GDALRelationshipType""'");
   47260             :   } 
   47261          10 :   arg2 = static_cast< GDALRelationshipType >(val2);
   47262          10 :   {
   47263          10 :     const int bLocalUseExceptions = GetUseExceptions();
   47264          10 :     if ( bLocalUseExceptions ) {
   47265           1 :       pushErrorHandler();
   47266             :     }
   47267          10 :     {
   47268          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47269          10 :       GDALRelationshipShadow_SetType(arg1,arg2);
   47270          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47271             :     }
   47272          10 :     if ( bLocalUseExceptions ) {
   47273           1 :       popErrorHandler();
   47274             :     }
   47275             : #ifndef SED_HACKS
   47276             :     if ( bLocalUseExceptions ) {
   47277             :       CPLErr eclass = CPLGetLastErrorType();
   47278             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47279             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47280             :       }
   47281             :     }
   47282             : #endif
   47283             :   }
   47284          10 :   resultobj = SWIG_Py_Void();
   47285          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; } }
   47286             :   return resultobj;
   47287             : fail:
   47288             :   return NULL;
   47289             : }
   47290             : 
   47291             : 
   47292          14 : SWIGINTERN PyObject *_wrap_Relationship_GetForwardPathLabel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47293          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47294          14 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47295          14 :   void *argp1 = 0 ;
   47296          14 :   int res1 = 0 ;
   47297          14 :   PyObject *swig_obj[1] ;
   47298          14 :   char *result = 0 ;
   47299             :   
   47300          14 :   if (!args) SWIG_fail;
   47301          14 :   swig_obj[0] = args;
   47302          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47303          14 :   if (!SWIG_IsOK(res1)) {
   47304           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetForwardPathLabel" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47305             :   }
   47306          14 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47307          14 :   {
   47308          14 :     const int bLocalUseExceptions = GetUseExceptions();
   47309          14 :     if ( bLocalUseExceptions ) {
   47310           4 :       pushErrorHandler();
   47311             :     }
   47312          14 :     {
   47313          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47314          14 :       result = (char *)GDALRelationshipShadow_GetForwardPathLabel(arg1);
   47315          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47316             :     }
   47317          14 :     if ( bLocalUseExceptions ) {
   47318           4 :       popErrorHandler();
   47319             :     }
   47320             : #ifndef SED_HACKS
   47321             :     if ( bLocalUseExceptions ) {
   47322             :       CPLErr eclass = CPLGetLastErrorType();
   47323             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47324             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47325             :       }
   47326             :     }
   47327             : #endif
   47328             :   }
   47329          14 :   resultobj = SWIG_FromCharPtr((const char *)result);
   47330          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; } }
   47331             :   return resultobj;
   47332             : fail:
   47333             :   return NULL;
   47334             : }
   47335             : 
   47336             : 
   47337           9 : SWIGINTERN PyObject *_wrap_Relationship_SetForwardPathLabel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47338           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47339           9 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47340           9 :   char *arg2 = (char *) 0 ;
   47341           9 :   void *argp1 = 0 ;
   47342           9 :   int res1 = 0 ;
   47343           9 :   PyObject *str2 = 0 ;
   47344           9 :   int bToFree2 = 0 ;
   47345           9 :   PyObject *swig_obj[2] ;
   47346             :   
   47347           9 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetForwardPathLabel", 2, 2, swig_obj)) SWIG_fail;
   47348           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47349           9 :   if (!SWIG_IsOK(res1)) {
   47350           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetForwardPathLabel" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47351             :   }
   47352           9 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47353           9 :   {
   47354             :     /* %typemap(in) (tostring argin) */
   47355           9 :     str2 = PyObject_Str( swig_obj[1] );
   47356           9 :     if ( str2 == 0 ) {
   47357           0 :       PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
   47358           0 :       SWIG_fail;
   47359             :     }
   47360             :     
   47361           9 :     arg2 = GDALPythonObjectToCStr(str2, &bToFree2);
   47362             :   }
   47363           9 :   {
   47364           9 :     const int bLocalUseExceptions = GetUseExceptions();
   47365           9 :     if ( bLocalUseExceptions ) {
   47366           1 :       pushErrorHandler();
   47367             :     }
   47368           9 :     {
   47369           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47370           9 :       GDALRelationshipShadow_SetForwardPathLabel(arg1,(char const *)arg2);
   47371           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47372             :     }
   47373           9 :     if ( bLocalUseExceptions ) {
   47374           1 :       popErrorHandler();
   47375             :     }
   47376             : #ifndef SED_HACKS
   47377             :     if ( bLocalUseExceptions ) {
   47378             :       CPLErr eclass = CPLGetLastErrorType();
   47379             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47380             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47381             :       }
   47382             :     }
   47383             : #endif
   47384             :   }
   47385           9 :   resultobj = SWIG_Py_Void();
   47386           9 :   {
   47387             :     /* %typemap(freearg) (tostring argin) */
   47388           9 :     if ( str2 != NULL)
   47389             :     {
   47390           9 :       Py_DECREF(str2);
   47391             :     }
   47392           9 :     GDALPythonFreeCStr(arg2, bToFree2);
   47393             :   }
   47394           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; } }
   47395             :   return resultobj;
   47396           0 : fail:
   47397           0 :   {
   47398             :     /* %typemap(freearg) (tostring argin) */
   47399           0 :     if ( str2 != NULL)
   47400             :     {
   47401           0 :       Py_DECREF(str2);
   47402             :     }
   47403           9 :     GDALPythonFreeCStr(arg2, bToFree2);
   47404             :   }
   47405             :   return NULL;
   47406             : }
   47407             : 
   47408             : 
   47409          14 : SWIGINTERN PyObject *_wrap_Relationship_GetBackwardPathLabel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47410          14 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47411          14 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47412          14 :   void *argp1 = 0 ;
   47413          14 :   int res1 = 0 ;
   47414          14 :   PyObject *swig_obj[1] ;
   47415          14 :   char *result = 0 ;
   47416             :   
   47417          14 :   if (!args) SWIG_fail;
   47418          14 :   swig_obj[0] = args;
   47419          14 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47420          14 :   if (!SWIG_IsOK(res1)) {
   47421           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetBackwardPathLabel" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47422             :   }
   47423          14 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47424          14 :   {
   47425          14 :     const int bLocalUseExceptions = GetUseExceptions();
   47426          14 :     if ( bLocalUseExceptions ) {
   47427           4 :       pushErrorHandler();
   47428             :     }
   47429          14 :     {
   47430          14 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47431          14 :       result = (char *)GDALRelationshipShadow_GetBackwardPathLabel(arg1);
   47432          14 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47433             :     }
   47434          14 :     if ( bLocalUseExceptions ) {
   47435           4 :       popErrorHandler();
   47436             :     }
   47437             : #ifndef SED_HACKS
   47438             :     if ( bLocalUseExceptions ) {
   47439             :       CPLErr eclass = CPLGetLastErrorType();
   47440             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47441             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47442             :       }
   47443             :     }
   47444             : #endif
   47445             :   }
   47446          14 :   resultobj = SWIG_FromCharPtr((const char *)result);
   47447          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; } }
   47448             :   return resultobj;
   47449             : fail:
   47450             :   return NULL;
   47451             : }
   47452             : 
   47453             : 
   47454           9 : SWIGINTERN PyObject *_wrap_Relationship_SetBackwardPathLabel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47455           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47456           9 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47457           9 :   char *arg2 = (char *) 0 ;
   47458           9 :   void *argp1 = 0 ;
   47459           9 :   int res1 = 0 ;
   47460           9 :   PyObject *str2 = 0 ;
   47461           9 :   int bToFree2 = 0 ;
   47462           9 :   PyObject *swig_obj[2] ;
   47463             :   
   47464           9 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetBackwardPathLabel", 2, 2, swig_obj)) SWIG_fail;
   47465           9 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47466           9 :   if (!SWIG_IsOK(res1)) {
   47467           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetBackwardPathLabel" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47468             :   }
   47469           9 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47470           9 :   {
   47471             :     /* %typemap(in) (tostring argin) */
   47472           9 :     str2 = PyObject_Str( swig_obj[1] );
   47473           9 :     if ( str2 == 0 ) {
   47474           0 :       PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
   47475           0 :       SWIG_fail;
   47476             :     }
   47477             :     
   47478           9 :     arg2 = GDALPythonObjectToCStr(str2, &bToFree2);
   47479             :   }
   47480           9 :   {
   47481           9 :     const int bLocalUseExceptions = GetUseExceptions();
   47482           9 :     if ( bLocalUseExceptions ) {
   47483           1 :       pushErrorHandler();
   47484             :     }
   47485           9 :     {
   47486           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47487           9 :       GDALRelationshipShadow_SetBackwardPathLabel(arg1,(char const *)arg2);
   47488           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47489             :     }
   47490           9 :     if ( bLocalUseExceptions ) {
   47491           1 :       popErrorHandler();
   47492             :     }
   47493             : #ifndef SED_HACKS
   47494             :     if ( bLocalUseExceptions ) {
   47495             :       CPLErr eclass = CPLGetLastErrorType();
   47496             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47497             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47498             :       }
   47499             :     }
   47500             : #endif
   47501             :   }
   47502           9 :   resultobj = SWIG_Py_Void();
   47503           9 :   {
   47504             :     /* %typemap(freearg) (tostring argin) */
   47505           9 :     if ( str2 != NULL)
   47506             :     {
   47507           9 :       Py_DECREF(str2);
   47508             :     }
   47509           9 :     GDALPythonFreeCStr(arg2, bToFree2);
   47510             :   }
   47511           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; } }
   47512             :   return resultobj;
   47513           0 : fail:
   47514           0 :   {
   47515             :     /* %typemap(freearg) (tostring argin) */
   47516           0 :     if ( str2 != NULL)
   47517             :     {
   47518           0 :       Py_DECREF(str2);
   47519             :     }
   47520           9 :     GDALPythonFreeCStr(arg2, bToFree2);
   47521             :   }
   47522             :   return NULL;
   47523             : }
   47524             : 
   47525             : 
   47526          44 : SWIGINTERN PyObject *_wrap_Relationship_GetRelatedTableType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47527          44 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47528          44 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47529          44 :   void *argp1 = 0 ;
   47530          44 :   int res1 = 0 ;
   47531          44 :   PyObject *swig_obj[1] ;
   47532          44 :   char *result = 0 ;
   47533             :   
   47534          44 :   if (!args) SWIG_fail;
   47535          44 :   swig_obj[0] = args;
   47536          44 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47537          44 :   if (!SWIG_IsOK(res1)) {
   47538           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_GetRelatedTableType" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47539             :   }
   47540          44 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47541          44 :   {
   47542          44 :     const int bLocalUseExceptions = GetUseExceptions();
   47543          44 :     if ( bLocalUseExceptions ) {
   47544           9 :       pushErrorHandler();
   47545             :     }
   47546          44 :     {
   47547          44 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47548          44 :       result = (char *)GDALRelationshipShadow_GetRelatedTableType(arg1);
   47549          44 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47550             :     }
   47551          44 :     if ( bLocalUseExceptions ) {
   47552           9 :       popErrorHandler();
   47553             :     }
   47554             : #ifndef SED_HACKS
   47555             :     if ( bLocalUseExceptions ) {
   47556             :       CPLErr eclass = CPLGetLastErrorType();
   47557             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47558             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47559             :       }
   47560             :     }
   47561             : #endif
   47562             :   }
   47563          44 :   resultobj = SWIG_FromCharPtr((const char *)result);
   47564          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; } }
   47565             :   return resultobj;
   47566             : fail:
   47567             :   return NULL;
   47568             : }
   47569             : 
   47570             : 
   47571          20 : SWIGINTERN PyObject *_wrap_Relationship_SetRelatedTableType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47572          20 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47573          20 :   GDALRelationshipShadow *arg1 = (GDALRelationshipShadow *) 0 ;
   47574          20 :   char *arg2 = (char *) 0 ;
   47575          20 :   void *argp1 = 0 ;
   47576          20 :   int res1 = 0 ;
   47577          20 :   PyObject *str2 = 0 ;
   47578          20 :   int bToFree2 = 0 ;
   47579          20 :   PyObject *swig_obj[2] ;
   47580             :   
   47581          20 :   if (!SWIG_Python_UnpackTuple(args, "Relationship_SetRelatedTableType", 2, 2, swig_obj)) SWIG_fail;
   47582          20 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRelationshipShadow, 0 |  0 );
   47583          20 :   if (!SWIG_IsOK(res1)) {
   47584           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Relationship_SetRelatedTableType" "', argument " "1"" of type '" "GDALRelationshipShadow *""'"); 
   47585             :   }
   47586          20 :   arg1 = reinterpret_cast< GDALRelationshipShadow * >(argp1);
   47587          20 :   {
   47588             :     /* %typemap(in) (tostring argin) */
   47589          20 :     str2 = PyObject_Str( swig_obj[1] );
   47590          20 :     if ( str2 == 0 ) {
   47591           0 :       PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
   47592           0 :       SWIG_fail;
   47593             :     }
   47594             :     
   47595          20 :     arg2 = GDALPythonObjectToCStr(str2, &bToFree2);
   47596             :   }
   47597          20 :   {
   47598          20 :     const int bLocalUseExceptions = GetUseExceptions();
   47599          20 :     if ( bLocalUseExceptions ) {
   47600           1 :       pushErrorHandler();
   47601             :     }
   47602          20 :     {
   47603          20 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47604          20 :       GDALRelationshipShadow_SetRelatedTableType(arg1,(char const *)arg2);
   47605          20 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47606             :     }
   47607          20 :     if ( bLocalUseExceptions ) {
   47608           1 :       popErrorHandler();
   47609             :     }
   47610             : #ifndef SED_HACKS
   47611             :     if ( bLocalUseExceptions ) {
   47612             :       CPLErr eclass = CPLGetLastErrorType();
   47613             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47614             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47615             :       }
   47616             :     }
   47617             : #endif
   47618             :   }
   47619          20 :   resultobj = SWIG_Py_Void();
   47620          20 :   {
   47621             :     /* %typemap(freearg) (tostring argin) */
   47622          20 :     if ( str2 != NULL)
   47623             :     {
   47624          20 :       Py_DECREF(str2);
   47625             :     }
   47626          20 :     GDALPythonFreeCStr(arg2, bToFree2);
   47627             :   }
   47628          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; } }
   47629             :   return resultobj;
   47630           0 : fail:
   47631           0 :   {
   47632             :     /* %typemap(freearg) (tostring argin) */
   47633           0 :     if ( str2 != NULL)
   47634             :     {
   47635           0 :       Py_DECREF(str2);
   47636             :     }
   47637          20 :     GDALPythonFreeCStr(arg2, bToFree2);
   47638             :   }
   47639             :   return NULL;
   47640             : }
   47641             : 
   47642             : 
   47643         277 : SWIGINTERN PyObject *Relationship_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47644         277 :   PyObject *obj;
   47645         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   47646         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALRelationshipShadow, SWIG_NewClientData(obj));
   47647         277 :   return SWIG_Py_Void();
   47648             : }
   47649             : 
   47650          29 : SWIGINTERN PyObject *Relationship_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   47651          29 :   return SWIG_Python_InitShadowInstance(args);
   47652             : }
   47653             : 
   47654        3713 : SWIGINTERN PyObject *_wrap_TermProgress_nocb(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   47655        3713 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47656        3713 :   double arg1 ;
   47657        3713 :   char *arg2 = (char *) NULL ;
   47658        3713 :   void *arg3 = (void *) NULL ;
   47659        3713 :   double val1 ;
   47660        3713 :   int ecode1 = 0 ;
   47661        3713 :   int res2 ;
   47662        3713 :   char *buf2 = 0 ;
   47663        3713 :   int alloc2 = 0 ;
   47664        3713 :   int res3 ;
   47665        3713 :   PyObject * obj0 = 0 ;
   47666        3713 :   PyObject * obj1 = 0 ;
   47667        3713 :   PyObject * obj2 = 0 ;
   47668        3713 :   char * kwnames[] = {
   47669             :     (char *)"dfProgress",  (char *)"pszMessage",  (char *)"pData",  NULL 
   47670             :   };
   47671        3713 :   int result;
   47672             :   
   47673        3713 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OO:TermProgress_nocb", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
   47674        3713 :   ecode1 = SWIG_AsVal_double(obj0, &val1);
   47675        3713 :   if (!SWIG_IsOK(ecode1)) {
   47676           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "TermProgress_nocb" "', argument " "1"" of type '" "double""'");
   47677             :   } 
   47678        3713 :   arg1 = static_cast< double >(val1);
   47679        3713 :   if (obj1) {
   47680        1347 :     res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   47681        1347 :     if (!SWIG_IsOK(res2)) {
   47682           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermProgress_nocb" "', argument " "2"" of type '" "char const *""'");
   47683             :     }
   47684        1347 :     arg2 = reinterpret_cast< char * >(buf2);
   47685             :   }
   47686        3713 :   if (obj2) {
   47687        1347 :     res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
   47688        1347 :     if (!SWIG_IsOK(res3)) {
   47689           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "TermProgress_nocb" "', argument " "3"" of type '" "void *""'"); 
   47690             :     }
   47691             :   }
   47692        3713 :   {
   47693        3713 :     const int bLocalUseExceptions = GetUseExceptions();
   47694        3713 :     if ( bLocalUseExceptions ) {
   47695        3710 :       pushErrorHandler();
   47696             :     }
   47697        3713 :     {
   47698        3713 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47699        3713 :       result = (int)GDALTermProgress_nocb(arg1,(char const *)arg2,arg3);
   47700        3713 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47701             :     }
   47702        3713 :     if ( bLocalUseExceptions ) {
   47703        3710 :       popErrorHandler();
   47704             :     }
   47705             : #ifndef SED_HACKS
   47706             :     if ( bLocalUseExceptions ) {
   47707             :       CPLErr eclass = CPLGetLastErrorType();
   47708             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47709             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47710             :       }
   47711             :     }
   47712             : #endif
   47713             :   }
   47714        3713 :   resultobj = SWIG_From_int(static_cast< int >(result));
   47715        3713 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   47716        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; } }
   47717             :   return resultobj;
   47718           0 : fail:
   47719           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   47720             :   return NULL;
   47721             : }
   47722             : 
   47723             : 
   47724           4 : SWIGINTERN PyObject *_wrap_ComputeMedianCutPCT(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   47725           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47726           4 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   47727           4 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   47728           4 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   47729           4 :   int arg4 ;
   47730           4 :   GDALColorTableShadow *arg5 = (GDALColorTableShadow *) 0 ;
   47731           4 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   47732           4 :   void *arg7 = (void *) NULL ;
   47733           4 :   void *argp1 = 0 ;
   47734           4 :   int res1 = 0 ;
   47735           4 :   void *argp2 = 0 ;
   47736           4 :   int res2 = 0 ;
   47737           4 :   void *argp3 = 0 ;
   47738           4 :   int res3 = 0 ;
   47739           4 :   int val4 ;
   47740           4 :   int ecode4 = 0 ;
   47741           4 :   void *argp5 = 0 ;
   47742           4 :   int res5 = 0 ;
   47743           4 :   PyObject * obj0 = 0 ;
   47744           4 :   PyObject * obj1 = 0 ;
   47745           4 :   PyObject * obj2 = 0 ;
   47746           4 :   PyObject * obj3 = 0 ;
   47747           4 :   PyObject * obj4 = 0 ;
   47748           4 :   PyObject * obj5 = 0 ;
   47749           4 :   PyObject * obj6 = 0 ;
   47750           4 :   char * kwnames[] = {
   47751             :     (char *)"red",  (char *)"green",  (char *)"blue",  (char *)"num_colors",  (char *)"colors",  (char *)"callback",  (char *)"callback_data",  NULL 
   47752             :   };
   47753           4 :   int result;
   47754             :   
   47755             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   47756           4 :   PyProgressData *psProgressInfo;
   47757           4 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   47758           4 :   psProgressInfo->nLastReported = -1;
   47759           4 :   psProgressInfo->psPyCallback = NULL;
   47760           4 :   psProgressInfo->psPyCallbackData = NULL;
   47761           4 :   arg7 = psProgressInfo;
   47762           4 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO|OO:ComputeMedianCutPCT", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   47763           4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   47764           4 :   if (!SWIG_IsOK(res1)) {
   47765           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComputeMedianCutPCT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   47766             :   }
   47767           4 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   47768           4 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   47769           4 :   if (!SWIG_IsOK(res2)) {
   47770           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ComputeMedianCutPCT" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   47771             :   }
   47772           4 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   47773           4 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   47774           4 :   if (!SWIG_IsOK(res3)) {
   47775           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ComputeMedianCutPCT" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   47776             :   }
   47777           4 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   47778           4 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   47779           4 :   if (!SWIG_IsOK(ecode4)) {
   47780           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ComputeMedianCutPCT" "', argument " "4"" of type '" "int""'");
   47781             :   } 
   47782           4 :   arg4 = static_cast< int >(val4);
   47783           4 :   res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   47784           4 :   if (!SWIG_IsOK(res5)) {
   47785           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ComputeMedianCutPCT" "', argument " "5"" of type '" "GDALColorTableShadow *""'"); 
   47786             :   }
   47787           4 :   arg5 = reinterpret_cast< GDALColorTableShadow * >(argp5);
   47788           4 :   if (obj5) {
   47789           3 :     {
   47790             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   47791             :       /* callback_func typemap */
   47792             :       
   47793             :       /* In some cases 0 is passed instead of None. */
   47794             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   47795           3 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   47796             :       {
   47797           0 :         if( PyLong_AsLong(obj5) == 0 )
   47798             :         {
   47799           0 :           obj5 = Py_None;
   47800             :         }
   47801             :       }
   47802             :       
   47803           3 :       if (obj5 && obj5 != Py_None ) {
   47804           3 :         void* cbfunction = NULL;
   47805           3 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   47806             :             (void**)&cbfunction,
   47807             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   47808             :             SWIG_POINTER_EXCEPTION | 0 ));
   47809             :         
   47810           3 :         if ( cbfunction == GDALTermProgress ) {
   47811             :           arg6 = GDALTermProgress;
   47812             :         } else {
   47813           3 :           if (!PyCallable_Check(obj5)) {
   47814           0 :             PyErr_SetString( PyExc_RuntimeError,
   47815             :               "Object given is not a Python function" );
   47816           0 :             SWIG_fail;
   47817             :           }
   47818           3 :           psProgressInfo->psPyCallback = obj5;
   47819           3 :           arg6 = PyProgressProxy;
   47820             :         }
   47821             :         
   47822             :       }
   47823             :       
   47824             :     }
   47825             :   }
   47826           4 :   if (obj6) {
   47827           0 :     {
   47828             :       /* %typemap(in) ( void* callback_data=NULL)  */
   47829           0 :       psProgressInfo->psPyCallbackData = obj6 ;
   47830             :     }
   47831             :   }
   47832           4 :   {
   47833           4 :     if (!arg1) {
   47834           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   47835             :     }
   47836             :   }
   47837           4 :   {
   47838           4 :     if (!arg2) {
   47839           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   47840             :     }
   47841             :   }
   47842           4 :   {
   47843           4 :     if (!arg3) {
   47844           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   47845             :     }
   47846             :   }
   47847           4 :   {
   47848           4 :     if (!arg5) {
   47849           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   47850             :     }
   47851             :   }
   47852           4 :   {
   47853           4 :     const int bLocalUseExceptions = GetUseExceptions();
   47854           4 :     if ( bLocalUseExceptions ) {
   47855           4 :       pushErrorHandler();
   47856             :     }
   47857           4 :     {
   47858           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   47859           4 :       result = (int)ComputeMedianCutPCT(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   47860           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   47861             :     }
   47862           4 :     if ( bLocalUseExceptions ) {
   47863           4 :       popErrorHandler();
   47864             :     }
   47865             : #ifndef SED_HACKS
   47866             :     if ( bLocalUseExceptions ) {
   47867             :       CPLErr eclass = CPLGetLastErrorType();
   47868             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   47869             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   47870             :       }
   47871             :     }
   47872             : #endif
   47873             :   }
   47874           4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   47875           4 :   {
   47876             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   47877             :     
   47878           4 :     CPLFree(psProgressInfo);
   47879             :     
   47880             :   }
   47881           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; } }
   47882             :   return resultobj;
   47883           0 : fail:
   47884           0 :   {
   47885             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   47886             :     
   47887           0 :     CPLFree(psProgressInfo);
   47888             :     
   47889             :   }
   47890             :   return NULL;
   47891             : }
   47892             : 
   47893             : 
   47894           7 : SWIGINTERN PyObject *_wrap_DitherRGB2PCT(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   47895           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   47896           7 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   47897           7 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   47898           7 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   47899           7 :   GDALRasterBandShadow *arg4 = (GDALRasterBandShadow *) 0 ;
   47900           7 :   GDALColorTableShadow *arg5 = (GDALColorTableShadow *) 0 ;
   47901           7 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   47902           7 :   void *arg7 = (void *) NULL ;
   47903           7 :   void *argp1 = 0 ;
   47904           7 :   int res1 = 0 ;
   47905           7 :   void *argp2 = 0 ;
   47906           7 :   int res2 = 0 ;
   47907           7 :   void *argp3 = 0 ;
   47908           7 :   int res3 = 0 ;
   47909           7 :   void *argp4 = 0 ;
   47910           7 :   int res4 = 0 ;
   47911           7 :   void *argp5 = 0 ;
   47912           7 :   int res5 = 0 ;
   47913           7 :   PyObject * obj0 = 0 ;
   47914           7 :   PyObject * obj1 = 0 ;
   47915           7 :   PyObject * obj2 = 0 ;
   47916           7 :   PyObject * obj3 = 0 ;
   47917           7 :   PyObject * obj4 = 0 ;
   47918           7 :   PyObject * obj5 = 0 ;
   47919           7 :   PyObject * obj6 = 0 ;
   47920           7 :   char * kwnames[] = {
   47921             :     (char *)"red",  (char *)"green",  (char *)"blue",  (char *)"target",  (char *)"colors",  (char *)"callback",  (char *)"callback_data",  NULL 
   47922             :   };
   47923           7 :   int result;
   47924             :   
   47925             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   47926           7 :   PyProgressData *psProgressInfo;
   47927           7 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   47928           7 :   psProgressInfo->nLastReported = -1;
   47929           7 :   psProgressInfo->psPyCallback = NULL;
   47930           7 :   psProgressInfo->psPyCallbackData = NULL;
   47931           7 :   arg7 = psProgressInfo;
   47932           7 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO|OO:DitherRGB2PCT", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   47933           7 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   47934           7 :   if (!SWIG_IsOK(res1)) {
   47935           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DitherRGB2PCT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   47936             :   }
   47937           7 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   47938           7 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   47939           7 :   if (!SWIG_IsOK(res2)) {
   47940           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DitherRGB2PCT" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   47941             :   }
   47942           7 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   47943           7 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   47944           7 :   if (!SWIG_IsOK(res3)) {
   47945           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DitherRGB2PCT" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   47946             :   }
   47947           7 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   47948           7 :   res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   47949           7 :   if (!SWIG_IsOK(res4)) {
   47950           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DitherRGB2PCT" "', argument " "4"" of type '" "GDALRasterBandShadow *""'"); 
   47951             :   }
   47952           7 :   arg4 = reinterpret_cast< GDALRasterBandShadow * >(argp4);
   47953           7 :   res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   47954           7 :   if (!SWIG_IsOK(res5)) {
   47955           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "DitherRGB2PCT" "', argument " "5"" of type '" "GDALColorTableShadow *""'"); 
   47956             :   }
   47957           7 :   arg5 = reinterpret_cast< GDALColorTableShadow * >(argp5);
   47958           7 :   if (obj5) {
   47959           6 :     {
   47960             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   47961             :       /* callback_func typemap */
   47962             :       
   47963             :       /* In some cases 0 is passed instead of None. */
   47964             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   47965           6 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   47966             :       {
   47967           0 :         if( PyLong_AsLong(obj5) == 0 )
   47968             :         {
   47969           0 :           obj5 = Py_None;
   47970             :         }
   47971             :       }
   47972             :       
   47973           6 :       if (obj5 && obj5 != Py_None ) {
   47974           6 :         void* cbfunction = NULL;
   47975           6 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   47976             :             (void**)&cbfunction,
   47977             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   47978             :             SWIG_POINTER_EXCEPTION | 0 ));
   47979             :         
   47980           6 :         if ( cbfunction == GDALTermProgress ) {
   47981             :           arg6 = GDALTermProgress;
   47982             :         } else {
   47983           6 :           if (!PyCallable_Check(obj5)) {
   47984           0 :             PyErr_SetString( PyExc_RuntimeError,
   47985             :               "Object given is not a Python function" );
   47986           0 :             SWIG_fail;
   47987             :           }
   47988           6 :           psProgressInfo->psPyCallback = obj5;
   47989           6 :           arg6 = PyProgressProxy;
   47990             :         }
   47991             :         
   47992             :       }
   47993             :       
   47994             :     }
   47995             :   }
   47996           7 :   if (obj6) {
   47997           0 :     {
   47998             :       /* %typemap(in) ( void* callback_data=NULL)  */
   47999           0 :       psProgressInfo->psPyCallbackData = obj6 ;
   48000             :     }
   48001             :   }
   48002           7 :   {
   48003           7 :     if (!arg1) {
   48004           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48005             :     }
   48006             :   }
   48007           7 :   {
   48008           7 :     if (!arg2) {
   48009           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48010             :     }
   48011             :   }
   48012           7 :   {
   48013           7 :     if (!arg3) {
   48014           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48015             :     }
   48016             :   }
   48017           7 :   {
   48018           7 :     if (!arg4) {
   48019           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48020             :     }
   48021             :   }
   48022           7 :   {
   48023           7 :     if (!arg5) {
   48024           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48025             :     }
   48026             :   }
   48027           7 :   {
   48028           7 :     const int bLocalUseExceptions = GetUseExceptions();
   48029           7 :     if ( bLocalUseExceptions ) {
   48030           7 :       pushErrorHandler();
   48031             :     }
   48032           7 :     {
   48033           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48034           7 :       result = (int)DitherRGB2PCT(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   48035           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48036             :     }
   48037           7 :     if ( bLocalUseExceptions ) {
   48038           7 :       popErrorHandler();
   48039             :     }
   48040             : #ifndef SED_HACKS
   48041             :     if ( bLocalUseExceptions ) {
   48042             :       CPLErr eclass = CPLGetLastErrorType();
   48043             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48044             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48045             :       }
   48046             :     }
   48047             : #endif
   48048             :   }
   48049           7 :   resultobj = SWIG_From_int(static_cast< int >(result));
   48050           7 :   {
   48051             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48052             :     
   48053           7 :     CPLFree(psProgressInfo);
   48054             :     
   48055             :   }
   48056           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; } }
   48057             :   return resultobj;
   48058           0 : fail:
   48059           0 :   {
   48060             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48061             :     
   48062           0 :     CPLFree(psProgressInfo);
   48063             :     
   48064             :   }
   48065             :   return NULL;
   48066             : }
   48067             : 
   48068             : 
   48069          62 : SWIGINTERN PyObject *_wrap_ReprojectImage(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   48070          62 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48071          62 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   48072          62 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   48073          62 :   char *arg3 = (char *) NULL ;
   48074          62 :   char *arg4 = (char *) NULL ;
   48075          62 :   GDALResampleAlg arg5 = (GDALResampleAlg) GRA_NearestNeighbour ;
   48076          62 :   double arg6 = (double) 0.0 ;
   48077          62 :   double arg7 = (double) 0.0 ;
   48078          62 :   GDALProgressFunc arg8 = (GDALProgressFunc) NULL ;
   48079          62 :   void *arg9 = (void *) NULL ;
   48080          62 :   char **arg10 = (char **) NULL ;
   48081          62 :   void *argp1 = 0 ;
   48082          62 :   int res1 = 0 ;
   48083          62 :   void *argp2 = 0 ;
   48084          62 :   int res2 = 0 ;
   48085          62 :   int res3 ;
   48086          62 :   char *buf3 = 0 ;
   48087          62 :   int alloc3 = 0 ;
   48088          62 :   int res4 ;
   48089          62 :   char *buf4 = 0 ;
   48090          62 :   int alloc4 = 0 ;
   48091          62 :   int val5 ;
   48092          62 :   int ecode5 = 0 ;
   48093          62 :   double val6 ;
   48094          62 :   int ecode6 = 0 ;
   48095          62 :   double val7 ;
   48096          62 :   int ecode7 = 0 ;
   48097          62 :   PyObject * obj0 = 0 ;
   48098          62 :   PyObject * obj1 = 0 ;
   48099          62 :   PyObject * obj2 = 0 ;
   48100          62 :   PyObject * obj3 = 0 ;
   48101          62 :   PyObject * obj4 = 0 ;
   48102          62 :   PyObject * obj5 = 0 ;
   48103          62 :   PyObject * obj6 = 0 ;
   48104          62 :   PyObject * obj7 = 0 ;
   48105          62 :   PyObject * obj8 = 0 ;
   48106          62 :   PyObject * obj9 = 0 ;
   48107          62 :   char * kwnames[] = {
   48108             :     (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 
   48109             :   };
   48110          62 :   CPLErr result;
   48111             :   
   48112             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   48113          62 :   PyProgressData *psProgressInfo;
   48114          62 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   48115          62 :   psProgressInfo->nLastReported = -1;
   48116          62 :   psProgressInfo->psPyCallback = NULL;
   48117          62 :   psProgressInfo->psPyCallbackData = NULL;
   48118          62 :   arg9 = psProgressInfo;
   48119          62 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOOOOOOO:ReprojectImage", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9)) SWIG_fail;
   48120          62 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   48121          62 :   if (!SWIG_IsOK(res1)) {
   48122           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReprojectImage" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   48123             :   }
   48124          62 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   48125          62 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   48126          62 :   if (!SWIG_IsOK(res2)) {
   48127           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ReprojectImage" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   48128             :   }
   48129          62 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   48130          62 :   if (obj2) {
   48131          61 :     res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   48132          61 :     if (!SWIG_IsOK(res3)) {
   48133           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ReprojectImage" "', argument " "3"" of type '" "char const *""'");
   48134             :     }
   48135          61 :     arg3 = reinterpret_cast< char * >(buf3);
   48136             :   }
   48137          62 :   if (obj3) {
   48138          61 :     res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
   48139          61 :     if (!SWIG_IsOK(res4)) {
   48140           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ReprojectImage" "', argument " "4"" of type '" "char const *""'");
   48141             :     }
   48142          61 :     arg4 = reinterpret_cast< char * >(buf4);
   48143             :   }
   48144          62 :   if (obj4) {
   48145          60 :     ecode5 = SWIG_AsVal_int(obj4, &val5);
   48146          60 :     if (!SWIG_IsOK(ecode5)) {
   48147           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ReprojectImage" "', argument " "5"" of type '" "GDALResampleAlg""'");
   48148             :     } 
   48149          60 :     arg5 = static_cast< GDALResampleAlg >(val5);
   48150             :   }
   48151          62 :   if (obj5) {
   48152           3 :     ecode6 = SWIG_AsVal_double(obj5, &val6);
   48153           3 :     if (!SWIG_IsOK(ecode6)) {
   48154           0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "ReprojectImage" "', argument " "6"" of type '" "double""'");
   48155             :     } 
   48156           3 :     arg6 = static_cast< double >(val6);
   48157             :   }
   48158          62 :   if (obj6) {
   48159           3 :     ecode7 = SWIG_AsVal_double(obj6, &val7);
   48160           3 :     if (!SWIG_IsOK(ecode7)) {
   48161           0 :       SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ReprojectImage" "', argument " "7"" of type '" "double""'");
   48162             :     } 
   48163           3 :     arg7 = static_cast< double >(val7);
   48164             :   }
   48165          62 :   if (obj7) {
   48166           3 :     {
   48167             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   48168             :       /* callback_func typemap */
   48169             :       
   48170             :       /* In some cases 0 is passed instead of None. */
   48171             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   48172           3 :       if ( PyLong_Check(obj7) || PyInt_Check(obj7) )
   48173             :       {
   48174           0 :         if( PyLong_AsLong(obj7) == 0 )
   48175             :         {
   48176           0 :           obj7 = Py_None;
   48177             :         }
   48178             :       }
   48179             :       
   48180           3 :       if (obj7 && obj7 != Py_None ) {
   48181           3 :         void* cbfunction = NULL;
   48182           3 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj7,
   48183             :             (void**)&cbfunction,
   48184             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   48185             :             SWIG_POINTER_EXCEPTION | 0 ));
   48186             :         
   48187           3 :         if ( cbfunction == GDALTermProgress ) {
   48188             :           arg8 = GDALTermProgress;
   48189             :         } else {
   48190           3 :           if (!PyCallable_Check(obj7)) {
   48191           0 :             PyErr_SetString( PyExc_RuntimeError,
   48192             :               "Object given is not a Python function" );
   48193           0 :             SWIG_fail;
   48194             :           }
   48195           3 :           psProgressInfo->psPyCallback = obj7;
   48196           3 :           arg8 = PyProgressProxy;
   48197             :         }
   48198             :         
   48199             :       }
   48200             :       
   48201             :     }
   48202             :   }
   48203          62 :   if (obj8) {
   48204           3 :     {
   48205             :       /* %typemap(in) ( void* callback_data=NULL)  */
   48206           3 :       psProgressInfo->psPyCallbackData = obj8 ;
   48207             :     }
   48208             :   }
   48209          62 :   if (obj9) {
   48210           1 :     {
   48211             :       /* %typemap(in) char **dict */
   48212           1 :       arg10 = NULL;
   48213           1 :       if ( PySequence_Check( obj9 ) ) {
   48214           1 :         int bErr = FALSE;
   48215           1 :         arg10 = CSLFromPySequence(obj9, &bErr);
   48216           1 :         if ( bErr )
   48217             :         {
   48218           0 :           SWIG_fail;
   48219             :         }
   48220             :       }
   48221           0 :       else if ( PyMapping_Check( obj9 ) ) {
   48222           0 :         int bErr = FALSE;
   48223           0 :         arg10 = CSLFromPyMapping(obj9, &bErr);
   48224           0 :         if ( bErr )
   48225             :         {
   48226           0 :           SWIG_fail;
   48227             :         }
   48228             :       }
   48229             :       else {
   48230           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   48231           0 :         SWIG_fail;
   48232             :       }
   48233             :     }
   48234             :   }
   48235          62 :   {
   48236          62 :     if (!arg1) {
   48237           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48238             :     }
   48239             :   }
   48240          62 :   {
   48241          62 :     if (!arg2) {
   48242           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48243             :     }
   48244             :   }
   48245          62 :   {
   48246          62 :     const int bLocalUseExceptions = GetUseExceptions();
   48247          62 :     if ( bLocalUseExceptions ) {
   48248          62 :       pushErrorHandler();
   48249             :     }
   48250          62 :     {
   48251          62 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48252          62 :       result = (CPLErr)ReprojectImage(arg1,arg2,(char const *)arg3,(char const *)arg4,arg5,arg6,arg7,arg8,arg9,arg10);
   48253          62 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48254             :     }
   48255          62 :     if ( bLocalUseExceptions ) {
   48256          62 :       popErrorHandler();
   48257             :     }
   48258             : #ifndef SED_HACKS
   48259             :     if ( bLocalUseExceptions ) {
   48260             :       CPLErr eclass = CPLGetLastErrorType();
   48261             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48262             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48263             :       }
   48264             :     }
   48265             : #endif
   48266             :   }
   48267          62 :   resultobj = SWIG_From_int(static_cast< int >(result));
   48268          62 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   48269          62 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   48270          62 :   {
   48271             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48272             :     
   48273          62 :     CPLFree(psProgressInfo);
   48274             :     
   48275             :   }
   48276          62 :   {
   48277             :     /* %typemap(freearg) char **dict */
   48278          62 :     CSLDestroy( arg10 );
   48279             :   }
   48280          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; } }
   48281             :   return resultobj;
   48282           0 : fail:
   48283           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   48284           0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   48285           0 :   {
   48286             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48287             :     
   48288           0 :     CPLFree(psProgressInfo);
   48289             :     
   48290             :   }
   48291           0 :   {
   48292             :     /* %typemap(freearg) char **dict */
   48293           0 :     CSLDestroy( arg10 );
   48294             :   }
   48295             :   return NULL;
   48296             : }
   48297             : 
   48298             : 
   48299           6 : SWIGINTERN PyObject *_wrap_ComputeProximity(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   48300           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48301           6 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   48302           6 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   48303           6 :   char **arg3 = (char **) NULL ;
   48304           6 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   48305           6 :   void *arg5 = (void *) NULL ;
   48306           6 :   void *argp1 = 0 ;
   48307           6 :   int res1 = 0 ;
   48308           6 :   void *argp2 = 0 ;
   48309           6 :   int res2 = 0 ;
   48310           6 :   PyObject * obj0 = 0 ;
   48311           6 :   PyObject * obj1 = 0 ;
   48312           6 :   PyObject * obj2 = 0 ;
   48313           6 :   PyObject * obj3 = 0 ;
   48314           6 :   PyObject * obj4 = 0 ;
   48315           6 :   char * kwnames[] = {
   48316             :     (char *)"srcBand",  (char *)"proximityBand",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   48317             :   };
   48318           6 :   int result;
   48319             :   
   48320             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   48321           6 :   PyProgressData *psProgressInfo;
   48322           6 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   48323           6 :   psProgressInfo->nLastReported = -1;
   48324           6 :   psProgressInfo->psPyCallback = NULL;
   48325           6 :   psProgressInfo->psPyCallbackData = NULL;
   48326           6 :   arg5 = psProgressInfo;
   48327           6 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:ComputeProximity", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   48328           6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   48329           6 :   if (!SWIG_IsOK(res1)) {
   48330           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComputeProximity" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   48331             :   }
   48332           6 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   48333           6 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   48334           6 :   if (!SWIG_IsOK(res2)) {
   48335           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ComputeProximity" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   48336             :   }
   48337           6 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   48338           6 :   if (obj2) {
   48339           5 :     {
   48340             :       /* %typemap(in) char **dict */
   48341           5 :       arg3 = NULL;
   48342           5 :       if ( PySequence_Check( obj2 ) ) {
   48343           5 :         int bErr = FALSE;
   48344           5 :         arg3 = CSLFromPySequence(obj2, &bErr);
   48345           5 :         if ( bErr )
   48346             :         {
   48347           0 :           SWIG_fail;
   48348             :         }
   48349             :       }
   48350           0 :       else if ( PyMapping_Check( obj2 ) ) {
   48351           0 :         int bErr = FALSE;
   48352           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   48353           0 :         if ( bErr )
   48354             :         {
   48355           0 :           SWIG_fail;
   48356             :         }
   48357             :       }
   48358             :       else {
   48359           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   48360           0 :         SWIG_fail;
   48361             :       }
   48362             :     }
   48363             :   }
   48364           6 :   if (obj3) {
   48365           3 :     {
   48366             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   48367             :       /* callback_func typemap */
   48368             :       
   48369             :       /* In some cases 0 is passed instead of None. */
   48370             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   48371           3 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   48372             :       {
   48373           0 :         if( PyLong_AsLong(obj3) == 0 )
   48374             :         {
   48375           0 :           obj3 = Py_None;
   48376             :         }
   48377             :       }
   48378             :       
   48379           3 :       if (obj3 && obj3 != Py_None ) {
   48380           1 :         void* cbfunction = NULL;
   48381           1 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   48382             :             (void**)&cbfunction,
   48383             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   48384             :             SWIG_POINTER_EXCEPTION | 0 ));
   48385             :         
   48386           1 :         if ( cbfunction == GDALTermProgress ) {
   48387             :           arg4 = GDALTermProgress;
   48388             :         } else {
   48389           1 :           if (!PyCallable_Check(obj3)) {
   48390           0 :             PyErr_SetString( PyExc_RuntimeError,
   48391             :               "Object given is not a Python function" );
   48392           0 :             SWIG_fail;
   48393             :           }
   48394           1 :           psProgressInfo->psPyCallback = obj3;
   48395           1 :           arg4 = PyProgressProxy;
   48396             :         }
   48397             :         
   48398             :       }
   48399             :       
   48400             :     }
   48401             :   }
   48402           6 :   if (obj4) {
   48403           0 :     {
   48404             :       /* %typemap(in) ( void* callback_data=NULL)  */
   48405           0 :       psProgressInfo->psPyCallbackData = obj4 ;
   48406             :     }
   48407             :   }
   48408           6 :   {
   48409           6 :     if (!arg1) {
   48410           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48411             :     }
   48412             :   }
   48413           6 :   {
   48414           6 :     if (!arg2) {
   48415           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48416             :     }
   48417             :   }
   48418           6 :   {
   48419           6 :     const int bLocalUseExceptions = GetUseExceptions();
   48420           6 :     if ( bLocalUseExceptions ) {
   48421           6 :       pushErrorHandler();
   48422             :     }
   48423           6 :     {
   48424           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48425           6 :       result = (int)ComputeProximity(arg1,arg2,arg3,arg4,arg5);
   48426           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48427             :     }
   48428           6 :     if ( bLocalUseExceptions ) {
   48429           6 :       popErrorHandler();
   48430             :     }
   48431             : #ifndef SED_HACKS
   48432             :     if ( bLocalUseExceptions ) {
   48433             :       CPLErr eclass = CPLGetLastErrorType();
   48434             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48435             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48436             :       }
   48437             :     }
   48438             : #endif
   48439             :   }
   48440           6 :   resultobj = SWIG_From_int(static_cast< int >(result));
   48441           6 :   {
   48442             :     /* %typemap(freearg) char **dict */
   48443           6 :     CSLDestroy( arg3 );
   48444             :   }
   48445           6 :   {
   48446             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48447             :     
   48448           6 :     CPLFree(psProgressInfo);
   48449             :     
   48450             :   }
   48451           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; } }
   48452             :   return resultobj;
   48453           0 : fail:
   48454           0 :   {
   48455             :     /* %typemap(freearg) char **dict */
   48456           0 :     CSLDestroy( arg3 );
   48457             :   }
   48458           0 :   {
   48459             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48460             :     
   48461           0 :     CPLFree(psProgressInfo);
   48462             :     
   48463             :   }
   48464             :   return NULL;
   48465             : }
   48466             : 
   48467             : 
   48468          42 : SWIGINTERN PyObject *_wrap_RasterizeLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   48469          42 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48470          42 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   48471          42 :   int arg2 ;
   48472          42 :   int *arg3 = (int *) 0 ;
   48473          42 :   OGRLayerShadow *arg4 = (OGRLayerShadow *) 0 ;
   48474          42 :   void *arg5 = (void *) NULL ;
   48475          42 :   void *arg6 = (void *) NULL ;
   48476          42 :   int arg7 = (int) 0 ;
   48477          42 :   double *arg8 = (double *) NULL ;
   48478          42 :   char **arg9 = (char **) NULL ;
   48479          42 :   GDALProgressFunc arg10 = (GDALProgressFunc) NULL ;
   48480          42 :   void *arg11 = (void *) NULL ;
   48481          42 :   void *argp1 = 0 ;
   48482          42 :   int res1 = 0 ;
   48483          42 :   void *argp4 = 0 ;
   48484          42 :   int res4 = 0 ;
   48485          42 :   int res5 ;
   48486          42 :   int res6 ;
   48487          42 :   PyObject * obj0 = 0 ;
   48488          42 :   PyObject * obj1 = 0 ;
   48489          42 :   PyObject * obj2 = 0 ;
   48490          42 :   PyObject * obj3 = 0 ;
   48491          42 :   PyObject * obj4 = 0 ;
   48492          42 :   PyObject * obj5 = 0 ;
   48493          42 :   PyObject * obj6 = 0 ;
   48494          42 :   PyObject * obj7 = 0 ;
   48495          42 :   PyObject * obj8 = 0 ;
   48496          42 :   char * kwnames[] = {
   48497             :     (char *)"dataset",  (char *)"bands",  (char *)"layer",  (char *)"pfnTransformer",  (char *)"pTransformArg",  (char *)"burn_values",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   48498             :   };
   48499          42 :   int result;
   48500             :   
   48501             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   48502          42 :   PyProgressData *psProgressInfo;
   48503          42 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   48504          42 :   psProgressInfo->nLastReported = -1;
   48505          42 :   psProgressInfo->psPyCallback = NULL;
   48506          42 :   psProgressInfo->psPyCallbackData = NULL;
   48507          42 :   arg11 = psProgressInfo;
   48508          42 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|OOOOOO:RasterizeLayer", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) SWIG_fail;
   48509          42 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   48510          42 :   if (!SWIG_IsOK(res1)) {
   48511           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterizeLayer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   48512             :   }
   48513          42 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   48514          42 :   {
   48515             :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   48516          42 :     arg3 = CreateCIntListFromSequence(obj1, &arg2);
   48517          42 :     if( arg2 < 0 ) {
   48518           0 :       SWIG_fail;
   48519             :     }
   48520             :   }
   48521          42 :   res4 = SWIG_ConvertPtr(obj2, &argp4,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   48522          42 :   if (!SWIG_IsOK(res4)) {
   48523           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "RasterizeLayer" "', argument " "4"" of type '" "OGRLayerShadow *""'"); 
   48524             :   }
   48525          42 :   arg4 = reinterpret_cast< OGRLayerShadow * >(argp4);
   48526          42 :   if (obj3) {
   48527           0 :     res5 = SWIG_ConvertPtr(obj3,SWIG_as_voidptrptr(&arg5), 0, 0);
   48528           0 :     if (!SWIG_IsOK(res5)) {
   48529           0 :       SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "RasterizeLayer" "', argument " "5"" of type '" "void *""'"); 
   48530             :     }
   48531             :   }
   48532          42 :   if (obj4) {
   48533           0 :     res6 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg6), 0, 0);
   48534           0 :     if (!SWIG_IsOK(res6)) {
   48535           0 :       SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "RasterizeLayer" "', argument " "6"" of type '" "void *""'"); 
   48536             :     }
   48537             :   }
   48538          42 :   if (obj5) {
   48539          41 :     {
   48540             :       /* %typemap(in,numinputs=1) (int nList, double* pList)*/
   48541          41 :       arg8 = CreateCDoubleListFromSequence(obj5, &arg7);
   48542          41 :       if( arg7 < 0 ) {
   48543           0 :         SWIG_fail;
   48544             :       }
   48545             :     }
   48546             :   }
   48547          42 :   if (obj6) {
   48548          41 :     {
   48549             :       /* %typemap(in) char **dict */
   48550          41 :       arg9 = NULL;
   48551          41 :       if ( PySequence_Check( obj6 ) ) {
   48552          41 :         int bErr = FALSE;
   48553          41 :         arg9 = CSLFromPySequence(obj6, &bErr);
   48554          41 :         if ( bErr )
   48555             :         {
   48556           0 :           SWIG_fail;
   48557             :         }
   48558             :       }
   48559           0 :       else if ( PyMapping_Check( obj6 ) ) {
   48560           0 :         int bErr = FALSE;
   48561           0 :         arg9 = CSLFromPyMapping(obj6, &bErr);
   48562           0 :         if ( bErr )
   48563             :         {
   48564           0 :           SWIG_fail;
   48565             :         }
   48566             :       }
   48567             :       else {
   48568           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   48569           0 :         SWIG_fail;
   48570             :       }
   48571             :     }
   48572             :   }
   48573          42 :   if (obj7) {
   48574           0 :     {
   48575             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   48576             :       /* callback_func typemap */
   48577             :       
   48578             :       /* In some cases 0 is passed instead of None. */
   48579             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   48580           0 :       if ( PyLong_Check(obj7) || PyInt_Check(obj7) )
   48581             :       {
   48582           0 :         if( PyLong_AsLong(obj7) == 0 )
   48583             :         {
   48584           0 :           obj7 = Py_None;
   48585             :         }
   48586             :       }
   48587             :       
   48588           0 :       if (obj7 && obj7 != Py_None ) {
   48589           0 :         void* cbfunction = NULL;
   48590           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj7,
   48591             :             (void**)&cbfunction,
   48592             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   48593             :             SWIG_POINTER_EXCEPTION | 0 ));
   48594             :         
   48595           0 :         if ( cbfunction == GDALTermProgress ) {
   48596             :           arg10 = GDALTermProgress;
   48597             :         } else {
   48598           0 :           if (!PyCallable_Check(obj7)) {
   48599           0 :             PyErr_SetString( PyExc_RuntimeError,
   48600             :               "Object given is not a Python function" );
   48601           0 :             SWIG_fail;
   48602             :           }
   48603           0 :           psProgressInfo->psPyCallback = obj7;
   48604           0 :           arg10 = PyProgressProxy;
   48605             :         }
   48606             :         
   48607             :       }
   48608             :       
   48609             :     }
   48610             :   }
   48611          42 :   if (obj8) {
   48612           0 :     {
   48613             :       /* %typemap(in) ( void* callback_data=NULL)  */
   48614           0 :       psProgressInfo->psPyCallbackData = obj8 ;
   48615             :     }
   48616             :   }
   48617          42 :   {
   48618          42 :     if (!arg1) {
   48619           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48620             :     }
   48621             :   }
   48622          42 :   {
   48623          42 :     if (!arg4) {
   48624           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48625             :     }
   48626             :   }
   48627          42 :   {
   48628          42 :     const int bLocalUseExceptions = GetUseExceptions();
   48629          42 :     if ( bLocalUseExceptions ) {
   48630          42 :       pushErrorHandler();
   48631             :     }
   48632          42 :     {
   48633          42 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48634          42 :       result = (int)RasterizeLayer(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
   48635          42 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48636             :     }
   48637          42 :     if ( bLocalUseExceptions ) {
   48638          42 :       popErrorHandler();
   48639             :     }
   48640             : #ifndef SED_HACKS
   48641             :     if ( bLocalUseExceptions ) {
   48642             :       CPLErr eclass = CPLGetLastErrorType();
   48643             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48644             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48645             :       }
   48646             :     }
   48647             : #endif
   48648             :   }
   48649          42 :   resultobj = SWIG_From_int(static_cast< int >(result));
   48650          42 :   {
   48651             :     /* %typemap(freearg) (int nList, int* pList) */
   48652          42 :     free(arg3);
   48653             :   }
   48654          42 :   {
   48655             :     /* %typemap(freearg) (int nList, double* pList) */
   48656          42 :     free(arg8);
   48657             :   }
   48658          42 :   {
   48659             :     /* %typemap(freearg) char **dict */
   48660          42 :     CSLDestroy( arg9 );
   48661             :   }
   48662          42 :   {
   48663             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48664             :     
   48665          42 :     CPLFree(psProgressInfo);
   48666             :     
   48667             :   }
   48668          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; } }
   48669             :   return resultobj;
   48670           0 : fail:
   48671           0 :   {
   48672             :     /* %typemap(freearg) (int nList, int* pList) */
   48673           0 :     free(arg3);
   48674             :   }
   48675           0 :   {
   48676             :     /* %typemap(freearg) (int nList, double* pList) */
   48677           0 :     free(arg8);
   48678             :   }
   48679           0 :   {
   48680             :     /* %typemap(freearg) char **dict */
   48681           0 :     CSLDestroy( arg9 );
   48682             :   }
   48683           0 :   {
   48684             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48685             :     
   48686           0 :     CPLFree(psProgressInfo);
   48687             :     
   48688             :   }
   48689             :   return NULL;
   48690             : }
   48691             : 
   48692             : 
   48693          21 : SWIGINTERN PyObject *_wrap_Polygonize(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   48694          21 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48695          21 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   48696          21 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   48697          21 :   OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
   48698          21 :   int arg4 ;
   48699          21 :   char **arg5 = (char **) NULL ;
   48700          21 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   48701          21 :   void *arg7 = (void *) NULL ;
   48702          21 :   void *argp1 = 0 ;
   48703          21 :   int res1 = 0 ;
   48704          21 :   void *argp2 = 0 ;
   48705          21 :   int res2 = 0 ;
   48706          21 :   void *argp3 = 0 ;
   48707          21 :   int res3 = 0 ;
   48708          21 :   int val4 ;
   48709          21 :   int ecode4 = 0 ;
   48710          21 :   PyObject * obj0 = 0 ;
   48711          21 :   PyObject * obj1 = 0 ;
   48712          21 :   PyObject * obj2 = 0 ;
   48713          21 :   PyObject * obj3 = 0 ;
   48714          21 :   PyObject * obj4 = 0 ;
   48715          21 :   PyObject * obj5 = 0 ;
   48716          21 :   PyObject * obj6 = 0 ;
   48717          21 :   char * kwnames[] = {
   48718             :     (char *)"srcBand",  (char *)"maskBand",  (char *)"outLayer",  (char *)"iPixValField",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   48719             :   };
   48720          21 :   int result;
   48721             :   
   48722             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   48723          21 :   PyProgressData *psProgressInfo;
   48724          21 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   48725          21 :   psProgressInfo->nLastReported = -1;
   48726          21 :   psProgressInfo->psPyCallback = NULL;
   48727          21 :   psProgressInfo->psPyCallbackData = NULL;
   48728          21 :   arg7 = psProgressInfo;
   48729          21 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOO:Polygonize", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   48730          21 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   48731          21 :   if (!SWIG_IsOK(res1)) {
   48732           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Polygonize" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   48733             :   }
   48734          21 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   48735          21 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   48736          21 :   if (!SWIG_IsOK(res2)) {
   48737           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Polygonize" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   48738             :   }
   48739          21 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   48740          21 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   48741          21 :   if (!SWIG_IsOK(res3)) {
   48742           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Polygonize" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
   48743             :   }
   48744          21 :   arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
   48745          21 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   48746          21 :   if (!SWIG_IsOK(ecode4)) {
   48747           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Polygonize" "', argument " "4"" of type '" "int""'");
   48748             :   } 
   48749          21 :   arg4 = static_cast< int >(val4);
   48750          21 :   if (obj4) {
   48751          14 :     {
   48752             :       /* %typemap(in) char **dict */
   48753          14 :       arg5 = NULL;
   48754          14 :       if ( PySequence_Check( obj4 ) ) {
   48755          14 :         int bErr = FALSE;
   48756          14 :         arg5 = CSLFromPySequence(obj4, &bErr);
   48757          14 :         if ( bErr )
   48758             :         {
   48759           0 :           SWIG_fail;
   48760             :         }
   48761             :       }
   48762           0 :       else if ( PyMapping_Check( obj4 ) ) {
   48763           0 :         int bErr = FALSE;
   48764           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   48765           0 :         if ( bErr )
   48766             :         {
   48767           0 :           SWIG_fail;
   48768             :         }
   48769             :       }
   48770             :       else {
   48771           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   48772           0 :         SWIG_fail;
   48773             :       }
   48774             :     }
   48775             :   }
   48776          21 :   if (obj5) {
   48777          12 :     {
   48778             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   48779             :       /* callback_func typemap */
   48780             :       
   48781             :       /* In some cases 0 is passed instead of None. */
   48782             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   48783          12 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   48784             :       {
   48785           0 :         if( PyLong_AsLong(obj5) == 0 )
   48786             :         {
   48787           0 :           obj5 = Py_None;
   48788             :         }
   48789             :       }
   48790             :       
   48791          12 :       if (obj5 && obj5 != Py_None ) {
   48792           7 :         void* cbfunction = NULL;
   48793           7 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   48794             :             (void**)&cbfunction,
   48795             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   48796             :             SWIG_POINTER_EXCEPTION | 0 ));
   48797             :         
   48798           7 :         if ( cbfunction == GDALTermProgress ) {
   48799             :           arg6 = GDALTermProgress;
   48800             :         } else {
   48801           7 :           if (!PyCallable_Check(obj5)) {
   48802           0 :             PyErr_SetString( PyExc_RuntimeError,
   48803             :               "Object given is not a Python function" );
   48804           0 :             SWIG_fail;
   48805             :           }
   48806           7 :           psProgressInfo->psPyCallback = obj5;
   48807           7 :           arg6 = PyProgressProxy;
   48808             :         }
   48809             :         
   48810             :       }
   48811             :       
   48812             :     }
   48813             :   }
   48814          21 :   if (obj6) {
   48815           0 :     {
   48816             :       /* %typemap(in) ( void* callback_data=NULL)  */
   48817           0 :       psProgressInfo->psPyCallbackData = obj6 ;
   48818             :     }
   48819             :   }
   48820          21 :   {
   48821          21 :     if (!arg1) {
   48822           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48823             :     }
   48824             :   }
   48825          21 :   {
   48826          21 :     if (!arg3) {
   48827           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   48828             :     }
   48829             :   }
   48830          21 :   {
   48831          21 :     const int bLocalUseExceptions = GetUseExceptions();
   48832          21 :     if ( bLocalUseExceptions ) {
   48833          21 :       pushErrorHandler();
   48834             :     }
   48835          21 :     {
   48836          21 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   48837          21 :       result = (int)Polygonize(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   48838          21 :       SWIG_PYTHON_THREAD_END_ALLOW;
   48839             :     }
   48840          21 :     if ( bLocalUseExceptions ) {
   48841          21 :       popErrorHandler();
   48842             :     }
   48843             : #ifndef SED_HACKS
   48844             :     if ( bLocalUseExceptions ) {
   48845             :       CPLErr eclass = CPLGetLastErrorType();
   48846             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   48847             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   48848             :       }
   48849             :     }
   48850             : #endif
   48851             :   }
   48852          21 :   resultobj = SWIG_From_int(static_cast< int >(result));
   48853          21 :   {
   48854             :     /* %typemap(freearg) char **dict */
   48855          21 :     CSLDestroy( arg5 );
   48856             :   }
   48857          21 :   {
   48858             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48859             :     
   48860          21 :     CPLFree(psProgressInfo);
   48861             :     
   48862             :   }
   48863          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; } }
   48864             :   return resultobj;
   48865           0 : fail:
   48866           0 :   {
   48867             :     /* %typemap(freearg) char **dict */
   48868           0 :     CSLDestroy( arg5 );
   48869             :   }
   48870           0 :   {
   48871             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   48872             :     
   48873           0 :     CPLFree(psProgressInfo);
   48874             :     
   48875             :   }
   48876             :   return NULL;
   48877             : }
   48878             : 
   48879             : 
   48880           1 : SWIGINTERN PyObject *_wrap_FPolygonize(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   48881           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   48882           1 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   48883           1 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   48884           1 :   OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
   48885           1 :   int arg4 ;
   48886           1 :   char **arg5 = (char **) NULL ;
   48887           1 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   48888           1 :   void *arg7 = (void *) NULL ;
   48889           1 :   void *argp1 = 0 ;
   48890           1 :   int res1 = 0 ;
   48891           1 :   void *argp2 = 0 ;
   48892           1 :   int res2 = 0 ;
   48893           1 :   void *argp3 = 0 ;
   48894           1 :   int res3 = 0 ;
   48895           1 :   int val4 ;
   48896           1 :   int ecode4 = 0 ;
   48897           1 :   PyObject * obj0 = 0 ;
   48898           1 :   PyObject * obj1 = 0 ;
   48899           1 :   PyObject * obj2 = 0 ;
   48900           1 :   PyObject * obj3 = 0 ;
   48901           1 :   PyObject * obj4 = 0 ;
   48902           1 :   PyObject * obj5 = 0 ;
   48903           1 :   PyObject * obj6 = 0 ;
   48904           1 :   char * kwnames[] = {
   48905             :     (char *)"srcBand",  (char *)"maskBand",  (char *)"outLayer",  (char *)"iPixValField",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   48906             :   };
   48907           1 :   int result;
   48908             :   
   48909             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   48910           1 :   PyProgressData *psProgressInfo;
   48911           1 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   48912           1 :   psProgressInfo->nLastReported = -1;
   48913           1 :   psProgressInfo->psPyCallback = NULL;
   48914           1 :   psProgressInfo->psPyCallbackData = NULL;
   48915           1 :   arg7 = psProgressInfo;
   48916           1 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOO:FPolygonize", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   48917           1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   48918           1 :   if (!SWIG_IsOK(res1)) {
   48919           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FPolygonize" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   48920             :   }
   48921           1 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   48922           1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   48923           1 :   if (!SWIG_IsOK(res2)) {
   48924           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FPolygonize" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   48925             :   }
   48926           1 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   48927           1 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   48928           1 :   if (!SWIG_IsOK(res3)) {
   48929           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FPolygonize" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
   48930             :   }
   48931           1 :   arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
   48932           1 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   48933           1 :   if (!SWIG_IsOK(ecode4)) {
   48934           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FPolygonize" "', argument " "4"" of type '" "int""'");
   48935             :   } 
   48936           1 :   arg4 = static_cast< int >(val4);
   48937           1 :   if (obj4) {
   48938           0 :     {
   48939             :       /* %typemap(in) char **dict */
   48940           0 :       arg5 = NULL;
   48941           0 :       if ( PySequence_Check( obj4 ) ) {
   48942           0 :         int bErr = FALSE;
   48943           0 :         arg5 = CSLFromPySequence(obj4, &bErr);
   48944           0 :         if ( bErr )
   48945             :         {
   48946           0 :           SWIG_fail;
   48947             :         }
   48948             :       }
   48949           0 :       else if ( PyMapping_Check( obj4 ) ) {
   48950           0 :         int bErr = FALSE;
   48951           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   48952           0 :         if ( bErr )
   48953             :         {
   48954           0 :           SWIG_fail;
   48955             :         }
   48956             :       }
   48957             :       else {
   48958           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   48959           0 :         SWIG_fail;
   48960             :       }
   48961             :     }
   48962             :   }
   48963           1 :   if (obj5) {
   48964           0 :     {
   48965             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   48966             :       /* callback_func typemap */
   48967             :       
   48968             :       /* In some cases 0 is passed instead of None. */
   48969             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   48970           0 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   48971             :       {
   48972           0 :         if( PyLong_AsLong(obj5) == 0 )
   48973             :         {
   48974           0 :           obj5 = Py_None;
   48975             :         }
   48976             :       }
   48977             :       
   48978           0 :       if (obj5 && obj5 != Py_None ) {
   48979           0 :         void* cbfunction = NULL;
   48980           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   48981             :             (void**)&cbfunction,
   48982             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   48983             :             SWIG_POINTER_EXCEPTION | 0 ));
   48984             :         
   48985           0 :         if ( cbfunction == GDALTermProgress ) {
   48986             :           arg6 = GDALTermProgress;
   48987             :         } else {
   48988           0 :           if (!PyCallable_Check(obj5)) {
   48989           0 :             PyErr_SetString( PyExc_RuntimeError,
   48990             :               "Object given is not a Python function" );
   48991           0 :             SWIG_fail;
   48992             :           }
   48993           0 :           psProgressInfo->psPyCallback = obj5;
   48994           0 :           arg6 = PyProgressProxy;
   48995             :         }
   48996             :         
   48997             :       }
   48998             :       
   48999             :     }
   49000             :   }
   49001           1 :   if (obj6) {
   49002           0 :     {
   49003             :       /* %typemap(in) ( void* callback_data=NULL)  */
   49004           0 :       psProgressInfo->psPyCallbackData = obj6 ;
   49005             :     }
   49006             :   }
   49007           1 :   {
   49008           1 :     if (!arg1) {
   49009           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49010             :     }
   49011             :   }
   49012           1 :   {
   49013           1 :     if (!arg3) {
   49014           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49015             :     }
   49016             :   }
   49017           1 :   {
   49018           1 :     const int bLocalUseExceptions = GetUseExceptions();
   49019           1 :     if ( bLocalUseExceptions ) {
   49020           1 :       pushErrorHandler();
   49021             :     }
   49022           1 :     {
   49023           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49024           1 :       result = (int)FPolygonize(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   49025           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49026             :     }
   49027           1 :     if ( bLocalUseExceptions ) {
   49028           1 :       popErrorHandler();
   49029             :     }
   49030             : #ifndef SED_HACKS
   49031             :     if ( bLocalUseExceptions ) {
   49032             :       CPLErr eclass = CPLGetLastErrorType();
   49033             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49034             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49035             :       }
   49036             :     }
   49037             : #endif
   49038             :   }
   49039           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   49040           1 :   {
   49041             :     /* %typemap(freearg) char **dict */
   49042           1 :     CSLDestroy( arg5 );
   49043             :   }
   49044           1 :   {
   49045             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49046             :     
   49047           1 :     CPLFree(psProgressInfo);
   49048             :     
   49049             :   }
   49050           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; } }
   49051             :   return resultobj;
   49052           0 : fail:
   49053           0 :   {
   49054             :     /* %typemap(freearg) char **dict */
   49055           0 :     CSLDestroy( arg5 );
   49056             :   }
   49057           0 :   {
   49058             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49059             :     
   49060           0 :     CPLFree(psProgressInfo);
   49061             :     
   49062             :   }
   49063             :   return NULL;
   49064             : }
   49065             : 
   49066             : 
   49067          29 : SWIGINTERN PyObject *_wrap_FillNodata(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   49068          29 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49069          29 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   49070          29 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   49071          29 :   double arg3 ;
   49072          29 :   int arg4 ;
   49073          29 :   char **arg5 = (char **) NULL ;
   49074          29 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   49075          29 :   void *arg7 = (void *) NULL ;
   49076          29 :   void *argp1 = 0 ;
   49077          29 :   int res1 = 0 ;
   49078          29 :   void *argp2 = 0 ;
   49079          29 :   int res2 = 0 ;
   49080          29 :   double val3 ;
   49081          29 :   int ecode3 = 0 ;
   49082          29 :   int val4 ;
   49083          29 :   int ecode4 = 0 ;
   49084          29 :   PyObject * obj0 = 0 ;
   49085          29 :   PyObject * obj1 = 0 ;
   49086          29 :   PyObject * obj2 = 0 ;
   49087          29 :   PyObject * obj3 = 0 ;
   49088          29 :   PyObject * obj4 = 0 ;
   49089          29 :   PyObject * obj5 = 0 ;
   49090          29 :   PyObject * obj6 = 0 ;
   49091          29 :   char * kwnames[] = {
   49092             :     (char *)"targetBand",  (char *)"maskBand",  (char *)"maxSearchDist",  (char *)"smoothingIterations",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   49093             :   };
   49094          29 :   int result;
   49095             :   
   49096             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   49097          29 :   PyProgressData *psProgressInfo;
   49098          29 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   49099          29 :   psProgressInfo->nLastReported = -1;
   49100          29 :   psProgressInfo->psPyCallback = NULL;
   49101          29 :   psProgressInfo->psPyCallbackData = NULL;
   49102          29 :   arg7 = psProgressInfo;
   49103          29 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOO:FillNodata", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   49104          29 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   49105          29 :   if (!SWIG_IsOK(res1)) {
   49106           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FillNodata" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   49107             :   }
   49108          29 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   49109          29 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   49110          29 :   if (!SWIG_IsOK(res2)) {
   49111           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FillNodata" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   49112             :   }
   49113          29 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   49114          29 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   49115          29 :   if (!SWIG_IsOK(ecode3)) {
   49116           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FillNodata" "', argument " "3"" of type '" "double""'");
   49117             :   } 
   49118          29 :   arg3 = static_cast< double >(val3);
   49119          29 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   49120          29 :   if (!SWIG_IsOK(ecode4)) {
   49121           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FillNodata" "', argument " "4"" of type '" "int""'");
   49122             :   } 
   49123          29 :   arg4 = static_cast< int >(val4);
   49124          29 :   if (obj4) {
   49125          26 :     {
   49126             :       /* %typemap(in) char **dict */
   49127          26 :       arg5 = NULL;
   49128          26 :       if ( PySequence_Check( obj4 ) ) {
   49129          26 :         int bErr = FALSE;
   49130          26 :         arg5 = CSLFromPySequence(obj4, &bErr);
   49131          26 :         if ( bErr )
   49132             :         {
   49133           0 :           SWIG_fail;
   49134             :         }
   49135             :       }
   49136           0 :       else if ( PyMapping_Check( obj4 ) ) {
   49137           0 :         int bErr = FALSE;
   49138           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   49139           0 :         if ( bErr )
   49140             :         {
   49141           0 :           SWIG_fail;
   49142             :         }
   49143             :       }
   49144             :       else {
   49145           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   49146           0 :         SWIG_fail;
   49147             :       }
   49148             :     }
   49149             :   }
   49150          29 :   if (obj5) {
   49151           4 :     {
   49152             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   49153             :       /* callback_func typemap */
   49154             :       
   49155             :       /* In some cases 0 is passed instead of None. */
   49156             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   49157           4 :       if ( PyLong_Check(obj5) || PyInt_Check(obj5) )
   49158             :       {
   49159           0 :         if( PyLong_AsLong(obj5) == 0 )
   49160             :         {
   49161           0 :           obj5 = Py_None;
   49162             :         }
   49163             :       }
   49164             :       
   49165           4 :       if (obj5 && obj5 != Py_None ) {
   49166           4 :         void* cbfunction = NULL;
   49167           4 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj5,
   49168             :             (void**)&cbfunction,
   49169             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   49170             :             SWIG_POINTER_EXCEPTION | 0 ));
   49171             :         
   49172           4 :         if ( cbfunction == GDALTermProgress ) {
   49173             :           arg6 = GDALTermProgress;
   49174             :         } else {
   49175           4 :           if (!PyCallable_Check(obj5)) {
   49176           0 :             PyErr_SetString( PyExc_RuntimeError,
   49177             :               "Object given is not a Python function" );
   49178           0 :             SWIG_fail;
   49179             :           }
   49180           4 :           psProgressInfo->psPyCallback = obj5;
   49181           4 :           arg6 = PyProgressProxy;
   49182             :         }
   49183             :         
   49184             :       }
   49185             :       
   49186             :     }
   49187             :   }
   49188          29 :   if (obj6) {
   49189           0 :     {
   49190             :       /* %typemap(in) ( void* callback_data=NULL)  */
   49191           0 :       psProgressInfo->psPyCallbackData = obj6 ;
   49192             :     }
   49193             :   }
   49194          29 :   {
   49195          29 :     if (!arg1) {
   49196           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49197             :     }
   49198             :   }
   49199          29 :   {
   49200          29 :     const int bLocalUseExceptions = GetUseExceptions();
   49201          29 :     if ( bLocalUseExceptions ) {
   49202          29 :       pushErrorHandler();
   49203             :     }
   49204          29 :     {
   49205          29 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49206          29 :       result = (int)FillNodata(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   49207          29 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49208             :     }
   49209          29 :     if ( bLocalUseExceptions ) {
   49210          29 :       popErrorHandler();
   49211             :     }
   49212             : #ifndef SED_HACKS
   49213             :     if ( bLocalUseExceptions ) {
   49214             :       CPLErr eclass = CPLGetLastErrorType();
   49215             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49216             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49217             :       }
   49218             :     }
   49219             : #endif
   49220             :   }
   49221          29 :   resultobj = SWIG_From_int(static_cast< int >(result));
   49222          29 :   {
   49223             :     /* %typemap(freearg) char **dict */
   49224          29 :     CSLDestroy( arg5 );
   49225             :   }
   49226          29 :   {
   49227             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49228             :     
   49229          29 :     CPLFree(psProgressInfo);
   49230             :     
   49231             :   }
   49232          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; } }
   49233             :   return resultobj;
   49234           0 : fail:
   49235           0 :   {
   49236             :     /* %typemap(freearg) char **dict */
   49237           0 :     CSLDestroy( arg5 );
   49238             :   }
   49239           0 :   {
   49240             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49241             :     
   49242           0 :     CPLFree(psProgressInfo);
   49243             :     
   49244             :   }
   49245             :   return NULL;
   49246             : }
   49247             : 
   49248             : 
   49249          12 : SWIGINTERN PyObject *_wrap_SieveFilter(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   49250          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49251          12 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   49252          12 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   49253          12 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   49254          12 :   int arg4 ;
   49255          12 :   int arg5 = (int) 4 ;
   49256          12 :   char **arg6 = (char **) NULL ;
   49257          12 :   GDALProgressFunc arg7 = (GDALProgressFunc) NULL ;
   49258          12 :   void *arg8 = (void *) NULL ;
   49259          12 :   void *argp1 = 0 ;
   49260          12 :   int res1 = 0 ;
   49261          12 :   void *argp2 = 0 ;
   49262          12 :   int res2 = 0 ;
   49263          12 :   void *argp3 = 0 ;
   49264          12 :   int res3 = 0 ;
   49265          12 :   int val4 ;
   49266          12 :   int ecode4 = 0 ;
   49267          12 :   int val5 ;
   49268          12 :   int ecode5 = 0 ;
   49269          12 :   PyObject * obj0 = 0 ;
   49270          12 :   PyObject * obj1 = 0 ;
   49271          12 :   PyObject * obj2 = 0 ;
   49272          12 :   PyObject * obj3 = 0 ;
   49273          12 :   PyObject * obj4 = 0 ;
   49274          12 :   PyObject * obj5 = 0 ;
   49275          12 :   PyObject * obj6 = 0 ;
   49276          12 :   PyObject * obj7 = 0 ;
   49277          12 :   char * kwnames[] = {
   49278             :     (char *)"srcBand",  (char *)"maskBand",  (char *)"dstBand",  (char *)"threshold",  (char *)"connectedness",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   49279             :   };
   49280          12 :   int result;
   49281             :   
   49282             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   49283          12 :   PyProgressData *psProgressInfo;
   49284          12 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   49285          12 :   psProgressInfo->nLastReported = -1;
   49286          12 :   psProgressInfo->psPyCallback = NULL;
   49287          12 :   psProgressInfo->psPyCallbackData = NULL;
   49288          12 :   arg8 = psProgressInfo;
   49289          12 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOOO:SieveFilter", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
   49290          12 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   49291          12 :   if (!SWIG_IsOK(res1)) {
   49292           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SieveFilter" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   49293             :   }
   49294          12 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   49295          12 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   49296          12 :   if (!SWIG_IsOK(res2)) {
   49297           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SieveFilter" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   49298             :   }
   49299          12 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   49300          12 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   49301          12 :   if (!SWIG_IsOK(res3)) {
   49302           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SieveFilter" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   49303             :   }
   49304          12 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   49305          12 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   49306          12 :   if (!SWIG_IsOK(ecode4)) {
   49307           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SieveFilter" "', argument " "4"" of type '" "int""'");
   49308             :   } 
   49309          12 :   arg4 = static_cast< int >(val4);
   49310          12 :   if (obj4) {
   49311          12 :     ecode5 = SWIG_AsVal_int(obj4, &val5);
   49312          12 :     if (!SWIG_IsOK(ecode5)) {
   49313           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SieveFilter" "', argument " "5"" of type '" "int""'");
   49314             :     } 
   49315             :     arg5 = static_cast< int >(val5);
   49316             :   }
   49317          12 :   if (obj5) {
   49318           0 :     {
   49319             :       /* %typemap(in) char **dict */
   49320           0 :       arg6 = NULL;
   49321           0 :       if ( PySequence_Check( obj5 ) ) {
   49322           0 :         int bErr = FALSE;
   49323           0 :         arg6 = CSLFromPySequence(obj5, &bErr);
   49324           0 :         if ( bErr )
   49325             :         {
   49326           0 :           SWIG_fail;
   49327             :         }
   49328             :       }
   49329           0 :       else if ( PyMapping_Check( obj5 ) ) {
   49330           0 :         int bErr = FALSE;
   49331           0 :         arg6 = CSLFromPyMapping(obj5, &bErr);
   49332           0 :         if ( bErr )
   49333             :         {
   49334           0 :           SWIG_fail;
   49335             :         }
   49336             :       }
   49337             :       else {
   49338           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   49339           0 :         SWIG_fail;
   49340             :       }
   49341             :     }
   49342             :   }
   49343          12 :   if (obj6) {
   49344           2 :     {
   49345             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   49346             :       /* callback_func typemap */
   49347             :       
   49348             :       /* In some cases 0 is passed instead of None. */
   49349             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   49350           2 :       if ( PyLong_Check(obj6) || PyInt_Check(obj6) )
   49351             :       {
   49352           0 :         if( PyLong_AsLong(obj6) == 0 )
   49353             :         {
   49354           0 :           obj6 = Py_None;
   49355             :         }
   49356             :       }
   49357             :       
   49358           2 :       if (obj6 && obj6 != Py_None ) {
   49359           2 :         void* cbfunction = NULL;
   49360           2 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj6,
   49361             :             (void**)&cbfunction,
   49362             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   49363             :             SWIG_POINTER_EXCEPTION | 0 ));
   49364             :         
   49365           2 :         if ( cbfunction == GDALTermProgress ) {
   49366             :           arg7 = GDALTermProgress;
   49367             :         } else {
   49368           2 :           if (!PyCallable_Check(obj6)) {
   49369           0 :             PyErr_SetString( PyExc_RuntimeError,
   49370             :               "Object given is not a Python function" );
   49371           0 :             SWIG_fail;
   49372             :           }
   49373           2 :           psProgressInfo->psPyCallback = obj6;
   49374           2 :           arg7 = PyProgressProxy;
   49375             :         }
   49376             :         
   49377             :       }
   49378             :       
   49379             :     }
   49380             :   }
   49381          12 :   if (obj7) {
   49382           0 :     {
   49383             :       /* %typemap(in) ( void* callback_data=NULL)  */
   49384           0 :       psProgressInfo->psPyCallbackData = obj7 ;
   49385             :     }
   49386             :   }
   49387          12 :   {
   49388          12 :     if (!arg1) {
   49389           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49390             :     }
   49391             :   }
   49392          12 :   {
   49393          12 :     if (!arg3) {
   49394           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49395             :     }
   49396             :   }
   49397          12 :   {
   49398          12 :     const int bLocalUseExceptions = GetUseExceptions();
   49399          12 :     if ( bLocalUseExceptions ) {
   49400          12 :       pushErrorHandler();
   49401             :     }
   49402          12 :     {
   49403          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49404          12 :       result = (int)SieveFilter(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
   49405          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49406             :     }
   49407          12 :     if ( bLocalUseExceptions ) {
   49408          12 :       popErrorHandler();
   49409             :     }
   49410             : #ifndef SED_HACKS
   49411             :     if ( bLocalUseExceptions ) {
   49412             :       CPLErr eclass = CPLGetLastErrorType();
   49413             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49414             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49415             :       }
   49416             :     }
   49417             : #endif
   49418             :   }
   49419          12 :   resultobj = SWIG_From_int(static_cast< int >(result));
   49420          12 :   {
   49421             :     /* %typemap(freearg) char **dict */
   49422          12 :     CSLDestroy( arg6 );
   49423             :   }
   49424          12 :   {
   49425             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49426             :     
   49427          12 :     CPLFree(psProgressInfo);
   49428             :     
   49429             :   }
   49430          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; } }
   49431             :   return resultobj;
   49432           0 : fail:
   49433           0 :   {
   49434             :     /* %typemap(freearg) char **dict */
   49435           0 :     CSLDestroy( arg6 );
   49436             :   }
   49437           0 :   {
   49438             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49439             :     
   49440           0 :     CPLFree(psProgressInfo);
   49441             :     
   49442             :   }
   49443             :   return NULL;
   49444             : }
   49445             : 
   49446             : 
   49447           2 : SWIGINTERN PyObject *_wrap_RegenerateOverviews(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   49448           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49449           2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   49450           2 :   int arg2 ;
   49451           2 :   GDALRasterBandShadow **arg3 = (GDALRasterBandShadow **) 0 ;
   49452           2 :   char *arg4 = (char *) "average" ;
   49453           2 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   49454           2 :   void *arg6 = (void *) NULL ;
   49455           2 :   void *argp1 = 0 ;
   49456           2 :   int res1 = 0 ;
   49457           2 :   int res4 ;
   49458           2 :   char *buf4 = 0 ;
   49459           2 :   int alloc4 = 0 ;
   49460           2 :   PyObject * obj0 = 0 ;
   49461           2 :   PyObject * obj1 = 0 ;
   49462           2 :   PyObject * obj2 = 0 ;
   49463           2 :   PyObject * obj3 = 0 ;
   49464           2 :   PyObject * obj4 = 0 ;
   49465           2 :   char * kwnames[] = {
   49466             :     (char *)"srcBand",  (char *)"overviewBandCount",  (char *)"resampling",  (char *)"callback",  (char *)"callback_data",  NULL 
   49467             :   };
   49468           2 :   int result;
   49469             :   
   49470             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   49471           2 :   PyProgressData *psProgressInfo;
   49472           2 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   49473           2 :   psProgressInfo->nLastReported = -1;
   49474           2 :   psProgressInfo->psPyCallback = NULL;
   49475           2 :   psProgressInfo->psPyCallbackData = NULL;
   49476           2 :   arg6 = psProgressInfo;
   49477           2 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:RegenerateOverviews", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   49478           2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   49479           2 :   if (!SWIG_IsOK(res1)) {
   49480           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RegenerateOverviews" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   49481             :   }
   49482           2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   49483           2 :   {
   49484             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALRasterBandShadow *optional_##GDALRasterBandShadow)*/
   49485           2 :     if ( !PySequence_Check(obj1) ) {
   49486           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   49487           0 :       SWIG_fail;
   49488             :     }
   49489           2 :     Py_ssize_t size = PySequence_Size(obj1);
   49490           2 :     if( size > (Py_ssize_t)INT_MAX ) {
   49491           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   49492           0 :       SWIG_fail;
   49493             :     }
   49494           2 :     if( (size_t)size > SIZE_MAX / sizeof(GDALRasterBandShadow*) ) {
   49495           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   49496           0 :       SWIG_fail;
   49497             :     }
   49498           2 :     arg2 = (int)size;
   49499           2 :     arg3 = (GDALRasterBandShadow**) VSIMalloc(arg2*sizeof(GDALRasterBandShadow*));
   49500           2 :     if( !arg3) {
   49501           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   49502           0 :       SWIG_fail;
   49503             :     }
   49504             :     
   49505           6 :     for( int i = 0; i<arg2; i++ ) {
   49506           4 :       PyObject *o = PySequence_GetItem(obj1,i);
   49507           4 :       GDALRasterBandShadow* rawobjectpointer = NULL;
   49508           4 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0 ));
   49509           4 :       if (!rawobjectpointer) {
   49510           0 :         Py_DECREF(o);
   49511           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALRasterBandShadow");
   49512           0 :         SWIG_fail;
   49513             :       }
   49514           4 :       arg3[i] = rawobjectpointer;
   49515           4 :       Py_DECREF(o);
   49516             :       
   49517             :     }
   49518             :   }
   49519           2 :   if (obj2) {
   49520           2 :     res4 = SWIG_AsCharPtrAndSize(obj2, &buf4, NULL, &alloc4);
   49521           2 :     if (!SWIG_IsOK(res4)) {
   49522           0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "RegenerateOverviews" "', argument " "4"" of type '" "char const *""'");
   49523             :     }
   49524           2 :     arg4 = reinterpret_cast< char * >(buf4);
   49525             :   }
   49526           2 :   if (obj3) {
   49527           0 :     {
   49528             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   49529             :       /* callback_func typemap */
   49530             :       
   49531             :       /* In some cases 0 is passed instead of None. */
   49532             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   49533           0 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   49534             :       {
   49535           0 :         if( PyLong_AsLong(obj3) == 0 )
   49536             :         {
   49537           0 :           obj3 = Py_None;
   49538             :         }
   49539             :       }
   49540             :       
   49541           0 :       if (obj3 && obj3 != Py_None ) {
   49542           0 :         void* cbfunction = NULL;
   49543           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   49544             :             (void**)&cbfunction,
   49545             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   49546             :             SWIG_POINTER_EXCEPTION | 0 ));
   49547             :         
   49548           0 :         if ( cbfunction == GDALTermProgress ) {
   49549             :           arg5 = GDALTermProgress;
   49550             :         } else {
   49551           0 :           if (!PyCallable_Check(obj3)) {
   49552           0 :             PyErr_SetString( PyExc_RuntimeError,
   49553             :               "Object given is not a Python function" );
   49554           0 :             SWIG_fail;
   49555             :           }
   49556           0 :           psProgressInfo->psPyCallback = obj3;
   49557           0 :           arg5 = PyProgressProxy;
   49558             :         }
   49559             :         
   49560             :       }
   49561             :       
   49562             :     }
   49563             :   }
   49564           2 :   if (obj4) {
   49565           0 :     {
   49566             :       /* %typemap(in) ( void* callback_data=NULL)  */
   49567           0 :       psProgressInfo->psPyCallbackData = obj4 ;
   49568             :     }
   49569             :   }
   49570           2 :   {
   49571           2 :     if (!arg1) {
   49572           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49573             :     }
   49574             :   }
   49575           2 :   {
   49576           2 :     const int bLocalUseExceptions = GetUseExceptions();
   49577           2 :     if ( bLocalUseExceptions ) {
   49578           0 :       pushErrorHandler();
   49579             :     }
   49580           2 :     {
   49581           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49582           2 :       result = (int)RegenerateOverviews(arg1,arg2,arg3,(char const *)arg4,arg5,arg6);
   49583           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49584             :     }
   49585           2 :     if ( bLocalUseExceptions ) {
   49586           0 :       popErrorHandler();
   49587             :     }
   49588             : #ifndef SED_HACKS
   49589             :     if ( bLocalUseExceptions ) {
   49590             :       CPLErr eclass = CPLGetLastErrorType();
   49591             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49592             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49593             :       }
   49594             :     }
   49595             : #endif
   49596             :   }
   49597           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   49598           2 :   {
   49599             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   49600           2 :     CPLFree( arg3 );
   49601             :   }
   49602           2 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   49603           2 :   {
   49604             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49605             :     
   49606           2 :     CPLFree(psProgressInfo);
   49607             :     
   49608             :   }
   49609           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; } }
   49610             :   return resultobj;
   49611           0 : fail:
   49612           0 :   {
   49613             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   49614           0 :     CPLFree( arg3 );
   49615             :   }
   49616           0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   49617           0 :   {
   49618             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49619             :     
   49620           0 :     CPLFree(psProgressInfo);
   49621             :     
   49622             :   }
   49623             :   return NULL;
   49624             : }
   49625             : 
   49626             : 
   49627         248 : SWIGINTERN PyObject *_wrap_RegenerateOverview(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   49628         248 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49629         248 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   49630         248 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   49631         248 :   char *arg3 = (char *) "average" ;
   49632         248 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   49633         248 :   void *arg5 = (void *) NULL ;
   49634         248 :   void *argp1 = 0 ;
   49635         248 :   int res1 = 0 ;
   49636         248 :   void *argp2 = 0 ;
   49637         248 :   int res2 = 0 ;
   49638         248 :   int res3 ;
   49639         248 :   char *buf3 = 0 ;
   49640         248 :   int alloc3 = 0 ;
   49641         248 :   PyObject * obj0 = 0 ;
   49642         248 :   PyObject * obj1 = 0 ;
   49643         248 :   PyObject * obj2 = 0 ;
   49644         248 :   PyObject * obj3 = 0 ;
   49645         248 :   PyObject * obj4 = 0 ;
   49646         248 :   char * kwnames[] = {
   49647             :     (char *)"srcBand",  (char *)"overviewBand",  (char *)"resampling",  (char *)"callback",  (char *)"callback_data",  NULL 
   49648             :   };
   49649         248 :   int result;
   49650             :   
   49651             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   49652         248 :   PyProgressData *psProgressInfo;
   49653         248 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   49654         248 :   psProgressInfo->nLastReported = -1;
   49655         248 :   psProgressInfo->psPyCallback = NULL;
   49656         248 :   psProgressInfo->psPyCallbackData = NULL;
   49657         248 :   arg5 = psProgressInfo;
   49658         248 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:RegenerateOverview", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   49659         248 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   49660         248 :   if (!SWIG_IsOK(res1)) {
   49661           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RegenerateOverview" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   49662             :   }
   49663         248 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   49664         248 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   49665         248 :   if (!SWIG_IsOK(res2)) {
   49666           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RegenerateOverview" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   49667             :   }
   49668         248 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   49669         248 :   if (obj2) {
   49670         248 :     res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   49671         248 :     if (!SWIG_IsOK(res3)) {
   49672           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "RegenerateOverview" "', argument " "3"" of type '" "char const *""'");
   49673             :     }
   49674         248 :     arg3 = reinterpret_cast< char * >(buf3);
   49675             :   }
   49676         248 :   if (obj3) {
   49677           0 :     {
   49678             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   49679             :       /* callback_func typemap */
   49680             :       
   49681             :       /* In some cases 0 is passed instead of None. */
   49682             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   49683           0 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   49684             :       {
   49685           0 :         if( PyLong_AsLong(obj3) == 0 )
   49686             :         {
   49687           0 :           obj3 = Py_None;
   49688             :         }
   49689             :       }
   49690             :       
   49691           0 :       if (obj3 && obj3 != Py_None ) {
   49692           0 :         void* cbfunction = NULL;
   49693           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   49694             :             (void**)&cbfunction,
   49695             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   49696             :             SWIG_POINTER_EXCEPTION | 0 ));
   49697             :         
   49698           0 :         if ( cbfunction == GDALTermProgress ) {
   49699             :           arg4 = GDALTermProgress;
   49700             :         } else {
   49701           0 :           if (!PyCallable_Check(obj3)) {
   49702           0 :             PyErr_SetString( PyExc_RuntimeError,
   49703             :               "Object given is not a Python function" );
   49704           0 :             SWIG_fail;
   49705             :           }
   49706           0 :           psProgressInfo->psPyCallback = obj3;
   49707           0 :           arg4 = PyProgressProxy;
   49708             :         }
   49709             :         
   49710             :       }
   49711             :       
   49712             :     }
   49713             :   }
   49714         248 :   if (obj4) {
   49715           0 :     {
   49716             :       /* %typemap(in) ( void* callback_data=NULL)  */
   49717           0 :       psProgressInfo->psPyCallbackData = obj4 ;
   49718             :     }
   49719             :   }
   49720         248 :   {
   49721         248 :     if (!arg1) {
   49722           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49723             :     }
   49724             :   }
   49725         248 :   {
   49726         248 :     if (!arg2) {
   49727           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49728             :     }
   49729             :   }
   49730         248 :   {
   49731         248 :     const int bLocalUseExceptions = GetUseExceptions();
   49732         248 :     if ( bLocalUseExceptions ) {
   49733         246 :       pushErrorHandler();
   49734             :     }
   49735         248 :     {
   49736         248 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49737         248 :       result = (int)RegenerateOverview(arg1,arg2,(char const *)arg3,arg4,arg5);
   49738         248 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49739             :     }
   49740         248 :     if ( bLocalUseExceptions ) {
   49741         246 :       popErrorHandler();
   49742             :     }
   49743             : #ifndef SED_HACKS
   49744             :     if ( bLocalUseExceptions ) {
   49745             :       CPLErr eclass = CPLGetLastErrorType();
   49746             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49747             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49748             :       }
   49749             :     }
   49750             : #endif
   49751             :   }
   49752         248 :   resultobj = SWIG_From_int(static_cast< int >(result));
   49753         248 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   49754         248 :   {
   49755             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49756             :     
   49757         248 :     CPLFree(psProgressInfo);
   49758             :     
   49759             :   }
   49760         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; } }
   49761             :   return resultobj;
   49762           0 : fail:
   49763           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   49764           0 :   {
   49765             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49766             :     
   49767           0 :     CPLFree(psProgressInfo);
   49768             :     
   49769             :   }
   49770             :   return NULL;
   49771             : }
   49772             : 
   49773             : 
   49774           3 : SWIGINTERN PyObject *_wrap_ContourGenerate(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   49775           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49776           3 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   49777           3 :   double arg2 ;
   49778           3 :   double arg3 ;
   49779           3 :   int arg4 ;
   49780           3 :   double *arg5 = (double *) 0 ;
   49781           3 :   int arg6 ;
   49782           3 :   double arg7 ;
   49783           3 :   OGRLayerShadow *arg8 = (OGRLayerShadow *) 0 ;
   49784           3 :   int arg9 ;
   49785           3 :   int arg10 ;
   49786           3 :   GDALProgressFunc arg11 = (GDALProgressFunc) NULL ;
   49787           3 :   void *arg12 = (void *) NULL ;
   49788           3 :   void *argp1 = 0 ;
   49789           3 :   int res1 = 0 ;
   49790           3 :   double val2 ;
   49791           3 :   int ecode2 = 0 ;
   49792           3 :   double val3 ;
   49793           3 :   int ecode3 = 0 ;
   49794           3 :   int val6 ;
   49795           3 :   int ecode6 = 0 ;
   49796           3 :   double val7 ;
   49797           3 :   int ecode7 = 0 ;
   49798           3 :   void *argp8 = 0 ;
   49799           3 :   int res8 = 0 ;
   49800           3 :   int val9 ;
   49801           3 :   int ecode9 = 0 ;
   49802           3 :   int val10 ;
   49803           3 :   int ecode10 = 0 ;
   49804           3 :   PyObject * obj0 = 0 ;
   49805           3 :   PyObject * obj1 = 0 ;
   49806           3 :   PyObject * obj2 = 0 ;
   49807           3 :   PyObject * obj3 = 0 ;
   49808           3 :   PyObject * obj4 = 0 ;
   49809           3 :   PyObject * obj5 = 0 ;
   49810           3 :   PyObject * obj6 = 0 ;
   49811           3 :   PyObject * obj7 = 0 ;
   49812           3 :   PyObject * obj8 = 0 ;
   49813           3 :   PyObject * obj9 = 0 ;
   49814           3 :   PyObject * obj10 = 0 ;
   49815           3 :   char * kwnames[] = {
   49816             :     (char *)"srcBand",  (char *)"contourInterval",  (char *)"contourBase",  (char *)"fixedLevelCount",  (char *)"useNoData",  (char *)"noDataValue",  (char *)"dstLayer",  (char *)"idField",  (char *)"elevField",  (char *)"callback",  (char *)"callback_data",  NULL 
   49817             :   };
   49818           3 :   int result;
   49819             :   
   49820             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   49821           3 :   PyProgressData *psProgressInfo;
   49822           3 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   49823           3 :   psProgressInfo->nLastReported = -1;
   49824           3 :   psProgressInfo->psPyCallback = NULL;
   49825           3 :   psProgressInfo->psPyCallbackData = NULL;
   49826           3 :   arg12 = psProgressInfo;
   49827           3 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOOO|OO:ContourGenerate", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10)) SWIG_fail;
   49828           3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   49829           3 :   if (!SWIG_IsOK(res1)) {
   49830           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContourGenerate" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   49831             :   }
   49832           3 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   49833           3 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   49834           3 :   if (!SWIG_IsOK(ecode2)) {
   49835           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ContourGenerate" "', argument " "2"" of type '" "double""'");
   49836             :   } 
   49837           3 :   arg2 = static_cast< double >(val2);
   49838           3 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   49839           3 :   if (!SWIG_IsOK(ecode3)) {
   49840           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ContourGenerate" "', argument " "3"" of type '" "double""'");
   49841             :   } 
   49842           3 :   arg3 = static_cast< double >(val3);
   49843           3 :   {
   49844             :     /* %typemap(in,numinputs=1) (int nList, double* pList)*/
   49845           3 :     arg5 = CreateCDoubleListFromSequence(obj3, &arg4);
   49846           3 :     if( arg4 < 0 ) {
   49847           0 :       SWIG_fail;
   49848             :     }
   49849             :   }
   49850           3 :   ecode6 = SWIG_AsVal_int(obj4, &val6);
   49851           3 :   if (!SWIG_IsOK(ecode6)) {
   49852           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "ContourGenerate" "', argument " "6"" of type '" "int""'");
   49853             :   } 
   49854           3 :   arg6 = static_cast< int >(val6);
   49855           3 :   ecode7 = SWIG_AsVal_double(obj5, &val7);
   49856           3 :   if (!SWIG_IsOK(ecode7)) {
   49857           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ContourGenerate" "', argument " "7"" of type '" "double""'");
   49858             :   } 
   49859           3 :   arg7 = static_cast< double >(val7);
   49860           3 :   res8 = SWIG_ConvertPtr(obj6, &argp8,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   49861           3 :   if (!SWIG_IsOK(res8)) {
   49862           0 :     SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "ContourGenerate" "', argument " "8"" of type '" "OGRLayerShadow *""'"); 
   49863             :   }
   49864           3 :   arg8 = reinterpret_cast< OGRLayerShadow * >(argp8);
   49865           3 :   ecode9 = SWIG_AsVal_int(obj7, &val9);
   49866           3 :   if (!SWIG_IsOK(ecode9)) {
   49867           0 :     SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "ContourGenerate" "', argument " "9"" of type '" "int""'");
   49868             :   } 
   49869           3 :   arg9 = static_cast< int >(val9);
   49870           3 :   ecode10 = SWIG_AsVal_int(obj8, &val10);
   49871           3 :   if (!SWIG_IsOK(ecode10)) {
   49872           0 :     SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "ContourGenerate" "', argument " "10"" of type '" "int""'");
   49873             :   } 
   49874           3 :   arg10 = static_cast< int >(val10);
   49875           3 :   if (obj9) {
   49876           0 :     {
   49877             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   49878             :       /* callback_func typemap */
   49879             :       
   49880             :       /* In some cases 0 is passed instead of None. */
   49881             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   49882           0 :       if ( PyLong_Check(obj9) || PyInt_Check(obj9) )
   49883             :       {
   49884           0 :         if( PyLong_AsLong(obj9) == 0 )
   49885             :         {
   49886           0 :           obj9 = Py_None;
   49887             :         }
   49888             :       }
   49889             :       
   49890           0 :       if (obj9 && obj9 != Py_None ) {
   49891           0 :         void* cbfunction = NULL;
   49892           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj9,
   49893             :             (void**)&cbfunction,
   49894             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   49895             :             SWIG_POINTER_EXCEPTION | 0 ));
   49896             :         
   49897           0 :         if ( cbfunction == GDALTermProgress ) {
   49898             :           arg11 = GDALTermProgress;
   49899             :         } else {
   49900           0 :           if (!PyCallable_Check(obj9)) {
   49901           0 :             PyErr_SetString( PyExc_RuntimeError,
   49902             :               "Object given is not a Python function" );
   49903           0 :             SWIG_fail;
   49904             :           }
   49905           0 :           psProgressInfo->psPyCallback = obj9;
   49906           0 :           arg11 = PyProgressProxy;
   49907             :         }
   49908             :         
   49909             :       }
   49910             :       
   49911             :     }
   49912             :   }
   49913           3 :   if (obj10) {
   49914           0 :     {
   49915             :       /* %typemap(in) ( void* callback_data=NULL)  */
   49916           0 :       psProgressInfo->psPyCallbackData = obj10 ;
   49917             :     }
   49918             :   }
   49919           3 :   {
   49920           3 :     if (!arg1) {
   49921           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49922             :     }
   49923             :   }
   49924           3 :   {
   49925           3 :     if (!arg8) {
   49926           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   49927             :     }
   49928             :   }
   49929           3 :   {
   49930           3 :     const int bLocalUseExceptions = GetUseExceptions();
   49931           3 :     if ( bLocalUseExceptions ) {
   49932           3 :       pushErrorHandler();
   49933             :     }
   49934           3 :     {
   49935           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   49936           3 :       result = (int)ContourGenerate(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
   49937           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   49938             :     }
   49939           3 :     if ( bLocalUseExceptions ) {
   49940           3 :       popErrorHandler();
   49941             :     }
   49942             : #ifndef SED_HACKS
   49943             :     if ( bLocalUseExceptions ) {
   49944             :       CPLErr eclass = CPLGetLastErrorType();
   49945             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   49946             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   49947             :       }
   49948             :     }
   49949             : #endif
   49950             :   }
   49951           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   49952           3 :   {
   49953             :     /* %typemap(freearg) (int nList, double* pList) */
   49954           3 :     free(arg5);
   49955             :   }
   49956           3 :   {
   49957             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49958             :     
   49959           3 :     CPLFree(psProgressInfo);
   49960             :     
   49961             :   }
   49962           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; } }
   49963             :   return resultobj;
   49964           0 : fail:
   49965           0 :   {
   49966             :     /* %typemap(freearg) (int nList, double* pList) */
   49967           0 :     free(arg5);
   49968             :   }
   49969           0 :   {
   49970             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   49971             :     
   49972           0 :     CPLFree(psProgressInfo);
   49973             :     
   49974             :   }
   49975             :   return NULL;
   49976             : }
   49977             : 
   49978             : 
   49979          25 : SWIGINTERN PyObject *_wrap_ContourGenerateEx(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   49980          25 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   49981          25 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   49982          25 :   OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
   49983          25 :   char **arg3 = (char **) NULL ;
   49984          25 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   49985          25 :   void *arg5 = (void *) NULL ;
   49986          25 :   void *argp1 = 0 ;
   49987          25 :   int res1 = 0 ;
   49988          25 :   void *argp2 = 0 ;
   49989          25 :   int res2 = 0 ;
   49990          25 :   PyObject * obj0 = 0 ;
   49991          25 :   PyObject * obj1 = 0 ;
   49992          25 :   PyObject * obj2 = 0 ;
   49993          25 :   PyObject * obj3 = 0 ;
   49994          25 :   PyObject * obj4 = 0 ;
   49995          25 :   char * kwnames[] = {
   49996             :     (char *)"srcBand",  (char *)"dstLayer",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
   49997             :   };
   49998          25 :   int result;
   49999             :   
   50000             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   50001          25 :   PyProgressData *psProgressInfo;
   50002          25 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   50003          25 :   psProgressInfo->nLastReported = -1;
   50004          25 :   psProgressInfo->psPyCallback = NULL;
   50005          25 :   psProgressInfo->psPyCallbackData = NULL;
   50006          25 :   arg5 = psProgressInfo;
   50007          25 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOO:ContourGenerateEx", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   50008          25 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   50009          25 :   if (!SWIG_IsOK(res1)) {
   50010           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContourGenerateEx" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   50011             :   }
   50012          25 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   50013          25 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   50014          25 :   if (!SWIG_IsOK(res2)) {
   50015           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContourGenerateEx" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
   50016             :   }
   50017          25 :   arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
   50018          25 :   if (obj2) {
   50019          25 :     {
   50020             :       /* %typemap(in) char **dict */
   50021          25 :       arg3 = NULL;
   50022          25 :       if ( PySequence_Check( obj2 ) ) {
   50023          25 :         int bErr = FALSE;
   50024          25 :         arg3 = CSLFromPySequence(obj2, &bErr);
   50025          25 :         if ( bErr )
   50026             :         {
   50027           0 :           SWIG_fail;
   50028             :         }
   50029             :       }
   50030           0 :       else if ( PyMapping_Check( obj2 ) ) {
   50031           0 :         int bErr = FALSE;
   50032           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   50033           0 :         if ( bErr )
   50034             :         {
   50035           0 :           SWIG_fail;
   50036             :         }
   50037             :       }
   50038             :       else {
   50039           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   50040           0 :         SWIG_fail;
   50041             :       }
   50042             :     }
   50043             :   }
   50044          25 :   if (obj3) {
   50045           0 :     {
   50046             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   50047             :       /* callback_func typemap */
   50048             :       
   50049             :       /* In some cases 0 is passed instead of None. */
   50050             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   50051           0 :       if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
   50052             :       {
   50053           0 :         if( PyLong_AsLong(obj3) == 0 )
   50054             :         {
   50055           0 :           obj3 = Py_None;
   50056             :         }
   50057             :       }
   50058             :       
   50059           0 :       if (obj3 && obj3 != Py_None ) {
   50060           0 :         void* cbfunction = NULL;
   50061           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
   50062             :             (void**)&cbfunction,
   50063             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   50064             :             SWIG_POINTER_EXCEPTION | 0 ));
   50065             :         
   50066           0 :         if ( cbfunction == GDALTermProgress ) {
   50067             :           arg4 = GDALTermProgress;
   50068             :         } else {
   50069           0 :           if (!PyCallable_Check(obj3)) {
   50070           0 :             PyErr_SetString( PyExc_RuntimeError,
   50071             :               "Object given is not a Python function" );
   50072           0 :             SWIG_fail;
   50073             :           }
   50074           0 :           psProgressInfo->psPyCallback = obj3;
   50075           0 :           arg4 = PyProgressProxy;
   50076             :         }
   50077             :         
   50078             :       }
   50079             :       
   50080             :     }
   50081             :   }
   50082          25 :   if (obj4) {
   50083           0 :     {
   50084             :       /* %typemap(in) ( void* callback_data=NULL)  */
   50085           0 :       psProgressInfo->psPyCallbackData = obj4 ;
   50086             :     }
   50087             :   }
   50088          25 :   {
   50089          25 :     if (!arg1) {
   50090           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   50091             :     }
   50092             :   }
   50093          25 :   {
   50094          25 :     if (!arg2) {
   50095           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   50096             :     }
   50097             :   }
   50098          25 :   {
   50099          25 :     const int bLocalUseExceptions = GetUseExceptions();
   50100          25 :     if ( bLocalUseExceptions ) {
   50101          25 :       pushErrorHandler();
   50102             :     }
   50103          25 :     {
   50104          25 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50105          25 :       result = (int)ContourGenerateEx(arg1,arg2,arg3,arg4,arg5);
   50106          25 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50107             :     }
   50108          25 :     if ( bLocalUseExceptions ) {
   50109          25 :       popErrorHandler();
   50110             :     }
   50111             : #ifndef SED_HACKS
   50112             :     if ( bLocalUseExceptions ) {
   50113             :       CPLErr eclass = CPLGetLastErrorType();
   50114             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50115             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50116             :       }
   50117             :     }
   50118             : #endif
   50119             :   }
   50120          25 :   resultobj = SWIG_From_int(static_cast< int >(result));
   50121          25 :   {
   50122             :     /* %typemap(freearg) char **dict */
   50123          25 :     CSLDestroy( arg3 );
   50124             :   }
   50125          25 :   {
   50126             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   50127             :     
   50128          25 :     CPLFree(psProgressInfo);
   50129             :     
   50130             :   }
   50131          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; } }
   50132             :   return resultobj;
   50133           0 : fail:
   50134           0 :   {
   50135             :     /* %typemap(freearg) char **dict */
   50136           0 :     CSLDestroy( arg3 );
   50137             :   }
   50138           0 :   {
   50139             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   50140             :     
   50141           0 :     CPLFree(psProgressInfo);
   50142             :     
   50143             :   }
   50144             :   return NULL;
   50145             : }
   50146             : 
   50147             : 
   50148           0 : SWIGINTERN PyObject *_wrap_ViewshedGenerate(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   50149           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50150           0 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   50151           0 :   char *arg2 = (char *) 0 ;
   50152           0 :   char *arg3 = (char *) 0 ;
   50153           0 :   char **arg4 = (char **) 0 ;
   50154           0 :   double arg5 ;
   50155           0 :   double arg6 ;
   50156           0 :   double arg7 ;
   50157           0 :   double arg8 ;
   50158           0 :   double arg9 ;
   50159           0 :   double arg10 ;
   50160           0 :   double arg11 ;
   50161           0 :   double arg12 ;
   50162           0 :   double arg13 ;
   50163           0 :   GDALViewshedMode arg14 ;
   50164           0 :   double arg15 ;
   50165           0 :   GDALProgressFunc arg16 = (GDALProgressFunc) NULL ;
   50166           0 :   void *arg17 = (void *) NULL ;
   50167           0 :   GDALViewshedOutputType arg18 = (GDALViewshedOutputType) GVOT_NORMAL ;
   50168           0 :   char **arg19 = (char **) NULL ;
   50169           0 :   void *argp1 = 0 ;
   50170           0 :   int res1 = 0 ;
   50171           0 :   int res2 ;
   50172           0 :   char *buf2 = 0 ;
   50173           0 :   int alloc2 = 0 ;
   50174           0 :   int res3 ;
   50175           0 :   char *buf3 = 0 ;
   50176           0 :   int alloc3 = 0 ;
   50177           0 :   double val5 ;
   50178           0 :   int ecode5 = 0 ;
   50179           0 :   double val6 ;
   50180           0 :   int ecode6 = 0 ;
   50181           0 :   double val7 ;
   50182           0 :   int ecode7 = 0 ;
   50183           0 :   double val8 ;
   50184           0 :   int ecode8 = 0 ;
   50185           0 :   double val9 ;
   50186           0 :   int ecode9 = 0 ;
   50187           0 :   double val10 ;
   50188           0 :   int ecode10 = 0 ;
   50189           0 :   double val11 ;
   50190           0 :   int ecode11 = 0 ;
   50191           0 :   double val12 ;
   50192           0 :   int ecode12 = 0 ;
   50193           0 :   double val13 ;
   50194           0 :   int ecode13 = 0 ;
   50195           0 :   int val14 ;
   50196           0 :   int ecode14 = 0 ;
   50197           0 :   double val15 ;
   50198           0 :   int ecode15 = 0 ;
   50199           0 :   int val18 ;
   50200           0 :   int ecode18 = 0 ;
   50201           0 :   PyObject * obj0 = 0 ;
   50202           0 :   PyObject * obj1 = 0 ;
   50203           0 :   PyObject * obj2 = 0 ;
   50204           0 :   PyObject * obj3 = 0 ;
   50205           0 :   PyObject * obj4 = 0 ;
   50206           0 :   PyObject * obj5 = 0 ;
   50207           0 :   PyObject * obj6 = 0 ;
   50208           0 :   PyObject * obj7 = 0 ;
   50209           0 :   PyObject * obj8 = 0 ;
   50210           0 :   PyObject * obj9 = 0 ;
   50211           0 :   PyObject * obj10 = 0 ;
   50212           0 :   PyObject * obj11 = 0 ;
   50213           0 :   PyObject * obj12 = 0 ;
   50214           0 :   PyObject * obj13 = 0 ;
   50215           0 :   PyObject * obj14 = 0 ;
   50216           0 :   PyObject * obj15 = 0 ;
   50217           0 :   PyObject * obj16 = 0 ;
   50218           0 :   PyObject * obj17 = 0 ;
   50219           0 :   PyObject * obj18 = 0 ;
   50220           0 :   char * kwnames[] = {
   50221             :     (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 
   50222             :   };
   50223           0 :   GDALDatasetShadow *result = 0 ;
   50224             :   
   50225             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   50226           0 :   PyProgressData *psProgressInfo;
   50227           0 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   50228           0 :   psProgressInfo->nLastReported = -1;
   50229           0 :   psProgressInfo->psPyCallback = NULL;
   50230           0 :   psProgressInfo->psPyCallbackData = NULL;
   50231           0 :   arg17 = psProgressInfo;
   50232           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;
   50233           0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   50234           0 :   if (!SWIG_IsOK(res1)) {
   50235           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewshedGenerate" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   50236             :   }
   50237           0 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   50238           0 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   50239           0 :   if (!SWIG_IsOK(res2)) {
   50240           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewshedGenerate" "', argument " "2"" of type '" "char const *""'");
   50241             :   }
   50242           0 :   arg2 = reinterpret_cast< char * >(buf2);
   50243           0 :   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   50244           0 :   if (!SWIG_IsOK(res3)) {
   50245           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewshedGenerate" "', argument " "3"" of type '" "char const *""'");
   50246             :   }
   50247           0 :   arg3 = reinterpret_cast< char * >(buf3);
   50248           0 :   {
   50249             :     /* %typemap(in) char **dict */
   50250           0 :     arg4 = NULL;
   50251           0 :     if ( PySequence_Check( obj3 ) ) {
   50252           0 :       int bErr = FALSE;
   50253           0 :       arg4 = CSLFromPySequence(obj3, &bErr);
   50254           0 :       if ( bErr )
   50255             :       {
   50256           0 :         SWIG_fail;
   50257             :       }
   50258             :     }
   50259           0 :     else if ( PyMapping_Check( obj3 ) ) {
   50260           0 :       int bErr = FALSE;
   50261           0 :       arg4 = CSLFromPyMapping(obj3, &bErr);
   50262           0 :       if ( bErr )
   50263             :       {
   50264           0 :         SWIG_fail;
   50265             :       }
   50266             :     }
   50267             :     else {
   50268           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   50269           0 :       SWIG_fail;
   50270             :     }
   50271             :   }
   50272           0 :   ecode5 = SWIG_AsVal_double(obj4, &val5);
   50273           0 :   if (!SWIG_IsOK(ecode5)) {
   50274           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ViewshedGenerate" "', argument " "5"" of type '" "double""'");
   50275             :   } 
   50276           0 :   arg5 = static_cast< double >(val5);
   50277           0 :   ecode6 = SWIG_AsVal_double(obj5, &val6);
   50278           0 :   if (!SWIG_IsOK(ecode6)) {
   50279           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "ViewshedGenerate" "', argument " "6"" of type '" "double""'");
   50280             :   } 
   50281           0 :   arg6 = static_cast< double >(val6);
   50282           0 :   ecode7 = SWIG_AsVal_double(obj6, &val7);
   50283           0 :   if (!SWIG_IsOK(ecode7)) {
   50284           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ViewshedGenerate" "', argument " "7"" of type '" "double""'");
   50285             :   } 
   50286           0 :   arg7 = static_cast< double >(val7);
   50287           0 :   ecode8 = SWIG_AsVal_double(obj7, &val8);
   50288           0 :   if (!SWIG_IsOK(ecode8)) {
   50289           0 :     SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "ViewshedGenerate" "', argument " "8"" of type '" "double""'");
   50290             :   } 
   50291           0 :   arg8 = static_cast< double >(val8);
   50292           0 :   ecode9 = SWIG_AsVal_double(obj8, &val9);
   50293           0 :   if (!SWIG_IsOK(ecode9)) {
   50294           0 :     SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "ViewshedGenerate" "', argument " "9"" of type '" "double""'");
   50295             :   } 
   50296           0 :   arg9 = static_cast< double >(val9);
   50297           0 :   ecode10 = SWIG_AsVal_double(obj9, &val10);
   50298           0 :   if (!SWIG_IsOK(ecode10)) {
   50299           0 :     SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "ViewshedGenerate" "', argument " "10"" of type '" "double""'");
   50300             :   } 
   50301           0 :   arg10 = static_cast< double >(val10);
   50302           0 :   ecode11 = SWIG_AsVal_double(obj10, &val11);
   50303           0 :   if (!SWIG_IsOK(ecode11)) {
   50304           0 :     SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "ViewshedGenerate" "', argument " "11"" of type '" "double""'");
   50305             :   } 
   50306           0 :   arg11 = static_cast< double >(val11);
   50307           0 :   ecode12 = SWIG_AsVal_double(obj11, &val12);
   50308           0 :   if (!SWIG_IsOK(ecode12)) {
   50309           0 :     SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "ViewshedGenerate" "', argument " "12"" of type '" "double""'");
   50310             :   } 
   50311           0 :   arg12 = static_cast< double >(val12);
   50312           0 :   ecode13 = SWIG_AsVal_double(obj12, &val13);
   50313           0 :   if (!SWIG_IsOK(ecode13)) {
   50314           0 :     SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "ViewshedGenerate" "', argument " "13"" of type '" "double""'");
   50315             :   } 
   50316           0 :   arg13 = static_cast< double >(val13);
   50317           0 :   ecode14 = SWIG_AsVal_int(obj13, &val14);
   50318           0 :   if (!SWIG_IsOK(ecode14)) {
   50319           0 :     SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "ViewshedGenerate" "', argument " "14"" of type '" "GDALViewshedMode""'");
   50320             :   } 
   50321           0 :   arg14 = static_cast< GDALViewshedMode >(val14);
   50322           0 :   ecode15 = SWIG_AsVal_double(obj14, &val15);
   50323           0 :   if (!SWIG_IsOK(ecode15)) {
   50324           0 :     SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "ViewshedGenerate" "', argument " "15"" of type '" "double""'");
   50325             :   } 
   50326           0 :   arg15 = static_cast< double >(val15);
   50327           0 :   if (obj15) {
   50328           0 :     {
   50329             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   50330             :       /* callback_func typemap */
   50331             :       
   50332             :       /* In some cases 0 is passed instead of None. */
   50333             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   50334           0 :       if ( PyLong_Check(obj15) || PyInt_Check(obj15) )
   50335             :       {
   50336           0 :         if( PyLong_AsLong(obj15) == 0 )
   50337             :         {
   50338           0 :           obj15 = Py_None;
   50339             :         }
   50340             :       }
   50341             :       
   50342           0 :       if (obj15 && obj15 != Py_None ) {
   50343           0 :         void* cbfunction = NULL;
   50344           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj15,
   50345             :             (void**)&cbfunction,
   50346             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   50347             :             SWIG_POINTER_EXCEPTION | 0 ));
   50348             :         
   50349           0 :         if ( cbfunction == GDALTermProgress ) {
   50350             :           arg16 = GDALTermProgress;
   50351             :         } else {
   50352           0 :           if (!PyCallable_Check(obj15)) {
   50353           0 :             PyErr_SetString( PyExc_RuntimeError,
   50354             :               "Object given is not a Python function" );
   50355           0 :             SWIG_fail;
   50356             :           }
   50357           0 :           psProgressInfo->psPyCallback = obj15;
   50358           0 :           arg16 = PyProgressProxy;
   50359             :         }
   50360             :         
   50361             :       }
   50362             :       
   50363             :     }
   50364             :   }
   50365           0 :   if (obj16) {
   50366           0 :     {
   50367             :       /* %typemap(in) ( void* callback_data=NULL)  */
   50368           0 :       psProgressInfo->psPyCallbackData = obj16 ;
   50369             :     }
   50370             :   }
   50371           0 :   if (obj17) {
   50372           0 :     ecode18 = SWIG_AsVal_int(obj17, &val18);
   50373           0 :     if (!SWIG_IsOK(ecode18)) {
   50374           0 :       SWIG_exception_fail(SWIG_ArgError(ecode18), "in method '" "ViewshedGenerate" "', argument " "18"" of type '" "GDALViewshedOutputType""'");
   50375             :     } 
   50376           0 :     arg18 = static_cast< GDALViewshedOutputType >(val18);
   50377             :   }
   50378           0 :   if (obj18) {
   50379           0 :     {
   50380             :       /* %typemap(in) char **dict */
   50381           0 :       arg19 = NULL;
   50382           0 :       if ( PySequence_Check( obj18 ) ) {
   50383           0 :         int bErr = FALSE;
   50384           0 :         arg19 = CSLFromPySequence(obj18, &bErr);
   50385           0 :         if ( bErr )
   50386             :         {
   50387           0 :           SWIG_fail;
   50388             :         }
   50389             :       }
   50390           0 :       else if ( PyMapping_Check( obj18 ) ) {
   50391           0 :         int bErr = FALSE;
   50392           0 :         arg19 = CSLFromPyMapping(obj18, &bErr);
   50393           0 :         if ( bErr )
   50394             :         {
   50395           0 :           SWIG_fail;
   50396             :         }
   50397             :       }
   50398             :       else {
   50399           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   50400           0 :         SWIG_fail;
   50401             :       }
   50402             :     }
   50403             :   }
   50404           0 :   {
   50405           0 :     if (!arg1) {
   50406           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   50407             :     }
   50408             :   }
   50409           0 :   {
   50410           0 :     const int bLocalUseExceptions = GetUseExceptions();
   50411           0 :     if ( bLocalUseExceptions ) {
   50412           0 :       pushErrorHandler();
   50413             :     }
   50414           0 :     {
   50415           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50416           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);
   50417           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50418             :     }
   50419           0 :     if ( bLocalUseExceptions ) {
   50420           0 :       popErrorHandler();
   50421             :     }
   50422             : #ifndef SED_HACKS
   50423             :     if ( bLocalUseExceptions ) {
   50424             :       CPLErr eclass = CPLGetLastErrorType();
   50425             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50426             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50427             :       }
   50428             :     }
   50429             : #endif
   50430             :   }
   50431           0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   50432           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   50433           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   50434           0 :   {
   50435             :     /* %typemap(freearg) char **dict */
   50436           0 :     CSLDestroy( arg4 );
   50437             :   }
   50438           0 :   {
   50439             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   50440             :     
   50441           0 :     CPLFree(psProgressInfo);
   50442             :     
   50443             :   }
   50444           0 :   {
   50445             :     /* %typemap(freearg) char **dict */
   50446           0 :     CSLDestroy( arg19 );
   50447             :   }
   50448           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; } }
   50449             :   return resultobj;
   50450           0 : fail:
   50451           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   50452           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   50453           0 :   {
   50454             :     /* %typemap(freearg) char **dict */
   50455           0 :     CSLDestroy( arg4 );
   50456             :   }
   50457           0 :   {
   50458             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   50459             :     
   50460           0 :     CPLFree(psProgressInfo);
   50461             :     
   50462             :   }
   50463           0 :   {
   50464             :     /* %typemap(freearg) char **dict */
   50465           0 :     CSLDestroy( arg19 );
   50466             :   }
   50467             :   return NULL;
   50468             : }
   50469             : 
   50470             : 
   50471           6 : SWIGINTERN PyObject *_wrap_IsLineOfSightVisible(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   50472           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50473           6 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   50474           6 :   int arg2 ;
   50475           6 :   int arg3 ;
   50476           6 :   double arg4 ;
   50477           6 :   int arg5 ;
   50478           6 :   int arg6 ;
   50479           6 :   double arg7 ;
   50480           6 :   bool *arg8 = (bool *) 0 ;
   50481           6 :   int *arg9 = (int *) 0 ;
   50482           6 :   int *arg10 = (int *) 0 ;
   50483           6 :   char **arg11 = (char **) NULL ;
   50484           6 :   void *argp1 = 0 ;
   50485           6 :   int res1 = 0 ;
   50486           6 :   int val2 ;
   50487           6 :   int ecode2 = 0 ;
   50488           6 :   int val3 ;
   50489           6 :   int ecode3 = 0 ;
   50490           6 :   double val4 ;
   50491           6 :   int ecode4 = 0 ;
   50492           6 :   int val5 ;
   50493           6 :   int ecode5 = 0 ;
   50494           6 :   int val6 ;
   50495           6 :   int ecode6 = 0 ;
   50496           6 :   double val7 ;
   50497           6 :   int ecode7 = 0 ;
   50498           6 :   bool visible8 = 0 ;
   50499           6 :   int nxintersection8 = 0 ;
   50500           6 :   int nyintersection8 = 0 ;
   50501           6 :   PyObject * obj0 = 0 ;
   50502           6 :   PyObject * obj1 = 0 ;
   50503           6 :   PyObject * obj2 = 0 ;
   50504           6 :   PyObject * obj3 = 0 ;
   50505           6 :   PyObject * obj4 = 0 ;
   50506           6 :   PyObject * obj5 = 0 ;
   50507           6 :   PyObject * obj6 = 0 ;
   50508           6 :   PyObject * obj7 = 0 ;
   50509           6 :   char * kwnames[] = {
   50510             :     (char *)"band",  (char *)"xA",  (char *)"yA",  (char *)"zA",  (char *)"xB",  (char *)"yB",  (char *)"zB",  (char *)"options",  NULL 
   50511             :   };
   50512             :   
   50513           6 :   {
   50514             :     /* %typemap(in) (bool *pbVisible, int *pnXIntersection, int *pnYIntersection) */
   50515           6 :     arg8 = &visible8;
   50516           6 :     arg9 = &nxintersection8;
   50517           6 :     arg10 = &nyintersection8;
   50518             :   }
   50519           6 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO|O:IsLineOfSightVisible", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
   50520           6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   50521           6 :   if (!SWIG_IsOK(res1)) {
   50522           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IsLineOfSightVisible" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   50523             :   }
   50524           6 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   50525           6 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   50526           6 :   if (!SWIG_IsOK(ecode2)) {
   50527           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IsLineOfSightVisible" "', argument " "2"" of type '" "int""'");
   50528             :   } 
   50529           6 :   arg2 = static_cast< int >(val2);
   50530           6 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   50531           6 :   if (!SWIG_IsOK(ecode3)) {
   50532           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IsLineOfSightVisible" "', argument " "3"" of type '" "int""'");
   50533             :   } 
   50534           6 :   arg3 = static_cast< int >(val3);
   50535           6 :   ecode4 = SWIG_AsVal_double(obj3, &val4);
   50536           6 :   if (!SWIG_IsOK(ecode4)) {
   50537           0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IsLineOfSightVisible" "', argument " "4"" of type '" "double""'");
   50538             :   } 
   50539           6 :   arg4 = static_cast< double >(val4);
   50540           6 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   50541           6 :   if (!SWIG_IsOK(ecode5)) {
   50542           0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "IsLineOfSightVisible" "', argument " "5"" of type '" "int""'");
   50543             :   } 
   50544           6 :   arg5 = static_cast< int >(val5);
   50545           6 :   ecode6 = SWIG_AsVal_int(obj5, &val6);
   50546           6 :   if (!SWIG_IsOK(ecode6)) {
   50547           0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "IsLineOfSightVisible" "', argument " "6"" of type '" "int""'");
   50548             :   } 
   50549           6 :   arg6 = static_cast< int >(val6);
   50550           6 :   ecode7 = SWIG_AsVal_double(obj6, &val7);
   50551           6 :   if (!SWIG_IsOK(ecode7)) {
   50552           0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "IsLineOfSightVisible" "', argument " "7"" of type '" "double""'");
   50553             :   } 
   50554           6 :   arg7 = static_cast< double >(val7);
   50555           6 :   if (obj7) {
   50556           0 :     {
   50557             :       /* %typemap(in) char **dict */
   50558           0 :       arg11 = NULL;
   50559           0 :       if ( PySequence_Check( obj7 ) ) {
   50560           0 :         int bErr = FALSE;
   50561           0 :         arg11 = CSLFromPySequence(obj7, &bErr);
   50562           0 :         if ( bErr )
   50563             :         {
   50564           0 :           SWIG_fail;
   50565             :         }
   50566             :       }
   50567           0 :       else if ( PyMapping_Check( obj7 ) ) {
   50568           0 :         int bErr = FALSE;
   50569           0 :         arg11 = CSLFromPyMapping(obj7, &bErr);
   50570           0 :         if ( bErr )
   50571             :         {
   50572           0 :           SWIG_fail;
   50573             :         }
   50574             :       }
   50575             :       else {
   50576           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   50577           0 :         SWIG_fail;
   50578             :       }
   50579             :     }
   50580             :   }
   50581           6 :   {
   50582           6 :     if (!arg1) {
   50583           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   50584             :     }
   50585             :   }
   50586           5 :   {
   50587           5 :     const int bLocalUseExceptions = GetUseExceptions();
   50588           5 :     if ( bLocalUseExceptions ) {
   50589           5 :       pushErrorHandler();
   50590             :     }
   50591           5 :     {
   50592           5 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50593           5 :       IsLineOfSightVisible(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
   50594           5 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50595             :     }
   50596           5 :     if ( bLocalUseExceptions ) {
   50597           5 :       popErrorHandler();
   50598             :     }
   50599             : #ifndef SED_HACKS
   50600             :     if ( bLocalUseExceptions ) {
   50601             :       CPLErr eclass = CPLGetLastErrorType();
   50602             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50603             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50604             :       }
   50605             :     }
   50606             : #endif
   50607             :   }
   50608           5 :   resultobj = SWIG_Py_Void();
   50609           5 :   {
   50610             :     /* %typemap(argout) (bool *pbVisible, int *pnXIntersection, int *pnYIntersection)  */
   50611           5 :     PyObject *r = PyTuple_New( 3 );
   50612           5 :     PyTuple_SetItem( r, 0, PyBool_FromLong(*arg8) );
   50613           5 :     PyTuple_SetItem( r, 1, PyLong_FromLong(*arg9) );
   50614           5 :     PyTuple_SetItem( r, 2, PyLong_FromLong(*arg10) );
   50615             : #if SWIG_VERSION >= 0x040300
   50616             :     resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
   50617             : #else
   50618           5 :     resultobj = SWIG_Python_AppendOutput(resultobj,r);
   50619             : #endif
   50620             :   }
   50621           5 :   {
   50622             :     /* %typemap(freearg) char **dict */
   50623           5 :     CSLDestroy( arg11 );
   50624             :   }
   50625           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; } }
   50626             :   return resultobj;
   50627           1 : fail:
   50628           1 :   {
   50629             :     /* %typemap(freearg) char **dict */
   50630           1 :     CSLDestroy( arg11 );
   50631             :   }
   50632             :   return NULL;
   50633             : }
   50634             : 
   50635             : 
   50636          24 : SWIGINTERN PyObject *_wrap_AutoCreateWarpedVRT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50637          24 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50638          24 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   50639          24 :   char *arg2 = (char *) 0 ;
   50640          24 :   char *arg3 = (char *) 0 ;
   50641          24 :   GDALResampleAlg arg4 = (GDALResampleAlg) GRA_NearestNeighbour ;
   50642          24 :   double arg5 = (double) 0.0 ;
   50643          24 :   void *argp1 = 0 ;
   50644          24 :   int res1 = 0 ;
   50645          24 :   int res2 ;
   50646          24 :   char *buf2 = 0 ;
   50647          24 :   int alloc2 = 0 ;
   50648          24 :   int res3 ;
   50649          24 :   char *buf3 = 0 ;
   50650          24 :   int alloc3 = 0 ;
   50651          24 :   int val4 ;
   50652          24 :   int ecode4 = 0 ;
   50653          24 :   double val5 ;
   50654          24 :   int ecode5 = 0 ;
   50655          24 :   PyObject *swig_obj[5] ;
   50656          24 :   GDALDatasetShadow *result = 0 ;
   50657             :   
   50658          24 :   if (!SWIG_Python_UnpackTuple(args, "AutoCreateWarpedVRT", 1, 5, swig_obj)) SWIG_fail;
   50659          24 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   50660          24 :   if (!SWIG_IsOK(res1)) {
   50661           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AutoCreateWarpedVRT" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   50662             :   }
   50663          24 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   50664          24 :   if (swig_obj[1]) {
   50665           9 :     res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   50666           9 :     if (!SWIG_IsOK(res2)) {
   50667           0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AutoCreateWarpedVRT" "', argument " "2"" of type '" "char const *""'");
   50668             :     }
   50669           9 :     arg2 = reinterpret_cast< char * >(buf2);
   50670             :   }
   50671          24 :   if (swig_obj[2]) {
   50672           9 :     res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   50673           9 :     if (!SWIG_IsOK(res3)) {
   50674           0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AutoCreateWarpedVRT" "', argument " "3"" of type '" "char const *""'");
   50675             :     }
   50676           9 :     arg3 = reinterpret_cast< char * >(buf3);
   50677             :   }
   50678          24 :   if (swig_obj[3]) {
   50679           3 :     ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
   50680           3 :     if (!SWIG_IsOK(ecode4)) {
   50681           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "AutoCreateWarpedVRT" "', argument " "4"" of type '" "GDALResampleAlg""'");
   50682             :     } 
   50683           3 :     arg4 = static_cast< GDALResampleAlg >(val4);
   50684             :   }
   50685          24 :   if (swig_obj[4]) {
   50686           3 :     ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
   50687           3 :     if (!SWIG_IsOK(ecode5)) {
   50688           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "AutoCreateWarpedVRT" "', argument " "5"" of type '" "double""'");
   50689             :     } 
   50690           3 :     arg5 = static_cast< double >(val5);
   50691             :   }
   50692          24 :   {
   50693          24 :     if (!arg1) {
   50694           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   50695             :     }
   50696             :   }
   50697          24 :   {
   50698          24 :     const int bLocalUseExceptions = GetUseExceptions();
   50699          24 :     if ( bLocalUseExceptions ) {
   50700          24 :       pushErrorHandler();
   50701             :     }
   50702          24 :     {
   50703          24 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50704          24 :       result = (GDALDatasetShadow *)AutoCreateWarpedVRT(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5);
   50705          24 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50706             :     }
   50707          24 :     if ( bLocalUseExceptions ) {
   50708          24 :       popErrorHandler();
   50709             :     }
   50710             : #ifndef SED_HACKS
   50711             :     if ( bLocalUseExceptions ) {
   50712             :       CPLErr eclass = CPLGetLastErrorType();
   50713             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50714             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50715             :       }
   50716             :     }
   50717             : #endif
   50718             :   }
   50719          24 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   50720          24 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   50721          24 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   50722          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; } }
   50723             :   return resultobj;
   50724           0 : fail:
   50725           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   50726           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   50727             :   return NULL;
   50728             : }
   50729             : 
   50730             : 
   50731           8 : SWIGINTERN PyObject *_wrap_CreatePansharpenedVRT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50732           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50733           8 :   char *arg1 = (char *) 0 ;
   50734           8 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   50735           8 :   int arg3 ;
   50736           8 :   GDALRasterBandShadow **arg4 = (GDALRasterBandShadow **) 0 ;
   50737           8 :   int res1 ;
   50738           8 :   char *buf1 = 0 ;
   50739           8 :   int alloc1 = 0 ;
   50740           8 :   void *argp2 = 0 ;
   50741           8 :   int res2 = 0 ;
   50742           8 :   PyObject *swig_obj[3] ;
   50743           8 :   GDALDatasetShadow *result = 0 ;
   50744             :   
   50745           8 :   if (!SWIG_Python_UnpackTuple(args, "CreatePansharpenedVRT", 3, 3, swig_obj)) SWIG_fail;
   50746           8 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   50747           8 :   if (!SWIG_IsOK(res1)) {
   50748           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreatePansharpenedVRT" "', argument " "1"" of type '" "char const *""'");
   50749             :   }
   50750           8 :   arg1 = reinterpret_cast< char * >(buf1);
   50751           8 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   50752           8 :   if (!SWIG_IsOK(res2)) {
   50753           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CreatePansharpenedVRT" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   50754             :   }
   50755           8 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   50756           8 :   {
   50757             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALRasterBandShadow *optional_##GDALRasterBandShadow)*/
   50758           8 :     if ( !PySequence_Check(swig_obj[2]) ) {
   50759           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   50760           0 :       SWIG_fail;
   50761             :     }
   50762           8 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   50763           8 :     if( size > (Py_ssize_t)INT_MAX ) {
   50764           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   50765           0 :       SWIG_fail;
   50766             :     }
   50767           8 :     if( (size_t)size > SIZE_MAX / sizeof(GDALRasterBandShadow*) ) {
   50768           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   50769           0 :       SWIG_fail;
   50770             :     }
   50771           8 :     arg3 = (int)size;
   50772           8 :     arg4 = (GDALRasterBandShadow**) VSIMalloc(arg3*sizeof(GDALRasterBandShadow*));
   50773           8 :     if( !arg4) {
   50774           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   50775           0 :       SWIG_fail;
   50776             :     }
   50777             :     
   50778          30 :     for( int i = 0; i<arg3; i++ ) {
   50779          22 :       PyObject *o = PySequence_GetItem(swig_obj[2],i);
   50780          22 :       GDALRasterBandShadow* rawobjectpointer = NULL;
   50781          22 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALRasterBandShadow, SWIG_POINTER_EXCEPTION | 0 ));
   50782          22 :       if (!rawobjectpointer) {
   50783           0 :         Py_DECREF(o);
   50784           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALRasterBandShadow");
   50785           0 :         SWIG_fail;
   50786             :       }
   50787          22 :       arg4[i] = rawobjectpointer;
   50788          22 :       Py_DECREF(o);
   50789             :       
   50790             :     }
   50791             :   }
   50792           8 :   {
   50793           8 :     if (!arg2) {
   50794           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   50795             :     }
   50796             :   }
   50797           8 :   {
   50798           8 :     const int bLocalUseExceptions = GetUseExceptions();
   50799           8 :     if ( bLocalUseExceptions ) {
   50800           2 :       pushErrorHandler();
   50801             :     }
   50802           8 :     {
   50803           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50804           8 :       result = (GDALDatasetShadow *)CreatePansharpenedVRT((char const *)arg1,arg2,arg3,arg4);
   50805           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50806             :     }
   50807           8 :     if ( bLocalUseExceptions ) {
   50808           2 :       popErrorHandler();
   50809             :     }
   50810             : #ifndef SED_HACKS
   50811             :     if ( bLocalUseExceptions ) {
   50812             :       CPLErr eclass = CPLGetLastErrorType();
   50813             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50814             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50815             :       }
   50816             :     }
   50817             : #endif
   50818             :   }
   50819           8 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   50820           8 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   50821           8 :   {
   50822             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   50823           8 :     CPLFree( arg4 );
   50824             :   }
   50825           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; } }
   50826             :   return resultobj;
   50827           0 : fail:
   50828           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   50829           0 :   {
   50830             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   50831           0 :     CPLFree( arg4 );
   50832             :   }
   50833             :   return NULL;
   50834             : }
   50835             : 
   50836             : 
   50837           1 : SWIGINTERN PyObject *_wrap_GetTranformerOptionList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50838           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50839           1 :   char *result = 0 ;
   50840             :   
   50841           1 :   if (!SWIG_Python_UnpackTuple(args, "GetTranformerOptionList", 0, 0, 0)) SWIG_fail;
   50842           1 :   {
   50843           1 :     const int bLocalUseExceptions = GetUseExceptions();
   50844           1 :     if ( bLocalUseExceptions ) {
   50845           1 :       pushErrorHandler();
   50846             :     }
   50847           1 :     {
   50848           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50849           1 :       result = (char *)GDALGetGenImgProjTranformerOptionList();
   50850           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50851             :     }
   50852           1 :     if ( bLocalUseExceptions ) {
   50853           1 :       popErrorHandler();
   50854             :     }
   50855             : #ifndef SED_HACKS
   50856             :     if ( bLocalUseExceptions ) {
   50857             :       CPLErr eclass = CPLGetLastErrorType();
   50858             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50859             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50860             :       }
   50861             :     }
   50862             : #endif
   50863             :   }
   50864           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   50865           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; } }
   50866             :   return resultobj;
   50867           0 : fail:
   50868           0 :   return NULL;
   50869             : }
   50870             : 
   50871             : 
   50872          71 : SWIGINTERN PyObject *_wrap_delete_GDALTransformerInfoShadow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   50873          71 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50874          71 :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   50875          71 :   void *argp1 = 0 ;
   50876          71 :   int res1 = 0 ;
   50877          71 :   PyObject *swig_obj[1] ;
   50878             :   
   50879          71 :   if (!args) SWIG_fail;
   50880          71 :   swig_obj[0] = args;
   50881          71 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, SWIG_POINTER_DISOWN |  0 );
   50882          71 :   if (!SWIG_IsOK(res1)) {
   50883           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALTransformerInfoShadow" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   50884             :   }
   50885          71 :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   50886          71 :   {
   50887          71 :     const int bLocalUseExceptions = GetUseExceptions();
   50888          71 :     if ( bLocalUseExceptions ) {
   50889          69 :       pushErrorHandler();
   50890             :     }
   50891          71 :     {
   50892          71 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50893          71 :       delete_GDALTransformerInfoShadow(arg1);
   50894          71 :       SWIG_PYTHON_THREAD_END_ALLOW;
   50895             :     }
   50896          71 :     if ( bLocalUseExceptions ) {
   50897          69 :       popErrorHandler();
   50898             :     }
   50899             : #ifndef SED_HACKS
   50900             :     if ( bLocalUseExceptions ) {
   50901             :       CPLErr eclass = CPLGetLastErrorType();
   50902             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50903             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50904             :       }
   50905             :     }
   50906             : #endif
   50907             :   }
   50908          71 :   resultobj = SWIG_Py_Void();
   50909          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; } }
   50910             :   return resultobj;
   50911             : fail:
   50912             :   return NULL;
   50913             : }
   50914             : 
   50915             : 
   50916             : SWIGINTERN PyObject *_wrap_GDALTransformerInfoShadow_TransformPoint__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
   50917             :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   50918             :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   50919             :   int arg2 ;
   50920             :   double *arg3 ;
   50921             :   void *argp1 = 0 ;
   50922             :   int res1 = 0 ;
   50923             :   int val2 ;
   50924             :   int ecode2 = 0 ;
   50925             :   double argin3[3] ;
   50926             :   int result;
   50927             :   
   50928             :   if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
   50929             :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   50930             :   if (!SWIG_IsOK(res1)) {
   50931             :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   50932             :   }
   50933             :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   50934             :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   50935             :   if (!SWIG_IsOK(ecode2)) {
   50936             :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "2"" of type '" "int""'");
   50937             :   } 
   50938             :   arg2 = static_cast< int >(val2);
   50939             :   {
   50940             :     /* %typemap(in) (double argin3[ANY]) */
   50941             :     arg3 = argin3;
   50942             :     if (! PySequence_Check(swig_obj[2]) ) {
   50943             :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   50944             :       SWIG_fail;
   50945             :     }
   50946             :     Py_ssize_t seq_size = PySequence_Size(swig_obj[2]);
   50947             :     if ( seq_size != 3 ) {
   50948             :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   50949             :       SWIG_fail;
   50950             :     }
   50951             :     for (unsigned int i=0; i<3; i++) {
   50952             :       PyObject *o = PySequence_GetItem(swig_obj[2],i);
   50953             :       double val;
   50954             :       if ( !PyArg_Parse(o, "d", &val ) ) {
   50955             :         PyErr_SetString(PyExc_TypeError, "not a number");
   50956             :         Py_DECREF(o);
   50957             :         SWIG_fail;
   50958             :       }
   50959             :       arg3[i] =  val;
   50960             :       Py_DECREF(o);
   50961             :     }
   50962             :   }
   50963             :   {
   50964             :     const int bLocalUseExceptions = GetUseExceptions();
   50965             :     if ( bLocalUseExceptions ) {
   50966             :       pushErrorHandler();
   50967             :     }
   50968             :     {
   50969             :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   50970             :       result = (int)GDALTransformerInfoShadow_TransformPoint__SWIG_0(arg1,arg2,arg3);
   50971             :       SWIG_PYTHON_THREAD_END_ALLOW;
   50972             :     }
   50973             :     if ( bLocalUseExceptions ) {
   50974             :       popErrorHandler();
   50975             :     }
   50976             : #ifndef SED_HACKS
   50977             :     if ( bLocalUseExceptions ) {
   50978             :       CPLErr eclass = CPLGetLastErrorType();
   50979             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   50980             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   50981             :       }
   50982             :     }
   50983             : #endif
   50984             :   }
   50985             :   resultobj = SWIG_From_int(static_cast< int >(result));
   50986             :   {
   50987             :     /* %typemap(argout) (double argout[ANY]) */
   50988             :     PyObject *out = CreateTupleFromDoubleArray( arg3, 3 );
   50989             : #if SWIG_VERSION >= 0x040300
   50990             :     resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
   50991             : #else
   50992             :     resultobj = SWIG_Python_AppendOutput(resultobj,out);
   50993             : #endif
   50994             :   }
   50995             :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   50996             :   return resultobj;
   50997             : fail:
   50998             :   return NULL;
   50999             : }
   51000             : 
   51001             : 
   51002             : SWIGINTERN PyObject *_wrap_GDALTransformerInfoShadow_TransformPoint__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
   51003             :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51004             :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   51005             :   double *arg2 ;
   51006             :   int arg3 ;
   51007             :   double arg4 ;
   51008             :   double arg5 ;
   51009             :   double arg6 = (double) 0.0 ;
   51010             :   void *argp1 = 0 ;
   51011             :   int res1 = 0 ;
   51012             :   double argout2[3] ;
   51013             :   int val3 ;
   51014             :   int ecode3 = 0 ;
   51015             :   double val4 ;
   51016             :   int ecode4 = 0 ;
   51017             :   double val5 ;
   51018             :   int ecode5 = 0 ;
   51019             :   double val6 ;
   51020             :   int ecode6 = 0 ;
   51021             :   int result;
   51022             :   
   51023             :   {
   51024             :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   51025             :     memset(argout2, 0, sizeof(argout2));
   51026             :     arg2 = argout2;
   51027             :   }
   51028             :   if ((nobjs < 4) || (nobjs > 5)) SWIG_fail;
   51029             :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   51030             :   if (!SWIG_IsOK(res1)) {
   51031             :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   51032             :   }
   51033             :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   51034             :   ecode3 = SWIG_AsVal_int(swig_obj[1], &val3);
   51035             :   if (!SWIG_IsOK(ecode3)) {
   51036             :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "3"" of type '" "int""'");
   51037             :   } 
   51038             :   arg3 = static_cast< int >(val3);
   51039             :   ecode4 = SWIG_AsVal_double(swig_obj[2], &val4);
   51040             :   if (!SWIG_IsOK(ecode4)) {
   51041             :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "4"" of type '" "double""'");
   51042             :   } 
   51043             :   arg4 = static_cast< double >(val4);
   51044             :   ecode5 = SWIG_AsVal_double(swig_obj[3], &val5);
   51045             :   if (!SWIG_IsOK(ecode5)) {
   51046             :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "5"" of type '" "double""'");
   51047             :   } 
   51048             :   arg5 = static_cast< double >(val5);
   51049             :   if (swig_obj[4]) {
   51050             :     ecode6 = SWIG_AsVal_double(swig_obj[4], &val6);
   51051             :     if (!SWIG_IsOK(ecode6)) {
   51052             :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "GDALTransformerInfoShadow_TransformPoint" "', argument " "6"" of type '" "double""'");
   51053             :     } 
   51054             :     arg6 = static_cast< double >(val6);
   51055             :   }
   51056             :   {
   51057             :     const int bLocalUseExceptions = GetUseExceptions();
   51058             :     if ( bLocalUseExceptions ) {
   51059             :       pushErrorHandler();
   51060             :     }
   51061             :     {
   51062             :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51063             :       result = (int)GDALTransformerInfoShadow_TransformPoint__SWIG_1(arg1,arg2,arg3,arg4,arg5,arg6);
   51064             :       SWIG_PYTHON_THREAD_END_ALLOW;
   51065             :     }
   51066             :     if ( bLocalUseExceptions ) {
   51067             :       popErrorHandler();
   51068             :     }
   51069             : #ifndef SED_HACKS
   51070             :     if ( bLocalUseExceptions ) {
   51071             :       CPLErr eclass = CPLGetLastErrorType();
   51072             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51073             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51074             :       }
   51075             :     }
   51076             : #endif
   51077             :   }
   51078             :   resultobj = SWIG_From_int(static_cast< int >(result));
   51079             :   {
   51080             :     /* %typemap(argout) (double argout[ANY]) */
   51081             :     PyObject *out = CreateTupleFromDoubleArray( arg2, 3 );
   51082             : #if SWIG_VERSION >= 0x040300
   51083             :     resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
   51084             : #else
   51085             :     resultobj = SWIG_Python_AppendOutput(resultobj,out);
   51086             : #endif
   51087             :   }
   51088             :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   51089             :   return resultobj;
   51090             : fail:
   51091             :   return NULL;
   51092             : }
   51093             : 
   51094             : 
   51095        8677 : SWIGINTERN PyObject *_wrap_GDALTransformerInfoShadow_TransformPoint(PyObject *self, PyObject *args) {
   51096        8677 :   Py_ssize_t argc;
   51097        8677 :   PyObject *argv[6] = {
   51098             :     0
   51099             :   };
   51100             :   
   51101        8677 :   if (!(argc = SWIG_Python_UnpackTuple(args, "GDALTransformerInfoShadow_TransformPoint", 0, 5, argv))) SWIG_fail;
   51102        8677 :   --argc;
   51103        8677 :   if (argc == 3) {
   51104           0 :     int _v;
   51105           0 :     void *vptr = 0;
   51106           0 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALTransformerInfoShadow, 0);
   51107           0 :     _v = SWIG_CheckState(res);
   51108           0 :     if (_v) {
   51109           0 :       {
   51110           0 :         int res = SWIG_AsVal_int(argv[1], NULL);
   51111           0 :         _v = SWIG_CheckState(res);
   51112             :       }
   51113           0 :       if (_v) {
   51114           0 :         void *vptr = 0;
   51115           0 :         int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_double, 0);
   51116           0 :         _v = SWIG_CheckState(res);
   51117           0 :         if (_v) {
   51118           0 :           return _wrap_GDALTransformerInfoShadow_TransformPoint__SWIG_0(self, argc, argv);
   51119             :         }
   51120             :       }
   51121             :     }
   51122             :   }
   51123        8677 :   if ((argc >= 4) && (argc <= 5)) {
   51124        8677 :     int _v;
   51125        8677 :     void *vptr = 0;
   51126        8677 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALTransformerInfoShadow, 0);
   51127        8677 :     _v = SWIG_CheckState(res);
   51128        8677 :     if (_v) {
   51129        8677 :       {
   51130        8677 :         int res = SWIG_AsVal_int(argv[1], NULL);
   51131        8677 :         _v = SWIG_CheckState(res);
   51132             :       }
   51133        8677 :       if (_v) {
   51134        8677 :         {
   51135        8677 :           int res = SWIG_AsVal_double(argv[2], NULL);
   51136        8677 :           _v = SWIG_CheckState(res);
   51137             :         }
   51138        8677 :         if (_v) {
   51139        8677 :           {
   51140        8677 :             int res = SWIG_AsVal_double(argv[3], NULL);
   51141        8677 :             _v = SWIG_CheckState(res);
   51142             :           }
   51143        8677 :           if (_v) {
   51144        8677 :             if (argc <= 4) {
   51145        8677 :               return _wrap_GDALTransformerInfoShadow_TransformPoint__SWIG_1(self, argc, argv);
   51146             :             }
   51147          40 :             {
   51148          40 :               int res = SWIG_AsVal_double(argv[4], NULL);
   51149          40 :               _v = SWIG_CheckState(res);
   51150             :             }
   51151          40 :             if (_v) {
   51152          40 :               return _wrap_GDALTransformerInfoShadow_TransformPoint__SWIG_1(self, argc, argv);
   51153             :             }
   51154             :           }
   51155             :         }
   51156             :       }
   51157             :     }
   51158             :   }
   51159             :   
   51160           0 : fail:
   51161           0 :   SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'GDALTransformerInfoShadow_TransformPoint'.\n"
   51162             :     "  Possible C/C++ prototypes are:\n"
   51163             :     "    GDALTransformerInfoShadow::TransformPoint(int,double [3])\n"
   51164             :     "    GDALTransformerInfoShadow::TransformPoint(double [3],int,double,double,double)\n");
   51165             :   return 0;
   51166             : }
   51167             : 
   51168             : 
   51169           4 : SWIGINTERN PyObject *_wrap_GDALTransformerInfoShadow_TransformPoints(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51170           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51171           4 :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   51172           4 :   int arg2 ;
   51173           4 :   int arg3 ;
   51174           4 :   double *arg4 = (double *) 0 ;
   51175           4 :   double *arg5 = (double *) 0 ;
   51176           4 :   double *arg6 = (double *) 0 ;
   51177           4 :   int *arg7 = (int *) 0 ;
   51178           4 :   void *argp1 = 0 ;
   51179           4 :   int res1 = 0 ;
   51180           4 :   int val2 ;
   51181           4 :   int ecode2 = 0 ;
   51182           4 :   PyObject *swig_obj[3] ;
   51183           4 :   int result;
   51184             :   
   51185           4 :   if (!SWIG_Python_UnpackTuple(args, "GDALTransformerInfoShadow_TransformPoints", 3, 3, swig_obj)) SWIG_fail;
   51186           4 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   51187           4 :   if (!SWIG_IsOK(res1)) {
   51188           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDALTransformerInfoShadow_TransformPoints" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   51189             :   }
   51190           4 :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   51191           4 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   51192           4 :   if (!SWIG_IsOK(ecode2)) {
   51193           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDALTransformerInfoShadow_TransformPoints" "', argument " "2"" of type '" "int""'");
   51194             :   } 
   51195           4 :   arg2 = static_cast< int >(val2);
   51196           4 :   {
   51197             :     /*  typemap(in,numinputs=1) (int nCount, double *x, double *y, double *z, int* panSuccess) */
   51198           4 :     if ( !PySequence_Check(swig_obj[2]) ) {
   51199           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   51200           0 :       SWIG_fail;
   51201             :     }
   51202             :     
   51203           4 :     Py_ssize_t size = PySequence_Size(swig_obj[2]);
   51204           4 :     if( size != (int)size ) {
   51205           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   51206           0 :       SWIG_fail;
   51207             :     }
   51208           4 :     arg3 = (int)size;
   51209           4 :     arg4 = (double*) VSIMalloc(arg3*sizeof(double));
   51210           4 :     arg5 = (double*) VSIMalloc(arg3*sizeof(double));
   51211           4 :     arg6 = (double*) VSIMalloc(arg3*sizeof(double));
   51212           4 :     arg7 = (int*) VSIMalloc(arg3*sizeof(int));
   51213             :     
   51214           4 :     if (arg4 == NULL || arg5 == NULL || arg6 == NULL || arg7 == NULL)
   51215             :     {
   51216           0 :       PyErr_SetString( PyExc_RuntimeError, "Out of memory" );
   51217           0 :       SWIG_fail;
   51218             :     }
   51219             :     
   51220           4 :     if (!DecomposeSequenceOfCoordinates(swig_obj[2],arg3,arg4,arg5,arg6)) {
   51221           0 :       SWIG_fail;
   51222             :     }
   51223             :   }
   51224           4 :   {
   51225           4 :     const int bLocalUseExceptions = GetUseExceptions();
   51226           4 :     if ( bLocalUseExceptions ) {
   51227           4 :       pushErrorHandler();
   51228             :     }
   51229           4 :     {
   51230           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51231           4 :       result = (int)GDALTransformerInfoShadow_TransformPoints(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   51232           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51233             :     }
   51234           4 :     if ( bLocalUseExceptions ) {
   51235           4 :       popErrorHandler();
   51236             :     }
   51237             : #ifndef SED_HACKS
   51238             :     if ( bLocalUseExceptions ) {
   51239             :       CPLErr eclass = CPLGetLastErrorType();
   51240             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51241             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51242             :       }
   51243             :     }
   51244             : #endif
   51245             :   }
   51246           4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   51247           4 :   {
   51248             :     /* %typemap(argout)  (int nCount, double *x, double *y, double *z, int* panSuccess) */
   51249           4 :     Py_DECREF(resultobj);
   51250           4 :     PyObject *xyz = PyList_New( arg3 );
   51251           4 :     if( !xyz ) {
   51252           0 :       SWIG_fail;
   51253             :     }
   51254           4 :     PyObject *success = PyList_New( arg3 );
   51255           4 :     if( !success ) {
   51256           0 :       Py_DECREF(xyz);
   51257           0 :       SWIG_fail;
   51258             :     }
   51259          35 :     for( int i=0; i< arg3; i++ ) {
   51260          31 :       PyObject *tuple = PyTuple_New( 3 );
   51261          31 :       PyTuple_SetItem( tuple, 0, PyFloat_FromDouble( (arg4)[i] ) );
   51262          31 :       PyTuple_SetItem( tuple, 1, PyFloat_FromDouble( (arg5)[i] ) );
   51263          31 :       PyTuple_SetItem( tuple, 2, PyFloat_FromDouble( (arg6)[i] ) );
   51264          31 :       PyList_SetItem( xyz, i, tuple );
   51265          31 :       PyList_SetItem( success, i, Py_BuildValue( "i",  (arg7)[i]) );
   51266             :     }
   51267           4 :     resultobj = PyTuple_New( 2 );
   51268           4 :     PyTuple_SetItem( resultobj, 0, xyz );
   51269           4 :     PyTuple_SetItem( resultobj, 1, success );
   51270             :   }
   51271           4 :   {
   51272             :     /* %typemap(freearg)  (int nCount, double *x, double *y, double *z, int* panSuccess) */
   51273           4 :     VSIFree(arg4);
   51274           4 :     VSIFree(arg5);
   51275           4 :     VSIFree(arg6);
   51276           4 :     VSIFree(arg7);
   51277             :   }
   51278           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; } }
   51279             :   return resultobj;
   51280           0 : fail:
   51281           0 :   {
   51282             :     /* %typemap(freearg)  (int nCount, double *x, double *y, double *z, int* panSuccess) */
   51283           0 :     VSIFree(arg4);
   51284           0 :     VSIFree(arg5);
   51285           0 :     VSIFree(arg6);
   51286           0 :     VSIFree(arg7);
   51287             :   }
   51288             :   return NULL;
   51289             : }
   51290             : 
   51291             : 
   51292           1 : SWIGINTERN PyObject *_wrap_GDALTransformerInfoShadow_TransformGeolocations(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   51293           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51294           1 :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   51295           1 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   51296           1 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   51297           1 :   GDALRasterBandShadow *arg4 = (GDALRasterBandShadow *) 0 ;
   51298           1 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   51299           1 :   void *arg6 = (void *) NULL ;
   51300           1 :   char **arg7 = (char **) NULL ;
   51301           1 :   void *argp1 = 0 ;
   51302           1 :   int res1 = 0 ;
   51303           1 :   void *argp2 = 0 ;
   51304           1 :   int res2 = 0 ;
   51305           1 :   void *argp3 = 0 ;
   51306           1 :   int res3 = 0 ;
   51307           1 :   void *argp4 = 0 ;
   51308           1 :   int res4 = 0 ;
   51309           1 :   PyObject * obj0 = 0 ;
   51310           1 :   PyObject * obj1 = 0 ;
   51311           1 :   PyObject * obj2 = 0 ;
   51312           1 :   PyObject * obj3 = 0 ;
   51313           1 :   PyObject * obj4 = 0 ;
   51314           1 :   PyObject * obj5 = 0 ;
   51315           1 :   PyObject * obj6 = 0 ;
   51316           1 :   char * kwnames[] = {
   51317             :     (char *)"self",  (char *)"xBand",  (char *)"yBand",  (char *)"zBand",  (char *)"callback",  (char *)"callback_data",  (char *)"options",  NULL 
   51318             :   };
   51319           1 :   int result;
   51320             :   
   51321             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   51322           1 :   PyProgressData *psProgressInfo;
   51323           1 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   51324           1 :   psProgressInfo->nLastReported = -1;
   51325           1 :   psProgressInfo->psPyCallback = NULL;
   51326           1 :   psProgressInfo->psPyCallbackData = NULL;
   51327           1 :   arg6 = psProgressInfo;
   51328           1 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|OOO:GDALTransformerInfoShadow_TransformGeolocations", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
   51329           1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   51330           1 :   if (!SWIG_IsOK(res1)) {
   51331           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDALTransformerInfoShadow_TransformGeolocations" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   51332             :   }
   51333           1 :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   51334           1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   51335           1 :   if (!SWIG_IsOK(res2)) {
   51336           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GDALTransformerInfoShadow_TransformGeolocations" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   51337             :   }
   51338           1 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   51339           1 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   51340           1 :   if (!SWIG_IsOK(res3)) {
   51341           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GDALTransformerInfoShadow_TransformGeolocations" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   51342             :   }
   51343           1 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   51344           1 :   res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   51345           1 :   if (!SWIG_IsOK(res4)) {
   51346           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "GDALTransformerInfoShadow_TransformGeolocations" "', argument " "4"" of type '" "GDALRasterBandShadow *""'"); 
   51347             :   }
   51348           1 :   arg4 = reinterpret_cast< GDALRasterBandShadow * >(argp4);
   51349           1 :   if (obj4) {
   51350           0 :     {
   51351             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   51352             :       /* callback_func typemap */
   51353             :       
   51354             :       /* In some cases 0 is passed instead of None. */
   51355             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   51356           0 :       if ( PyLong_Check(obj4) || PyInt_Check(obj4) )
   51357             :       {
   51358           0 :         if( PyLong_AsLong(obj4) == 0 )
   51359             :         {
   51360           0 :           obj4 = Py_None;
   51361             :         }
   51362             :       }
   51363             :       
   51364           0 :       if (obj4 && obj4 != Py_None ) {
   51365           0 :         void* cbfunction = NULL;
   51366           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj4,
   51367             :             (void**)&cbfunction,
   51368             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   51369             :             SWIG_POINTER_EXCEPTION | 0 ));
   51370             :         
   51371           0 :         if ( cbfunction == GDALTermProgress ) {
   51372             :           arg5 = GDALTermProgress;
   51373             :         } else {
   51374           0 :           if (!PyCallable_Check(obj4)) {
   51375           0 :             PyErr_SetString( PyExc_RuntimeError,
   51376             :               "Object given is not a Python function" );
   51377           0 :             SWIG_fail;
   51378             :           }
   51379           0 :           psProgressInfo->psPyCallback = obj4;
   51380           0 :           arg5 = PyProgressProxy;
   51381             :         }
   51382             :         
   51383             :       }
   51384             :       
   51385             :     }
   51386             :   }
   51387           1 :   if (obj5) {
   51388           0 :     {
   51389             :       /* %typemap(in) ( void* callback_data=NULL)  */
   51390           0 :       psProgressInfo->psPyCallbackData = obj5 ;
   51391             :     }
   51392             :   }
   51393           1 :   if (obj6) {
   51394           0 :     {
   51395             :       /* %typemap(in) char **dict */
   51396           0 :       arg7 = NULL;
   51397           0 :       if ( PySequence_Check( obj6 ) ) {
   51398           0 :         int bErr = FALSE;
   51399           0 :         arg7 = CSLFromPySequence(obj6, &bErr);
   51400           0 :         if ( bErr )
   51401             :         {
   51402           0 :           SWIG_fail;
   51403             :         }
   51404             :       }
   51405           0 :       else if ( PyMapping_Check( obj6 ) ) {
   51406           0 :         int bErr = FALSE;
   51407           0 :         arg7 = CSLFromPyMapping(obj6, &bErr);
   51408           0 :         if ( bErr )
   51409             :         {
   51410           0 :           SWIG_fail;
   51411             :         }
   51412             :       }
   51413             :       else {
   51414           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   51415           0 :         SWIG_fail;
   51416             :       }
   51417             :     }
   51418             :   }
   51419           1 :   {
   51420           1 :     if (!arg2) {
   51421           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   51422             :     }
   51423             :   }
   51424           1 :   {
   51425           1 :     if (!arg3) {
   51426           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   51427             :     }
   51428             :   }
   51429           1 :   {
   51430           1 :     if (!arg4) {
   51431           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   51432             :     }
   51433             :   }
   51434           1 :   {
   51435           1 :     const int bLocalUseExceptions = GetUseExceptions();
   51436           1 :     if ( bLocalUseExceptions ) {
   51437           1 :       pushErrorHandler();
   51438             :     }
   51439           1 :     {
   51440           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51441           1 :       result = (int)GDALTransformerInfoShadow_TransformGeolocations(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   51442           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51443             :     }
   51444           1 :     if ( bLocalUseExceptions ) {
   51445           1 :       popErrorHandler();
   51446             :     }
   51447             : #ifndef SED_HACKS
   51448             :     if ( bLocalUseExceptions ) {
   51449             :       CPLErr eclass = CPLGetLastErrorType();
   51450             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51451             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51452             :       }
   51453             :     }
   51454             : #endif
   51455             :   }
   51456           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   51457           1 :   {
   51458             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   51459             :     
   51460           1 :     CPLFree(psProgressInfo);
   51461             :     
   51462             :   }
   51463           1 :   {
   51464             :     /* %typemap(freearg) char **dict */
   51465           1 :     CSLDestroy( arg7 );
   51466             :   }
   51467           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; } }
   51468             :   return resultobj;
   51469           0 : fail:
   51470           0 :   {
   51471             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   51472             :     
   51473           0 :     CPLFree(psProgressInfo);
   51474             :     
   51475             :   }
   51476           0 :   {
   51477             :     /* %typemap(freearg) char **dict */
   51478           0 :     CSLDestroy( arg7 );
   51479             :   }
   51480             :   return NULL;
   51481             : }
   51482             : 
   51483             : 
   51484         277 : SWIGINTERN PyObject *GDALTransformerInfoShadow_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51485         277 :   PyObject *obj;
   51486         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   51487         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALTransformerInfoShadow, SWIG_NewClientData(obj));
   51488         277 :   return SWIG_Py_Void();
   51489             : }
   51490             : 
   51491          79 : SWIGINTERN PyObject *_wrap_Transformer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51492          79 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51493          79 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   51494          79 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   51495          79 :   char **arg3 = (char **) 0 ;
   51496          79 :   void *argp1 = 0 ;
   51497          79 :   int res1 = 0 ;
   51498          79 :   void *argp2 = 0 ;
   51499          79 :   int res2 = 0 ;
   51500          79 :   PyObject *swig_obj[3] ;
   51501          79 :   GDALTransformerInfoShadow *result = 0 ;
   51502             :   
   51503          79 :   if (!SWIG_Python_UnpackTuple(args, "Transformer", 3, 3, swig_obj)) SWIG_fail;
   51504          79 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   51505          79 :   if (!SWIG_IsOK(res1)) {
   51506           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Transformer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   51507             :   }
   51508          79 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   51509          79 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   51510          79 :   if (!SWIG_IsOK(res2)) {
   51511           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Transformer" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   51512             :   }
   51513          79 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   51514          79 :   {
   51515             :     /* %typemap(in) char **dict */
   51516          79 :     arg3 = NULL;
   51517          79 :     if ( PySequence_Check( swig_obj[2] ) ) {
   51518          79 :       int bErr = FALSE;
   51519          79 :       arg3 = CSLFromPySequence(swig_obj[2], &bErr);
   51520          79 :       if ( bErr )
   51521             :       {
   51522           0 :         SWIG_fail;
   51523             :       }
   51524             :     }
   51525           0 :     else if ( PyMapping_Check( swig_obj[2] ) ) {
   51526           0 :       int bErr = FALSE;
   51527           0 :       arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
   51528           0 :       if ( bErr )
   51529             :       {
   51530           0 :         SWIG_fail;
   51531             :       }
   51532             :     }
   51533             :     else {
   51534           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   51535           0 :       SWIG_fail;
   51536             :     }
   51537             :   }
   51538          79 :   {
   51539          79 :     const int bLocalUseExceptions = GetUseExceptions();
   51540          79 :     if ( bLocalUseExceptions ) {
   51541          76 :       pushErrorHandler();
   51542             :     }
   51543          79 :     {
   51544          79 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51545          79 :       result = (GDALTransformerInfoShadow *)Transformer(arg1,arg2,arg3);
   51546          79 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51547             :     }
   51548          79 :     if ( bLocalUseExceptions ) {
   51549          76 :       popErrorHandler();
   51550             :     }
   51551             : #ifndef SED_HACKS
   51552             :     if ( bLocalUseExceptions ) {
   51553             :       CPLErr eclass = CPLGetLastErrorType();
   51554             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51555             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51556             :       }
   51557             :     }
   51558             : #endif
   51559             :   }
   51560          79 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALTransformerInfoShadow, SWIG_POINTER_OWN |  0 );
   51561          79 :   {
   51562             :     /* %typemap(freearg) char **dict */
   51563          79 :     CSLDestroy( arg3 );
   51564             :   }
   51565          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; } }
   51566             :   return resultobj;
   51567           0 : fail:
   51568           0 :   {
   51569             :     /* %typemap(freearg) char **dict */
   51570           0 :     CSLDestroy( arg3 );
   51571             :   }
   51572             :   return NULL;
   51573             : }
   51574             : 
   51575             : 
   51576           1 : SWIGINTERN PyObject *_wrap_WarpGetOptionList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51577           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51578           1 :   char *result = 0 ;
   51579             :   
   51580           1 :   if (!SWIG_Python_UnpackTuple(args, "WarpGetOptionList", 0, 0, 0)) SWIG_fail;
   51581           1 :   {
   51582           1 :     const int bLocalUseExceptions = GetUseExceptions();
   51583           1 :     if ( bLocalUseExceptions ) {
   51584           1 :       pushErrorHandler();
   51585             :     }
   51586           1 :     {
   51587           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51588           1 :       result = (char *)GDALWarpGetOptionList();
   51589           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51590             :     }
   51591           1 :     if ( bLocalUseExceptions ) {
   51592           1 :       popErrorHandler();
   51593             :     }
   51594             : #ifndef SED_HACKS
   51595             :     if ( bLocalUseExceptions ) {
   51596             :       CPLErr eclass = CPLGetLastErrorType();
   51597             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51598             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51599             :       }
   51600             :     }
   51601             : #endif
   51602             :   }
   51603           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   51604           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; } }
   51605             :   return resultobj;
   51606           0 : fail:
   51607           0 :   return NULL;
   51608             : }
   51609             : 
   51610             : 
   51611           2 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_width_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51612           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51613           2 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   51614           2 :   void *argp1 = 0 ;
   51615           2 :   int res1 = 0 ;
   51616           2 :   PyObject *swig_obj[1] ;
   51617           2 :   int result;
   51618             :   
   51619           2 :   if (!args) SWIG_fail;
   51620           2 :   swig_obj[0] = args;
   51621           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   51622           2 :   if (!SWIG_IsOK(res1)) {
   51623           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_width_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   51624             :   }
   51625           2 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   51626           2 :   {
   51627           2 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51628           2 :     result = (int) ((arg1)->width);
   51629           2 :     SWIG_PYTHON_THREAD_END_ALLOW;
   51630             :   }
   51631           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   51632           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; } }
   51633             :   return resultobj;
   51634             : fail:
   51635             :   return NULL;
   51636             : }
   51637             : 
   51638             : 
   51639           2 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_height_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51640           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51641           2 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   51642           2 :   void *argp1 = 0 ;
   51643           2 :   int res1 = 0 ;
   51644           2 :   PyObject *swig_obj[1] ;
   51645           2 :   int result;
   51646             :   
   51647           2 :   if (!args) SWIG_fail;
   51648           2 :   swig_obj[0] = args;
   51649           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   51650           2 :   if (!SWIG_IsOK(res1)) {
   51651           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_height_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   51652             :   }
   51653           2 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   51654           2 :   {
   51655           2 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51656           2 :     result = (int) ((arg1)->height);
   51657           2 :     SWIG_PYTHON_THREAD_END_ALLOW;
   51658             :   }
   51659           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   51660           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; } }
   51661             :   return resultobj;
   51662             : fail:
   51663             :   return NULL;
   51664             : }
   51665             : 
   51666             : 
   51667           3 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_xmin_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51668           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51669           3 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   51670           3 :   void *argp1 = 0 ;
   51671           3 :   int res1 = 0 ;
   51672           3 :   PyObject *swig_obj[1] ;
   51673           3 :   double result;
   51674             :   
   51675           3 :   if (!args) SWIG_fail;
   51676           3 :   swig_obj[0] = args;
   51677           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   51678           3 :   if (!SWIG_IsOK(res1)) {
   51679           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_xmin_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   51680             :   }
   51681           3 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   51682           3 :   {
   51683           3 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51684           3 :     result = (double) ((arg1)->xmin);
   51685           3 :     SWIG_PYTHON_THREAD_END_ALLOW;
   51686             :   }
   51687           3 :   resultobj = SWIG_From_double(static_cast< double >(result));
   51688           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; } }
   51689             :   return resultobj;
   51690             : fail:
   51691             :   return NULL;
   51692             : }
   51693             : 
   51694             : 
   51695           3 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_ymin_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51696           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51697           3 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   51698           3 :   void *argp1 = 0 ;
   51699           3 :   int res1 = 0 ;
   51700           3 :   PyObject *swig_obj[1] ;
   51701           3 :   double result;
   51702             :   
   51703           3 :   if (!args) SWIG_fail;
   51704           3 :   swig_obj[0] = args;
   51705           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   51706           3 :   if (!SWIG_IsOK(res1)) {
   51707           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_ymin_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   51708             :   }
   51709           3 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   51710           3 :   {
   51711           3 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51712           3 :     result = (double) ((arg1)->ymin);
   51713           3 :     SWIG_PYTHON_THREAD_END_ALLOW;
   51714             :   }
   51715           3 :   resultobj = SWIG_From_double(static_cast< double >(result));
   51716           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; } }
   51717             :   return resultobj;
   51718             : fail:
   51719             :   return NULL;
   51720             : }
   51721             : 
   51722             : 
   51723           3 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_xmax_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51724           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51725           3 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   51726           3 :   void *argp1 = 0 ;
   51727           3 :   int res1 = 0 ;
   51728           3 :   PyObject *swig_obj[1] ;
   51729           3 :   double result;
   51730             :   
   51731           3 :   if (!args) SWIG_fail;
   51732           3 :   swig_obj[0] = args;
   51733           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   51734           3 :   if (!SWIG_IsOK(res1)) {
   51735           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_xmax_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   51736             :   }
   51737           3 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   51738           3 :   {
   51739           3 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51740           3 :     result = (double) ((arg1)->xmax);
   51741           3 :     SWIG_PYTHON_THREAD_END_ALLOW;
   51742             :   }
   51743           3 :   resultobj = SWIG_From_double(static_cast< double >(result));
   51744           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; } }
   51745             :   return resultobj;
   51746             : fail:
   51747             :   return NULL;
   51748             : }
   51749             : 
   51750             : 
   51751           3 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_ymax_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51752           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51753           3 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   51754           3 :   void *argp1 = 0 ;
   51755           3 :   int res1 = 0 ;
   51756           3 :   PyObject *swig_obj[1] ;
   51757           3 :   double result;
   51758             :   
   51759           3 :   if (!args) SWIG_fail;
   51760           3 :   swig_obj[0] = args;
   51761           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   51762           3 :   if (!SWIG_IsOK(res1)) {
   51763           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_ymax_get" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   51764             :   }
   51765           3 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   51766           3 :   {
   51767           3 :     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51768           3 :     result = (double) ((arg1)->ymax);
   51769           3 :     SWIG_PYTHON_THREAD_END_ALLOW;
   51770             :   }
   51771           3 :   resultobj = SWIG_From_double(static_cast< double >(result));
   51772           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; } }
   51773             :   return resultobj;
   51774             : fail:
   51775             :   return NULL;
   51776             : }
   51777             : 
   51778             : 
   51779           3 : SWIGINTERN PyObject *_wrap_delete_SuggestedWarpOutputRes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51780           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51781           3 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   51782           3 :   void *argp1 = 0 ;
   51783           3 :   int res1 = 0 ;
   51784           3 :   PyObject *swig_obj[1] ;
   51785             :   
   51786           3 :   if (!args) SWIG_fail;
   51787           3 :   swig_obj[0] = args;
   51788           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, SWIG_POINTER_DISOWN |  0 );
   51789           3 :   if (!SWIG_IsOK(res1)) {
   51790           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SuggestedWarpOutputRes" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   51791             :   }
   51792           3 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   51793           3 :   {
   51794           3 :     const int bLocalUseExceptions = GetUseExceptions();
   51795           3 :     if ( bLocalUseExceptions ) {
   51796           3 :       pushErrorHandler();
   51797             :     }
   51798           3 :     {
   51799           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51800           3 :       delete_SuggestedWarpOutputRes(arg1);
   51801           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51802             :     }
   51803           3 :     if ( bLocalUseExceptions ) {
   51804           3 :       popErrorHandler();
   51805             :     }
   51806             : #ifndef SED_HACKS
   51807             :     if ( bLocalUseExceptions ) {
   51808             :       CPLErr eclass = CPLGetLastErrorType();
   51809             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51810             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51811             :       }
   51812             :     }
   51813             : #endif
   51814             :   }
   51815           3 :   resultobj = SWIG_Py_Void();
   51816           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; } }
   51817             :   return resultobj;
   51818             : fail:
   51819             :   return NULL;
   51820             : }
   51821             : 
   51822             : 
   51823           2 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputRes_GetGeotransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51824           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51825           2 :   SuggestedWarpOutputRes *arg1 = (SuggestedWarpOutputRes *) 0 ;
   51826           2 :   double *arg2 ;
   51827           2 :   void *argp1 = 0 ;
   51828           2 :   int res1 = 0 ;
   51829           2 :   double argout2[6] ;
   51830           2 :   PyObject *swig_obj[1] ;
   51831             :   
   51832           2 :   {
   51833             :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   51834           2 :     memset(argout2, 0, sizeof(argout2));
   51835           2 :     arg2 = argout2;
   51836             :   }
   51837           2 :   if (!args) SWIG_fail;
   51838           2 :   swig_obj[0] = args;
   51839           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_SuggestedWarpOutputRes, 0 |  0 );
   51840           2 :   if (!SWIG_IsOK(res1)) {
   51841           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputRes_GetGeotransform" "', argument " "1"" of type '" "SuggestedWarpOutputRes *""'"); 
   51842             :   }
   51843           2 :   arg1 = reinterpret_cast< SuggestedWarpOutputRes * >(argp1);
   51844           2 :   {
   51845           2 :     const int bLocalUseExceptions = GetUseExceptions();
   51846           2 :     if ( bLocalUseExceptions ) {
   51847           2 :       pushErrorHandler();
   51848             :     }
   51849           2 :     {
   51850           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51851           2 :       SuggestedWarpOutputRes_GetGeotransform(arg1,arg2);
   51852           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51853             :     }
   51854           2 :     if ( bLocalUseExceptions ) {
   51855           2 :       popErrorHandler();
   51856             :     }
   51857             : #ifndef SED_HACKS
   51858             :     if ( bLocalUseExceptions ) {
   51859             :       CPLErr eclass = CPLGetLastErrorType();
   51860             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51861             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51862             :       }
   51863             :     }
   51864             : #endif
   51865             :   }
   51866           2 :   resultobj = SWIG_Py_Void();
   51867           2 :   {
   51868             :     /* %typemap(argout) (double argout[ANY]) */
   51869           2 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 6 );
   51870             : #if SWIG_VERSION >= 0x040300
   51871             :     resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
   51872             : #else
   51873           2 :     resultobj = SWIG_Python_AppendOutput(resultobj,out);
   51874             : #endif
   51875             :   }
   51876           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; } }
   51877             :   return resultobj;
   51878             : fail:
   51879             :   return NULL;
   51880             : }
   51881             : 
   51882             : 
   51883         277 : SWIGINTERN PyObject *SuggestedWarpOutputRes_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51884         277 :   PyObject *obj;
   51885         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   51886         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_SuggestedWarpOutputRes, SWIG_NewClientData(obj));
   51887         277 :   return SWIG_Py_Void();
   51888             : }
   51889             : 
   51890           1 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputFromTransformer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51891           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51892           1 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   51893           1 :   GDALTransformerInfoShadow *arg2 = (GDALTransformerInfoShadow *) 0 ;
   51894           1 :   void *argp1 = 0 ;
   51895           1 :   int res1 = 0 ;
   51896           1 :   void *argp2 = 0 ;
   51897           1 :   int res2 = 0 ;
   51898           1 :   PyObject *swig_obj[2] ;
   51899           1 :   SuggestedWarpOutputRes *result = 0 ;
   51900             :   
   51901           1 :   if (!SWIG_Python_UnpackTuple(args, "SuggestedWarpOutputFromTransformer", 2, 2, swig_obj)) SWIG_fail;
   51902           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   51903           1 :   if (!SWIG_IsOK(res1)) {
   51904           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputFromTransformer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   51905             :   }
   51906           1 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   51907           1 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   51908           1 :   if (!SWIG_IsOK(res2)) {
   51909           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SuggestedWarpOutputFromTransformer" "', argument " "2"" of type '" "GDALTransformerInfoShadow *""'"); 
   51910             :   }
   51911           1 :   arg2 = reinterpret_cast< GDALTransformerInfoShadow * >(argp2);
   51912           1 :   {
   51913           1 :     const int bLocalUseExceptions = GetUseExceptions();
   51914           1 :     if ( bLocalUseExceptions ) {
   51915           1 :       pushErrorHandler();
   51916             :     }
   51917           1 :     {
   51918           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51919           1 :       result = (SuggestedWarpOutputRes *)SuggestedWarpOutputFromTransformer(arg1,arg2);
   51920           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51921             :     }
   51922           1 :     if ( bLocalUseExceptions ) {
   51923           1 :       popErrorHandler();
   51924             :     }
   51925             : #ifndef SED_HACKS
   51926             :     if ( bLocalUseExceptions ) {
   51927             :       CPLErr eclass = CPLGetLastErrorType();
   51928             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51929             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51930             :       }
   51931             :     }
   51932             : #endif
   51933             :   }
   51934           1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SuggestedWarpOutputRes, SWIG_POINTER_OWN |  0 );
   51935           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; } }
   51936             :   return resultobj;
   51937             : fail:
   51938             :   return NULL;
   51939             : }
   51940             : 
   51941             : 
   51942           2 : SWIGINTERN PyObject *_wrap_SuggestedWarpOutputFromOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   51943           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   51944           2 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   51945           2 :   char **arg2 = (char **) 0 ;
   51946           2 :   void *argp1 = 0 ;
   51947           2 :   int res1 = 0 ;
   51948           2 :   PyObject *swig_obj[2] ;
   51949           2 :   SuggestedWarpOutputRes *result = 0 ;
   51950             :   
   51951           2 :   if (!SWIG_Python_UnpackTuple(args, "SuggestedWarpOutputFromOptions", 2, 2, swig_obj)) SWIG_fail;
   51952           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   51953           2 :   if (!SWIG_IsOK(res1)) {
   51954           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SuggestedWarpOutputFromOptions" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   51955             :   }
   51956           2 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   51957           2 :   {
   51958             :     /* %typemap(in) char **dict */
   51959           2 :     arg2 = NULL;
   51960           2 :     if ( PySequence_Check( swig_obj[1] ) ) {
   51961           2 :       int bErr = FALSE;
   51962           2 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   51963           2 :       if ( bErr )
   51964             :       {
   51965           0 :         SWIG_fail;
   51966             :       }
   51967             :     }
   51968           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   51969           0 :       int bErr = FALSE;
   51970           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   51971           0 :       if ( bErr )
   51972             :       {
   51973           0 :         SWIG_fail;
   51974             :       }
   51975             :     }
   51976             :     else {
   51977           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   51978           0 :       SWIG_fail;
   51979             :     }
   51980             :   }
   51981           2 :   {
   51982           2 :     const int bLocalUseExceptions = GetUseExceptions();
   51983           2 :     if ( bLocalUseExceptions ) {
   51984           2 :       pushErrorHandler();
   51985             :     }
   51986           2 :     {
   51987           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   51988           2 :       result = (SuggestedWarpOutputRes *)SuggestedWarpOutputFromOptions(arg1,arg2);
   51989           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   51990             :     }
   51991           2 :     if ( bLocalUseExceptions ) {
   51992           2 :       popErrorHandler();
   51993             :     }
   51994             : #ifndef SED_HACKS
   51995             :     if ( bLocalUseExceptions ) {
   51996             :       CPLErr eclass = CPLGetLastErrorType();
   51997             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   51998             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   51999             :       }
   52000             :     }
   52001             : #endif
   52002             :   }
   52003           2 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SuggestedWarpOutputRes, SWIG_POINTER_OWN |  0 );
   52004           2 :   {
   52005             :     /* %typemap(freearg) char **dict */
   52006           2 :     CSLDestroy( arg2 );
   52007             :   }
   52008           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; } }
   52009             :   return resultobj;
   52010           0 : fail:
   52011           0 :   {
   52012             :     /* %typemap(freearg) char **dict */
   52013           0 :     CSLDestroy( arg2 );
   52014             :   }
   52015             :   return NULL;
   52016             : }
   52017             : 
   52018             : 
   52019          23 : SWIGINTERN PyObject *_wrap__ApplyVerticalShiftGrid(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   52020          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52021          23 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   52022          23 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   52023          23 :   bool arg3 = (bool) false ;
   52024          23 :   double arg4 = (double) 1.0 ;
   52025          23 :   double arg5 = (double) 1.0 ;
   52026          23 :   char **arg6 = (char **) NULL ;
   52027          23 :   void *argp1 = 0 ;
   52028          23 :   int res1 = 0 ;
   52029          23 :   void *argp2 = 0 ;
   52030          23 :   int res2 = 0 ;
   52031          23 :   bool val3 ;
   52032          23 :   int ecode3 = 0 ;
   52033          23 :   double val4 ;
   52034          23 :   int ecode4 = 0 ;
   52035          23 :   double val5 ;
   52036          23 :   int ecode5 = 0 ;
   52037          23 :   PyObject * obj0 = 0 ;
   52038          23 :   PyObject * obj1 = 0 ;
   52039          23 :   PyObject * obj2 = 0 ;
   52040          23 :   PyObject * obj3 = 0 ;
   52041          23 :   PyObject * obj4 = 0 ;
   52042          23 :   PyObject * obj5 = 0 ;
   52043          23 :   char * kwnames[] = {
   52044             :     (char *)"src_ds",  (char *)"grid_ds",  (char *)"inverse",  (char *)"srcUnitToMeter",  (char *)"dstUnitToMeter",  (char *)"options",  NULL 
   52045             :   };
   52046          23 :   GDALDatasetShadow *result = 0 ;
   52047             :   
   52048          23 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|OOOO:_ApplyVerticalShiftGrid", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
   52049          23 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   52050          23 :   if (!SWIG_IsOK(res1)) {
   52051           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_ApplyVerticalShiftGrid" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   52052             :   }
   52053          23 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   52054          23 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   52055          23 :   if (!SWIG_IsOK(res2)) {
   52056           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "_ApplyVerticalShiftGrid" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   52057             :   }
   52058          23 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   52059          23 :   if (obj2) {
   52060           1 :     ecode3 = SWIG_AsVal_bool(obj2, &val3);
   52061           1 :     if (!SWIG_IsOK(ecode3)) {
   52062           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "_ApplyVerticalShiftGrid" "', argument " "3"" of type '" "bool""'");
   52063             :     } 
   52064             :     arg3 = static_cast< bool >(val3);
   52065             :   }
   52066          23 :   if (obj3) {
   52067           1 :     ecode4 = SWIG_AsVal_double(obj3, &val4);
   52068           1 :     if (!SWIG_IsOK(ecode4)) {
   52069           0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "_ApplyVerticalShiftGrid" "', argument " "4"" of type '" "double""'");
   52070             :     } 
   52071           1 :     arg4 = static_cast< double >(val4);
   52072             :   }
   52073          23 :   if (obj4) {
   52074           1 :     ecode5 = SWIG_AsVal_double(obj4, &val5);
   52075           1 :     if (!SWIG_IsOK(ecode5)) {
   52076           0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "_ApplyVerticalShiftGrid" "', argument " "5"" of type '" "double""'");
   52077             :     } 
   52078           1 :     arg5 = static_cast< double >(val5);
   52079             :   }
   52080          23 :   if (obj5) {
   52081          11 :     {
   52082             :       /* %typemap(in) char **dict */
   52083          11 :       arg6 = NULL;
   52084          11 :       if ( PySequence_Check( obj5 ) ) {
   52085          11 :         int bErr = FALSE;
   52086          11 :         arg6 = CSLFromPySequence(obj5, &bErr);
   52087          11 :         if ( bErr )
   52088             :         {
   52089           0 :           SWIG_fail;
   52090             :         }
   52091             :       }
   52092           0 :       else if ( PyMapping_Check( obj5 ) ) {
   52093           0 :         int bErr = FALSE;
   52094           0 :         arg6 = CSLFromPyMapping(obj5, &bErr);
   52095           0 :         if ( bErr )
   52096             :         {
   52097           0 :           SWIG_fail;
   52098             :         }
   52099             :       }
   52100             :       else {
   52101           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   52102           0 :         SWIG_fail;
   52103             :       }
   52104             :     }
   52105             :   }
   52106          23 :   {
   52107          23 :     if (!arg1) {
   52108           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   52109             :     }
   52110             :   }
   52111          23 :   {
   52112          23 :     if (!arg2) {
   52113           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   52114             :     }
   52115             :   }
   52116          23 :   {
   52117          23 :     const int bLocalUseExceptions = GetUseExceptions();
   52118          23 :     if ( bLocalUseExceptions ) {
   52119          12 :       pushErrorHandler();
   52120             :     }
   52121          23 :     {
   52122          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52123          23 :       result = (GDALDatasetShadow *)ApplyVerticalShiftGrid(arg1,arg2,arg3,arg4,arg5,arg6);
   52124          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52125             :     }
   52126          23 :     if ( bLocalUseExceptions ) {
   52127          12 :       popErrorHandler();
   52128             :     }
   52129             : #ifndef SED_HACKS
   52130             :     if ( bLocalUseExceptions ) {
   52131             :       CPLErr eclass = CPLGetLastErrorType();
   52132             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52133             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52134             :       }
   52135             :     }
   52136             : #endif
   52137             :   }
   52138          23 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   52139          23 :   {
   52140             :     /* %typemap(freearg) char **dict */
   52141          23 :     CSLDestroy( arg6 );
   52142             :   }
   52143          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; } }
   52144             :   return resultobj;
   52145           0 : fail:
   52146           0 :   {
   52147             :     /* %typemap(freearg) char **dict */
   52148           0 :     CSLDestroy( arg6 );
   52149             :   }
   52150             :   return NULL;
   52151             : }
   52152             : 
   52153             : 
   52154        1485 : SWIGINTERN PyObject *_wrap_GetGlobalAlgorithmRegistry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52155        1485 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52156        1485 :   GDALAlgorithmRegistryHS *result = 0 ;
   52157             :   
   52158        1485 :   if (!SWIG_Python_UnpackTuple(args, "GetGlobalAlgorithmRegistry", 0, 0, 0)) SWIG_fail;
   52159        1485 :   {
   52160        1485 :     const int bLocalUseExceptions = GetUseExceptions();
   52161        1485 :     if ( bLocalUseExceptions ) {
   52162        1484 :       pushErrorHandler();
   52163             :     }
   52164        1485 :     {
   52165        1485 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52166        1485 :       result = (GDALAlgorithmRegistryHS *)GDALGetGlobalAlgorithmRegistry();
   52167        1485 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52168             :     }
   52169        1485 :     if ( bLocalUseExceptions ) {
   52170        1484 :       popErrorHandler();
   52171             :     }
   52172             : #ifndef SED_HACKS
   52173             :     if ( bLocalUseExceptions ) {
   52174             :       CPLErr eclass = CPLGetLastErrorType();
   52175             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52176             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52177             :       }
   52178             :     }
   52179             : #endif
   52180             :   }
   52181        1485 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAlgorithmRegistryHS, SWIG_POINTER_OWN |  0 );
   52182        1485 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   52183             :   return resultobj;
   52184           0 : fail:
   52185           0 :   return NULL;
   52186             : }
   52187             : 
   52188             : 
   52189           0 : SWIGINTERN PyObject *_wrap_AlgorithmArgTypeIsList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52190           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52191           0 :   GDALAlgorithmArgType arg1 ;
   52192           0 :   int val1 ;
   52193           0 :   int ecode1 = 0 ;
   52194           0 :   PyObject *swig_obj[1] ;
   52195           0 :   bool result;
   52196             :   
   52197           0 :   if (!args) SWIG_fail;
   52198           0 :   swig_obj[0] = args;
   52199           0 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   52200           0 :   if (!SWIG_IsOK(ecode1)) {
   52201           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "AlgorithmArgTypeIsList" "', argument " "1"" of type '" "GDALAlgorithmArgType""'");
   52202             :   } 
   52203           0 :   arg1 = static_cast< GDALAlgorithmArgType >(val1);
   52204           0 :   {
   52205           0 :     const int bLocalUseExceptions = GetUseExceptions();
   52206           0 :     if ( bLocalUseExceptions ) {
   52207           0 :       pushErrorHandler();
   52208             :     }
   52209           0 :     {
   52210           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52211           0 :       result = (bool)GDALAlgorithmArgTypeIsList(arg1);
   52212           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52213             :     }
   52214           0 :     if ( bLocalUseExceptions ) {
   52215           0 :       popErrorHandler();
   52216             :     }
   52217             : #ifndef SED_HACKS
   52218             :     if ( bLocalUseExceptions ) {
   52219             :       CPLErr eclass = CPLGetLastErrorType();
   52220             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52221             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52222             :       }
   52223             :     }
   52224             : #endif
   52225             :   }
   52226           0 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   52227           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; } }
   52228             :   return resultobj;
   52229             : fail:
   52230             :   return NULL;
   52231             : }
   52232             : 
   52233             : 
   52234           0 : SWIGINTERN PyObject *_wrap_AlgorithmArgTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52235           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52236           0 :   GDALAlgorithmArgType arg1 ;
   52237           0 :   int val1 ;
   52238           0 :   int ecode1 = 0 ;
   52239           0 :   PyObject *swig_obj[1] ;
   52240           0 :   char *result = 0 ;
   52241             :   
   52242           0 :   if (!args) SWIG_fail;
   52243           0 :   swig_obj[0] = args;
   52244           0 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   52245           0 :   if (!SWIG_IsOK(ecode1)) {
   52246           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "AlgorithmArgTypeName" "', argument " "1"" of type '" "GDALAlgorithmArgType""'");
   52247             :   } 
   52248           0 :   arg1 = static_cast< GDALAlgorithmArgType >(val1);
   52249           0 :   {
   52250           0 :     const int bLocalUseExceptions = GetUseExceptions();
   52251           0 :     if ( bLocalUseExceptions ) {
   52252           0 :       pushErrorHandler();
   52253             :     }
   52254           0 :     {
   52255           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52256           0 :       result = (char *)GDALAlgorithmArgTypeName(arg1);
   52257           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52258             :     }
   52259           0 :     if ( bLocalUseExceptions ) {
   52260           0 :       popErrorHandler();
   52261             :     }
   52262             : #ifndef SED_HACKS
   52263             :     if ( bLocalUseExceptions ) {
   52264             :       CPLErr eclass = CPLGetLastErrorType();
   52265             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52266             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52267             :       }
   52268             :     }
   52269             : #endif
   52270             :   }
   52271           0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   52272           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; } }
   52273             :   return resultobj;
   52274             : fail:
   52275             :   return NULL;
   52276             : }
   52277             : 
   52278             : 
   52279        7087 : SWIGINTERN PyObject *_wrap_delete_AlgorithmArg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52280        7087 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52281        7087 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52282        7087 :   void *argp1 = 0 ;
   52283        7087 :   int res1 = 0 ;
   52284        7087 :   PyObject *swig_obj[1] ;
   52285             :   
   52286        7087 :   if (!args) SWIG_fail;
   52287        7087 :   swig_obj[0] = args;
   52288        7087 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, SWIG_POINTER_DISOWN |  0 );
   52289        7087 :   if (!SWIG_IsOK(res1)) {
   52290           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AlgorithmArg" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52291             :   }
   52292        7087 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52293        7087 :   {
   52294        7087 :     const int bLocalUseExceptions = GetUseExceptions();
   52295        7087 :     if ( bLocalUseExceptions ) {
   52296        7084 :       pushErrorHandler();
   52297             :     }
   52298        7087 :     {
   52299        7087 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52300        7087 :       delete_GDALAlgorithmArgHS(arg1);
   52301        7087 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52302             :     }
   52303        7087 :     if ( bLocalUseExceptions ) {
   52304        7084 :       popErrorHandler();
   52305             :     }
   52306             : #ifndef SED_HACKS
   52307             :     if ( bLocalUseExceptions ) {
   52308             :       CPLErr eclass = CPLGetLastErrorType();
   52309             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52310             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52311             :       }
   52312             :     }
   52313             : #endif
   52314             :   }
   52315        7087 :   resultobj = SWIG_Py_Void();
   52316        7087 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   52317             :   return resultobj;
   52318             : fail:
   52319             :   return NULL;
   52320             : }
   52321             : 
   52322             : 
   52323         143 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52324         143 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52325         143 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52326         143 :   void *argp1 = 0 ;
   52327         143 :   int res1 = 0 ;
   52328         143 :   PyObject *swig_obj[1] ;
   52329         143 :   char *result = 0 ;
   52330             :   
   52331         143 :   if (!args) SWIG_fail;
   52332         143 :   swig_obj[0] = args;
   52333         143 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52334         143 :   if (!SWIG_IsOK(res1)) {
   52335           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetName" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52336             :   }
   52337         143 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52338         143 :   {
   52339         143 :     const int bLocalUseExceptions = GetUseExceptions();
   52340         143 :     if ( bLocalUseExceptions ) {
   52341         143 :       pushErrorHandler();
   52342             :     }
   52343         143 :     {
   52344         143 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52345         143 :       result = (char *)GDALAlgorithmArgHS_GetName(arg1);
   52346         143 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52347             :     }
   52348         143 :     if ( bLocalUseExceptions ) {
   52349         143 :       popErrorHandler();
   52350             :     }
   52351             : #ifndef SED_HACKS
   52352             :     if ( bLocalUseExceptions ) {
   52353             :       CPLErr eclass = CPLGetLastErrorType();
   52354             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52355             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52356             :       }
   52357             :     }
   52358             : #endif
   52359             :   }
   52360         143 :   resultobj = SWIG_FromCharPtr((const char *)result);
   52361         143 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   52362             :   return resultobj;
   52363             : fail:
   52364             :   return NULL;
   52365             : }
   52366             : 
   52367             : 
   52368        5173 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52369        5173 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52370        5173 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52371        5173 :   void *argp1 = 0 ;
   52372        5173 :   int res1 = 0 ;
   52373        5173 :   PyObject *swig_obj[1] ;
   52374        5173 :   GDALAlgorithmArgType result;
   52375             :   
   52376        5173 :   if (!args) SWIG_fail;
   52377        5173 :   swig_obj[0] = args;
   52378        5173 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52379        5173 :   if (!SWIG_IsOK(res1)) {
   52380           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetType" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52381             :   }
   52382        5173 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52383        5173 :   {
   52384        5173 :     const int bLocalUseExceptions = GetUseExceptions();
   52385        5173 :     if ( bLocalUseExceptions ) {
   52386        5170 :       pushErrorHandler();
   52387             :     }
   52388        5173 :     {
   52389        5173 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52390        5173 :       result = (GDALAlgorithmArgType)GDALAlgorithmArgHS_GetType(arg1);
   52391        5173 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52392             :     }
   52393        5173 :     if ( bLocalUseExceptions ) {
   52394        5170 :       popErrorHandler();
   52395             :     }
   52396             : #ifndef SED_HACKS
   52397             :     if ( bLocalUseExceptions ) {
   52398             :       CPLErr eclass = CPLGetLastErrorType();
   52399             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52400             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52401             :       }
   52402             :     }
   52403             : #endif
   52404             :   }
   52405        5173 :   resultobj = SWIG_From_int(static_cast< int >(result));
   52406        5173 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   52407             :   return resultobj;
   52408             : fail:
   52409             :   return NULL;
   52410             : }
   52411             : 
   52412             : 
   52413           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52414           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52415           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52416           1 :   void *argp1 = 0 ;
   52417           1 :   int res1 = 0 ;
   52418           1 :   PyObject *swig_obj[1] ;
   52419           1 :   char *result = 0 ;
   52420             :   
   52421           1 :   if (!args) SWIG_fail;
   52422           1 :   swig_obj[0] = args;
   52423           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52424           1 :   if (!SWIG_IsOK(res1)) {
   52425           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDescription" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52426             :   }
   52427           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52428           1 :   {
   52429           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52430           1 :     if ( bLocalUseExceptions ) {
   52431           1 :       pushErrorHandler();
   52432             :     }
   52433           1 :     {
   52434           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52435           1 :       result = (char *)GDALAlgorithmArgHS_GetDescription(arg1);
   52436           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52437             :     }
   52438           1 :     if ( bLocalUseExceptions ) {
   52439           1 :       popErrorHandler();
   52440             :     }
   52441             : #ifndef SED_HACKS
   52442             :     if ( bLocalUseExceptions ) {
   52443             :       CPLErr eclass = CPLGetLastErrorType();
   52444             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52445             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52446             :       }
   52447             :     }
   52448             : #endif
   52449             :   }
   52450           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   52451           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; } }
   52452             :   return resultobj;
   52453             : fail:
   52454             :   return NULL;
   52455             : }
   52456             : 
   52457             : 
   52458           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetShortName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52459           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52460           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52461           1 :   void *argp1 = 0 ;
   52462           1 :   int res1 = 0 ;
   52463           1 :   PyObject *swig_obj[1] ;
   52464           1 :   char *result = 0 ;
   52465             :   
   52466           1 :   if (!args) SWIG_fail;
   52467           1 :   swig_obj[0] = args;
   52468           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52469           1 :   if (!SWIG_IsOK(res1)) {
   52470           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetShortName" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52471             :   }
   52472           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52473           1 :   {
   52474           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52475           1 :     if ( bLocalUseExceptions ) {
   52476           1 :       pushErrorHandler();
   52477             :     }
   52478           1 :     {
   52479           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52480           1 :       result = (char *)GDALAlgorithmArgHS_GetShortName(arg1);
   52481           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52482             :     }
   52483           1 :     if ( bLocalUseExceptions ) {
   52484           1 :       popErrorHandler();
   52485             :     }
   52486             : #ifndef SED_HACKS
   52487             :     if ( bLocalUseExceptions ) {
   52488             :       CPLErr eclass = CPLGetLastErrorType();
   52489             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52490             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52491             :       }
   52492             :     }
   52493             : #endif
   52494             :   }
   52495           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   52496           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; } }
   52497             :   return resultobj;
   52498             : fail:
   52499             :   return NULL;
   52500             : }
   52501             : 
   52502             : 
   52503           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAliases(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52504           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52505           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52506           1 :   void *argp1 = 0 ;
   52507           1 :   int res1 = 0 ;
   52508           1 :   PyObject *swig_obj[1] ;
   52509           1 :   char **result = 0 ;
   52510             :   
   52511           1 :   if (!args) SWIG_fail;
   52512           1 :   swig_obj[0] = args;
   52513           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52514           1 :   if (!SWIG_IsOK(res1)) {
   52515           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAliases" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52516             :   }
   52517           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52518           1 :   {
   52519           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52520           1 :     if ( bLocalUseExceptions ) {
   52521           1 :       pushErrorHandler();
   52522             :     }
   52523           1 :     {
   52524           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52525           1 :       result = (char **)GDALAlgorithmArgHS_GetAliases(arg1);
   52526           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52527             :     }
   52528           1 :     if ( bLocalUseExceptions ) {
   52529           1 :       popErrorHandler();
   52530             :     }
   52531             : #ifndef SED_HACKS
   52532             :     if ( bLocalUseExceptions ) {
   52533             :       CPLErr eclass = CPLGetLastErrorType();
   52534             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52535             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52536             :       }
   52537             :     }
   52538             : #endif
   52539             :   }
   52540           1 :   {
   52541             :     /* %typemap(out) char **CSL -> ( string ) */
   52542           1 :     bool bErr = false;
   52543           1 :     resultobj = CSLToList(result, &bErr);
   52544           1 :     CSLDestroy(result);
   52545           1 :     if( bErr ) {
   52546           0 :       SWIG_fail;
   52547             :     }
   52548             :   }
   52549           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; } }
   52550             :   return resultobj;
   52551             : fail:
   52552             :   return NULL;
   52553             : }
   52554             : 
   52555             : 
   52556           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetMetaVar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52557           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52558           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52559           1 :   void *argp1 = 0 ;
   52560           1 :   int res1 = 0 ;
   52561           1 :   PyObject *swig_obj[1] ;
   52562           1 :   char *result = 0 ;
   52563             :   
   52564           1 :   if (!args) SWIG_fail;
   52565           1 :   swig_obj[0] = args;
   52566           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52567           1 :   if (!SWIG_IsOK(res1)) {
   52568           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetMetaVar" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52569             :   }
   52570           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52571           1 :   {
   52572           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52573           1 :     if ( bLocalUseExceptions ) {
   52574           1 :       pushErrorHandler();
   52575             :     }
   52576           1 :     {
   52577           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52578           1 :       result = (char *)GDALAlgorithmArgHS_GetMetaVar(arg1);
   52579           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52580             :     }
   52581           1 :     if ( bLocalUseExceptions ) {
   52582           1 :       popErrorHandler();
   52583             :     }
   52584             : #ifndef SED_HACKS
   52585             :     if ( bLocalUseExceptions ) {
   52586             :       CPLErr eclass = CPLGetLastErrorType();
   52587             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52588             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52589             :       }
   52590             :     }
   52591             : #endif
   52592             :   }
   52593           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   52594           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; } }
   52595             :   return resultobj;
   52596             : fail:
   52597             :   return NULL;
   52598             : }
   52599             : 
   52600             : 
   52601           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetCategory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52602           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52603           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52604           1 :   void *argp1 = 0 ;
   52605           1 :   int res1 = 0 ;
   52606           1 :   PyObject *swig_obj[1] ;
   52607           1 :   char *result = 0 ;
   52608             :   
   52609           1 :   if (!args) SWIG_fail;
   52610           1 :   swig_obj[0] = args;
   52611           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52612           1 :   if (!SWIG_IsOK(res1)) {
   52613           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetCategory" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52614             :   }
   52615           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52616           1 :   {
   52617           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52618           1 :     if ( bLocalUseExceptions ) {
   52619           1 :       pushErrorHandler();
   52620             :     }
   52621           1 :     {
   52622           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52623           1 :       result = (char *)GDALAlgorithmArgHS_GetCategory(arg1);
   52624           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52625             :     }
   52626           1 :     if ( bLocalUseExceptions ) {
   52627           1 :       popErrorHandler();
   52628             :     }
   52629             : #ifndef SED_HACKS
   52630             :     if ( bLocalUseExceptions ) {
   52631             :       CPLErr eclass = CPLGetLastErrorType();
   52632             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52633             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52634             :       }
   52635             :     }
   52636             : #endif
   52637             :   }
   52638           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   52639           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; } }
   52640             :   return resultobj;
   52641             : fail:
   52642             :   return NULL;
   52643             : }
   52644             : 
   52645             : 
   52646           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_IsPositional(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52647           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52648           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52649           1 :   void *argp1 = 0 ;
   52650           1 :   int res1 = 0 ;
   52651           1 :   PyObject *swig_obj[1] ;
   52652           1 :   bool result;
   52653             :   
   52654           1 :   if (!args) SWIG_fail;
   52655           1 :   swig_obj[0] = args;
   52656           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52657           1 :   if (!SWIG_IsOK(res1)) {
   52658           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsPositional" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52659             :   }
   52660           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52661           1 :   {
   52662           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52663           1 :     if ( bLocalUseExceptions ) {
   52664           1 :       pushErrorHandler();
   52665             :     }
   52666           1 :     {
   52667           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52668           1 :       result = (bool)GDALAlgorithmArgHS_IsPositional(arg1);
   52669           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52670             :     }
   52671           1 :     if ( bLocalUseExceptions ) {
   52672           1 :       popErrorHandler();
   52673             :     }
   52674             : #ifndef SED_HACKS
   52675             :     if ( bLocalUseExceptions ) {
   52676             :       CPLErr eclass = CPLGetLastErrorType();
   52677             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52678             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52679             :       }
   52680             :     }
   52681             : #endif
   52682             :   }
   52683           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   52684           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; } }
   52685             :   return resultobj;
   52686             : fail:
   52687             :   return NULL;
   52688             : }
   52689             : 
   52690             : 
   52691           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_IsRequired(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52692           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52693           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52694           1 :   void *argp1 = 0 ;
   52695           1 :   int res1 = 0 ;
   52696           1 :   PyObject *swig_obj[1] ;
   52697           1 :   bool result;
   52698             :   
   52699           1 :   if (!args) SWIG_fail;
   52700           1 :   swig_obj[0] = args;
   52701           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52702           1 :   if (!SWIG_IsOK(res1)) {
   52703           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsRequired" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52704             :   }
   52705           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52706           1 :   {
   52707           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52708           1 :     if ( bLocalUseExceptions ) {
   52709           1 :       pushErrorHandler();
   52710             :     }
   52711           1 :     {
   52712           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52713           1 :       result = (bool)GDALAlgorithmArgHS_IsRequired(arg1);
   52714           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52715             :     }
   52716           1 :     if ( bLocalUseExceptions ) {
   52717           1 :       popErrorHandler();
   52718             :     }
   52719             : #ifndef SED_HACKS
   52720             :     if ( bLocalUseExceptions ) {
   52721             :       CPLErr eclass = CPLGetLastErrorType();
   52722             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52723             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52724             :       }
   52725             :     }
   52726             : #endif
   52727             :   }
   52728           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   52729           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; } }
   52730             :   return resultobj;
   52731             : fail:
   52732             :   return NULL;
   52733             : }
   52734             : 
   52735             : 
   52736           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetMinCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52737           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52738           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52739           1 :   void *argp1 = 0 ;
   52740           1 :   int res1 = 0 ;
   52741           1 :   PyObject *swig_obj[1] ;
   52742           1 :   int result;
   52743             :   
   52744           1 :   if (!args) SWIG_fail;
   52745           1 :   swig_obj[0] = args;
   52746           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52747           1 :   if (!SWIG_IsOK(res1)) {
   52748           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetMinCount" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52749             :   }
   52750           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52751           1 :   {
   52752           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52753           1 :     if ( bLocalUseExceptions ) {
   52754           1 :       pushErrorHandler();
   52755             :     }
   52756           1 :     {
   52757           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52758           1 :       result = (int)GDALAlgorithmArgHS_GetMinCount(arg1);
   52759           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52760             :     }
   52761           1 :     if ( bLocalUseExceptions ) {
   52762           1 :       popErrorHandler();
   52763             :     }
   52764             : #ifndef SED_HACKS
   52765             :     if ( bLocalUseExceptions ) {
   52766             :       CPLErr eclass = CPLGetLastErrorType();
   52767             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52768             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52769             :       }
   52770             :     }
   52771             : #endif
   52772             :   }
   52773           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   52774           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; } }
   52775             :   return resultobj;
   52776             : fail:
   52777             :   return NULL;
   52778             : }
   52779             : 
   52780             : 
   52781           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetMaxCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52782           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52783           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52784           1 :   void *argp1 = 0 ;
   52785           1 :   int res1 = 0 ;
   52786           1 :   PyObject *swig_obj[1] ;
   52787           1 :   int result;
   52788             :   
   52789           1 :   if (!args) SWIG_fail;
   52790           1 :   swig_obj[0] = args;
   52791           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52792           1 :   if (!SWIG_IsOK(res1)) {
   52793           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetMaxCount" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52794             :   }
   52795           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52796           1 :   {
   52797           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52798           1 :     if ( bLocalUseExceptions ) {
   52799           1 :       pushErrorHandler();
   52800             :     }
   52801           1 :     {
   52802           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52803           1 :       result = (int)GDALAlgorithmArgHS_GetMaxCount(arg1);
   52804           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52805             :     }
   52806           1 :     if ( bLocalUseExceptions ) {
   52807           1 :       popErrorHandler();
   52808             :     }
   52809             : #ifndef SED_HACKS
   52810             :     if ( bLocalUseExceptions ) {
   52811             :       CPLErr eclass = CPLGetLastErrorType();
   52812             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52813             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52814             :       }
   52815             :     }
   52816             : #endif
   52817             :   }
   52818           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   52819           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; } }
   52820             :   return resultobj;
   52821             : fail:
   52822             :   return NULL;
   52823             : }
   52824             : 
   52825             : 
   52826           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetPackedValuesAllowed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52827           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52828           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52829           1 :   void *argp1 = 0 ;
   52830           1 :   int res1 = 0 ;
   52831           1 :   PyObject *swig_obj[1] ;
   52832           1 :   bool result;
   52833             :   
   52834           1 :   if (!args) SWIG_fail;
   52835           1 :   swig_obj[0] = args;
   52836           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52837           1 :   if (!SWIG_IsOK(res1)) {
   52838           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetPackedValuesAllowed" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52839             :   }
   52840           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52841           1 :   {
   52842           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52843           1 :     if ( bLocalUseExceptions ) {
   52844           1 :       pushErrorHandler();
   52845             :     }
   52846           1 :     {
   52847           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52848           1 :       result = (bool)GDALAlgorithmArgHS_GetPackedValuesAllowed(arg1);
   52849           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52850             :     }
   52851           1 :     if ( bLocalUseExceptions ) {
   52852           1 :       popErrorHandler();
   52853             :     }
   52854             : #ifndef SED_HACKS
   52855             :     if ( bLocalUseExceptions ) {
   52856             :       CPLErr eclass = CPLGetLastErrorType();
   52857             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52858             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52859             :       }
   52860             :     }
   52861             : #endif
   52862             :   }
   52863           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   52864           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; } }
   52865             :   return resultobj;
   52866             : fail:
   52867             :   return NULL;
   52868             : }
   52869             : 
   52870             : 
   52871           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetRepeatedArgAllowed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52872           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52873           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52874           1 :   void *argp1 = 0 ;
   52875           1 :   int res1 = 0 ;
   52876           1 :   PyObject *swig_obj[1] ;
   52877           1 :   bool result;
   52878             :   
   52879           1 :   if (!args) SWIG_fail;
   52880           1 :   swig_obj[0] = args;
   52881           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52882           1 :   if (!SWIG_IsOK(res1)) {
   52883           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetRepeatedArgAllowed" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52884             :   }
   52885           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52886           1 :   {
   52887           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52888           1 :     if ( bLocalUseExceptions ) {
   52889           1 :       pushErrorHandler();
   52890             :     }
   52891           1 :     {
   52892           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52893           1 :       result = (bool)GDALAlgorithmArgHS_GetRepeatedArgAllowed(arg1);
   52894           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52895             :     }
   52896           1 :     if ( bLocalUseExceptions ) {
   52897           1 :       popErrorHandler();
   52898             :     }
   52899             : #ifndef SED_HACKS
   52900             :     if ( bLocalUseExceptions ) {
   52901             :       CPLErr eclass = CPLGetLastErrorType();
   52902             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52903             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52904             :       }
   52905             :     }
   52906             : #endif
   52907             :   }
   52908           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   52909           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; } }
   52910             :   return resultobj;
   52911             : fail:
   52912             :   return NULL;
   52913             : }
   52914             : 
   52915             : 
   52916           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetChoices(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52917           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52918           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52919           1 :   void *argp1 = 0 ;
   52920           1 :   int res1 = 0 ;
   52921           1 :   PyObject *swig_obj[1] ;
   52922           1 :   char **result = 0 ;
   52923             :   
   52924           1 :   if (!args) SWIG_fail;
   52925           1 :   swig_obj[0] = args;
   52926           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52927           1 :   if (!SWIG_IsOK(res1)) {
   52928           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetChoices" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52929             :   }
   52930           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52931           1 :   {
   52932           1 :     const int bLocalUseExceptions = GetUseExceptions();
   52933           1 :     if ( bLocalUseExceptions ) {
   52934           1 :       pushErrorHandler();
   52935             :     }
   52936           1 :     {
   52937           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52938           1 :       result = (char **)GDALAlgorithmArgHS_GetChoices(arg1);
   52939           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   52940             :     }
   52941           1 :     if ( bLocalUseExceptions ) {
   52942           1 :       popErrorHandler();
   52943             :     }
   52944             : #ifndef SED_HACKS
   52945             :     if ( bLocalUseExceptions ) {
   52946             :       CPLErr eclass = CPLGetLastErrorType();
   52947             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   52948             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   52949             :       }
   52950             :     }
   52951             : #endif
   52952             :   }
   52953           1 :   {
   52954             :     /* %typemap(out) char **CSL -> ( string ) */
   52955           1 :     bool bErr = false;
   52956           1 :     resultobj = CSLToList(result, &bErr);
   52957           1 :     CSLDestroy(result);
   52958           1 :     if( bErr ) {
   52959           0 :       SWIG_fail;
   52960             :     }
   52961             :   }
   52962           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; } }
   52963             :   return resultobj;
   52964             : fail:
   52965             :   return NULL;
   52966             : }
   52967             : 
   52968             : 
   52969          25 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetMetadataItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   52970          25 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   52971          25 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   52972          25 :   char *arg2 = (char *) 0 ;
   52973          25 :   void *argp1 = 0 ;
   52974          25 :   int res1 = 0 ;
   52975          25 :   int res2 ;
   52976          25 :   char *buf2 = 0 ;
   52977          25 :   int alloc2 = 0 ;
   52978          25 :   PyObject *swig_obj[2] ;
   52979          25 :   char **result = 0 ;
   52980             :   
   52981          25 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_GetMetadataItem", 2, 2, swig_obj)) SWIG_fail;
   52982          25 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   52983          25 :   if (!SWIG_IsOK(res1)) {
   52984           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetMetadataItem" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   52985             :   }
   52986          25 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   52987          25 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   52988          25 :   if (!SWIG_IsOK(res2)) {
   52989           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AlgorithmArg_GetMetadataItem" "', argument " "2"" of type '" "char const *""'");
   52990             :   }
   52991          25 :   arg2 = reinterpret_cast< char * >(buf2);
   52992          25 :   {
   52993          25 :     const int bLocalUseExceptions = GetUseExceptions();
   52994          25 :     if ( bLocalUseExceptions ) {
   52995          25 :       pushErrorHandler();
   52996             :     }
   52997          25 :     {
   52998          25 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   52999          25 :       result = (char **)GDALAlgorithmArgHS_GetMetadataItem(arg1,(char const *)arg2);
   53000          25 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53001             :     }
   53002          25 :     if ( bLocalUseExceptions ) {
   53003          25 :       popErrorHandler();
   53004             :     }
   53005             : #ifndef SED_HACKS
   53006             :     if ( bLocalUseExceptions ) {
   53007             :       CPLErr eclass = CPLGetLastErrorType();
   53008             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53009             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53010             :       }
   53011             :     }
   53012             : #endif
   53013             :   }
   53014          25 :   {
   53015             :     /* %typemap(out) char **CSL -> ( string ) */
   53016          25 :     bool bErr = false;
   53017          25 :     resultobj = CSLToList(result, &bErr);
   53018          25 :     CSLDestroy(result);
   53019          25 :     if( bErr ) {
   53020           0 :       SWIG_fail;
   53021             :     }
   53022             :   }
   53023          25 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   53024          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; } }
   53025             :   return resultobj;
   53026           0 : fail:
   53027           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   53028             :   return NULL;
   53029             : }
   53030             : 
   53031             : 
   53032         125 : SWIGINTERN PyObject *_wrap_AlgorithmArg_IsExplicitlySet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53033         125 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53034         125 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53035         125 :   void *argp1 = 0 ;
   53036         125 :   int res1 = 0 ;
   53037         125 :   PyObject *swig_obj[1] ;
   53038         125 :   bool result;
   53039             :   
   53040         125 :   if (!args) SWIG_fail;
   53041         125 :   swig_obj[0] = args;
   53042         125 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53043         125 :   if (!SWIG_IsOK(res1)) {
   53044           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsExplicitlySet" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53045             :   }
   53046         125 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53047         125 :   {
   53048         125 :     const int bLocalUseExceptions = GetUseExceptions();
   53049         125 :     if ( bLocalUseExceptions ) {
   53050         125 :       pushErrorHandler();
   53051             :     }
   53052         125 :     {
   53053         125 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53054         125 :       result = (bool)GDALAlgorithmArgHS_IsExplicitlySet(arg1);
   53055         125 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53056             :     }
   53057         125 :     if ( bLocalUseExceptions ) {
   53058         125 :       popErrorHandler();
   53059             :     }
   53060             : #ifndef SED_HACKS
   53061             :     if ( bLocalUseExceptions ) {
   53062             :       CPLErr eclass = CPLGetLastErrorType();
   53063             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53064             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53065             :       }
   53066             :     }
   53067             : #endif
   53068             :   }
   53069         125 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53070         125 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   53071             :   return resultobj;
   53072             : fail:
   53073             :   return NULL;
   53074             : }
   53075             : 
   53076             : 
   53077           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_HasDefaultValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53078           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53079           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53080           1 :   void *argp1 = 0 ;
   53081           1 :   int res1 = 0 ;
   53082           1 :   PyObject *swig_obj[1] ;
   53083           1 :   bool result;
   53084             :   
   53085           1 :   if (!args) SWIG_fail;
   53086           1 :   swig_obj[0] = args;
   53087           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53088           1 :   if (!SWIG_IsOK(res1)) {
   53089           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_HasDefaultValue" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53090             :   }
   53091           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53092           1 :   {
   53093           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53094           1 :     if ( bLocalUseExceptions ) {
   53095           1 :       pushErrorHandler();
   53096             :     }
   53097           1 :     {
   53098           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53099           1 :       result = (bool)GDALAlgorithmArgHS_HasDefaultValue(arg1);
   53100           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53101             :     }
   53102           1 :     if ( bLocalUseExceptions ) {
   53103           1 :       popErrorHandler();
   53104             :     }
   53105             : #ifndef SED_HACKS
   53106             :     if ( bLocalUseExceptions ) {
   53107             :       CPLErr eclass = CPLGetLastErrorType();
   53108             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53109             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53110             :       }
   53111             :     }
   53112             : #endif
   53113             :   }
   53114           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53115           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; } }
   53116             :   return resultobj;
   53117             : fail:
   53118             :   return NULL;
   53119             : }
   53120             : 
   53121             : 
   53122           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_IsHiddenForCLI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53123           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53124           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53125           1 :   void *argp1 = 0 ;
   53126           1 :   int res1 = 0 ;
   53127           1 :   PyObject *swig_obj[1] ;
   53128           1 :   bool result;
   53129             :   
   53130           1 :   if (!args) SWIG_fail;
   53131           1 :   swig_obj[0] = args;
   53132           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53133           1 :   if (!SWIG_IsOK(res1)) {
   53134           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsHiddenForCLI" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53135             :   }
   53136           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53137           1 :   {
   53138           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53139           1 :     if ( bLocalUseExceptions ) {
   53140           1 :       pushErrorHandler();
   53141             :     }
   53142           1 :     {
   53143           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53144           1 :       result = (bool)GDALAlgorithmArgHS_IsHiddenForCLI(arg1);
   53145           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53146             :     }
   53147           1 :     if ( bLocalUseExceptions ) {
   53148           1 :       popErrorHandler();
   53149             :     }
   53150             : #ifndef SED_HACKS
   53151             :     if ( bLocalUseExceptions ) {
   53152             :       CPLErr eclass = CPLGetLastErrorType();
   53153             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53154             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53155             :       }
   53156             :     }
   53157             : #endif
   53158             :   }
   53159           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53160           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; } }
   53161             :   return resultobj;
   53162             : fail:
   53163             :   return NULL;
   53164             : }
   53165             : 
   53166             : 
   53167           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_IsOnlyForCLI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53168           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53169           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53170           1 :   void *argp1 = 0 ;
   53171           1 :   int res1 = 0 ;
   53172           1 :   PyObject *swig_obj[1] ;
   53173           1 :   bool result;
   53174             :   
   53175           1 :   if (!args) SWIG_fail;
   53176           1 :   swig_obj[0] = args;
   53177           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53178           1 :   if (!SWIG_IsOK(res1)) {
   53179           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsOnlyForCLI" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53180             :   }
   53181           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53182           1 :   {
   53183           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53184           1 :     if ( bLocalUseExceptions ) {
   53185           1 :       pushErrorHandler();
   53186             :     }
   53187           1 :     {
   53188           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53189           1 :       result = (bool)GDALAlgorithmArgHS_IsOnlyForCLI(arg1);
   53190           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53191             :     }
   53192           1 :     if ( bLocalUseExceptions ) {
   53193           1 :       popErrorHandler();
   53194             :     }
   53195             : #ifndef SED_HACKS
   53196             :     if ( bLocalUseExceptions ) {
   53197             :       CPLErr eclass = CPLGetLastErrorType();
   53198             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53199             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53200             :       }
   53201             :     }
   53202             : #endif
   53203             :   }
   53204           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53205           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; } }
   53206             :   return resultobj;
   53207             : fail:
   53208             :   return NULL;
   53209             : }
   53210             : 
   53211             : 
   53212           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_IsInput(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53213           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53214           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53215           1 :   void *argp1 = 0 ;
   53216           1 :   int res1 = 0 ;
   53217           1 :   PyObject *swig_obj[1] ;
   53218           1 :   bool result;
   53219             :   
   53220           1 :   if (!args) SWIG_fail;
   53221           1 :   swig_obj[0] = args;
   53222           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53223           1 :   if (!SWIG_IsOK(res1)) {
   53224           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsInput" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53225             :   }
   53226           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53227           1 :   {
   53228           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53229           1 :     if ( bLocalUseExceptions ) {
   53230           1 :       pushErrorHandler();
   53231             :     }
   53232           1 :     {
   53233           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53234           1 :       result = (bool)GDALAlgorithmArgHS_IsInput(arg1);
   53235           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53236             :     }
   53237           1 :     if ( bLocalUseExceptions ) {
   53238           1 :       popErrorHandler();
   53239             :     }
   53240             : #ifndef SED_HACKS
   53241             :     if ( bLocalUseExceptions ) {
   53242             :       CPLErr eclass = CPLGetLastErrorType();
   53243             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53244             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53245             :       }
   53246             :     }
   53247             : #endif
   53248             :   }
   53249           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53250           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; } }
   53251             :   return resultobj;
   53252             : fail:
   53253             :   return NULL;
   53254             : }
   53255             : 
   53256             : 
   53257        2234 : SWIGINTERN PyObject *_wrap_AlgorithmArg_IsOutput(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53258        2234 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53259        2234 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53260        2234 :   void *argp1 = 0 ;
   53261        2234 :   int res1 = 0 ;
   53262        2234 :   PyObject *swig_obj[1] ;
   53263        2234 :   bool result;
   53264             :   
   53265        2234 :   if (!args) SWIG_fail;
   53266        2234 :   swig_obj[0] = args;
   53267        2234 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53268        2234 :   if (!SWIG_IsOK(res1)) {
   53269           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_IsOutput" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53270             :   }
   53271        2234 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53272        2234 :   {
   53273        2234 :     const int bLocalUseExceptions = GetUseExceptions();
   53274        2234 :     if ( bLocalUseExceptions ) {
   53275        2234 :       pushErrorHandler();
   53276             :     }
   53277        2234 :     {
   53278        2234 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53279        2234 :       result = (bool)GDALAlgorithmArgHS_IsOutput(arg1);
   53280        2234 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53281             :     }
   53282        2234 :     if ( bLocalUseExceptions ) {
   53283        2234 :       popErrorHandler();
   53284             :     }
   53285             : #ifndef SED_HACKS
   53286             :     if ( bLocalUseExceptions ) {
   53287             :       CPLErr eclass = CPLGetLastErrorType();
   53288             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53289             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53290             :       }
   53291             :     }
   53292             : #endif
   53293             :   }
   53294        2234 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53295        2234 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   53296             :   return resultobj;
   53297             : fail:
   53298             :   return NULL;
   53299             : }
   53300             : 
   53301             : 
   53302           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDatasetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53303           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53304           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53305           1 :   void *argp1 = 0 ;
   53306           1 :   int res1 = 0 ;
   53307           1 :   PyObject *swig_obj[1] ;
   53308           1 :   int result;
   53309             :   
   53310           1 :   if (!args) SWIG_fail;
   53311           1 :   swig_obj[0] = args;
   53312           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53313           1 :   if (!SWIG_IsOK(res1)) {
   53314           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDatasetType" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53315             :   }
   53316           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53317           1 :   {
   53318           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53319           1 :     if ( bLocalUseExceptions ) {
   53320           1 :       pushErrorHandler();
   53321             :     }
   53322           1 :     {
   53323           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53324           1 :       result = (int)GDALAlgorithmArgHS_GetDatasetType(arg1);
   53325           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53326             :     }
   53327           1 :     if ( bLocalUseExceptions ) {
   53328           1 :       popErrorHandler();
   53329             :     }
   53330             : #ifndef SED_HACKS
   53331             :     if ( bLocalUseExceptions ) {
   53332             :       CPLErr eclass = CPLGetLastErrorType();
   53333             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53334             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53335             :       }
   53336             :     }
   53337             : #endif
   53338             :   }
   53339           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   53340           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; } }
   53341             :   return resultobj;
   53342             : fail:
   53343             :   return NULL;
   53344             : }
   53345             : 
   53346             : 
   53347           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDatasetInputFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53348           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53349           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53350           1 :   void *argp1 = 0 ;
   53351           1 :   int res1 = 0 ;
   53352           1 :   PyObject *swig_obj[1] ;
   53353           1 :   int result;
   53354             :   
   53355           1 :   if (!args) SWIG_fail;
   53356           1 :   swig_obj[0] = args;
   53357           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53358           1 :   if (!SWIG_IsOK(res1)) {
   53359           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDatasetInputFlags" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53360             :   }
   53361           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53362           1 :   {
   53363           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53364           1 :     if ( bLocalUseExceptions ) {
   53365           1 :       pushErrorHandler();
   53366             :     }
   53367           1 :     {
   53368           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53369           1 :       result = (int)GDALAlgorithmArgHS_GetDatasetInputFlags(arg1);
   53370           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53371             :     }
   53372           1 :     if ( bLocalUseExceptions ) {
   53373           1 :       popErrorHandler();
   53374             :     }
   53375             : #ifndef SED_HACKS
   53376             :     if ( bLocalUseExceptions ) {
   53377             :       CPLErr eclass = CPLGetLastErrorType();
   53378             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53379             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53380             :       }
   53381             :     }
   53382             : #endif
   53383             :   }
   53384           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   53385           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; } }
   53386             :   return resultobj;
   53387             : fail:
   53388             :   return NULL;
   53389             : }
   53390             : 
   53391             : 
   53392           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetDatasetOutputFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53393           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53394           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53395           1 :   void *argp1 = 0 ;
   53396           1 :   int res1 = 0 ;
   53397           1 :   PyObject *swig_obj[1] ;
   53398           1 :   int result;
   53399             :   
   53400           1 :   if (!args) SWIG_fail;
   53401           1 :   swig_obj[0] = args;
   53402           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53403           1 :   if (!SWIG_IsOK(res1)) {
   53404           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetDatasetOutputFlags" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53405             :   }
   53406           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53407           1 :   {
   53408           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53409           1 :     if ( bLocalUseExceptions ) {
   53410           1 :       pushErrorHandler();
   53411             :     }
   53412           1 :     {
   53413           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53414           1 :       result = (int)GDALAlgorithmArgHS_GetDatasetOutputFlags(arg1);
   53415           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53416             :     }
   53417           1 :     if ( bLocalUseExceptions ) {
   53418           1 :       popErrorHandler();
   53419             :     }
   53420             : #ifndef SED_HACKS
   53421             :     if ( bLocalUseExceptions ) {
   53422             :       CPLErr eclass = CPLGetLastErrorType();
   53423             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53424             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53425             :       }
   53426             :     }
   53427             : #endif
   53428             :   }
   53429           1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   53430           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; } }
   53431             :   return resultobj;
   53432             : fail:
   53433             :   return NULL;
   53434             : }
   53435             : 
   53436             : 
   53437           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetMutualExclusionGroup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53438           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53439           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53440           1 :   void *argp1 = 0 ;
   53441           1 :   int res1 = 0 ;
   53442           1 :   PyObject *swig_obj[1] ;
   53443           1 :   char *result = 0 ;
   53444             :   
   53445           1 :   if (!args) SWIG_fail;
   53446           1 :   swig_obj[0] = args;
   53447           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53448           1 :   if (!SWIG_IsOK(res1)) {
   53449           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetMutualExclusionGroup" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53450             :   }
   53451           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53452           1 :   {
   53453           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53454           1 :     if ( bLocalUseExceptions ) {
   53455           1 :       pushErrorHandler();
   53456             :     }
   53457           1 :     {
   53458           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53459           1 :       result = (char *)GDALAlgorithmArgHS_GetMutualExclusionGroup(arg1);
   53460           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53461             :     }
   53462           1 :     if ( bLocalUseExceptions ) {
   53463           1 :       popErrorHandler();
   53464             :     }
   53465             : #ifndef SED_HACKS
   53466             :     if ( bLocalUseExceptions ) {
   53467             :       CPLErr eclass = CPLGetLastErrorType();
   53468             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53469             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53470             :       }
   53471             :     }
   53472             : #endif
   53473             :   }
   53474           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   53475           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; } }
   53476             :   return resultobj;
   53477             : fail:
   53478             :   return NULL;
   53479             : }
   53480             : 
   53481             : 
   53482           7 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsBoolean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53483           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53484           7 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53485           7 :   void *argp1 = 0 ;
   53486           7 :   int res1 = 0 ;
   53487           7 :   PyObject *swig_obj[1] ;
   53488           7 :   bool result;
   53489             :   
   53490           7 :   if (!args) SWIG_fail;
   53491           7 :   swig_obj[0] = args;
   53492           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53493           7 :   if (!SWIG_IsOK(res1)) {
   53494           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsBoolean" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53495             :   }
   53496           7 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53497           7 :   {
   53498           7 :     const int bLocalUseExceptions = GetUseExceptions();
   53499           7 :     if ( bLocalUseExceptions ) {
   53500           7 :       pushErrorHandler();
   53501             :     }
   53502           7 :     {
   53503           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53504           7 :       result = (bool)GDALAlgorithmArgHS_GetAsBoolean(arg1);
   53505           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53506             :     }
   53507           7 :     if ( bLocalUseExceptions ) {
   53508           7 :       popErrorHandler();
   53509             :     }
   53510             : #ifndef SED_HACKS
   53511             :     if ( bLocalUseExceptions ) {
   53512             :       CPLErr eclass = CPLGetLastErrorType();
   53513             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53514             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53515             :       }
   53516             :     }
   53517             : #endif
   53518             :   }
   53519           7 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53520           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; } }
   53521             :   return resultobj;
   53522             : fail:
   53523             :   return NULL;
   53524             : }
   53525             : 
   53526             : 
   53527         110 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53528         110 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53529         110 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53530         110 :   void *argp1 = 0 ;
   53531         110 :   int res1 = 0 ;
   53532         110 :   PyObject *swig_obj[1] ;
   53533         110 :   char *result = 0 ;
   53534             :   
   53535         110 :   if (!args) SWIG_fail;
   53536         110 :   swig_obj[0] = args;
   53537         110 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53538         110 :   if (!SWIG_IsOK(res1)) {
   53539           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsString" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53540             :   }
   53541         110 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53542         110 :   {
   53543         110 :     const int bLocalUseExceptions = GetUseExceptions();
   53544         110 :     if ( bLocalUseExceptions ) {
   53545         110 :       pushErrorHandler();
   53546             :     }
   53547         110 :     {
   53548         110 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53549         110 :       result = (char *)GDALAlgorithmArgHS_GetAsString(arg1);
   53550         110 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53551             :     }
   53552         110 :     if ( bLocalUseExceptions ) {
   53553         110 :       popErrorHandler();
   53554             :     }
   53555             : #ifndef SED_HACKS
   53556             :     if ( bLocalUseExceptions ) {
   53557             :       CPLErr eclass = CPLGetLastErrorType();
   53558             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53559             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53560             :       }
   53561             :     }
   53562             : #endif
   53563             :   }
   53564         110 :   resultobj = SWIG_FromCharPtr((const char *)result);
   53565         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; } }
   53566             :   return resultobj;
   53567             : fail:
   53568             :   return NULL;
   53569             : }
   53570             : 
   53571             : 
   53572           7 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsInteger(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53573           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53574           7 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53575           7 :   void *argp1 = 0 ;
   53576           7 :   int res1 = 0 ;
   53577           7 :   PyObject *swig_obj[1] ;
   53578           7 :   int result;
   53579             :   
   53580           7 :   if (!args) SWIG_fail;
   53581           7 :   swig_obj[0] = args;
   53582           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53583           7 :   if (!SWIG_IsOK(res1)) {
   53584           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsInteger" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53585             :   }
   53586           7 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53587           7 :   {
   53588           7 :     const int bLocalUseExceptions = GetUseExceptions();
   53589           7 :     if ( bLocalUseExceptions ) {
   53590           7 :       pushErrorHandler();
   53591             :     }
   53592           7 :     {
   53593           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53594           7 :       result = (int)GDALAlgorithmArgHS_GetAsInteger(arg1);
   53595           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53596             :     }
   53597           7 :     if ( bLocalUseExceptions ) {
   53598           7 :       popErrorHandler();
   53599             :     }
   53600             : #ifndef SED_HACKS
   53601             :     if ( bLocalUseExceptions ) {
   53602             :       CPLErr eclass = CPLGetLastErrorType();
   53603             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53604             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53605             :       }
   53606             :     }
   53607             : #endif
   53608             :   }
   53609           7 :   resultobj = SWIG_From_int(static_cast< int >(result));
   53610           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; } }
   53611             :   return resultobj;
   53612             : fail:
   53613             :   return NULL;
   53614             : }
   53615             : 
   53616             : 
   53617           7 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53618           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53619           7 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53620           7 :   void *argp1 = 0 ;
   53621           7 :   int res1 = 0 ;
   53622           7 :   PyObject *swig_obj[1] ;
   53623           7 :   double result;
   53624             :   
   53625           7 :   if (!args) SWIG_fail;
   53626           7 :   swig_obj[0] = args;
   53627           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53628           7 :   if (!SWIG_IsOK(res1)) {
   53629           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsDouble" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53630             :   }
   53631           7 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53632           7 :   {
   53633           7 :     const int bLocalUseExceptions = GetUseExceptions();
   53634           7 :     if ( bLocalUseExceptions ) {
   53635           7 :       pushErrorHandler();
   53636             :     }
   53637           7 :     {
   53638           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53639           7 :       result = (double)GDALAlgorithmArgHS_GetAsDouble(arg1);
   53640           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53641             :     }
   53642           7 :     if ( bLocalUseExceptions ) {
   53643           7 :       popErrorHandler();
   53644             :     }
   53645             : #ifndef SED_HACKS
   53646             :     if ( bLocalUseExceptions ) {
   53647             :       CPLErr eclass = CPLGetLastErrorType();
   53648             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53649             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53650             :       }
   53651             :     }
   53652             : #endif
   53653             :   }
   53654           7 :   resultobj = SWIG_From_double(static_cast< double >(result));
   53655           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; } }
   53656             :   return resultobj;
   53657             : fail:
   53658             :   return NULL;
   53659             : }
   53660             : 
   53661             : 
   53662        1549 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsDatasetValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53663        1549 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53664        1549 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53665        1549 :   void *argp1 = 0 ;
   53666        1549 :   int res1 = 0 ;
   53667        1549 :   PyObject *swig_obj[1] ;
   53668        1549 :   GDALArgDatasetValueHS *result = 0 ;
   53669             :   
   53670        1549 :   if (!args) SWIG_fail;
   53671        1549 :   swig_obj[0] = args;
   53672        1549 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53673        1549 :   if (!SWIG_IsOK(res1)) {
   53674           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsDatasetValue" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53675             :   }
   53676        1549 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53677        1549 :   {
   53678        1549 :     const int bLocalUseExceptions = GetUseExceptions();
   53679        1549 :     if ( bLocalUseExceptions ) {
   53680        1547 :       pushErrorHandler();
   53681             :     }
   53682        1549 :     {
   53683        1549 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53684        1549 :       result = (GDALArgDatasetValueHS *)GDALAlgorithmArgHS_GetAsDatasetValue(arg1);
   53685        1549 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53686             :     }
   53687        1549 :     if ( bLocalUseExceptions ) {
   53688        1547 :       popErrorHandler();
   53689             :     }
   53690             : #ifndef SED_HACKS
   53691             :     if ( bLocalUseExceptions ) {
   53692             :       CPLErr eclass = CPLGetLastErrorType();
   53693             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53694             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53695             :       }
   53696             :     }
   53697             : #endif
   53698             :   }
   53699        1549 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALArgDatasetValueHS, SWIG_POINTER_OWN |  0 );
   53700        1551 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   53701             :   return resultobj;
   53702             : fail:
   53703             :   return NULL;
   53704             : }
   53705             : 
   53706             : 
   53707           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsStringList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53708           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53709           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53710           1 :   void *argp1 = 0 ;
   53711           1 :   int res1 = 0 ;
   53712           1 :   PyObject *swig_obj[1] ;
   53713           1 :   char **result = 0 ;
   53714             :   
   53715           1 :   if (!args) SWIG_fail;
   53716           1 :   swig_obj[0] = args;
   53717           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53718           1 :   if (!SWIG_IsOK(res1)) {
   53719           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsStringList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53720             :   }
   53721           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53722           1 :   {
   53723           1 :     const int bLocalUseExceptions = GetUseExceptions();
   53724           1 :     if ( bLocalUseExceptions ) {
   53725           1 :       pushErrorHandler();
   53726             :     }
   53727           1 :     {
   53728           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53729           1 :       result = (char **)GDALAlgorithmArgHS_GetAsStringList(arg1);
   53730           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53731             :     }
   53732           1 :     if ( bLocalUseExceptions ) {
   53733           1 :       popErrorHandler();
   53734             :     }
   53735             : #ifndef SED_HACKS
   53736             :     if ( bLocalUseExceptions ) {
   53737             :       CPLErr eclass = CPLGetLastErrorType();
   53738             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53739             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53740             :       }
   53741             :     }
   53742             : #endif
   53743             :   }
   53744           1 :   {
   53745             :     /* %typemap(out) char **CSL -> ( string ) */
   53746           1 :     bool bErr = false;
   53747           1 :     resultobj = CSLToList(result, &bErr);
   53748           1 :     CSLDestroy(result);
   53749           1 :     if( bErr ) {
   53750           0 :       SWIG_fail;
   53751             :     }
   53752             :   }
   53753           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; } }
   53754             :   return resultobj;
   53755             : fail:
   53756             :   return NULL;
   53757             : }
   53758             : 
   53759             : 
   53760           7 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsIntegerList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53761           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53762           7 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53763           7 :   int *arg2 = (int *) 0 ;
   53764           7 :   int **arg3 = (int **) 0 ;
   53765           7 :   void *argp1 = 0 ;
   53766           7 :   int res1 = 0 ;
   53767           7 :   int nLen2 = 0 ;
   53768           7 :   int *pList2 = NULL ;
   53769           7 :   PyObject *swig_obj[1] ;
   53770             :   
   53771           7 :   {
   53772             :     /* %typemap(in,numinputs=0) (int *nLen2, const int **pList2) (int nLen2, int *pList2) */
   53773           7 :     arg2 = &nLen2;
   53774           7 :     arg3 = &pList2;
   53775             :   }
   53776           7 :   if (!args) SWIG_fail;
   53777           7 :   swig_obj[0] = args;
   53778           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53779           7 :   if (!SWIG_IsOK(res1)) {
   53780           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsIntegerList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53781             :   }
   53782           7 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53783           7 :   {
   53784           7 :     const int bLocalUseExceptions = GetUseExceptions();
   53785           7 :     if ( bLocalUseExceptions ) {
   53786           7 :       pushErrorHandler();
   53787             :     }
   53788           7 :     {
   53789           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53790           7 :       GDALAlgorithmArgHS_GetAsIntegerList(arg1,arg2,(int const **)arg3);
   53791           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53792             :     }
   53793           7 :     if ( bLocalUseExceptions ) {
   53794           7 :       popErrorHandler();
   53795             :     }
   53796             : #ifndef SED_HACKS
   53797             :     if ( bLocalUseExceptions ) {
   53798             :       CPLErr eclass = CPLGetLastErrorType();
   53799             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53800             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53801             :       }
   53802             :     }
   53803             : #endif
   53804             :   }
   53805           7 :   resultobj = SWIG_Py_Void();
   53806           7 :   {
   53807             :     /* %typemap(argout) (int *nLen, const int **pList ) */
   53808           7 :     Py_DECREF(resultobj);
   53809           7 :     PyObject *out = PyList_New( *arg2 );
   53810           7 :     if( !out ) {
   53811           0 :       SWIG_fail;
   53812             :     }
   53813          16 :     for( int i=0; i<*arg2; i++ ) {
   53814           9 :       PyObject *val = PyInt_FromLong( (*arg3)[i] );
   53815           9 :       PyList_SetItem( out, i, val );
   53816             :     }
   53817           7 :     resultobj = out;
   53818             :   }
   53819           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; } }
   53820             :   return resultobj;
   53821             : fail:
   53822             :   return NULL;
   53823             : }
   53824             : 
   53825             : 
   53826           7 : SWIGINTERN PyObject *_wrap_AlgorithmArg_GetAsDoubleList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53827           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53828           7 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53829           7 :   int *arg2 = (int *) 0 ;
   53830           7 :   double **arg3 = (double **) 0 ;
   53831           7 :   void *argp1 = 0 ;
   53832           7 :   int res1 = 0 ;
   53833           7 :   int nLen2 = 0 ;
   53834           7 :   double *pList2 = NULL ;
   53835           7 :   PyObject *swig_obj[1] ;
   53836             :   
   53837           7 :   {
   53838             :     /* %typemap(in,numinputs=0) (int *nLen2, const double **pList2) (int nLen2, double *pList2) */
   53839           7 :     arg2 = &nLen2;
   53840           7 :     arg3 = &pList2;
   53841             :   }
   53842           7 :   if (!args) SWIG_fail;
   53843           7 :   swig_obj[0] = args;
   53844           7 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53845           7 :   if (!SWIG_IsOK(res1)) {
   53846           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_GetAsDoubleList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53847             :   }
   53848           7 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53849           7 :   {
   53850           7 :     const int bLocalUseExceptions = GetUseExceptions();
   53851           7 :     if ( bLocalUseExceptions ) {
   53852           7 :       pushErrorHandler();
   53853             :     }
   53854           7 :     {
   53855           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53856           7 :       GDALAlgorithmArgHS_GetAsDoubleList(arg1,arg2,(double const **)arg3);
   53857           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53858             :     }
   53859           7 :     if ( bLocalUseExceptions ) {
   53860           7 :       popErrorHandler();
   53861             :     }
   53862             : #ifndef SED_HACKS
   53863             :     if ( bLocalUseExceptions ) {
   53864             :       CPLErr eclass = CPLGetLastErrorType();
   53865             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53866             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53867             :       }
   53868             :     }
   53869             : #endif
   53870             :   }
   53871           7 :   resultobj = SWIG_Py_Void();
   53872           7 :   {
   53873             :     /* %typemap(argout) (int *nLen, const double **pList ) */
   53874           7 :     Py_DECREF(resultobj);
   53875           7 :     PyObject *out = PyList_New( *arg2 );
   53876           7 :     if( !out ) {
   53877           0 :       SWIG_fail;
   53878             :     }
   53879          16 :     for( int i=0; i<*arg2; i++ ) {
   53880           9 :       PyObject *val = PyFloat_FromDouble( (*arg3)[i] );
   53881           9 :       PyList_SetItem( out, i, val );
   53882             :     }
   53883           7 :     resultobj = out;
   53884             :   }
   53885           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; } }
   53886             :   return resultobj;
   53887             : fail:
   53888             :   return NULL;
   53889             : }
   53890             : 
   53891             : 
   53892         300 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsBoolean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53893         300 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53894         300 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53895         300 :   bool arg2 ;
   53896         300 :   void *argp1 = 0 ;
   53897         300 :   int res1 = 0 ;
   53898         300 :   bool val2 ;
   53899         300 :   int ecode2 = 0 ;
   53900         300 :   PyObject *swig_obj[2] ;
   53901         300 :   bool result;
   53902             :   
   53903         300 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsBoolean", 2, 2, swig_obj)) SWIG_fail;
   53904         300 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53905         300 :   if (!SWIG_IsOK(res1)) {
   53906           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsBoolean" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53907             :   }
   53908         300 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53909         300 :   ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
   53910         299 :   if (!SWIG_IsOK(ecode2)) {
   53911           1 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AlgorithmArg_SetAsBoolean" "', argument " "2"" of type '" "bool""'");
   53912             :   } 
   53913         299 :   arg2 = static_cast< bool >(val2);
   53914         299 :   {
   53915         299 :     const int bLocalUseExceptions = GetUseExceptions();
   53916         299 :     if ( bLocalUseExceptions ) {
   53917         299 :       pushErrorHandler();
   53918             :     }
   53919         299 :     {
   53920         299 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53921         299 :       result = (bool)GDALAlgorithmArgHS_SetAsBoolean(arg1,arg2);
   53922         299 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53923             :     }
   53924         299 :     if ( bLocalUseExceptions ) {
   53925         299 :       popErrorHandler();
   53926             :     }
   53927             : #ifndef SED_HACKS
   53928             :     if ( bLocalUseExceptions ) {
   53929             :       CPLErr eclass = CPLGetLastErrorType();
   53930             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53931             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53932             :       }
   53933             :     }
   53934             : #endif
   53935             :   }
   53936         299 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53937         300 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   53938             :   return resultobj;
   53939             : fail:
   53940             :   return NULL;
   53941             : }
   53942             : 
   53943             : 
   53944        1329 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   53945        1329 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   53946        1329 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   53947        1329 :   char *arg2 = (char *) 0 ;
   53948        1329 :   void *argp1 = 0 ;
   53949        1329 :   int res1 = 0 ;
   53950        1329 :   int res2 ;
   53951        1329 :   char *buf2 = 0 ;
   53952        1329 :   int alloc2 = 0 ;
   53953        1329 :   PyObject *swig_obj[2] ;
   53954        1329 :   bool result;
   53955             :   
   53956        1329 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsString", 2, 2, swig_obj)) SWIG_fail;
   53957        1329 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   53958        1329 :   if (!SWIG_IsOK(res1)) {
   53959           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsString" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   53960             :   }
   53961        1329 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   53962        1329 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   53963        1329 :   if (!SWIG_IsOK(res2)) {
   53964           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AlgorithmArg_SetAsString" "', argument " "2"" of type '" "char const *""'");
   53965             :   }
   53966        1329 :   arg2 = reinterpret_cast< char * >(buf2);
   53967        1329 :   {
   53968        1329 :     const int bLocalUseExceptions = GetUseExceptions();
   53969        1329 :     if ( bLocalUseExceptions ) {
   53970        1329 :       pushErrorHandler();
   53971             :     }
   53972        1329 :     {
   53973        1329 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   53974        1329 :       result = (bool)GDALAlgorithmArgHS_SetAsString(arg1,(char const *)arg2);
   53975        1329 :       SWIG_PYTHON_THREAD_END_ALLOW;
   53976             :     }
   53977        1329 :     if ( bLocalUseExceptions ) {
   53978        1329 :       popErrorHandler();
   53979             :     }
   53980             : #ifndef SED_HACKS
   53981             :     if ( bLocalUseExceptions ) {
   53982             :       CPLErr eclass = CPLGetLastErrorType();
   53983             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   53984             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   53985             :       }
   53986             :     }
   53987             : #endif
   53988             :   }
   53989        1329 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   53990        1329 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   53991        1365 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   53992             :   return resultobj;
   53993           0 : fail:
   53994           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   53995             :   return NULL;
   53996             : }
   53997             : 
   53998             : 
   53999         211 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsInteger(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54000         211 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54001         211 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54002         211 :   int arg2 ;
   54003         211 :   void *argp1 = 0 ;
   54004         211 :   int res1 = 0 ;
   54005         211 :   int val2 ;
   54006         211 :   int ecode2 = 0 ;
   54007         211 :   PyObject *swig_obj[2] ;
   54008         211 :   bool result;
   54009             :   
   54010         211 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsInteger", 2, 2, swig_obj)) SWIG_fail;
   54011         211 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54012         211 :   if (!SWIG_IsOK(res1)) {
   54013           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsInteger" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54014             :   }
   54015         211 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54016         211 :   ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   54017         211 :   if (!SWIG_IsOK(ecode2)) {
   54018           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AlgorithmArg_SetAsInteger" "', argument " "2"" of type '" "int""'");
   54019             :   } 
   54020         211 :   arg2 = static_cast< int >(val2);
   54021         211 :   {
   54022         211 :     const int bLocalUseExceptions = GetUseExceptions();
   54023         211 :     if ( bLocalUseExceptions ) {
   54024         211 :       pushErrorHandler();
   54025             :     }
   54026         211 :     {
   54027         211 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54028         211 :       result = (bool)GDALAlgorithmArgHS_SetAsInteger(arg1,arg2);
   54029         211 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54030             :     }
   54031         211 :     if ( bLocalUseExceptions ) {
   54032         211 :       popErrorHandler();
   54033             :     }
   54034             : #ifndef SED_HACKS
   54035             :     if ( bLocalUseExceptions ) {
   54036             :       CPLErr eclass = CPLGetLastErrorType();
   54037             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54038             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54039             :       }
   54040             :     }
   54041             : #endif
   54042             :   }
   54043         211 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   54044         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; } }
   54045             :   return resultobj;
   54046             : fail:
   54047             :   return NULL;
   54048             : }
   54049             : 
   54050             : 
   54051         215 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54052         215 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54053         215 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54054         215 :   double arg2 ;
   54055         215 :   void *argp1 = 0 ;
   54056         215 :   int res1 = 0 ;
   54057         215 :   double val2 ;
   54058         215 :   int ecode2 = 0 ;
   54059         215 :   PyObject *swig_obj[2] ;
   54060         215 :   bool result;
   54061             :   
   54062         215 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsDouble", 2, 2, swig_obj)) SWIG_fail;
   54063         215 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54064         215 :   if (!SWIG_IsOK(res1)) {
   54065           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsDouble" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54066             :   }
   54067         215 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54068         215 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   54069         215 :   if (!SWIG_IsOK(ecode2)) {
   54070           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AlgorithmArg_SetAsDouble" "', argument " "2"" of type '" "double""'");
   54071             :   } 
   54072         215 :   arg2 = static_cast< double >(val2);
   54073         215 :   {
   54074         215 :     const int bLocalUseExceptions = GetUseExceptions();
   54075         215 :     if ( bLocalUseExceptions ) {
   54076         215 :       pushErrorHandler();
   54077             :     }
   54078         215 :     {
   54079         215 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54080         215 :       result = (bool)GDALAlgorithmArgHS_SetAsDouble(arg1,arg2);
   54081         215 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54082             :     }
   54083         215 :     if ( bLocalUseExceptions ) {
   54084         215 :       popErrorHandler();
   54085             :     }
   54086             : #ifndef SED_HACKS
   54087             :     if ( bLocalUseExceptions ) {
   54088             :       CPLErr eclass = CPLGetLastErrorType();
   54089             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54090             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54091             :       }
   54092             :     }
   54093             : #endif
   54094             :   }
   54095         215 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   54096         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; } }
   54097             :   return resultobj;
   54098             : fail:
   54099             :   return NULL;
   54100             : }
   54101             : 
   54102             : 
   54103           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsDatasetValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54104           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54105           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54106           1 :   GDALArgDatasetValueHS *arg2 = (GDALArgDatasetValueHS *) 0 ;
   54107           1 :   void *argp1 = 0 ;
   54108           1 :   int res1 = 0 ;
   54109           1 :   void *argp2 = 0 ;
   54110           1 :   int res2 = 0 ;
   54111           1 :   PyObject *swig_obj[2] ;
   54112           1 :   bool result;
   54113             :   
   54114           1 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsDatasetValue", 2, 2, swig_obj)) SWIG_fail;
   54115           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54116           1 :   if (!SWIG_IsOK(res1)) {
   54117           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsDatasetValue" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54118             :   }
   54119           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54120           1 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALArgDatasetValueHS, 0 |  0 );
   54121           1 :   if (!SWIG_IsOK(res2)) {
   54122           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AlgorithmArg_SetAsDatasetValue" "', argument " "2"" of type '" "GDALArgDatasetValueHS *""'"); 
   54123             :   }
   54124           1 :   arg2 = reinterpret_cast< GDALArgDatasetValueHS * >(argp2);
   54125           1 :   {
   54126           1 :     const int bLocalUseExceptions = GetUseExceptions();
   54127           1 :     if ( bLocalUseExceptions ) {
   54128           1 :       pushErrorHandler();
   54129             :     }
   54130           1 :     {
   54131           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54132           1 :       result = (bool)GDALAlgorithmArgHS_SetAsDatasetValue(arg1,arg2);
   54133           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54134             :     }
   54135           1 :     if ( bLocalUseExceptions ) {
   54136           1 :       popErrorHandler();
   54137             :     }
   54138             : #ifndef SED_HACKS
   54139             :     if ( bLocalUseExceptions ) {
   54140             :       CPLErr eclass = CPLGetLastErrorType();
   54141             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54142             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54143             :       }
   54144             :     }
   54145             : #endif
   54146             :   }
   54147           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   54148           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; } }
   54149             :   return resultobj;
   54150             : fail:
   54151             :   return NULL;
   54152             : }
   54153             : 
   54154             : 
   54155         257 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsStringList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54156         257 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54157         257 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54158         257 :   char **arg2 = (char **) 0 ;
   54159         257 :   void *argp1 = 0 ;
   54160         257 :   int res1 = 0 ;
   54161         257 :   PyObject *swig_obj[2] ;
   54162         257 :   bool result;
   54163             :   
   54164         257 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsStringList", 2, 2, swig_obj)) SWIG_fail;
   54165         257 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54166         257 :   if (!SWIG_IsOK(res1)) {
   54167           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsStringList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54168             :   }
   54169         257 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54170         257 :   {
   54171             :     /* %typemap(in) char **dict */
   54172         257 :     arg2 = NULL;
   54173         257 :     if ( PySequence_Check( swig_obj[1] ) ) {
   54174         257 :       int bErr = FALSE;
   54175         257 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   54176         257 :       if ( bErr )
   54177             :       {
   54178           0 :         SWIG_fail;
   54179             :       }
   54180             :     }
   54181           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   54182           0 :       int bErr = FALSE;
   54183           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   54184           0 :       if ( bErr )
   54185             :       {
   54186           0 :         SWIG_fail;
   54187             :       }
   54188             :     }
   54189             :     else {
   54190           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   54191           0 :       SWIG_fail;
   54192             :     }
   54193             :   }
   54194         257 :   {
   54195         257 :     const int bLocalUseExceptions = GetUseExceptions();
   54196         257 :     if ( bLocalUseExceptions ) {
   54197         256 :       pushErrorHandler();
   54198             :     }
   54199         257 :     {
   54200         257 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54201         257 :       result = (bool)GDALAlgorithmArgHS_SetAsStringList(arg1,arg2);
   54202         257 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54203             :     }
   54204         257 :     if ( bLocalUseExceptions ) {
   54205         256 :       popErrorHandler();
   54206             :     }
   54207             : #ifndef SED_HACKS
   54208             :     if ( bLocalUseExceptions ) {
   54209             :       CPLErr eclass = CPLGetLastErrorType();
   54210             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54211             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54212             :       }
   54213             :     }
   54214             : #endif
   54215             :   }
   54216         257 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   54217         257 :   {
   54218             :     /* %typemap(freearg) char **dict */
   54219         257 :     CSLDestroy( arg2 );
   54220             :   }
   54221         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; } }
   54222             :   return resultobj;
   54223           0 : fail:
   54224           0 :   {
   54225             :     /* %typemap(freearg) char **dict */
   54226           0 :     CSLDestroy( arg2 );
   54227             :   }
   54228             :   return NULL;
   54229             : }
   54230             : 
   54231             : 
   54232          59 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsIntegerList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54233          59 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54234          59 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54235          59 :   int arg2 ;
   54236          59 :   int *arg3 = (int *) 0 ;
   54237          59 :   void *argp1 = 0 ;
   54238          59 :   int res1 = 0 ;
   54239          59 :   PyObject *swig_obj[2] ;
   54240          59 :   bool result;
   54241             :   
   54242          59 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsIntegerList", 2, 2, swig_obj)) SWIG_fail;
   54243          59 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54244          59 :   if (!SWIG_IsOK(res1)) {
   54245           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsIntegerList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54246             :   }
   54247          59 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54248          59 :   {
   54249             :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   54250          59 :     arg3 = CreateCIntListFromSequence(swig_obj[1], &arg2);
   54251          59 :     if( arg2 < 0 ) {
   54252           2 :       SWIG_fail;
   54253             :     }
   54254             :   }
   54255          57 :   {
   54256          57 :     const int bLocalUseExceptions = GetUseExceptions();
   54257          57 :     if ( bLocalUseExceptions ) {
   54258          57 :       pushErrorHandler();
   54259             :     }
   54260          57 :     {
   54261          57 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54262          57 :       result = (bool)GDALAlgorithmArgHS_SetAsIntegerList(arg1,arg2,arg3);
   54263          57 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54264             :     }
   54265          57 :     if ( bLocalUseExceptions ) {
   54266          57 :       popErrorHandler();
   54267             :     }
   54268             : #ifndef SED_HACKS
   54269             :     if ( bLocalUseExceptions ) {
   54270             :       CPLErr eclass = CPLGetLastErrorType();
   54271             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54272             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54273             :       }
   54274             :     }
   54275             : #endif
   54276             :   }
   54277          57 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   54278          57 :   {
   54279             :     /* %typemap(freearg) (int nList, int* pList) */
   54280          57 :     free(arg3);
   54281             :   }
   54282          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; } }
   54283             :   return resultobj;
   54284           2 : fail:
   54285           2 :   {
   54286             :     /* %typemap(freearg) (int nList, int* pList) */
   54287           2 :     free(arg3);
   54288             :   }
   54289           2 :   return NULL;
   54290             : }
   54291             : 
   54292             : 
   54293         126 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetAsDoubleList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54294         126 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54295         126 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54296         126 :   int arg2 ;
   54297         126 :   double *arg3 = (double *) 0 ;
   54298         126 :   void *argp1 = 0 ;
   54299         126 :   int res1 = 0 ;
   54300         126 :   PyObject *swig_obj[2] ;
   54301         126 :   bool result;
   54302             :   
   54303         126 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetAsDoubleList", 2, 2, swig_obj)) SWIG_fail;
   54304         126 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54305         126 :   if (!SWIG_IsOK(res1)) {
   54306           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetAsDoubleList" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54307             :   }
   54308         126 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54309         126 :   {
   54310             :     /* %typemap(in,numinputs=1) (int nList, double* pList)*/
   54311         126 :     arg3 = CreateCDoubleListFromSequence(swig_obj[1], &arg2);
   54312         126 :     if( arg2 < 0 ) {
   54313           2 :       SWIG_fail;
   54314             :     }
   54315             :   }
   54316         124 :   {
   54317         124 :     const int bLocalUseExceptions = GetUseExceptions();
   54318         124 :     if ( bLocalUseExceptions ) {
   54319         124 :       pushErrorHandler();
   54320             :     }
   54321         124 :     {
   54322         124 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54323         124 :       result = (bool)GDALAlgorithmArgHS_SetAsDoubleList(arg1,arg2,arg3);
   54324         124 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54325             :     }
   54326         124 :     if ( bLocalUseExceptions ) {
   54327         124 :       popErrorHandler();
   54328             :     }
   54329             : #ifndef SED_HACKS
   54330             :     if ( bLocalUseExceptions ) {
   54331             :       CPLErr eclass = CPLGetLastErrorType();
   54332             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54333             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54334             :       }
   54335             :     }
   54336             : #endif
   54337             :   }
   54338         124 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   54339         124 :   {
   54340             :     /* %typemap(freearg) (int nList, double* pList) */
   54341         124 :     free(arg3);
   54342             :   }
   54343         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; } }
   54344             :   return resultobj;
   54345           2 : fail:
   54346           2 :   {
   54347             :     /* %typemap(freearg) (int nList, double* pList) */
   54348           2 :     free(arg3);
   54349             :   }
   54350           2 :   return NULL;
   54351             : }
   54352             : 
   54353             : 
   54354           1 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetDataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54355           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54356           1 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54357           1 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   54358           1 :   void *argp1 = 0 ;
   54359           1 :   int res1 = 0 ;
   54360           1 :   void *argp2 = 0 ;
   54361           1 :   int res2 = 0 ;
   54362           1 :   PyObject *swig_obj[2] ;
   54363           1 :   bool result;
   54364             :   
   54365           1 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetDataset", 2, 2, swig_obj)) SWIG_fail;
   54366           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54367           1 :   if (!SWIG_IsOK(res1)) {
   54368           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetDataset" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54369             :   }
   54370           1 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54371           1 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   54372           1 :   if (!SWIG_IsOK(res2)) {
   54373           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AlgorithmArg_SetDataset" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   54374             :   }
   54375           1 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   54376           1 :   {
   54377           1 :     const int bLocalUseExceptions = GetUseExceptions();
   54378           1 :     if ( bLocalUseExceptions ) {
   54379           1 :       pushErrorHandler();
   54380             :     }
   54381           1 :     {
   54382           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54383           1 :       result = (bool)GDALAlgorithmArgHS_SetDataset(arg1,arg2);
   54384           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54385             :     }
   54386           1 :     if ( bLocalUseExceptions ) {
   54387           1 :       popErrorHandler();
   54388             :     }
   54389             : #ifndef SED_HACKS
   54390             :     if ( bLocalUseExceptions ) {
   54391             :       CPLErr eclass = CPLGetLastErrorType();
   54392             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54393             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54394             :       }
   54395             :     }
   54396             : #endif
   54397             :   }
   54398           1 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   54399           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; } }
   54400             :   return resultobj;
   54401             : fail:
   54402             :   return NULL;
   54403             : }
   54404             : 
   54405             : 
   54406         378 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetDatasets(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54407         378 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54408         378 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54409         378 :   int arg2 ;
   54410         378 :   GDALDatasetShadow **arg3 = (GDALDatasetShadow **) 0 ;
   54411         378 :   void *argp1 = 0 ;
   54412         378 :   int res1 = 0 ;
   54413         378 :   PyObject *swig_obj[2] ;
   54414         378 :   bool result;
   54415             :   
   54416         378 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetDatasets", 2, 2, swig_obj)) SWIG_fail;
   54417         378 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54418         378 :   if (!SWIG_IsOK(res1)) {
   54419           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetDatasets" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54420             :   }
   54421         378 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54422         378 :   {
   54423             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDatasetShadow *optional_##GDALDatasetShadow)*/
   54424         378 :     if ( !PySequence_Check(swig_obj[1]) ) {
   54425           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   54426           0 :       SWIG_fail;
   54427             :     }
   54428         378 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   54429         378 :     if( size > (Py_ssize_t)INT_MAX ) {
   54430           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   54431           0 :       SWIG_fail;
   54432             :     }
   54433         378 :     if( (size_t)size > SIZE_MAX / sizeof(GDALDatasetShadow*) ) {
   54434           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   54435           0 :       SWIG_fail;
   54436             :     }
   54437         378 :     arg2 = (int)size;
   54438         378 :     arg3 = (GDALDatasetShadow**) VSIMalloc(arg2*sizeof(GDALDatasetShadow*));
   54439         378 :     if( !arg3) {
   54440           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   54441           0 :       SWIG_fail;
   54442             :     }
   54443             :     
   54444         781 :     for( int i = 0; i<arg2; i++ ) {
   54445         403 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   54446         403 :       GDALDatasetShadow* rawobjectpointer = NULL;
   54447         403 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0 ));
   54448         403 :       if (!rawobjectpointer) {
   54449           0 :         Py_DECREF(o);
   54450           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALDatasetShadow");
   54451           0 :         SWIG_fail;
   54452             :       }
   54453         403 :       arg3[i] = rawobjectpointer;
   54454         403 :       Py_DECREF(o);
   54455             :       
   54456             :     }
   54457             :   }
   54458         378 :   {
   54459         378 :     const int bLocalUseExceptions = GetUseExceptions();
   54460         378 :     if ( bLocalUseExceptions ) {
   54461         378 :       pushErrorHandler();
   54462             :     }
   54463         378 :     {
   54464         378 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54465         378 :       result = (bool)GDALAlgorithmArgHS_SetDatasets(arg1,arg2,arg3);
   54466         378 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54467             :     }
   54468         378 :     if ( bLocalUseExceptions ) {
   54469         378 :       popErrorHandler();
   54470             :     }
   54471             : #ifndef SED_HACKS
   54472             :     if ( bLocalUseExceptions ) {
   54473             :       CPLErr eclass = CPLGetLastErrorType();
   54474             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54475             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54476             :       }
   54477             :     }
   54478             : #endif
   54479             :   }
   54480         378 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   54481         378 :   {
   54482             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   54483         378 :     CPLFree( arg3 );
   54484             :   }
   54485         378 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   54486             :   return resultobj;
   54487           0 : fail:
   54488           0 :   {
   54489             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   54490           0 :     CPLFree( arg3 );
   54491             :   }
   54492             :   return NULL;
   54493             : }
   54494             : 
   54495             : 
   54496         378 : SWIGINTERN PyObject *_wrap_AlgorithmArg_SetDatasetNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54497         378 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54498         378 :   GDALAlgorithmArgHS *arg1 = (GDALAlgorithmArgHS *) 0 ;
   54499         378 :   char **arg2 = (char **) 0 ;
   54500         378 :   void *argp1 = 0 ;
   54501         378 :   int res1 = 0 ;
   54502         378 :   PyObject *swig_obj[2] ;
   54503         378 :   bool result;
   54504             :   
   54505         378 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmArg_SetDatasetNames", 2, 2, swig_obj)) SWIG_fail;
   54506         378 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmArgHS, 0 |  0 );
   54507         378 :   if (!SWIG_IsOK(res1)) {
   54508           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmArg_SetDatasetNames" "', argument " "1"" of type '" "GDALAlgorithmArgHS *""'"); 
   54509             :   }
   54510         378 :   arg1 = reinterpret_cast< GDALAlgorithmArgHS * >(argp1);
   54511         378 :   {
   54512             :     /* %typemap(in) char **dict */
   54513         378 :     arg2 = NULL;
   54514         378 :     if ( PySequence_Check( swig_obj[1] ) ) {
   54515         378 :       int bErr = FALSE;
   54516         378 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   54517         378 :       if ( bErr )
   54518             :       {
   54519           0 :         SWIG_fail;
   54520             :       }
   54521             :     }
   54522           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   54523           0 :       int bErr = FALSE;
   54524           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   54525           0 :       if ( bErr )
   54526             :       {
   54527           0 :         SWIG_fail;
   54528             :       }
   54529             :     }
   54530             :     else {
   54531           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   54532           0 :       SWIG_fail;
   54533             :     }
   54534             :   }
   54535         378 :   {
   54536         378 :     const int bLocalUseExceptions = GetUseExceptions();
   54537         378 :     if ( bLocalUseExceptions ) {
   54538         378 :       pushErrorHandler();
   54539             :     }
   54540         378 :     {
   54541         378 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54542         378 :       result = (bool)GDALAlgorithmArgHS_SetDatasetNames(arg1,arg2);
   54543         378 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54544             :     }
   54545         378 :     if ( bLocalUseExceptions ) {
   54546         378 :       popErrorHandler();
   54547             :     }
   54548             : #ifndef SED_HACKS
   54549             :     if ( bLocalUseExceptions ) {
   54550             :       CPLErr eclass = CPLGetLastErrorType();
   54551             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54552             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54553             :       }
   54554             :     }
   54555             : #endif
   54556             :   }
   54557         378 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   54558         378 :   {
   54559             :     /* %typemap(freearg) char **dict */
   54560         378 :     CSLDestroy( arg2 );
   54561             :   }
   54562         378 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   54563             :   return resultobj;
   54564           0 : fail:
   54565           0 :   {
   54566             :     /* %typemap(freearg) char **dict */
   54567           0 :     CSLDestroy( arg2 );
   54568             :   }
   54569             :   return NULL;
   54570             : }
   54571             : 
   54572             : 
   54573         277 : SWIGINTERN PyObject *AlgorithmArg_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54574         277 :   PyObject *obj;
   54575         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   54576         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALAlgorithmArgHS, SWIG_NewClientData(obj));
   54577         277 :   return SWIG_Py_Void();
   54578             : }
   54579             : 
   54580        3613 : SWIGINTERN PyObject *_wrap_delete_Algorithm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54581        3613 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54582        3613 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   54583        3613 :   void *argp1 = 0 ;
   54584        3613 :   int res1 = 0 ;
   54585        3613 :   PyObject *swig_obj[1] ;
   54586             :   
   54587        3613 :   if (!args) SWIG_fail;
   54588        3613 :   swig_obj[0] = args;
   54589        3613 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, SWIG_POINTER_DISOWN |  0 );
   54590        3613 :   if (!SWIG_IsOK(res1)) {
   54591           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Algorithm" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   54592             :   }
   54593        3613 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   54594        3613 :   {
   54595        3613 :     const int bLocalUseExceptions = GetUseExceptions();
   54596        3613 :     if ( bLocalUseExceptions ) {
   54597        3611 :       pushErrorHandler();
   54598             :     }
   54599        3613 :     {
   54600        3613 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54601        3613 :       delete_GDALAlgorithmHS(arg1);
   54602        3613 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54603             :     }
   54604        3613 :     if ( bLocalUseExceptions ) {
   54605        3611 :       popErrorHandler();
   54606             :     }
   54607             : #ifndef SED_HACKS
   54608             :     if ( bLocalUseExceptions ) {
   54609             :       CPLErr eclass = CPLGetLastErrorType();
   54610             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54611             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54612             :       }
   54613             :     }
   54614             : #endif
   54615             :   }
   54616        3613 :   resultobj = SWIG_Py_Void();
   54617        3613 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   54618             :   return resultobj;
   54619             : fail:
   54620             :   return NULL;
   54621             : }
   54622             : 
   54623             : 
   54624          32 : SWIGINTERN PyObject *_wrap_Algorithm_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54625          32 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54626          32 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   54627          32 :   void *argp1 = 0 ;
   54628          32 :   int res1 = 0 ;
   54629          32 :   PyObject *swig_obj[1] ;
   54630          32 :   char *result = 0 ;
   54631             :   
   54632          32 :   if (!args) SWIG_fail;
   54633          32 :   swig_obj[0] = args;
   54634          32 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   54635          32 :   if (!SWIG_IsOK(res1)) {
   54636           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetName" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   54637             :   }
   54638          32 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   54639          32 :   {
   54640          32 :     const int bLocalUseExceptions = GetUseExceptions();
   54641          32 :     if ( bLocalUseExceptions ) {
   54642          32 :       pushErrorHandler();
   54643             :     }
   54644          32 :     {
   54645          32 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54646          32 :       result = (char *)GDALAlgorithmHS_GetName(arg1);
   54647          32 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54648             :     }
   54649          32 :     if ( bLocalUseExceptions ) {
   54650          32 :       popErrorHandler();
   54651             :     }
   54652             : #ifndef SED_HACKS
   54653             :     if ( bLocalUseExceptions ) {
   54654             :       CPLErr eclass = CPLGetLastErrorType();
   54655             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54656             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54657             :       }
   54658             :     }
   54659             : #endif
   54660             :   }
   54661          32 :   resultobj = SWIG_FromCharPtr((const char *)result);
   54662          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; } }
   54663             :   return resultobj;
   54664             : fail:
   54665             :   return NULL;
   54666             : }
   54667             : 
   54668             : 
   54669           1 : SWIGINTERN PyObject *_wrap_Algorithm_GetDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54670           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54671           1 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   54672           1 :   void *argp1 = 0 ;
   54673           1 :   int res1 = 0 ;
   54674           1 :   PyObject *swig_obj[1] ;
   54675           1 :   char *result = 0 ;
   54676             :   
   54677           1 :   if (!args) SWIG_fail;
   54678           1 :   swig_obj[0] = args;
   54679           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   54680           1 :   if (!SWIG_IsOK(res1)) {
   54681           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetDescription" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   54682             :   }
   54683           1 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   54684           1 :   {
   54685           1 :     const int bLocalUseExceptions = GetUseExceptions();
   54686           1 :     if ( bLocalUseExceptions ) {
   54687           1 :       pushErrorHandler();
   54688             :     }
   54689           1 :     {
   54690           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54691           1 :       result = (char *)GDALAlgorithmHS_GetDescription(arg1);
   54692           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54693             :     }
   54694           1 :     if ( bLocalUseExceptions ) {
   54695           1 :       popErrorHandler();
   54696             :     }
   54697             : #ifndef SED_HACKS
   54698             :     if ( bLocalUseExceptions ) {
   54699             :       CPLErr eclass = CPLGetLastErrorType();
   54700             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54701             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54702             :       }
   54703             :     }
   54704             : #endif
   54705             :   }
   54706           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   54707           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; } }
   54708             :   return resultobj;
   54709             : fail:
   54710             :   return NULL;
   54711             : }
   54712             : 
   54713             : 
   54714           1 : SWIGINTERN PyObject *_wrap_Algorithm_GetLongDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54715           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54716           1 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   54717           1 :   void *argp1 = 0 ;
   54718           1 :   int res1 = 0 ;
   54719           1 :   PyObject *swig_obj[1] ;
   54720           1 :   char *result = 0 ;
   54721             :   
   54722           1 :   if (!args) SWIG_fail;
   54723           1 :   swig_obj[0] = args;
   54724           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   54725           1 :   if (!SWIG_IsOK(res1)) {
   54726           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetLongDescription" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   54727             :   }
   54728           1 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   54729           1 :   {
   54730           1 :     const int bLocalUseExceptions = GetUseExceptions();
   54731           1 :     if ( bLocalUseExceptions ) {
   54732           1 :       pushErrorHandler();
   54733             :     }
   54734           1 :     {
   54735           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54736           1 :       result = (char *)GDALAlgorithmHS_GetLongDescription(arg1);
   54737           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54738             :     }
   54739           1 :     if ( bLocalUseExceptions ) {
   54740           1 :       popErrorHandler();
   54741             :     }
   54742             : #ifndef SED_HACKS
   54743             :     if ( bLocalUseExceptions ) {
   54744             :       CPLErr eclass = CPLGetLastErrorType();
   54745             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54746             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54747             :       }
   54748             :     }
   54749             : #endif
   54750             :   }
   54751           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   54752           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; } }
   54753             :   return resultobj;
   54754             : fail:
   54755             :   return NULL;
   54756             : }
   54757             : 
   54758             : 
   54759           1 : SWIGINTERN PyObject *_wrap_Algorithm_GetHelpFullURL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54760           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54761           1 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   54762           1 :   void *argp1 = 0 ;
   54763           1 :   int res1 = 0 ;
   54764           1 :   PyObject *swig_obj[1] ;
   54765           1 :   char *result = 0 ;
   54766             :   
   54767           1 :   if (!args) SWIG_fail;
   54768           1 :   swig_obj[0] = args;
   54769           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   54770           1 :   if (!SWIG_IsOK(res1)) {
   54771           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetHelpFullURL" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   54772             :   }
   54773           1 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   54774           1 :   {
   54775           1 :     const int bLocalUseExceptions = GetUseExceptions();
   54776           1 :     if ( bLocalUseExceptions ) {
   54777           1 :       pushErrorHandler();
   54778             :     }
   54779           1 :     {
   54780           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54781           1 :       result = (char *)GDALAlgorithmHS_GetHelpFullURL(arg1);
   54782           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54783             :     }
   54784           1 :     if ( bLocalUseExceptions ) {
   54785           1 :       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           1 :   resultobj = SWIG_FromCharPtr((const char *)result);
   54797           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; } }
   54798             :   return resultobj;
   54799             : fail:
   54800             :   return NULL;
   54801             : }
   54802             : 
   54803             : 
   54804        1961 : SWIGINTERN PyObject *_wrap_Algorithm_HasSubAlgorithms(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54805        1961 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54806        1961 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   54807        1961 :   void *argp1 = 0 ;
   54808        1961 :   int res1 = 0 ;
   54809        1961 :   PyObject *swig_obj[1] ;
   54810        1961 :   bool result;
   54811             :   
   54812        1961 :   if (!args) SWIG_fail;
   54813        1961 :   swig_obj[0] = args;
   54814        1961 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   54815        1961 :   if (!SWIG_IsOK(res1)) {
   54816           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_HasSubAlgorithms" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   54817             :   }
   54818        1961 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   54819        1961 :   {
   54820        1961 :     const int bLocalUseExceptions = GetUseExceptions();
   54821        1961 :     if ( bLocalUseExceptions ) {
   54822        1960 :       pushErrorHandler();
   54823             :     }
   54824        1961 :     {
   54825        1961 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54826        1961 :       result = (bool)GDALAlgorithmHS_HasSubAlgorithms(arg1);
   54827        1961 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54828             :     }
   54829        1961 :     if ( bLocalUseExceptions ) {
   54830        1960 :       popErrorHandler();
   54831             :     }
   54832             : #ifndef SED_HACKS
   54833             :     if ( bLocalUseExceptions ) {
   54834             :       CPLErr eclass = CPLGetLastErrorType();
   54835             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54836             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54837             :       }
   54838             :     }
   54839             : #endif
   54840             :   }
   54841        1961 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   54842        1961 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   54843             :   return resultobj;
   54844             : fail:
   54845             :   return NULL;
   54846             : }
   54847             : 
   54848             : 
   54849           6 : SWIGINTERN PyObject *_wrap_Algorithm_GetSubAlgorithmNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54850           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54851           6 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   54852           6 :   void *argp1 = 0 ;
   54853           6 :   int res1 = 0 ;
   54854           6 :   PyObject *swig_obj[1] ;
   54855           6 :   char **result = 0 ;
   54856             :   
   54857           6 :   if (!args) SWIG_fail;
   54858           6 :   swig_obj[0] = args;
   54859           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   54860           6 :   if (!SWIG_IsOK(res1)) {
   54861           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetSubAlgorithmNames" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   54862             :   }
   54863           6 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   54864           6 :   {
   54865           6 :     const int bLocalUseExceptions = GetUseExceptions();
   54866           6 :     if ( bLocalUseExceptions ) {
   54867           6 :       pushErrorHandler();
   54868             :     }
   54869           6 :     {
   54870           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54871           6 :       result = (char **)GDALAlgorithmHS_GetSubAlgorithmNames(arg1);
   54872           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54873             :     }
   54874           6 :     if ( bLocalUseExceptions ) {
   54875           6 :       popErrorHandler();
   54876             :     }
   54877             : #ifndef SED_HACKS
   54878             :     if ( bLocalUseExceptions ) {
   54879             :       CPLErr eclass = CPLGetLastErrorType();
   54880             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54881             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54882             :       }
   54883             :     }
   54884             : #endif
   54885             :   }
   54886           6 :   {
   54887             :     /* %typemap(out) char **CSL -> ( string ) */
   54888           6 :     bool bErr = false;
   54889           6 :     resultobj = CSLToList(result, &bErr);
   54890           6 :     CSLDestroy(result);
   54891           6 :     if( bErr ) {
   54892           0 :       SWIG_fail;
   54893             :     }
   54894             :   }
   54895           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; } }
   54896             :   return resultobj;
   54897             : fail:
   54898             :   return NULL;
   54899             : }
   54900             : 
   54901             : 
   54902        1613 : SWIGINTERN PyObject *_wrap_Algorithm_InstantiateSubAlgorithm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54903        1613 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54904        1613 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   54905        1613 :   char *arg2 = (char *) 0 ;
   54906        1613 :   void *argp1 = 0 ;
   54907        1613 :   int res1 = 0 ;
   54908        1613 :   int res2 ;
   54909        1613 :   char *buf2 = 0 ;
   54910        1613 :   int alloc2 = 0 ;
   54911        1613 :   PyObject *swig_obj[2] ;
   54912        1613 :   GDALAlgorithmHS *result = 0 ;
   54913             :   
   54914        1613 :   if (!SWIG_Python_UnpackTuple(args, "Algorithm_InstantiateSubAlgorithm", 2, 2, swig_obj)) SWIG_fail;
   54915        1613 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   54916        1613 :   if (!SWIG_IsOK(res1)) {
   54917           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_InstantiateSubAlgorithm" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   54918             :   }
   54919        1613 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   54920        1613 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   54921        1613 :   if (!SWIG_IsOK(res2)) {
   54922           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Algorithm_InstantiateSubAlgorithm" "', argument " "2"" of type '" "char const *""'");
   54923             :   }
   54924        1613 :   arg2 = reinterpret_cast< char * >(buf2);
   54925        1613 :   {
   54926        1613 :     if (!arg2) {
   54927           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   54928             :     }
   54929             :   }
   54930        1612 :   {
   54931        1612 :     const int bLocalUseExceptions = GetUseExceptions();
   54932        1612 :     if ( bLocalUseExceptions ) {
   54933        1611 :       pushErrorHandler();
   54934             :     }
   54935        1612 :     {
   54936        1612 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   54937        1612 :       result = (GDALAlgorithmHS *)GDALAlgorithmHS_InstantiateSubAlgorithm(arg1,(char const *)arg2);
   54938        1612 :       SWIG_PYTHON_THREAD_END_ALLOW;
   54939             :     }
   54940        1612 :     if ( bLocalUseExceptions ) {
   54941        1611 :       popErrorHandler();
   54942             :     }
   54943             : #ifndef SED_HACKS
   54944             :     if ( bLocalUseExceptions ) {
   54945             :       CPLErr eclass = CPLGetLastErrorType();
   54946             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   54947             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   54948             :       }
   54949             :     }
   54950             : #endif
   54951             :   }
   54952        1612 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAlgorithmHS, SWIG_POINTER_OWN |  0 );
   54953        1612 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   54954        1613 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   54955             :   return resultobj;
   54956           1 : fail:
   54957           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   54958             :   return NULL;
   54959             : }
   54960             : 
   54961             : 
   54962          50 : SWIGINTERN PyObject *_wrap_Algorithm_ParseCommandLineArguments(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   54963          50 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   54964          50 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   54965          50 :   char **arg2 = (char **) 0 ;
   54966          50 :   void *argp1 = 0 ;
   54967          50 :   int res1 = 0 ;
   54968          50 :   PyObject *swig_obj[2] ;
   54969          50 :   bool result;
   54970             :   
   54971          50 :   if (!SWIG_Python_UnpackTuple(args, "Algorithm_ParseCommandLineArguments", 2, 2, swig_obj)) SWIG_fail;
   54972          50 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   54973          50 :   if (!SWIG_IsOK(res1)) {
   54974           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_ParseCommandLineArguments" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   54975             :   }
   54976          50 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   54977          50 :   {
   54978             :     /* %typemap(in) char **dict */
   54979          50 :     arg2 = NULL;
   54980          50 :     if ( PySequence_Check( swig_obj[1] ) ) {
   54981          50 :       int bErr = FALSE;
   54982          50 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   54983          50 :       if ( bErr )
   54984             :       {
   54985           0 :         SWIG_fail;
   54986             :       }
   54987             :     }
   54988           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   54989           0 :       int bErr = FALSE;
   54990           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   54991           0 :       if ( bErr )
   54992             :       {
   54993           0 :         SWIG_fail;
   54994             :       }
   54995             :     }
   54996             :     else {
   54997           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   54998           0 :       SWIG_fail;
   54999             :     }
   55000             :   }
   55001          50 :   {
   55002          50 :     const int bLocalUseExceptions = GetUseExceptions();
   55003          50 :     if ( bLocalUseExceptions ) {
   55004          50 :       pushErrorHandler();
   55005             :     }
   55006          50 :     {
   55007          50 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55008          50 :       result = (bool)GDALAlgorithmHS_ParseCommandLineArguments(arg1,arg2);
   55009          50 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55010             :     }
   55011          50 :     if ( bLocalUseExceptions ) {
   55012          50 :       popErrorHandler();
   55013             :     }
   55014             : #ifndef SED_HACKS
   55015             :     if ( bLocalUseExceptions ) {
   55016             :       CPLErr eclass = CPLGetLastErrorType();
   55017             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55018             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55019             :       }
   55020             :     }
   55021             : #endif
   55022             :   }
   55023          50 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   55024          50 :   {
   55025             :     /* %typemap(freearg) char **dict */
   55026          50 :     CSLDestroy( arg2 );
   55027             :   }
   55028          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; } }
   55029             :   return resultobj;
   55030           0 : fail:
   55031           0 :   {
   55032             :     /* %typemap(freearg) char **dict */
   55033           0 :     CSLDestroy( arg2 );
   55034             :   }
   55035             :   return NULL;
   55036             : }
   55037             : 
   55038             : 
   55039         532 : SWIGINTERN PyObject *_wrap_Algorithm_GetActualAlgorithm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55040         532 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55041         532 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55042         532 :   void *argp1 = 0 ;
   55043         532 :   int res1 = 0 ;
   55044         532 :   PyObject *swig_obj[1] ;
   55045         532 :   GDALAlgorithmHS *result = 0 ;
   55046             :   
   55047         532 :   if (!args) SWIG_fail;
   55048         532 :   swig_obj[0] = args;
   55049         532 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   55050         532 :   if (!SWIG_IsOK(res1)) {
   55051           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetActualAlgorithm" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55052             :   }
   55053         532 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55054         532 :   {
   55055         532 :     const int bLocalUseExceptions = GetUseExceptions();
   55056         532 :     if ( bLocalUseExceptions ) {
   55057         532 :       pushErrorHandler();
   55058             :     }
   55059         532 :     {
   55060         532 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55061         532 :       result = (GDALAlgorithmHS *)GDALAlgorithmHS_GetActualAlgorithm(arg1);
   55062         532 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55063             :     }
   55064         532 :     if ( bLocalUseExceptions ) {
   55065         532 :       popErrorHandler();
   55066             :     }
   55067             : #ifndef SED_HACKS
   55068             :     if ( bLocalUseExceptions ) {
   55069             :       CPLErr eclass = CPLGetLastErrorType();
   55070             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55071             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55072             :       }
   55073             :     }
   55074             : #endif
   55075             :   }
   55076         532 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAlgorithmHS, SWIG_POINTER_OWN |  0 );
   55077         532 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55078             :   return resultobj;
   55079             : fail:
   55080             :   return NULL;
   55081             : }
   55082             : 
   55083             : 
   55084        1188 : SWIGINTERN PyObject *_wrap_Algorithm_Run(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55085        1188 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55086        1188 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55087        1188 :   GDALProgressFunc arg2 = (GDALProgressFunc) NULL ;
   55088        1188 :   void *arg3 = (void *) NULL ;
   55089        1188 :   void *argp1 = 0 ;
   55090        1188 :   int res1 = 0 ;
   55091        1188 :   PyObject *swig_obj[3] ;
   55092        1188 :   bool result;
   55093             :   
   55094             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   55095        1188 :   PyProgressData *psProgressInfo;
   55096        1188 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   55097        1188 :   psProgressInfo->nLastReported = -1;
   55098        1188 :   psProgressInfo->psPyCallback = NULL;
   55099        1188 :   psProgressInfo->psPyCallbackData = NULL;
   55100        1188 :   arg3 = psProgressInfo;
   55101        1188 :   if (!SWIG_Python_UnpackTuple(args, "Algorithm_Run", 1, 3, swig_obj)) SWIG_fail;
   55102        1188 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   55103        1188 :   if (!SWIG_IsOK(res1)) {
   55104           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_Run" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55105             :   }
   55106        1188 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55107        1188 :   if (swig_obj[1]) {
   55108         273 :     {
   55109             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   55110             :       /* callback_func typemap */
   55111             :       
   55112             :       /* In some cases 0 is passed instead of None. */
   55113             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   55114         273 :       if ( PyLong_Check(swig_obj[1]) || PyInt_Check(swig_obj[1]) )
   55115             :       {
   55116           0 :         if( PyLong_AsLong(swig_obj[1]) == 0 )
   55117             :         {
   55118           0 :           swig_obj[1] = Py_None;
   55119             :         }
   55120             :       }
   55121             :       
   55122         273 :       if (swig_obj[1] && swig_obj[1] != Py_None ) {
   55123          53 :         void* cbfunction = NULL;
   55124          53 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[1],
   55125             :             (void**)&cbfunction,
   55126             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   55127             :             SWIG_POINTER_EXCEPTION | 0 ));
   55128             :         
   55129          53 :         if ( cbfunction == GDALTermProgress ) {
   55130             :           arg2 = GDALTermProgress;
   55131             :         } else {
   55132          53 :           if (!PyCallable_Check(swig_obj[1])) {
   55133           0 :             PyErr_SetString( PyExc_RuntimeError,
   55134             :               "Object given is not a Python function" );
   55135           0 :             SWIG_fail;
   55136             :           }
   55137          53 :           psProgressInfo->psPyCallback = swig_obj[1];
   55138          53 :           arg2 = PyProgressProxy;
   55139             :         }
   55140             :         
   55141             :       }
   55142             :       
   55143             :     }
   55144             :   }
   55145        1188 :   if (swig_obj[2]) {
   55146           0 :     {
   55147             :       /* %typemap(in) ( void* callback_data=NULL)  */
   55148           0 :       psProgressInfo->psPyCallbackData = swig_obj[2] ;
   55149             :     }
   55150             :   }
   55151        1188 :   {
   55152        1188 :     const int bLocalUseExceptions = GetUseExceptions();
   55153        1188 :     if ( bLocalUseExceptions ) {
   55154        1185 :       pushErrorHandler();
   55155             :     }
   55156        1188 :     {
   55157        1188 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55158        1188 :       result = (bool)GDALAlgorithmHS_Run(arg1,arg2,arg3);
   55159        1188 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55160             :     }
   55161        1188 :     if ( bLocalUseExceptions ) {
   55162        1185 :       popErrorHandler();
   55163             :     }
   55164             : #ifndef SED_HACKS
   55165             :     if ( bLocalUseExceptions ) {
   55166             :       CPLErr eclass = CPLGetLastErrorType();
   55167             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55168             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55169             :       }
   55170             :     }
   55171             : #endif
   55172             :   }
   55173        1188 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   55174        1188 :   {
   55175             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   55176             :     
   55177        1188 :     CPLFree(psProgressInfo);
   55178             :     
   55179             :   }
   55180        1886 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55181             :   return resultobj;
   55182           0 : fail:
   55183           0 :   {
   55184             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   55185             :     
   55186           0 :     CPLFree(psProgressInfo);
   55187             :     
   55188             :   }
   55189             :   return NULL;
   55190             : }
   55191             : 
   55192             : 
   55193         218 : SWIGINTERN PyObject *_wrap_Algorithm_Finalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55194         218 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55195         218 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55196         218 :   void *argp1 = 0 ;
   55197         218 :   int res1 = 0 ;
   55198         218 :   PyObject *swig_obj[1] ;
   55199         218 :   bool result;
   55200             :   
   55201         218 :   if (!args) SWIG_fail;
   55202         218 :   swig_obj[0] = args;
   55203         218 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   55204         218 :   if (!SWIG_IsOK(res1)) {
   55205           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_Finalize" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55206             :   }
   55207         218 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55208         218 :   {
   55209         218 :     const int bLocalUseExceptions = GetUseExceptions();
   55210         218 :     if ( bLocalUseExceptions ) {
   55211         218 :       pushErrorHandler();
   55212             :     }
   55213         218 :     {
   55214         218 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55215         218 :       result = (bool)GDALAlgorithmHS_Finalize(arg1);
   55216         218 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55217             :     }
   55218         218 :     if ( bLocalUseExceptions ) {
   55219         218 :       popErrorHandler();
   55220             :     }
   55221             : #ifndef SED_HACKS
   55222             :     if ( bLocalUseExceptions ) {
   55223             :       CPLErr eclass = CPLGetLastErrorType();
   55224             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55225             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55226             :       }
   55227             :     }
   55228             : #endif
   55229             :   }
   55230         218 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   55231         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; } }
   55232             :   return resultobj;
   55233             : fail:
   55234             :   return NULL;
   55235             : }
   55236             : 
   55237             : 
   55238         245 : SWIGINTERN PyObject *_wrap_Algorithm_ParseRunAndFinalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55239         245 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55240         245 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55241         245 :   char **arg2 = (char **) 0 ;
   55242         245 :   GDALProgressFunc arg3 = (GDALProgressFunc) NULL ;
   55243         245 :   void *arg4 = (void *) NULL ;
   55244         245 :   void *argp1 = 0 ;
   55245         245 :   int res1 = 0 ;
   55246         245 :   PyObject *swig_obj[4] ;
   55247         245 :   bool result;
   55248             :   
   55249             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   55250         245 :   PyProgressData *psProgressInfo;
   55251         245 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   55252         245 :   psProgressInfo->nLastReported = -1;
   55253         245 :   psProgressInfo->psPyCallback = NULL;
   55254         245 :   psProgressInfo->psPyCallbackData = NULL;
   55255         245 :   arg4 = psProgressInfo;
   55256         245 :   if (!SWIG_Python_UnpackTuple(args, "Algorithm_ParseRunAndFinalize", 2, 4, swig_obj)) SWIG_fail;
   55257         245 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   55258         245 :   if (!SWIG_IsOK(res1)) {
   55259           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_ParseRunAndFinalize" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55260             :   }
   55261         245 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55262         245 :   {
   55263             :     /* %typemap(in) char **dict */
   55264         245 :     arg2 = NULL;
   55265         245 :     if ( PySequence_Check( swig_obj[1] ) ) {
   55266         245 :       int bErr = FALSE;
   55267         245 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   55268         245 :       if ( bErr )
   55269             :       {
   55270           0 :         SWIG_fail;
   55271             :       }
   55272             :     }
   55273           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   55274           0 :       int bErr = FALSE;
   55275           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   55276           0 :       if ( bErr )
   55277             :       {
   55278           0 :         SWIG_fail;
   55279             :       }
   55280             :     }
   55281             :     else {
   55282           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   55283           0 :       SWIG_fail;
   55284             :     }
   55285             :   }
   55286         245 :   if (swig_obj[2]) {
   55287          12 :     {
   55288             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   55289             :       /* callback_func typemap */
   55290             :       
   55291             :       /* In some cases 0 is passed instead of None. */
   55292             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   55293          12 :       if ( PyLong_Check(swig_obj[2]) || PyInt_Check(swig_obj[2]) )
   55294             :       {
   55295           0 :         if( PyLong_AsLong(swig_obj[2]) == 0 )
   55296             :         {
   55297           0 :           swig_obj[2] = Py_None;
   55298             :         }
   55299             :       }
   55300             :       
   55301          12 :       if (swig_obj[2] && swig_obj[2] != Py_None ) {
   55302          12 :         void* cbfunction = NULL;
   55303          12 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[2],
   55304             :             (void**)&cbfunction,
   55305             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   55306             :             SWIG_POINTER_EXCEPTION | 0 ));
   55307             :         
   55308          12 :         if ( cbfunction == GDALTermProgress ) {
   55309             :           arg3 = GDALTermProgress;
   55310             :         } else {
   55311          12 :           if (!PyCallable_Check(swig_obj[2])) {
   55312           0 :             PyErr_SetString( PyExc_RuntimeError,
   55313             :               "Object given is not a Python function" );
   55314           0 :             SWIG_fail;
   55315             :           }
   55316          12 :           psProgressInfo->psPyCallback = swig_obj[2];
   55317          12 :           arg3 = PyProgressProxy;
   55318             :         }
   55319             :         
   55320             :       }
   55321             :       
   55322             :     }
   55323             :   }
   55324         245 :   if (swig_obj[3]) {
   55325           0 :     {
   55326             :       /* %typemap(in) ( void* callback_data=NULL)  */
   55327           0 :       psProgressInfo->psPyCallbackData = swig_obj[3] ;
   55328             :     }
   55329             :   }
   55330         245 :   {
   55331         245 :     const int bLocalUseExceptions = GetUseExceptions();
   55332         245 :     if ( bLocalUseExceptions ) {
   55333         245 :       pushErrorHandler();
   55334             :     }
   55335         245 :     {
   55336         245 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55337         245 :       result = (bool)GDALAlgorithmHS_ParseRunAndFinalize(arg1,arg2,arg3,arg4);
   55338         245 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55339             :     }
   55340         245 :     if ( bLocalUseExceptions ) {
   55341         245 :       popErrorHandler();
   55342             :     }
   55343             : #ifndef SED_HACKS
   55344             :     if ( bLocalUseExceptions ) {
   55345             :       CPLErr eclass = CPLGetLastErrorType();
   55346             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55347             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55348             :       }
   55349             :     }
   55350             : #endif
   55351             :   }
   55352         245 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   55353         245 :   {
   55354             :     /* %typemap(freearg) char **dict */
   55355         245 :     CSLDestroy( arg2 );
   55356             :   }
   55357         245 :   {
   55358             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   55359             :     
   55360         245 :     CPLFree(psProgressInfo);
   55361             :     
   55362             :   }
   55363         405 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55364             :   return resultobj;
   55365           0 : fail:
   55366           0 :   {
   55367             :     /* %typemap(freearg) char **dict */
   55368           0 :     CSLDestroy( arg2 );
   55369             :   }
   55370           0 :   {
   55371             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   55372             :     
   55373           0 :     CPLFree(psProgressInfo);
   55374             :     
   55375             :   }
   55376             :   return NULL;
   55377             : }
   55378             : 
   55379             : 
   55380           3 : SWIGINTERN PyObject *_wrap_Algorithm_GetUsageAsJSON(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55381           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55382           3 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55383           3 :   void *argp1 = 0 ;
   55384           3 :   int res1 = 0 ;
   55385           3 :   PyObject *swig_obj[1] ;
   55386           3 :   retStringAndCPLFree *result = 0 ;
   55387             :   
   55388           3 :   if (!args) SWIG_fail;
   55389           3 :   swig_obj[0] = args;
   55390           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   55391           3 :   if (!SWIG_IsOK(res1)) {
   55392           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetUsageAsJSON" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55393             :   }
   55394           3 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55395           3 :   {
   55396           3 :     const int bLocalUseExceptions = GetUseExceptions();
   55397           3 :     if ( bLocalUseExceptions ) {
   55398           3 :       pushErrorHandler();
   55399             :     }
   55400           3 :     {
   55401           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55402           3 :       result = (retStringAndCPLFree *)GDALAlgorithmHS_GetUsageAsJSON(arg1);
   55403           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55404             :     }
   55405           3 :     if ( bLocalUseExceptions ) {
   55406           3 :       popErrorHandler();
   55407             :     }
   55408             : #ifndef SED_HACKS
   55409             :     if ( bLocalUseExceptions ) {
   55410             :       CPLErr eclass = CPLGetLastErrorType();
   55411             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55412             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55413             :       }
   55414             :     }
   55415             : #endif
   55416             :   }
   55417           3 :   {
   55418             :     /* %typemap(out) (retStringAndCPLFree*) */
   55419           3 :     Py_XDECREF(resultobj);
   55420           3 :     if(result)
   55421             :     {
   55422           3 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   55423           3 :       CPLFree(result);
   55424             :     }
   55425             :     else
   55426             :     {
   55427           0 :       resultobj = Py_None;
   55428           0 :       Py_INCREF(resultobj);
   55429             :     }
   55430             :   }
   55431           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; } }
   55432             :   return resultobj;
   55433             : fail:
   55434             :   return NULL;
   55435             : }
   55436             : 
   55437             : 
   55438         109 : SWIGINTERN PyObject *_wrap_Algorithm_GetArgNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55439         109 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55440         109 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55441         109 :   void *argp1 = 0 ;
   55442         109 :   int res1 = 0 ;
   55443         109 :   PyObject *swig_obj[1] ;
   55444         109 :   char **result = 0 ;
   55445             :   
   55446         109 :   if (!args) SWIG_fail;
   55447         109 :   swig_obj[0] = args;
   55448         109 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   55449         109 :   if (!SWIG_IsOK(res1)) {
   55450           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetArgNames" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55451             :   }
   55452         109 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55453         109 :   {
   55454         109 :     const int bLocalUseExceptions = GetUseExceptions();
   55455         109 :     if ( bLocalUseExceptions ) {
   55456         109 :       pushErrorHandler();
   55457             :     }
   55458         109 :     {
   55459         109 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55460         109 :       result = (char **)GDALAlgorithmHS_GetArgNames(arg1);
   55461         109 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55462             :     }
   55463         109 :     if ( bLocalUseExceptions ) {
   55464         109 :       popErrorHandler();
   55465             :     }
   55466             : #ifndef SED_HACKS
   55467             :     if ( bLocalUseExceptions ) {
   55468             :       CPLErr eclass = CPLGetLastErrorType();
   55469             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55470             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55471             :       }
   55472             :     }
   55473             : #endif
   55474             :   }
   55475         109 :   {
   55476             :     /* %typemap(out) char **CSL -> ( string ) */
   55477         109 :     bool bErr = false;
   55478         109 :     resultobj = CSLToList(result, &bErr);
   55479         109 :     CSLDestroy(result);
   55480         109 :     if( bErr ) {
   55481           0 :       SWIG_fail;
   55482             :     }
   55483             :   }
   55484         109 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55485             :   return resultobj;
   55486             : fail:
   55487             :   return NULL;
   55488             : }
   55489             : 
   55490             : 
   55491        7091 : SWIGINTERN PyObject *_wrap_Algorithm_GetArg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55492        7091 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55493        7091 :   GDALAlgorithmHS *arg1 = (GDALAlgorithmHS *) 0 ;
   55494        7091 :   char *arg2 = (char *) 0 ;
   55495        7091 :   void *argp1 = 0 ;
   55496        7091 :   int res1 = 0 ;
   55497        7091 :   int res2 ;
   55498        7091 :   char *buf2 = 0 ;
   55499        7091 :   int alloc2 = 0 ;
   55500        7091 :   PyObject *swig_obj[2] ;
   55501        7091 :   GDALAlgorithmArgHS *result = 0 ;
   55502             :   
   55503        7091 :   if (!SWIG_Python_UnpackTuple(args, "Algorithm_GetArg", 2, 2, swig_obj)) SWIG_fail;
   55504        7091 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmHS, 0 |  0 );
   55505        7091 :   if (!SWIG_IsOK(res1)) {
   55506           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Algorithm_GetArg" "', argument " "1"" of type '" "GDALAlgorithmHS *""'"); 
   55507             :   }
   55508        7091 :   arg1 = reinterpret_cast< GDALAlgorithmHS * >(argp1);
   55509        7091 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   55510        7091 :   if (!SWIG_IsOK(res2)) {
   55511           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Algorithm_GetArg" "', argument " "2"" of type '" "char const *""'");
   55512             :   }
   55513        7091 :   arg2 = reinterpret_cast< char * >(buf2);
   55514        7091 :   {
   55515        7091 :     if (!arg2) {
   55516           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   55517             :     }
   55518             :   }
   55519        7090 :   {
   55520        7090 :     const int bLocalUseExceptions = GetUseExceptions();
   55521        7090 :     if ( bLocalUseExceptions ) {
   55522        7087 :       pushErrorHandler();
   55523             :     }
   55524        7090 :     {
   55525        7090 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55526        7090 :       result = (GDALAlgorithmArgHS *)GDALAlgorithmHS_GetArg(arg1,(char const *)arg2);
   55527        7090 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55528             :     }
   55529        7090 :     if ( bLocalUseExceptions ) {
   55530        7087 :       popErrorHandler();
   55531             :     }
   55532             : #ifndef SED_HACKS
   55533             :     if ( bLocalUseExceptions ) {
   55534             :       CPLErr eclass = CPLGetLastErrorType();
   55535             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55536             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55537             :       }
   55538             :     }
   55539             : #endif
   55540             :   }
   55541        7090 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAlgorithmArgHS, SWIG_POINTER_OWN |  0 );
   55542        7090 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   55543        7091 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55544             :   return resultobj;
   55545           1 : fail:
   55546           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   55547             :   return NULL;
   55548             : }
   55549             : 
   55550             : 
   55551         277 : SWIGINTERN PyObject *Algorithm_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55552         277 :   PyObject *obj;
   55553         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   55554         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALAlgorithmHS, SWIG_NewClientData(obj));
   55555         277 :   return SWIG_Py_Void();
   55556             : }
   55557             : 
   55558        1485 : SWIGINTERN PyObject *_wrap_delete_AlgorithmRegistry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55559        1485 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55560        1485 :   GDALAlgorithmRegistryHS *arg1 = (GDALAlgorithmRegistryHS *) 0 ;
   55561        1485 :   void *argp1 = 0 ;
   55562        1485 :   int res1 = 0 ;
   55563        1485 :   PyObject *swig_obj[1] ;
   55564             :   
   55565        1485 :   if (!args) SWIG_fail;
   55566        1485 :   swig_obj[0] = args;
   55567        1485 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmRegistryHS, SWIG_POINTER_DISOWN |  0 );
   55568        1485 :   if (!SWIG_IsOK(res1)) {
   55569           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AlgorithmRegistry" "', argument " "1"" of type '" "GDALAlgorithmRegistryHS *""'"); 
   55570             :   }
   55571        1485 :   arg1 = reinterpret_cast< GDALAlgorithmRegistryHS * >(argp1);
   55572        1485 :   {
   55573        1485 :     const int bLocalUseExceptions = GetUseExceptions();
   55574        1485 :     if ( bLocalUseExceptions ) {
   55575        1484 :       pushErrorHandler();
   55576             :     }
   55577        1485 :     {
   55578        1485 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55579        1485 :       delete_GDALAlgorithmRegistryHS(arg1);
   55580        1485 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55581             :     }
   55582        1485 :     if ( bLocalUseExceptions ) {
   55583        1484 :       popErrorHandler();
   55584             :     }
   55585             : #ifndef SED_HACKS
   55586             :     if ( bLocalUseExceptions ) {
   55587             :       CPLErr eclass = CPLGetLastErrorType();
   55588             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55589             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55590             :       }
   55591             :     }
   55592             : #endif
   55593             :   }
   55594        1485 :   resultobj = SWIG_Py_Void();
   55595        1485 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55596             :   return resultobj;
   55597             : fail:
   55598             :   return NULL;
   55599             : }
   55600             : 
   55601             : 
   55602           1 : SWIGINTERN PyObject *_wrap_AlgorithmRegistry_GetAlgNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55603           1 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55604           1 :   GDALAlgorithmRegistryHS *arg1 = (GDALAlgorithmRegistryHS *) 0 ;
   55605           1 :   void *argp1 = 0 ;
   55606           1 :   int res1 = 0 ;
   55607           1 :   PyObject *swig_obj[1] ;
   55608           1 :   char **result = 0 ;
   55609             :   
   55610           1 :   if (!args) SWIG_fail;
   55611           1 :   swig_obj[0] = args;
   55612           1 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmRegistryHS, 0 |  0 );
   55613           1 :   if (!SWIG_IsOK(res1)) {
   55614           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmRegistry_GetAlgNames" "', argument " "1"" of type '" "GDALAlgorithmRegistryHS *""'"); 
   55615             :   }
   55616           1 :   arg1 = reinterpret_cast< GDALAlgorithmRegistryHS * >(argp1);
   55617           1 :   {
   55618           1 :     const int bLocalUseExceptions = GetUseExceptions();
   55619           1 :     if ( bLocalUseExceptions ) {
   55620           1 :       pushErrorHandler();
   55621             :     }
   55622           1 :     {
   55623           1 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55624           1 :       result = (char **)GDALAlgorithmRegistryHS_GetAlgNames(arg1);
   55625           1 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55626             :     }
   55627           1 :     if ( bLocalUseExceptions ) {
   55628           1 :       popErrorHandler();
   55629             :     }
   55630             : #ifndef SED_HACKS
   55631             :     if ( bLocalUseExceptions ) {
   55632             :       CPLErr eclass = CPLGetLastErrorType();
   55633             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55634             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55635             :       }
   55636             :     }
   55637             : #endif
   55638             :   }
   55639           1 :   {
   55640             :     /* %typemap(out) char **CSL -> ( string ) */
   55641           1 :     bool bErr = false;
   55642           1 :     resultobj = CSLToList(result, &bErr);
   55643           1 :     CSLDestroy(result);
   55644           1 :     if( bErr ) {
   55645           0 :       SWIG_fail;
   55646             :     }
   55647             :   }
   55648           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; } }
   55649             :   return resultobj;
   55650             : fail:
   55651             :   return NULL;
   55652             : }
   55653             : 
   55654             : 
   55655        1487 : SWIGINTERN PyObject *_wrap_AlgorithmRegistry_InstantiateAlg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55656        1487 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55657        1487 :   GDALAlgorithmRegistryHS *arg1 = (GDALAlgorithmRegistryHS *) 0 ;
   55658        1487 :   char *arg2 = (char *) 0 ;
   55659        1487 :   void *argp1 = 0 ;
   55660        1487 :   int res1 = 0 ;
   55661        1487 :   int res2 ;
   55662        1487 :   char *buf2 = 0 ;
   55663        1487 :   int alloc2 = 0 ;
   55664        1487 :   PyObject *swig_obj[2] ;
   55665        1487 :   GDALAlgorithmHS *result = 0 ;
   55666             :   
   55667        1487 :   if (!SWIG_Python_UnpackTuple(args, "AlgorithmRegistry_InstantiateAlg", 2, 2, swig_obj)) SWIG_fail;
   55668        1487 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALAlgorithmRegistryHS, 0 |  0 );
   55669        1487 :   if (!SWIG_IsOK(res1)) {
   55670           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AlgorithmRegistry_InstantiateAlg" "', argument " "1"" of type '" "GDALAlgorithmRegistryHS *""'"); 
   55671             :   }
   55672        1487 :   arg1 = reinterpret_cast< GDALAlgorithmRegistryHS * >(argp1);
   55673        1487 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   55674        1487 :   if (!SWIG_IsOK(res2)) {
   55675           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AlgorithmRegistry_InstantiateAlg" "', argument " "2"" of type '" "char const *""'");
   55676             :   }
   55677        1487 :   arg2 = reinterpret_cast< char * >(buf2);
   55678        1487 :   {
   55679        1487 :     if (!arg2) {
   55680           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   55681             :     }
   55682             :   }
   55683        1486 :   {
   55684        1486 :     const int bLocalUseExceptions = GetUseExceptions();
   55685        1486 :     if ( bLocalUseExceptions ) {
   55686        1485 :       pushErrorHandler();
   55687             :     }
   55688        1486 :     {
   55689        1486 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55690        1486 :       result = (GDALAlgorithmHS *)GDALAlgorithmRegistryHS_InstantiateAlg(arg1,(char const *)arg2);
   55691        1486 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55692             :     }
   55693        1486 :     if ( bLocalUseExceptions ) {
   55694        1485 :       popErrorHandler();
   55695             :     }
   55696             : #ifndef SED_HACKS
   55697             :     if ( bLocalUseExceptions ) {
   55698             :       CPLErr eclass = CPLGetLastErrorType();
   55699             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55700             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55701             :       }
   55702             :     }
   55703             : #endif
   55704             :   }
   55705        1486 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAlgorithmHS, SWIG_POINTER_OWN |  0 );
   55706        1486 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   55707        1487 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55708             :   return resultobj;
   55709           1 : fail:
   55710           1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   55711             :   return NULL;
   55712             : }
   55713             : 
   55714             : 
   55715         277 : SWIGINTERN PyObject *AlgorithmRegistry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55716         277 :   PyObject *obj;
   55717         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   55718         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALAlgorithmRegistryHS, SWIG_NewClientData(obj));
   55719         277 :   return SWIG_Py_Void();
   55720             : }
   55721             : 
   55722        1548 : SWIGINTERN PyObject *_wrap_delete_ArgDatasetValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55723        1548 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55724        1548 :   GDALArgDatasetValueHS *arg1 = (GDALArgDatasetValueHS *) 0 ;
   55725        1548 :   void *argp1 = 0 ;
   55726        1548 :   int res1 = 0 ;
   55727        1548 :   PyObject *swig_obj[1] ;
   55728             :   
   55729        1548 :   if (!args) SWIG_fail;
   55730        1548 :   swig_obj[0] = args;
   55731        1548 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALArgDatasetValueHS, SWIG_POINTER_DISOWN |  0 );
   55732        1548 :   if (!SWIG_IsOK(res1)) {
   55733           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ArgDatasetValue" "', argument " "1"" of type '" "GDALArgDatasetValueHS *""'"); 
   55734             :   }
   55735        1548 :   arg1 = reinterpret_cast< GDALArgDatasetValueHS * >(argp1);
   55736        1548 :   {
   55737        1548 :     const int bLocalUseExceptions = GetUseExceptions();
   55738        1548 :     if ( bLocalUseExceptions ) {
   55739        1546 :       pushErrorHandler();
   55740             :     }
   55741        1548 :     {
   55742        1548 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55743        1548 :       delete_GDALArgDatasetValueHS(arg1);
   55744        1548 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55745             :     }
   55746        1548 :     if ( bLocalUseExceptions ) {
   55747        1546 :       popErrorHandler();
   55748             :     }
   55749             : #ifndef SED_HACKS
   55750             :     if ( bLocalUseExceptions ) {
   55751             :       CPLErr eclass = CPLGetLastErrorType();
   55752             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55753             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55754             :       }
   55755             :     }
   55756             : #endif
   55757             :   }
   55758        1548 :   resultobj = SWIG_Py_Void();
   55759        1548 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55760             :   return resultobj;
   55761             : fail:
   55762             :   return NULL;
   55763             : }
   55764             : 
   55765             : 
   55766           2 : SWIGINTERN PyObject *_wrap_ArgDatasetValue_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55767           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55768           2 :   GDALArgDatasetValueHS *arg1 = (GDALArgDatasetValueHS *) 0 ;
   55769           2 :   void *argp1 = 0 ;
   55770           2 :   int res1 = 0 ;
   55771           2 :   PyObject *swig_obj[1] ;
   55772           2 :   char *result = 0 ;
   55773             :   
   55774           2 :   if (!args) SWIG_fail;
   55775           2 :   swig_obj[0] = args;
   55776           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALArgDatasetValueHS, 0 |  0 );
   55777           2 :   if (!SWIG_IsOK(res1)) {
   55778           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArgDatasetValue_GetName" "', argument " "1"" of type '" "GDALArgDatasetValueHS *""'"); 
   55779             :   }
   55780           2 :   arg1 = reinterpret_cast< GDALArgDatasetValueHS * >(argp1);
   55781           2 :   {
   55782           2 :     const int bLocalUseExceptions = GetUseExceptions();
   55783           2 :     if ( bLocalUseExceptions ) {
   55784           2 :       pushErrorHandler();
   55785             :     }
   55786           2 :     {
   55787           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55788           2 :       result = (char *)GDALArgDatasetValueHS_GetName(arg1);
   55789           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55790             :     }
   55791           2 :     if ( bLocalUseExceptions ) {
   55792           2 :       popErrorHandler();
   55793             :     }
   55794             : #ifndef SED_HACKS
   55795             :     if ( bLocalUseExceptions ) {
   55796             :       CPLErr eclass = CPLGetLastErrorType();
   55797             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55798             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55799             :       }
   55800             :     }
   55801             : #endif
   55802             :   }
   55803           2 :   resultobj = SWIG_FromCharPtr((const char *)result);
   55804           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; } }
   55805             :   return resultobj;
   55806             : fail:
   55807             :   return NULL;
   55808             : }
   55809             : 
   55810             : 
   55811         504 : SWIGINTERN PyObject *_wrap_ArgDatasetValue_GetDataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55812         504 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55813         504 :   GDALArgDatasetValueHS *arg1 = (GDALArgDatasetValueHS *) 0 ;
   55814         504 :   void *argp1 = 0 ;
   55815         504 :   int res1 = 0 ;
   55816         504 :   PyObject *swig_obj[1] ;
   55817         504 :   GDALDatasetShadow *result = 0 ;
   55818             :   
   55819         504 :   if (!args) SWIG_fail;
   55820         504 :   swig_obj[0] = args;
   55821         504 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALArgDatasetValueHS, 0 |  0 );
   55822         504 :   if (!SWIG_IsOK(res1)) {
   55823           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArgDatasetValue_GetDataset" "', argument " "1"" of type '" "GDALArgDatasetValueHS *""'"); 
   55824             :   }
   55825         504 :   arg1 = reinterpret_cast< GDALArgDatasetValueHS * >(argp1);
   55826         504 :   {
   55827         504 :     const int bLocalUseExceptions = GetUseExceptions();
   55828         504 :     if ( bLocalUseExceptions ) {
   55829         504 :       pushErrorHandler();
   55830             :     }
   55831         504 :     {
   55832         504 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55833         504 :       result = (GDALDatasetShadow *)GDALArgDatasetValueHS_GetDataset(arg1);
   55834         504 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55835             :     }
   55836         504 :     if ( bLocalUseExceptions ) {
   55837         504 :       popErrorHandler();
   55838             :     }
   55839             : #ifndef SED_HACKS
   55840             :     if ( bLocalUseExceptions ) {
   55841             :       CPLErr eclass = CPLGetLastErrorType();
   55842             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55843             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55844             :       }
   55845             :     }
   55846             : #endif
   55847             :   }
   55848         504 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   55849         504 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55850             :   return resultobj;
   55851             : fail:
   55852             :   return NULL;
   55853             : }
   55854             : 
   55855             : 
   55856         831 : SWIGINTERN PyObject *_wrap_ArgDatasetValue_SetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55857         831 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55858         831 :   GDALArgDatasetValueHS *arg1 = (GDALArgDatasetValueHS *) 0 ;
   55859         831 :   char *arg2 = (char *) 0 ;
   55860         831 :   void *argp1 = 0 ;
   55861         831 :   int res1 = 0 ;
   55862         831 :   int res2 ;
   55863         831 :   char *buf2 = 0 ;
   55864         831 :   int alloc2 = 0 ;
   55865         831 :   PyObject *swig_obj[2] ;
   55866             :   
   55867         831 :   if (!SWIG_Python_UnpackTuple(args, "ArgDatasetValue_SetName", 2, 2, swig_obj)) SWIG_fail;
   55868         831 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALArgDatasetValueHS, 0 |  0 );
   55869         831 :   if (!SWIG_IsOK(res1)) {
   55870           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArgDatasetValue_SetName" "', argument " "1"" of type '" "GDALArgDatasetValueHS *""'"); 
   55871             :   }
   55872         831 :   arg1 = reinterpret_cast< GDALArgDatasetValueHS * >(argp1);
   55873         831 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   55874         831 :   if (!SWIG_IsOK(res2)) {
   55875           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ArgDatasetValue_SetName" "', argument " "2"" of type '" "char const *""'");
   55876             :   }
   55877         831 :   arg2 = reinterpret_cast< char * >(buf2);
   55878         831 :   {
   55879         831 :     if (!arg2) {
   55880           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   55881             :     }
   55882             :   }
   55883         831 :   {
   55884         831 :     const int bLocalUseExceptions = GetUseExceptions();
   55885         831 :     if ( bLocalUseExceptions ) {
   55886         829 :       pushErrorHandler();
   55887             :     }
   55888         831 :     {
   55889         831 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55890         831 :       GDALArgDatasetValueHS_SetName(arg1,(char const *)arg2);
   55891         831 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55892             :     }
   55893         831 :     if ( bLocalUseExceptions ) {
   55894         829 :       popErrorHandler();
   55895             :     }
   55896             : #ifndef SED_HACKS
   55897             :     if ( bLocalUseExceptions ) {
   55898             :       CPLErr eclass = CPLGetLastErrorType();
   55899             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55900             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55901             :       }
   55902             :     }
   55903             : #endif
   55904             :   }
   55905         831 :   resultobj = SWIG_Py_Void();
   55906         831 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   55907         831 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55908             :   return resultobj;
   55909           0 : fail:
   55910           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   55911             :   return NULL;
   55912             : }
   55913             : 
   55914             : 
   55915         215 : SWIGINTERN PyObject *_wrap_ArgDatasetValue_SetDataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55916         215 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55917         215 :   GDALArgDatasetValueHS *arg1 = (GDALArgDatasetValueHS *) 0 ;
   55918         215 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   55919         215 :   void *argp1 = 0 ;
   55920         215 :   int res1 = 0 ;
   55921         215 :   void *argp2 = 0 ;
   55922         215 :   int res2 = 0 ;
   55923         215 :   PyObject *swig_obj[2] ;
   55924             :   
   55925         215 :   if (!SWIG_Python_UnpackTuple(args, "ArgDatasetValue_SetDataset", 2, 2, swig_obj)) SWIG_fail;
   55926         215 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALArgDatasetValueHS, 0 |  0 );
   55927         215 :   if (!SWIG_IsOK(res1)) {
   55928           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArgDatasetValue_SetDataset" "', argument " "1"" of type '" "GDALArgDatasetValueHS *""'"); 
   55929             :   }
   55930         215 :   arg1 = reinterpret_cast< GDALArgDatasetValueHS * >(argp1);
   55931         215 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   55932         215 :   if (!SWIG_IsOK(res2)) {
   55933           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ArgDatasetValue_SetDataset" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   55934             :   }
   55935         215 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   55936         215 :   {
   55937         215 :     const int bLocalUseExceptions = GetUseExceptions();
   55938         215 :     if ( bLocalUseExceptions ) {
   55939         215 :       pushErrorHandler();
   55940             :     }
   55941         215 :     {
   55942         215 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   55943         215 :       GDALArgDatasetValueHS_SetDataset(arg1,arg2);
   55944         215 :       SWIG_PYTHON_THREAD_END_ALLOW;
   55945             :     }
   55946         215 :     if ( bLocalUseExceptions ) {
   55947         215 :       popErrorHandler();
   55948             :     }
   55949             : #ifndef SED_HACKS
   55950             :     if ( bLocalUseExceptions ) {
   55951             :       CPLErr eclass = CPLGetLastErrorType();
   55952             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   55953             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   55954             :       }
   55955             :     }
   55956             : #endif
   55957             :   }
   55958         215 :   resultobj = SWIG_Py_Void();
   55959         215 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   55960             :   return resultobj;
   55961             : fail:
   55962             :   return NULL;
   55963             : }
   55964             : 
   55965             : 
   55966         277 : SWIGINTERN PyObject *ArgDatasetValue_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55967         277 :   PyObject *obj;
   55968         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   55969         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALArgDatasetValueHS, SWIG_NewClientData(obj));
   55970         277 :   return SWIG_Py_Void();
   55971             : }
   55972             : 
   55973         401 : SWIGINTERN PyObject *_wrap_ApplyGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   55974         401 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   55975         401 :   double *arg1 ;
   55976         401 :   double arg2 ;
   55977         401 :   double arg3 ;
   55978         401 :   double *arg4 = (double *) 0 ;
   55979         401 :   double *arg5 = (double *) 0 ;
   55980         401 :   double argin1[6] ;
   55981         401 :   double val2 ;
   55982         401 :   int ecode2 = 0 ;
   55983         401 :   double val3 ;
   55984         401 :   int ecode3 = 0 ;
   55985         401 :   double temp4 ;
   55986         401 :   int res4 = SWIG_TMPOBJ ;
   55987         401 :   double temp5 ;
   55988         401 :   int res5 = SWIG_TMPOBJ ;
   55989         401 :   PyObject *swig_obj[3] ;
   55990             :   
   55991         401 :   arg4 = &temp4;
   55992         401 :   arg5 = &temp5;
   55993         401 :   if (!SWIG_Python_UnpackTuple(args, "ApplyGeoTransform", 3, 3, swig_obj)) SWIG_fail;
   55994         401 :   {
   55995             :     /* %typemap(in) (double argin1[ANY]) */
   55996         401 :     arg1 = argin1;
   55997         401 :     if (! PySequence_Check(swig_obj[0]) ) {
   55998           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   55999           0 :       SWIG_fail;
   56000             :     }
   56001         401 :     Py_ssize_t seq_size = PySequence_Size(swig_obj[0]);
   56002         401 :     if ( seq_size != 6 ) {
   56003           0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   56004           0 :       SWIG_fail;
   56005             :     }
   56006        2807 :     for (unsigned int i=0; i<6; i++) {
   56007        2406 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   56008        2406 :       double val;
   56009        2406 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   56010           0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   56011           0 :         Py_DECREF(o);
   56012           0 :         SWIG_fail;
   56013             :       }
   56014        2406 :       arg1[i] =  val;
   56015        2406 :       Py_DECREF(o);
   56016             :     }
   56017             :   }
   56018         401 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   56019         401 :   if (!SWIG_IsOK(ecode2)) {
   56020           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ApplyGeoTransform" "', argument " "2"" of type '" "double""'");
   56021             :   } 
   56022         401 :   arg2 = static_cast< double >(val2);
   56023         401 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   56024         401 :   if (!SWIG_IsOK(ecode3)) {
   56025           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ApplyGeoTransform" "', argument " "3"" of type '" "double""'");
   56026             :   } 
   56027         401 :   arg3 = static_cast< double >(val3);
   56028         401 :   {
   56029         401 :     const int bLocalUseExceptions = GetUseExceptions();
   56030         401 :     if ( bLocalUseExceptions ) {
   56031           0 :       pushErrorHandler();
   56032             :     }
   56033         401 :     {
   56034         401 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56035         401 :       GDALApplyGeoTransform(arg1,arg2,arg3,arg4,arg5);
   56036         401 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56037             :     }
   56038         401 :     if ( bLocalUseExceptions ) {
   56039           0 :       popErrorHandler();
   56040             :     }
   56041             : #ifndef SED_HACKS
   56042             :     if ( bLocalUseExceptions ) {
   56043             :       CPLErr eclass = CPLGetLastErrorType();
   56044             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56045             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56046             :       }
   56047             :     }
   56048             : #endif
   56049             :   }
   56050         401 :   resultobj = SWIG_Py_Void();
   56051         401 :   if (ReturnSame(SWIG_IsTmpObj(res4))) {
   56052         401 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
   56053             :   } else {
   56054           0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   56055           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
   56056             :   }
   56057         401 :   if (ReturnSame(SWIG_IsTmpObj(res5))) {
   56058         401 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
   56059             :   } else {
   56060           0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   56061           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
   56062             :   }
   56063         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; } }
   56064             :   return resultobj;
   56065             : fail:
   56066             :   return NULL;
   56067             : }
   56068             : 
   56069             : 
   56070          17 : SWIGINTERN PyObject *_wrap_InvGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56071          17 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56072          17 :   double *arg1 ;
   56073          17 :   double *arg2 ;
   56074          17 :   double argin1[6] ;
   56075          17 :   double argout2[6] ;
   56076          17 :   PyObject *swig_obj[1] ;
   56077          17 :   RETURN_NONE result;
   56078             :   
   56079          17 :   {
   56080             :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   56081          17 :     memset(argout2, 0, sizeof(argout2));
   56082          17 :     arg2 = argout2;
   56083             :   }
   56084          17 :   if (!args) SWIG_fail;
   56085          17 :   swig_obj[0] = args;
   56086          17 :   {
   56087             :     /* %typemap(in) (double argin1[ANY]) */
   56088          17 :     arg1 = argin1;
   56089          17 :     if (! PySequence_Check(swig_obj[0]) ) {
   56090           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   56091           0 :       SWIG_fail;
   56092             :     }
   56093          17 :     Py_ssize_t seq_size = PySequence_Size(swig_obj[0]);
   56094          17 :     if ( seq_size != 6 ) {
   56095           0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   56096           0 :       SWIG_fail;
   56097             :     }
   56098         119 :     for (unsigned int i=0; i<6; i++) {
   56099         102 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   56100         102 :       double val;
   56101         102 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   56102           0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   56103           0 :         Py_DECREF(o);
   56104           0 :         SWIG_fail;
   56105             :       }
   56106         102 :       arg1[i] =  val;
   56107         102 :       Py_DECREF(o);
   56108             :     }
   56109             :   }
   56110          17 :   {
   56111          17 :     const int bLocalUseExceptions = GetUseExceptions();
   56112          17 :     if ( bLocalUseExceptions ) {
   56113           9 :       pushErrorHandler();
   56114             :     }
   56115          17 :     {
   56116          17 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56117          17 :       result = (RETURN_NONE)GDALInvGeoTransform(arg1,arg2);
   56118          17 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56119             :     }
   56120          17 :     if ( bLocalUseExceptions ) {
   56121           9 :       popErrorHandler();
   56122             :     }
   56123             : #ifndef SED_HACKS
   56124             :     if ( bLocalUseExceptions ) {
   56125             :       CPLErr eclass = CPLGetLastErrorType();
   56126             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56127             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56128             :       }
   56129             :     }
   56130             : #endif
   56131             :   }
   56132             :   /*%typemap(out) IF_FALSE_RETURN_NONE */
   56133          17 :   {
   56134             :     /* %typemap(argout) (double argout[ANY]) */
   56135          17 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 6 );
   56136             : #if SWIG_VERSION >= 0x040300
   56137             :     resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
   56138             : #else
   56139          17 :     resultobj = SWIG_Python_AppendOutput(resultobj,out);
   56140             : #endif
   56141             :   }
   56142          17 :   {
   56143             :     /* %typemap(ret) IF_FALSE_RETURN_NONE */
   56144          17 :     if (result == 0 ) {
   56145           3 :       Py_XDECREF( resultobj );
   56146           3 :       resultobj = Py_None;
   56147           3 :       Py_INCREF(resultobj);
   56148             :     }
   56149          17 :     if (resultobj == 0) {
   56150           0 :       resultobj = Py_None;
   56151           0 :       Py_INCREF(resultobj);
   56152             :     }
   56153             :   }
   56154          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; } }
   56155             :   return resultobj;
   56156             : fail:
   56157             :   return NULL;
   56158             : }
   56159             : 
   56160             : 
   56161          10 : SWIGINTERN PyObject *_wrap_ApplyHomography(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56162          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56163          10 :   double *arg1 ;
   56164          10 :   double arg2 ;
   56165          10 :   double arg3 ;
   56166          10 :   double *arg4 = (double *) 0 ;
   56167          10 :   double *arg5 = (double *) 0 ;
   56168          10 :   double argin1[9] ;
   56169          10 :   double val2 ;
   56170          10 :   int ecode2 = 0 ;
   56171          10 :   double val3 ;
   56172          10 :   int ecode3 = 0 ;
   56173          10 :   double temp4 ;
   56174          10 :   int res4 = SWIG_TMPOBJ ;
   56175          10 :   double temp5 ;
   56176          10 :   int res5 = SWIG_TMPOBJ ;
   56177          10 :   PyObject *swig_obj[3] ;
   56178          10 :   int result;
   56179             :   
   56180          10 :   arg4 = &temp4;
   56181          10 :   arg5 = &temp5;
   56182          10 :   if (!SWIG_Python_UnpackTuple(args, "ApplyHomography", 3, 3, swig_obj)) SWIG_fail;
   56183          10 :   {
   56184             :     /* %typemap(in) (double argin1[ANY]) */
   56185          10 :     arg1 = argin1;
   56186          10 :     if (! PySequence_Check(swig_obj[0]) ) {
   56187           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   56188           0 :       SWIG_fail;
   56189             :     }
   56190          10 :     Py_ssize_t seq_size = PySequence_Size(swig_obj[0]);
   56191          10 :     if ( seq_size != 9 ) {
   56192           0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   56193           0 :       SWIG_fail;
   56194             :     }
   56195         100 :     for (unsigned int i=0; i<9; i++) {
   56196          90 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   56197          90 :       double val;
   56198          90 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   56199           0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   56200           0 :         Py_DECREF(o);
   56201           0 :         SWIG_fail;
   56202             :       }
   56203          90 :       arg1[i] =  val;
   56204          90 :       Py_DECREF(o);
   56205             :     }
   56206             :   }
   56207          10 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   56208          10 :   if (!SWIG_IsOK(ecode2)) {
   56209           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ApplyHomography" "', argument " "2"" of type '" "double""'");
   56210             :   } 
   56211          10 :   arg2 = static_cast< double >(val2);
   56212          10 :   ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
   56213          10 :   if (!SWIG_IsOK(ecode3)) {
   56214           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ApplyHomography" "', argument " "3"" of type '" "double""'");
   56215             :   } 
   56216          10 :   arg3 = static_cast< double >(val3);
   56217          10 :   {
   56218          10 :     const int bLocalUseExceptions = GetUseExceptions();
   56219          10 :     if ( bLocalUseExceptions ) {
   56220          10 :       pushErrorHandler();
   56221             :     }
   56222          10 :     {
   56223          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56224          10 :       result = (int)GDALApplyHomography(arg1,arg2,arg3,arg4,arg5);
   56225          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56226             :     }
   56227          10 :     if ( bLocalUseExceptions ) {
   56228          10 :       popErrorHandler();
   56229             :     }
   56230             : #ifndef SED_HACKS
   56231             :     if ( bLocalUseExceptions ) {
   56232             :       CPLErr eclass = CPLGetLastErrorType();
   56233             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56234             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56235             :       }
   56236             :     }
   56237             : #endif
   56238             :   }
   56239          10 :   resultobj = SWIG_From_int(static_cast< int >(result));
   56240          10 :   if (ReturnSame(SWIG_IsTmpObj(res4))) {
   56241          10 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
   56242             :   } else {
   56243           0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   56244           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
   56245             :   }
   56246          10 :   if (ReturnSame(SWIG_IsTmpObj(res5))) {
   56247          10 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
   56248             :   } else {
   56249           0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   56250           0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
   56251             :   }
   56252          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; } }
   56253             :   return resultobj;
   56254             : fail:
   56255             :   return NULL;
   56256             : }
   56257             : 
   56258             : 
   56259           7 : SWIGINTERN PyObject *_wrap_InvHomography(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56260           7 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56261           7 :   double *arg1 ;
   56262           7 :   double *arg2 ;
   56263           7 :   double argin1[9] ;
   56264           7 :   double argout2[9] ;
   56265           7 :   PyObject *swig_obj[1] ;
   56266           7 :   RETURN_NONE result;
   56267             :   
   56268           7 :   {
   56269             :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   56270           7 :     memset(argout2, 0, sizeof(argout2));
   56271           7 :     arg2 = argout2;
   56272             :   }
   56273           7 :   if (!args) SWIG_fail;
   56274           7 :   swig_obj[0] = args;
   56275           7 :   {
   56276             :     /* %typemap(in) (double argin1[ANY]) */
   56277           7 :     arg1 = argin1;
   56278           7 :     if (! PySequence_Check(swig_obj[0]) ) {
   56279           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   56280           0 :       SWIG_fail;
   56281             :     }
   56282           7 :     Py_ssize_t seq_size = PySequence_Size(swig_obj[0]);
   56283           7 :     if ( seq_size != 9 ) {
   56284           0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   56285           0 :       SWIG_fail;
   56286             :     }
   56287          70 :     for (unsigned int i=0; i<9; i++) {
   56288          63 :       PyObject *o = PySequence_GetItem(swig_obj[0],i);
   56289          63 :       double val;
   56290          63 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   56291           0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   56292           0 :         Py_DECREF(o);
   56293           0 :         SWIG_fail;
   56294             :       }
   56295          63 :       arg1[i] =  val;
   56296          63 :       Py_DECREF(o);
   56297             :     }
   56298             :   }
   56299           7 :   {
   56300           7 :     const int bLocalUseExceptions = GetUseExceptions();
   56301           7 :     if ( bLocalUseExceptions ) {
   56302           7 :       pushErrorHandler();
   56303             :     }
   56304           7 :     {
   56305           7 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56306           7 :       result = (RETURN_NONE)GDALInvHomography(arg1,arg2);
   56307           7 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56308             :     }
   56309           7 :     if ( bLocalUseExceptions ) {
   56310           7 :       popErrorHandler();
   56311             :     }
   56312             : #ifndef SED_HACKS
   56313             :     if ( bLocalUseExceptions ) {
   56314             :       CPLErr eclass = CPLGetLastErrorType();
   56315             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56316             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56317             :       }
   56318             :     }
   56319             : #endif
   56320             :   }
   56321             :   /*%typemap(out) IF_FALSE_RETURN_NONE */
   56322           7 :   {
   56323             :     /* %typemap(argout) (double argout[ANY]) */
   56324           7 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 9 );
   56325             : #if SWIG_VERSION >= 0x040300
   56326             :     resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
   56327             : #else
   56328           7 :     resultobj = SWIG_Python_AppendOutput(resultobj,out);
   56329             : #endif
   56330             :   }
   56331           7 :   {
   56332             :     /* %typemap(ret) IF_FALSE_RETURN_NONE */
   56333           7 :     if (result == 0 ) {
   56334           3 :       Py_XDECREF( resultobj );
   56335           3 :       resultobj = Py_None;
   56336           3 :       Py_INCREF(resultobj);
   56337             :     }
   56338           7 :     if (resultobj == 0) {
   56339           0 :       resultobj = Py_None;
   56340           0 :       Py_INCREF(resultobj);
   56341             :     }
   56342             :   }
   56343          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; } }
   56344             :   return resultobj;
   56345             : fail:
   56346             :   return NULL;
   56347             : }
   56348             : 
   56349             : 
   56350        3854 : SWIGINTERN PyObject *_wrap_VersionInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56351        3854 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56352        3854 :   char *arg1 = (char *) "VERSION_NUM" ;
   56353        3854 :   int res1 ;
   56354        3854 :   char *buf1 = 0 ;
   56355        3854 :   int alloc1 = 0 ;
   56356        3854 :   PyObject *swig_obj[1] ;
   56357        3854 :   char *result = 0 ;
   56358             :   
   56359        3854 :   if (!SWIG_Python_UnpackTuple(args, "VersionInfo", 0, 1, swig_obj)) SWIG_fail;
   56360        3854 :   if (swig_obj[0]) {
   56361        3854 :     res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   56362        3854 :     if (!SWIG_IsOK(res1)) {
   56363           0 :       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VersionInfo" "', argument " "1"" of type '" "char const *""'");
   56364             :     }
   56365        3854 :     arg1 = reinterpret_cast< char * >(buf1);
   56366             :   }
   56367        3854 :   {
   56368        3854 :     const int bLocalUseExceptions = GetUseExceptions();
   56369        3854 :     if ( bLocalUseExceptions ) {
   56370        3232 :       pushErrorHandler();
   56371             :     }
   56372        3854 :     {
   56373        3854 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56374        3854 :       result = (char *)GDALVersionInfo((char const *)arg1);
   56375        3854 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56376             :     }
   56377        3854 :     if ( bLocalUseExceptions ) {
   56378        3232 :       popErrorHandler();
   56379             :     }
   56380             : #ifndef SED_HACKS
   56381             :     if ( bLocalUseExceptions ) {
   56382             :       CPLErr eclass = CPLGetLastErrorType();
   56383             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56384             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56385             :       }
   56386             :     }
   56387             : #endif
   56388             :   }
   56389        3854 :   resultobj = SWIG_FromCharPtr((const char *)result);
   56390        3854 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   56391        3854 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   56392             :   return resultobj;
   56393           0 : fail:
   56394           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   56395             :   return NULL;
   56396             : }
   56397             : 
   56398             : 
   56399         274 : SWIGINTERN PyObject *_wrap_AllRegister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56400         274 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56401             :   
   56402         274 :   if (!SWIG_Python_UnpackTuple(args, "AllRegister", 0, 0, 0)) SWIG_fail;
   56403         274 :   {
   56404         274 :     const int bLocalUseExceptions = GetUseExceptions();
   56405         274 :     if ( bLocalUseExceptions ) {
   56406         225 :       pushErrorHandler();
   56407             :     }
   56408         274 :     {
   56409         274 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56410         274 :       GDALAllRegister();
   56411         274 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56412             :     }
   56413         274 :     if ( bLocalUseExceptions ) {
   56414         225 :       popErrorHandler();
   56415             :     }
   56416             : #ifndef SED_HACKS
   56417             :     if ( bLocalUseExceptions ) {
   56418             :       CPLErr eclass = CPLGetLastErrorType();
   56419             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56420             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56421             :       }
   56422             :     }
   56423             : #endif
   56424             :   }
   56425         274 :   resultobj = SWIG_Py_Void();
   56426         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; } }
   56427             :   return resultobj;
   56428           0 : fail:
   56429           0 :   return NULL;
   56430             : }
   56431             : 
   56432             : 
   56433           0 : SWIGINTERN PyObject *_wrap_GDALDestroyDriverManager(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56434           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56435             :   
   56436           0 :   if (!SWIG_Python_UnpackTuple(args, "GDALDestroyDriverManager", 0, 0, 0)) SWIG_fail;
   56437           0 :   {
   56438           0 :     const int bLocalUseExceptions = GetUseExceptions();
   56439           0 :     if ( bLocalUseExceptions ) {
   56440           0 :       pushErrorHandler();
   56441             :     }
   56442           0 :     {
   56443           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56444           0 :       GDALDestroyDriverManager();
   56445           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56446             :     }
   56447           0 :     if ( bLocalUseExceptions ) {
   56448           0 :       popErrorHandler();
   56449             :     }
   56450             : #ifndef SED_HACKS
   56451             :     if ( bLocalUseExceptions ) {
   56452             :       CPLErr eclass = CPLGetLastErrorType();
   56453             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56454             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56455             :       }
   56456             :     }
   56457             : #endif
   56458             :   }
   56459           0 :   resultobj = SWIG_Py_Void();
   56460           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; } }
   56461             :   return resultobj;
   56462           0 : fail:
   56463           0 :   return NULL;
   56464             : }
   56465             : 
   56466             : 
   56467          56 : SWIGINTERN PyObject *_wrap_GetCacheMax(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56468          56 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56469          56 :   GIntBig result;
   56470             :   
   56471          56 :   if (!SWIG_Python_UnpackTuple(args, "GetCacheMax", 0, 0, 0)) SWIG_fail;
   56472          56 :   {
   56473          56 :     const int bLocalUseExceptions = GetUseExceptions();
   56474          56 :     if ( bLocalUseExceptions ) {
   56475          26 :       pushErrorHandler();
   56476             :     }
   56477          56 :     {
   56478          56 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56479          56 :       result = wrapper_GDALGetCacheMax();
   56480          56 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56481             :     }
   56482          56 :     if ( bLocalUseExceptions ) {
   56483          26 :       popErrorHandler();
   56484             :     }
   56485             : #ifndef SED_HACKS
   56486             :     if ( bLocalUseExceptions ) {
   56487             :       CPLErr eclass = CPLGetLastErrorType();
   56488             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56489             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56490             :       }
   56491             :     }
   56492             : #endif
   56493             :   }
   56494          56 :   {
   56495          56 :     resultobj = PyLong_FromLongLong(result);
   56496             :   }
   56497          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; } }
   56498             :   return resultobj;
   56499           0 : fail:
   56500           0 :   return NULL;
   56501             : }
   56502             : 
   56503             : 
   56504           2 : SWIGINTERN PyObject *_wrap_GetCacheUsed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56505           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56506           2 :   GIntBig result;
   56507             :   
   56508           2 :   if (!SWIG_Python_UnpackTuple(args, "GetCacheUsed", 0, 0, 0)) SWIG_fail;
   56509           2 :   {
   56510           2 :     const int bLocalUseExceptions = GetUseExceptions();
   56511           2 :     if ( bLocalUseExceptions ) {
   56512           0 :       pushErrorHandler();
   56513             :     }
   56514           2 :     {
   56515           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56516           2 :       result = wrapper_GDALGetCacheUsed();
   56517           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56518             :     }
   56519           2 :     if ( bLocalUseExceptions ) {
   56520           0 :       popErrorHandler();
   56521             :     }
   56522             : #ifndef SED_HACKS
   56523             :     if ( bLocalUseExceptions ) {
   56524             :       CPLErr eclass = CPLGetLastErrorType();
   56525             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56526             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56527             :       }
   56528             :     }
   56529             : #endif
   56530             :   }
   56531           2 :   {
   56532           2 :     resultobj = PyLong_FromLongLong(result);
   56533             :   }
   56534           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; } }
   56535             :   return resultobj;
   56536           0 : fail:
   56537           0 :   return NULL;
   56538             : }
   56539             : 
   56540             : 
   56541          76 : SWIGINTERN PyObject *_wrap_SetCacheMax(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56542          76 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56543          76 :   GIntBig arg1 ;
   56544          76 :   PyObject *swig_obj[1] ;
   56545             :   
   56546          76 :   if (!args) SWIG_fail;
   56547          76 :   swig_obj[0] = args;
   56548          76 :   {
   56549          76 :     arg1 = (GIntBig)PyLong_AsLongLong(swig_obj[0]);
   56550             :   }
   56551          76 :   {
   56552          76 :     const int bLocalUseExceptions = GetUseExceptions();
   56553          76 :     if ( bLocalUseExceptions ) {
   56554          20 :       pushErrorHandler();
   56555             :     }
   56556          76 :     {
   56557          76 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56558          76 :       wrapper_GDALSetCacheMax(arg1);
   56559          76 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56560             :     }
   56561          76 :     if ( bLocalUseExceptions ) {
   56562          20 :       popErrorHandler();
   56563             :     }
   56564             : #ifndef SED_HACKS
   56565             :     if ( bLocalUseExceptions ) {
   56566             :       CPLErr eclass = CPLGetLastErrorType();
   56567             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56568             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56569             :       }
   56570             :     }
   56571             : #endif
   56572             :   }
   56573          76 :   resultobj = SWIG_Py_Void();
   56574          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; } }
   56575             :   return resultobj;
   56576           0 : fail:
   56577           0 :   return NULL;
   56578             : }
   56579             : 
   56580             : 
   56581          43 : SWIGINTERN PyObject *_wrap_GetDataTypeSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56582          43 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56583          43 :   GDALDataType arg1 ;
   56584          43 :   PyObject *swig_obj[1] ;
   56585          43 :   int result;
   56586             :   
   56587          43 :   if (!args) SWIG_fail;
   56588          43 :   swig_obj[0] = args;
   56589          43 :   {
   56590             :     // %typemap(in) GDALDataType
   56591          43 :     int val = 0;
   56592          43 :     int ecode = SWIG_AsVal_int(swig_obj[0], &val);
   56593          43 :     if (!SWIG_IsOK(ecode)) {
   56594           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   56595             :     }
   56596          43 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   56597             :     {
   56598           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   56599             :     }
   56600          43 :     arg1 = static_cast<GDALDataType>(val);
   56601             :   }
   56602          43 :   {
   56603          43 :     const int bLocalUseExceptions = GetUseExceptions();
   56604          43 :     if ( bLocalUseExceptions ) {
   56605          21 :       pushErrorHandler();
   56606             :     }
   56607          43 :     {
   56608          43 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56609          43 :       result = (int)wrapper_GDALGetDataTypeSizeBits(arg1);
   56610          43 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56611             :     }
   56612          43 :     if ( bLocalUseExceptions ) {
   56613          21 :       popErrorHandler();
   56614             :     }
   56615             : #ifndef SED_HACKS
   56616             :     if ( bLocalUseExceptions ) {
   56617             :       CPLErr eclass = CPLGetLastErrorType();
   56618             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56619             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56620             :       }
   56621             :     }
   56622             : #endif
   56623             :   }
   56624          43 :   resultobj = SWIG_From_int(static_cast< int >(result));
   56625          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; } }
   56626             :   return resultobj;
   56627             : fail:
   56628             :   return NULL;
   56629             : }
   56630             : 
   56631             : 
   56632           0 : SWIGINTERN PyObject *_wrap_GetDataTypeSizeBits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56633           0 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56634           0 :   GDALDataType arg1 ;
   56635           0 :   PyObject *swig_obj[1] ;
   56636           0 :   int result;
   56637             :   
   56638           0 :   if (!args) SWIG_fail;
   56639           0 :   swig_obj[0] = args;
   56640           0 :   {
   56641             :     // %typemap(in) GDALDataType
   56642           0 :     int val = 0;
   56643           0 :     int ecode = SWIG_AsVal_int(swig_obj[0], &val);
   56644           0 :     if (!SWIG_IsOK(ecode)) {
   56645           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   56646             :     }
   56647           0 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   56648             :     {
   56649           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   56650             :     }
   56651           0 :     arg1 = static_cast<GDALDataType>(val);
   56652             :   }
   56653           0 :   {
   56654           0 :     const int bLocalUseExceptions = GetUseExceptions();
   56655           0 :     if ( bLocalUseExceptions ) {
   56656           0 :       pushErrorHandler();
   56657             :     }
   56658           0 :     {
   56659           0 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56660           0 :       result = (int)GDALGetDataTypeSizeBits(arg1);
   56661           0 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56662             :     }
   56663           0 :     if ( bLocalUseExceptions ) {
   56664           0 :       popErrorHandler();
   56665             :     }
   56666             : #ifndef SED_HACKS
   56667             :     if ( bLocalUseExceptions ) {
   56668             :       CPLErr eclass = CPLGetLastErrorType();
   56669             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56670             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56671             :       }
   56672             :     }
   56673             : #endif
   56674             :   }
   56675           0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   56676           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; } }
   56677             :   return resultobj;
   56678             : fail:
   56679             :   return NULL;
   56680             : }
   56681             : 
   56682             : 
   56683           2 : SWIGINTERN PyObject *_wrap_GetDataTypeSizeBytes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56684           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56685           2 :   GDALDataType arg1 ;
   56686           2 :   PyObject *swig_obj[1] ;
   56687           2 :   int result;
   56688             :   
   56689           2 :   if (!args) SWIG_fail;
   56690           2 :   swig_obj[0] = args;
   56691           2 :   {
   56692             :     // %typemap(in) GDALDataType
   56693           2 :     int val = 0;
   56694           2 :     int ecode = SWIG_AsVal_int(swig_obj[0], &val);
   56695           2 :     if (!SWIG_IsOK(ecode)) {
   56696           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   56697             :     }
   56698           2 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   56699             :     {
   56700           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   56701             :     }
   56702           2 :     arg1 = static_cast<GDALDataType>(val);
   56703             :   }
   56704           2 :   {
   56705           2 :     const int bLocalUseExceptions = GetUseExceptions();
   56706           2 :     if ( bLocalUseExceptions ) {
   56707           2 :       pushErrorHandler();
   56708             :     }
   56709           2 :     {
   56710           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56711           2 :       result = (int)GDALGetDataTypeSizeBytes(arg1);
   56712           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56713             :     }
   56714           2 :     if ( bLocalUseExceptions ) {
   56715           2 :       popErrorHandler();
   56716             :     }
   56717             : #ifndef SED_HACKS
   56718             :     if ( bLocalUseExceptions ) {
   56719             :       CPLErr eclass = CPLGetLastErrorType();
   56720             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56721             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56722             :       }
   56723             :     }
   56724             : #endif
   56725             :   }
   56726           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   56727           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; } }
   56728             :   return resultobj;
   56729             : fail:
   56730             :   return NULL;
   56731             : }
   56732             : 
   56733             : 
   56734         201 : SWIGINTERN PyObject *_wrap_DataTypeIsComplex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56735         201 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56736         201 :   GDALDataType arg1 ;
   56737         201 :   PyObject *swig_obj[1] ;
   56738         201 :   int result;
   56739             :   
   56740         201 :   if (!args) SWIG_fail;
   56741         201 :   swig_obj[0] = args;
   56742         201 :   {
   56743             :     // %typemap(in) GDALDataType
   56744         201 :     int val = 0;
   56745         201 :     int ecode = SWIG_AsVal_int(swig_obj[0], &val);
   56746         201 :     if (!SWIG_IsOK(ecode)) {
   56747           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   56748             :     }
   56749         201 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   56750             :     {
   56751           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   56752             :     }
   56753         201 :     arg1 = static_cast<GDALDataType>(val);
   56754             :   }
   56755         201 :   {
   56756         201 :     const int bLocalUseExceptions = GetUseExceptions();
   56757         201 :     if ( bLocalUseExceptions ) {
   56758         143 :       pushErrorHandler();
   56759             :     }
   56760         201 :     {
   56761         201 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56762         201 :       result = (int)GDALDataTypeIsComplex(arg1);
   56763         201 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56764             :     }
   56765         201 :     if ( bLocalUseExceptions ) {
   56766         143 :       popErrorHandler();
   56767             :     }
   56768             : #ifndef SED_HACKS
   56769             :     if ( bLocalUseExceptions ) {
   56770             :       CPLErr eclass = CPLGetLastErrorType();
   56771             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56772             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56773             :       }
   56774             :     }
   56775             : #endif
   56776             :   }
   56777         201 :   resultobj = SWIG_From_int(static_cast< int >(result));
   56778         201 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   56779             :   return resultobj;
   56780             : fail:
   56781             :   return NULL;
   56782             : }
   56783             : 
   56784             : 
   56785        3815 : SWIGINTERN PyObject *_wrap_GetDataTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56786        3815 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56787        3815 :   GDALDataType arg1 ;
   56788        3815 :   PyObject *swig_obj[1] ;
   56789        3815 :   char *result = 0 ;
   56790             :   
   56791        3815 :   if (!args) SWIG_fail;
   56792        3815 :   swig_obj[0] = args;
   56793        3815 :   {
   56794             :     // %typemap(in) GDALDataType
   56795        3815 :     int val = 0;
   56796        3815 :     int ecode = SWIG_AsVal_int(swig_obj[0], &val);
   56797        3815 :     if (!SWIG_IsOK(ecode)) {
   56798           1 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   56799             :     }
   56800        3814 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   56801             :     {
   56802           2 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   56803             :     }
   56804        3812 :     arg1 = static_cast<GDALDataType>(val);
   56805             :   }
   56806        3812 :   {
   56807        3812 :     const int bLocalUseExceptions = GetUseExceptions();
   56808        3812 :     if ( bLocalUseExceptions ) {
   56809         274 :       pushErrorHandler();
   56810             :     }
   56811        3812 :     {
   56812        3812 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56813        3812 :       result = (char *)GDALGetDataTypeName(arg1);
   56814        3812 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56815             :     }
   56816        3812 :     if ( bLocalUseExceptions ) {
   56817         274 :       popErrorHandler();
   56818             :     }
   56819             : #ifndef SED_HACKS
   56820             :     if ( bLocalUseExceptions ) {
   56821             :       CPLErr eclass = CPLGetLastErrorType();
   56822             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56823             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56824             :       }
   56825             :     }
   56826             : #endif
   56827             :   }
   56828        3812 :   resultobj = SWIG_FromCharPtr((const char *)result);
   56829        3815 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   56830             :   return resultobj;
   56831             : fail:
   56832             :   return NULL;
   56833             : }
   56834             : 
   56835             : 
   56836         987 : SWIGINTERN PyObject *_wrap_GetDataTypeByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56837         987 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56838         987 :   char *arg1 = (char *) 0 ;
   56839         987 :   int res1 ;
   56840         987 :   char *buf1 = 0 ;
   56841         987 :   int alloc1 = 0 ;
   56842         987 :   PyObject *swig_obj[1] ;
   56843         987 :   GDALDataType result;
   56844             :   
   56845         987 :   if (!args) SWIG_fail;
   56846         987 :   swig_obj[0] = args;
   56847         987 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   56848         987 :   if (!SWIG_IsOK(res1)) {
   56849           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetDataTypeByName" "', argument " "1"" of type '" "char const *""'");
   56850             :   }
   56851         987 :   arg1 = reinterpret_cast< char * >(buf1);
   56852         987 :   {
   56853         987 :     const int bLocalUseExceptions = GetUseExceptions();
   56854         987 :     if ( bLocalUseExceptions ) {
   56855          81 :       pushErrorHandler();
   56856             :     }
   56857         987 :     {
   56858         987 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56859         987 :       result = (GDALDataType)GDALGetDataTypeByName((char const *)arg1);
   56860         987 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56861             :     }
   56862         987 :     if ( bLocalUseExceptions ) {
   56863          81 :       popErrorHandler();
   56864             :     }
   56865             : #ifndef SED_HACKS
   56866             :     if ( bLocalUseExceptions ) {
   56867             :       CPLErr eclass = CPLGetLastErrorType();
   56868             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56869             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56870             :       }
   56871             :     }
   56872             : #endif
   56873             :   }
   56874         987 :   resultobj = SWIG_From_int(static_cast< int >(result));
   56875         987 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   56876         987 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   56877             :   return resultobj;
   56878           0 : fail:
   56879           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   56880             :   return NULL;
   56881             : }
   56882             : 
   56883             : 
   56884          65 : SWIGINTERN PyObject *_wrap_DataTypeUnion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56885          65 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56886          65 :   GDALDataType arg1 ;
   56887          65 :   GDALDataType arg2 ;
   56888          65 :   PyObject *swig_obj[2] ;
   56889          65 :   GDALDataType result;
   56890             :   
   56891          65 :   if (!SWIG_Python_UnpackTuple(args, "DataTypeUnion", 2, 2, swig_obj)) SWIG_fail;
   56892          65 :   {
   56893             :     // %typemap(in) GDALDataType
   56894          65 :     int val = 0;
   56895          65 :     int ecode = SWIG_AsVal_int(swig_obj[0], &val);
   56896          65 :     if (!SWIG_IsOK(ecode)) {
   56897           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   56898             :     }
   56899          65 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   56900             :     {
   56901           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   56902             :     }
   56903          65 :     arg1 = static_cast<GDALDataType>(val);
   56904             :   }
   56905          65 :   {
   56906             :     // %typemap(in) GDALDataType
   56907          65 :     int val = 0;
   56908          65 :     int ecode = SWIG_AsVal_int(swig_obj[1], &val);
   56909          65 :     if (!SWIG_IsOK(ecode)) {
   56910           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   56911             :     }
   56912          65 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   56913             :     {
   56914           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   56915             :     }
   56916          65 :     arg2 = static_cast<GDALDataType>(val);
   56917             :   }
   56918          65 :   {
   56919          65 :     const int bLocalUseExceptions = GetUseExceptions();
   56920          65 :     if ( bLocalUseExceptions ) {
   56921          64 :       pushErrorHandler();
   56922             :     }
   56923          65 :     {
   56924          65 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56925          65 :       result = (GDALDataType)GDALDataTypeUnion(arg1,arg2);
   56926          65 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56927             :     }
   56928          65 :     if ( bLocalUseExceptions ) {
   56929          64 :       popErrorHandler();
   56930             :     }
   56931             : #ifndef SED_HACKS
   56932             :     if ( bLocalUseExceptions ) {
   56933             :       CPLErr eclass = CPLGetLastErrorType();
   56934             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   56935             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   56936             :       }
   56937             :     }
   56938             : #endif
   56939             :   }
   56940          65 :   resultobj = SWIG_From_int(static_cast< int >(result));
   56941          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; } }
   56942             :   return resultobj;
   56943             : fail:
   56944             :   return NULL;
   56945             : }
   56946             : 
   56947             : 
   56948           8 : SWIGINTERN PyObject *_wrap_DataTypeUnionWithValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   56949           8 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   56950           8 :   GDALDataType arg1 ;
   56951           8 :   double arg2 ;
   56952           8 :   bool arg3 ;
   56953           8 :   double val2 ;
   56954           8 :   int ecode2 = 0 ;
   56955           8 :   bool val3 ;
   56956           8 :   int ecode3 = 0 ;
   56957           8 :   PyObject *swig_obj[3] ;
   56958           8 :   GDALDataType result;
   56959             :   
   56960           8 :   if (!SWIG_Python_UnpackTuple(args, "DataTypeUnionWithValue", 3, 3, swig_obj)) SWIG_fail;
   56961           8 :   {
   56962             :     // %typemap(in) GDALDataType
   56963           8 :     int val = 0;
   56964           8 :     int ecode = SWIG_AsVal_int(swig_obj[0], &val);
   56965           8 :     if (!SWIG_IsOK(ecode)) {
   56966           0 :       SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALDataType");
   56967             :     }
   56968           8 :     if( val < GDT_Unknown || val >= GDT_TypeCount )
   56969             :     {
   56970           0 :       SWIG_exception_fail(SWIG_ValueError, "Invalid value for GDALDataType");
   56971             :     }
   56972           8 :     arg1 = static_cast<GDALDataType>(val);
   56973             :   }
   56974           8 :   ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
   56975           8 :   if (!SWIG_IsOK(ecode2)) {
   56976           0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DataTypeUnionWithValue" "', argument " "2"" of type '" "double""'");
   56977             :   } 
   56978           8 :   arg2 = static_cast< double >(val2);
   56979           8 :   ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3);
   56980           8 :   if (!SWIG_IsOK(ecode3)) {
   56981           0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DataTypeUnionWithValue" "', argument " "3"" of type '" "bool""'");
   56982             :   } 
   56983           8 :   arg3 = static_cast< bool >(val3);
   56984           8 :   {
   56985           8 :     const int bLocalUseExceptions = GetUseExceptions();
   56986           8 :     if ( bLocalUseExceptions ) {
   56987           8 :       pushErrorHandler();
   56988             :     }
   56989           8 :     {
   56990           8 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   56991           8 :       result = (GDALDataType)GDALDataTypeUnionWithValue(arg1,arg2,arg3);
   56992           8 :       SWIG_PYTHON_THREAD_END_ALLOW;
   56993             :     }
   56994           8 :     if ( bLocalUseExceptions ) {
   56995           8 :       popErrorHandler();
   56996             :     }
   56997             : #ifndef SED_HACKS
   56998             :     if ( bLocalUseExceptions ) {
   56999             :       CPLErr eclass = CPLGetLastErrorType();
   57000             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57001             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57002             :       }
   57003             :     }
   57004             : #endif
   57005             :   }
   57006           8 :   resultobj = SWIG_From_int(static_cast< int >(result));
   57007           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; } }
   57008             :   return resultobj;
   57009             : fail:
   57010             :   return NULL;
   57011             : }
   57012             : 
   57013             : 
   57014          61 : SWIGINTERN PyObject *_wrap_GetColorInterpretationName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57015          61 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57016          61 :   GDALColorInterp arg1 ;
   57017          61 :   int val1 ;
   57018          61 :   int ecode1 = 0 ;
   57019          61 :   PyObject *swig_obj[1] ;
   57020          61 :   char *result = 0 ;
   57021             :   
   57022          61 :   if (!args) SWIG_fail;
   57023          61 :   swig_obj[0] = args;
   57024          61 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   57025          61 :   if (!SWIG_IsOK(ecode1)) {
   57026           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetColorInterpretationName" "', argument " "1"" of type '" "GDALColorInterp""'");
   57027             :   } 
   57028          61 :   arg1 = static_cast< GDALColorInterp >(val1);
   57029          61 :   {
   57030          61 :     const int bLocalUseExceptions = GetUseExceptions();
   57031          61 :     if ( bLocalUseExceptions ) {
   57032           4 :       pushErrorHandler();
   57033             :     }
   57034          61 :     {
   57035          61 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57036          61 :       result = (char *)GDALGetColorInterpretationName(arg1);
   57037          61 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57038             :     }
   57039          61 :     if ( bLocalUseExceptions ) {
   57040           4 :       popErrorHandler();
   57041             :     }
   57042             : #ifndef SED_HACKS
   57043             :     if ( bLocalUseExceptions ) {
   57044             :       CPLErr eclass = CPLGetLastErrorType();
   57045             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57046             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57047             :       }
   57048             :     }
   57049             : #endif
   57050             :   }
   57051          61 :   resultobj = SWIG_FromCharPtr((const char *)result);
   57052          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; } }
   57053             :   return resultobj;
   57054             : fail:
   57055             :   return NULL;
   57056             : }
   57057             : 
   57058             : 
   57059          41 : SWIGINTERN PyObject *_wrap_GetColorInterpretationByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57060          41 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57061          41 :   char *arg1 = (char *) 0 ;
   57062          41 :   int res1 ;
   57063          41 :   char *buf1 = 0 ;
   57064          41 :   int alloc1 = 0 ;
   57065          41 :   PyObject *swig_obj[1] ;
   57066          41 :   GDALColorInterp result;
   57067             :   
   57068          41 :   if (!args) SWIG_fail;
   57069          41 :   swig_obj[0] = args;
   57070          41 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   57071          41 :   if (!SWIG_IsOK(res1)) {
   57072           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetColorInterpretationByName" "', argument " "1"" of type '" "char const *""'");
   57073             :   }
   57074          41 :   arg1 = reinterpret_cast< char * >(buf1);
   57075          41 :   {
   57076          41 :     const int bLocalUseExceptions = GetUseExceptions();
   57077          41 :     if ( bLocalUseExceptions ) {
   57078           1 :       pushErrorHandler();
   57079             :     }
   57080          41 :     {
   57081          41 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57082          41 :       result = (GDALColorInterp)GDALGetColorInterpretationByName((char const *)arg1);
   57083          41 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57084             :     }
   57085          41 :     if ( bLocalUseExceptions ) {
   57086           1 :       popErrorHandler();
   57087             :     }
   57088             : #ifndef SED_HACKS
   57089             :     if ( bLocalUseExceptions ) {
   57090             :       CPLErr eclass = CPLGetLastErrorType();
   57091             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57092             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57093             :       }
   57094             :     }
   57095             : #endif
   57096             :   }
   57097          41 :   resultobj = SWIG_From_int(static_cast< int >(result));
   57098          41 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   57099          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; } }
   57100             :   return resultobj;
   57101           0 : fail:
   57102           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   57103             :   return NULL;
   57104             : }
   57105             : 
   57106             : 
   57107           2 : SWIGINTERN PyObject *_wrap_GetPaletteInterpretationName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57108           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57109           2 :   GDALPaletteInterp arg1 ;
   57110           2 :   int val1 ;
   57111           2 :   int ecode1 = 0 ;
   57112           2 :   PyObject *swig_obj[1] ;
   57113           2 :   char *result = 0 ;
   57114             :   
   57115           2 :   if (!args) SWIG_fail;
   57116           2 :   swig_obj[0] = args;
   57117           2 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   57118           2 :   if (!SWIG_IsOK(ecode1)) {
   57119           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetPaletteInterpretationName" "', argument " "1"" of type '" "GDALPaletteInterp""'");
   57120             :   } 
   57121           2 :   arg1 = static_cast< GDALPaletteInterp >(val1);
   57122           2 :   {
   57123           2 :     const int bLocalUseExceptions = GetUseExceptions();
   57124           2 :     if ( bLocalUseExceptions ) {
   57125           0 :       pushErrorHandler();
   57126             :     }
   57127           2 :     {
   57128           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57129           2 :       result = (char *)GDALGetPaletteInterpretationName(arg1);
   57130           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57131             :     }
   57132           2 :     if ( bLocalUseExceptions ) {
   57133           0 :       popErrorHandler();
   57134             :     }
   57135             : #ifndef SED_HACKS
   57136             :     if ( bLocalUseExceptions ) {
   57137             :       CPLErr eclass = CPLGetLastErrorType();
   57138             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57139             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57140             :       }
   57141             :     }
   57142             : #endif
   57143             :   }
   57144           2 :   resultobj = SWIG_FromCharPtr((const char *)result);
   57145           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; } }
   57146             :   return resultobj;
   57147             : fail:
   57148             :   return NULL;
   57149             : }
   57150             : 
   57151             : 
   57152         130 : SWIGINTERN PyObject *_wrap_DecToDMS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57153         130 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57154         130 :   double arg1 ;
   57155         130 :   char *arg2 = (char *) 0 ;
   57156         130 :   int arg3 = (int) 2 ;
   57157         130 :   double val1 ;
   57158         130 :   int ecode1 = 0 ;
   57159         130 :   int res2 ;
   57160         130 :   char *buf2 = 0 ;
   57161         130 :   int alloc2 = 0 ;
   57162         130 :   int val3 ;
   57163         130 :   int ecode3 = 0 ;
   57164         130 :   PyObject *swig_obj[3] ;
   57165         130 :   char *result = 0 ;
   57166             :   
   57167         130 :   if (!SWIG_Python_UnpackTuple(args, "DecToDMS", 2, 3, swig_obj)) SWIG_fail;
   57168         130 :   ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
   57169         130 :   if (!SWIG_IsOK(ecode1)) {
   57170           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "DecToDMS" "', argument " "1"" of type '" "double""'");
   57171             :   } 
   57172         130 :   arg1 = static_cast< double >(val1);
   57173         130 :   res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
   57174         130 :   if (!SWIG_IsOK(res2)) {
   57175           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DecToDMS" "', argument " "2"" of type '" "char const *""'");
   57176             :   }
   57177         130 :   arg2 = reinterpret_cast< char * >(buf2);
   57178         130 :   if (swig_obj[2]) {
   57179         130 :     ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
   57180         130 :     if (!SWIG_IsOK(ecode3)) {
   57181           0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DecToDMS" "', argument " "3"" of type '" "int""'");
   57182             :     } 
   57183             :     arg3 = static_cast< int >(val3);
   57184             :   }
   57185         130 :   {
   57186         130 :     const int bLocalUseExceptions = GetUseExceptions();
   57187         130 :     if ( bLocalUseExceptions ) {
   57188           0 :       pushErrorHandler();
   57189             :     }
   57190         130 :     {
   57191         130 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57192         130 :       result = (char *)GDALDecToDMS(arg1,(char const *)arg2,arg3);
   57193         130 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57194             :     }
   57195         130 :     if ( bLocalUseExceptions ) {
   57196           0 :       popErrorHandler();
   57197             :     }
   57198             : #ifndef SED_HACKS
   57199             :     if ( bLocalUseExceptions ) {
   57200             :       CPLErr eclass = CPLGetLastErrorType();
   57201             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57202             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57203             :       }
   57204             :     }
   57205             : #endif
   57206             :   }
   57207         130 :   resultobj = SWIG_FromCharPtr((const char *)result);
   57208         130 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   57209         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; } }
   57210             :   return resultobj;
   57211           0 : fail:
   57212           0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   57213             :   return NULL;
   57214             : }
   57215             : 
   57216             : 
   57217           4 : SWIGINTERN PyObject *_wrap_PackedDMSToDec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57218           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57219           4 :   double arg1 ;
   57220           4 :   double val1 ;
   57221           4 :   int ecode1 = 0 ;
   57222           4 :   PyObject *swig_obj[1] ;
   57223           4 :   double result;
   57224             :   
   57225           4 :   if (!args) SWIG_fail;
   57226           4 :   swig_obj[0] = args;
   57227           4 :   ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
   57228           4 :   if (!SWIG_IsOK(ecode1)) {
   57229           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "PackedDMSToDec" "', argument " "1"" of type '" "double""'");
   57230             :   } 
   57231           4 :   arg1 = static_cast< double >(val1);
   57232           4 :   {
   57233           4 :     const int bLocalUseExceptions = GetUseExceptions();
   57234           4 :     if ( bLocalUseExceptions ) {
   57235           4 :       pushErrorHandler();
   57236             :     }
   57237           4 :     {
   57238           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57239           4 :       result = (double)GDALPackedDMSToDec(arg1);
   57240           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57241             :     }
   57242           4 :     if ( bLocalUseExceptions ) {
   57243           4 :       popErrorHandler();
   57244             :     }
   57245             : #ifndef SED_HACKS
   57246             :     if ( bLocalUseExceptions ) {
   57247             :       CPLErr eclass = CPLGetLastErrorType();
   57248             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57249             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57250             :       }
   57251             :     }
   57252             : #endif
   57253             :   }
   57254           4 :   resultobj = SWIG_From_double(static_cast< double >(result));
   57255           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; } }
   57256             :   return resultobj;
   57257             : fail:
   57258             :   return NULL;
   57259             : }
   57260             : 
   57261             : 
   57262           4 : SWIGINTERN PyObject *_wrap_DecToPackedDMS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57263           4 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57264           4 :   double arg1 ;
   57265           4 :   double val1 ;
   57266           4 :   int ecode1 = 0 ;
   57267           4 :   PyObject *swig_obj[1] ;
   57268           4 :   double result;
   57269             :   
   57270           4 :   if (!args) SWIG_fail;
   57271           4 :   swig_obj[0] = args;
   57272           4 :   ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
   57273           4 :   if (!SWIG_IsOK(ecode1)) {
   57274           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "DecToPackedDMS" "', argument " "1"" of type '" "double""'");
   57275             :   } 
   57276           4 :   arg1 = static_cast< double >(val1);
   57277           4 :   {
   57278           4 :     const int bLocalUseExceptions = GetUseExceptions();
   57279           4 :     if ( bLocalUseExceptions ) {
   57280           4 :       pushErrorHandler();
   57281             :     }
   57282           4 :     {
   57283           4 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57284           4 :       result = (double)GDALDecToPackedDMS(arg1);
   57285           4 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57286             :     }
   57287           4 :     if ( bLocalUseExceptions ) {
   57288           4 :       popErrorHandler();
   57289             :     }
   57290             : #ifndef SED_HACKS
   57291             :     if ( bLocalUseExceptions ) {
   57292             :       CPLErr eclass = CPLGetLastErrorType();
   57293             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57294             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57295             :       }
   57296             :     }
   57297             : #endif
   57298             :   }
   57299           4 :   resultobj = SWIG_From_double(static_cast< double >(result));
   57300           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; } }
   57301             :   return resultobj;
   57302             : fail:
   57303             :   return NULL;
   57304             : }
   57305             : 
   57306             : 
   57307          49 : SWIGINTERN PyObject *_wrap_ParseXMLString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57308          49 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57309          49 :   char *arg1 = (char *) 0 ;
   57310          49 :   int res1 ;
   57311          49 :   char *buf1 = 0 ;
   57312          49 :   int alloc1 = 0 ;
   57313          49 :   PyObject *swig_obj[1] ;
   57314          49 :   CPLXMLNode *result = 0 ;
   57315             :   
   57316          49 :   if (!args) SWIG_fail;
   57317          49 :   swig_obj[0] = args;
   57318          49 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   57319          49 :   if (!SWIG_IsOK(res1)) {
   57320           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParseXMLString" "', argument " "1"" of type '" "char *""'");
   57321             :   }
   57322          49 :   arg1 = reinterpret_cast< char * >(buf1);
   57323          49 :   {
   57324          49 :     const int bLocalUseExceptions = GetUseExceptions();
   57325          49 :     if ( bLocalUseExceptions ) {
   57326          24 :       pushErrorHandler();
   57327             :     }
   57328          49 :     {
   57329          49 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57330          49 :       result = (CPLXMLNode *)CPLParseXMLString(arg1);
   57331          49 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57332             :     }
   57333          49 :     if ( bLocalUseExceptions ) {
   57334          24 :       popErrorHandler();
   57335             :     }
   57336             : #ifndef SED_HACKS
   57337             :     if ( bLocalUseExceptions ) {
   57338             :       CPLErr eclass = CPLGetLastErrorType();
   57339             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57340             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57341             :       }
   57342             :     }
   57343             : #endif
   57344             :   }
   57345          49 :   {
   57346             :     /* %typemap(out) (CPLXMLNode*) */
   57347             :     
   57348          49 :     CPLXMLNode *psXMLTree = result;
   57349          49 :     int         bFakeRoot = FALSE;
   57350             :     
   57351          49 :     if( psXMLTree != NULL && psXMLTree->psNext != NULL )
   57352             :     {
   57353           3 :       CPLXMLNode *psFirst = psXMLTree;
   57354             :       
   57355             :       /* create a "pseudo" root if we have multiple elements */
   57356           3 :       psXMLTree = CPLCreateXMLNode( NULL, CXT_Element, "" );
   57357           3 :       psXMLTree->psChild = psFirst;
   57358           3 :       bFakeRoot = TRUE;
   57359             :     }
   57360             :     
   57361          49 :     resultobj = XMLTreeToPyList( psXMLTree );
   57362             :     
   57363          49 :     if( bFakeRoot )
   57364             :     {
   57365           3 :       psXMLTree->psChild = NULL;
   57366           3 :       CPLDestroyXMLNode( psXMLTree );
   57367             :     }
   57368             :   }
   57369          49 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   57370          49 :   {
   57371             :     /* %typemap(ret) (CPLXMLNode*) */
   57372          49 :     if ( result ) CPLDestroyXMLNode( result );
   57373             :   }
   57374          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; } }
   57375             :   return resultobj;
   57376           0 : fail:
   57377           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   57378             :   return NULL;
   57379             : }
   57380             : 
   57381             : 
   57382          13 : SWIGINTERN PyObject *_wrap_SerializeXMLTree(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57383          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57384          13 :   CPLXMLNode *arg1 = (CPLXMLNode *) 0 ;
   57385          13 :   PyObject *swig_obj[1] ;
   57386          13 :   retStringAndCPLFree *result = 0 ;
   57387             :   
   57388          13 :   if (!args) SWIG_fail;
   57389          13 :   swig_obj[0] = args;
   57390          13 :   {
   57391             :     /* %typemap(python,in) (CPLXMLNode* xmlnode ) */
   57392          13 :     arg1 = PyListToXMLTree( swig_obj[0] );
   57393          13 :     if ( !arg1 ) SWIG_fail;
   57394             :   }
   57395          13 :   {
   57396          13 :     const int bLocalUseExceptions = GetUseExceptions();
   57397          13 :     if ( bLocalUseExceptions ) {
   57398           3 :       pushErrorHandler();
   57399             :     }
   57400          13 :     {
   57401          13 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57402          13 :       result = (retStringAndCPLFree *)CPLSerializeXMLTree(arg1);
   57403          13 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57404             :     }
   57405          13 :     if ( bLocalUseExceptions ) {
   57406           3 :       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          13 :   {
   57418             :     /* %typemap(out) (retStringAndCPLFree*) */
   57419          13 :     Py_XDECREF(resultobj);
   57420          13 :     if(result)
   57421             :     {
   57422          13 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   57423          13 :       CPLFree(result);
   57424             :     }
   57425             :     else
   57426             :     {
   57427           0 :       resultobj = Py_None;
   57428           0 :       Py_INCREF(resultobj);
   57429             :     }
   57430             :   }
   57431          13 :   {
   57432             :     /* %typemap(freearg) (CPLXMLNode *xmlnode) */
   57433          13 :     CPLDestroyXMLNode( arg1 );
   57434             :   }
   57435          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; } }
   57436             :   return resultobj;
   57437           0 : fail:
   57438           0 :   {
   57439             :     /* %typemap(freearg) (CPLXMLNode *xmlnode) */
   57440           0 :     CPLDestroyXMLNode( arg1 );
   57441             :   }
   57442             :   return NULL;
   57443             : }
   57444             : 
   57445             : 
   57446          30 : SWIGINTERN PyObject *_wrap_GetJPEG2000Structure(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57447          30 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57448          30 :   char *arg1 = (char *) 0 ;
   57449          30 :   char **arg2 = (char **) NULL ;
   57450          30 :   int res1 ;
   57451          30 :   char *buf1 = 0 ;
   57452          30 :   int alloc1 = 0 ;
   57453          30 :   PyObject *swig_obj[2] ;
   57454          30 :   CPLXMLNode *result = 0 ;
   57455             :   
   57456          30 :   if (!SWIG_Python_UnpackTuple(args, "GetJPEG2000Structure", 1, 2, swig_obj)) SWIG_fail;
   57457          30 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   57458          30 :   if (!SWIG_IsOK(res1)) {
   57459           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetJPEG2000Structure" "', argument " "1"" of type '" "char const *""'");
   57460             :   }
   57461          30 :   arg1 = reinterpret_cast< char * >(buf1);
   57462          30 :   if (swig_obj[1]) {
   57463          30 :     {
   57464             :       /* %typemap(in) char **dict */
   57465          30 :       arg2 = NULL;
   57466          30 :       if ( PySequence_Check( swig_obj[1] ) ) {
   57467          30 :         int bErr = FALSE;
   57468          30 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   57469          30 :         if ( bErr )
   57470             :         {
   57471           0 :           SWIG_fail;
   57472             :         }
   57473             :       }
   57474           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   57475           0 :         int bErr = FALSE;
   57476           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   57477           0 :         if ( bErr )
   57478             :         {
   57479           0 :           SWIG_fail;
   57480             :         }
   57481             :       }
   57482             :       else {
   57483           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   57484           0 :         SWIG_fail;
   57485             :       }
   57486             :     }
   57487             :   }
   57488          30 :   {
   57489          30 :     const int bLocalUseExceptions = GetUseExceptions();
   57490          30 :     if ( bLocalUseExceptions ) {
   57491           0 :       pushErrorHandler();
   57492             :     }
   57493          30 :     {
   57494          30 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57495          30 :       result = (CPLXMLNode *)GDALGetJPEG2000Structure((char const *)arg1,arg2);
   57496          30 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57497             :     }
   57498          30 :     if ( bLocalUseExceptions ) {
   57499           0 :       popErrorHandler();
   57500             :     }
   57501             : #ifndef SED_HACKS
   57502             :     if ( bLocalUseExceptions ) {
   57503             :       CPLErr eclass = CPLGetLastErrorType();
   57504             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57505             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57506             :       }
   57507             :     }
   57508             : #endif
   57509             :   }
   57510          30 :   {
   57511             :     /* %typemap(out) (CPLXMLNode*) */
   57512             :     
   57513          30 :     CPLXMLNode *psXMLTree = result;
   57514          30 :     int         bFakeRoot = FALSE;
   57515             :     
   57516          30 :     if( psXMLTree != NULL && psXMLTree->psNext != NULL )
   57517             :     {
   57518           0 :       CPLXMLNode *psFirst = psXMLTree;
   57519             :       
   57520             :       /* create a "pseudo" root if we have multiple elements */
   57521           0 :       psXMLTree = CPLCreateXMLNode( NULL, CXT_Element, "" );
   57522           0 :       psXMLTree->psChild = psFirst;
   57523           0 :       bFakeRoot = TRUE;
   57524             :     }
   57525             :     
   57526          30 :     resultobj = XMLTreeToPyList( psXMLTree );
   57527             :     
   57528          30 :     if( bFakeRoot )
   57529             :     {
   57530           0 :       psXMLTree->psChild = NULL;
   57531           0 :       CPLDestroyXMLNode( psXMLTree );
   57532             :     }
   57533             :   }
   57534          30 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   57535          30 :   {
   57536             :     /* %typemap(freearg) char **dict */
   57537          30 :     CSLDestroy( arg2 );
   57538             :   }
   57539          30 :   {
   57540             :     /* %typemap(ret) (CPLXMLNode*) */
   57541          30 :     if ( result ) CPLDestroyXMLNode( result );
   57542             :   }
   57543          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; } }
   57544             :   return resultobj;
   57545           0 : fail:
   57546           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   57547           0 :   {
   57548             :     /* %typemap(freearg) char **dict */
   57549           0 :     CSLDestroy( arg2 );
   57550             :   }
   57551             :   return NULL;
   57552             : }
   57553             : 
   57554             : 
   57555           9 : SWIGINTERN PyObject *_wrap_GetJPEG2000StructureAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57556           9 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57557           9 :   char *arg1 = (char *) 0 ;
   57558           9 :   char **arg2 = (char **) NULL ;
   57559           9 :   int res1 ;
   57560           9 :   char *buf1 = 0 ;
   57561           9 :   int alloc1 = 0 ;
   57562           9 :   PyObject *swig_obj[2] ;
   57563           9 :   retStringAndCPLFree *result = 0 ;
   57564             :   
   57565           9 :   if (!SWIG_Python_UnpackTuple(args, "GetJPEG2000StructureAsString", 1, 2, swig_obj)) SWIG_fail;
   57566           9 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   57567           9 :   if (!SWIG_IsOK(res1)) {
   57568           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetJPEG2000StructureAsString" "', argument " "1"" of type '" "char const *""'");
   57569             :   }
   57570           9 :   arg1 = reinterpret_cast< char * >(buf1);
   57571           9 :   if (swig_obj[1]) {
   57572           9 :     {
   57573             :       /* %typemap(in) char **dict */
   57574           9 :       arg2 = NULL;
   57575           9 :       if ( PySequence_Check( swig_obj[1] ) ) {
   57576           9 :         int bErr = FALSE;
   57577           9 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   57578           9 :         if ( bErr )
   57579             :         {
   57580           0 :           SWIG_fail;
   57581             :         }
   57582             :       }
   57583           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   57584           0 :         int bErr = FALSE;
   57585           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   57586           0 :         if ( bErr )
   57587             :         {
   57588           0 :           SWIG_fail;
   57589             :         }
   57590             :       }
   57591             :       else {
   57592           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   57593           0 :         SWIG_fail;
   57594             :       }
   57595             :     }
   57596             :   }
   57597           9 :   {
   57598           9 :     const int bLocalUseExceptions = GetUseExceptions();
   57599           9 :     if ( bLocalUseExceptions ) {
   57600           5 :       pushErrorHandler();
   57601             :     }
   57602           9 :     {
   57603           9 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57604           9 :       result = (retStringAndCPLFree *)GetJPEG2000StructureAsString((char const *)arg1,arg2);
   57605           9 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57606             :     }
   57607           9 :     if ( bLocalUseExceptions ) {
   57608           5 :       popErrorHandler();
   57609             :     }
   57610             : #ifndef SED_HACKS
   57611             :     if ( bLocalUseExceptions ) {
   57612             :       CPLErr eclass = CPLGetLastErrorType();
   57613             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57614             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57615             :       }
   57616             :     }
   57617             : #endif
   57618             :   }
   57619           9 :   {
   57620             :     /* %typemap(out) (retStringAndCPLFree*) */
   57621           9 :     Py_XDECREF(resultobj);
   57622           9 :     if(result)
   57623             :     {
   57624           9 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   57625           9 :       CPLFree(result);
   57626             :     }
   57627             :     else
   57628             :     {
   57629           0 :       resultobj = Py_None;
   57630           0 :       Py_INCREF(resultobj);
   57631             :     }
   57632             :   }
   57633           9 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   57634           9 :   {
   57635             :     /* %typemap(freearg) char **dict */
   57636           9 :     CSLDestroy( arg2 );
   57637             :   }
   57638          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; } }
   57639             :   return resultobj;
   57640           0 : fail:
   57641           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   57642           0 :   {
   57643             :     /* %typemap(freearg) char **dict */
   57644           0 :     CSLDestroy( arg2 );
   57645             :   }
   57646             :   return NULL;
   57647             : }
   57648             : 
   57649             : 
   57650           6 : SWIGINTERN PyObject *_wrap_HasTriangulation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57651           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57652           6 :   int result;
   57653             :   
   57654           6 :   if (!SWIG_Python_UnpackTuple(args, "HasTriangulation", 0, 0, 0)) SWIG_fail;
   57655           6 :   {
   57656           6 :     const int bLocalUseExceptions = GetUseExceptions();
   57657           6 :     if ( bLocalUseExceptions ) {
   57658           6 :       pushErrorHandler();
   57659             :     }
   57660           6 :     {
   57661           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57662           6 :       result = (int)GDALHasTriangulation();
   57663           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57664             :     }
   57665           6 :     if ( bLocalUseExceptions ) {
   57666           6 :       popErrorHandler();
   57667             :     }
   57668             : #ifndef SED_HACKS
   57669             :     if ( bLocalUseExceptions ) {
   57670             :       CPLErr eclass = CPLGetLastErrorType();
   57671             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57672             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57673             :       }
   57674             :     }
   57675             : #endif
   57676             :   }
   57677           6 :   resultobj = SWIG_From_int(static_cast< int >(result));
   57678           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; } }
   57679             :   return resultobj;
   57680           0 : fail:
   57681           0 :   return NULL;
   57682             : }
   57683             : 
   57684             : 
   57685         373 : SWIGINTERN PyObject *_wrap_GetDriverCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57686         373 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57687         373 :   int result;
   57688             :   
   57689         373 :   if (!SWIG_Python_UnpackTuple(args, "GetDriverCount", 0, 0, 0)) SWIG_fail;
   57690         373 :   {
   57691         373 :     const int bLocalUseExceptions = GetUseExceptions();
   57692         373 :     if ( bLocalUseExceptions ) {
   57693         303 :       pushErrorHandler();
   57694             :     }
   57695         373 :     {
   57696         373 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57697         373 :       result = (int)GetDriverCount();
   57698         373 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57699             :     }
   57700         373 :     if ( bLocalUseExceptions ) {
   57701         303 :       popErrorHandler();
   57702             :     }
   57703             : #ifndef SED_HACKS
   57704             :     if ( bLocalUseExceptions ) {
   57705             :       CPLErr eclass = CPLGetLastErrorType();
   57706             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57707             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57708             :       }
   57709             :     }
   57710             : #endif
   57711             :   }
   57712         373 :   resultobj = SWIG_From_int(static_cast< int >(result));
   57713         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; } }
   57714             :   return resultobj;
   57715           0 : fail:
   57716           0 :   return NULL;
   57717             : }
   57718             : 
   57719             : 
   57720       14910 : SWIGINTERN PyObject *_wrap_GetDriverByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57721       14910 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57722       14910 :   char *arg1 = (char *) 0 ;
   57723       14910 :   int res1 ;
   57724       14910 :   char *buf1 = 0 ;
   57725       14910 :   int alloc1 = 0 ;
   57726       14910 :   PyObject *swig_obj[1] ;
   57727       14910 :   GDALDriverShadow *result = 0 ;
   57728             :   
   57729       14910 :   if (!args) SWIG_fail;
   57730       14910 :   swig_obj[0] = args;
   57731       14910 :   res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
   57732       14910 :   if (!SWIG_IsOK(res1)) {
   57733           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetDriverByName" "', argument " "1"" of type '" "char const *""'");
   57734             :   }
   57735       14910 :   arg1 = reinterpret_cast< char * >(buf1);
   57736       14910 :   {
   57737       14910 :     if (!arg1) {
   57738           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   57739             :     }
   57740             :   }
   57741       14910 :   {
   57742       14910 :     const int bLocalUseExceptions = GetUseExceptions();
   57743       14910 :     if ( bLocalUseExceptions ) {
   57744        8778 :       pushErrorHandler();
   57745             :     }
   57746       14910 :     {
   57747       14910 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57748       14910 :       result = (GDALDriverShadow *)GetDriverByName((char const *)arg1);
   57749       14910 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57750             :     }
   57751       14910 :     if ( bLocalUseExceptions ) {
   57752        8778 :       popErrorHandler();
   57753             :     }
   57754             : #ifndef SED_HACKS
   57755             :     if ( bLocalUseExceptions ) {
   57756             :       CPLErr eclass = CPLGetLastErrorType();
   57757             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57758             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57759             :       }
   57760             :     }
   57761             : #endif
   57762             :   }
   57763       14910 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   57764       14910 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   57765       14910 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   57766             :   return resultobj;
   57767           0 : fail:
   57768           0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   57769             :   return NULL;
   57770             : }
   57771             : 
   57772             : 
   57773       81493 : SWIGINTERN PyObject *_wrap_GetDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57774       81493 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57775       81493 :   int arg1 ;
   57776       81493 :   int val1 ;
   57777       81493 :   int ecode1 = 0 ;
   57778       81493 :   PyObject *swig_obj[1] ;
   57779       81493 :   GDALDriverShadow *result = 0 ;
   57780             :   
   57781       81493 :   if (!args) SWIG_fail;
   57782       81493 :   swig_obj[0] = args;
   57783       81493 :   ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
   57784       81493 :   if (!SWIG_IsOK(ecode1)) {
   57785           0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetDriver" "', argument " "1"" of type '" "int""'");
   57786             :   } 
   57787       81493 :   arg1 = static_cast< int >(val1);
   57788       81493 :   {
   57789       81493 :     const int bLocalUseExceptions = GetUseExceptions();
   57790       81493 :     if ( bLocalUseExceptions ) {
   57791       67016 :       pushErrorHandler();
   57792             :     }
   57793       81493 :     {
   57794       81493 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57795       81493 :       result = (GDALDriverShadow *)GetDriver(arg1);
   57796       81493 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57797             :     }
   57798       81493 :     if ( bLocalUseExceptions ) {
   57799       67016 :       popErrorHandler();
   57800             :     }
   57801             : #ifndef SED_HACKS
   57802             :     if ( bLocalUseExceptions ) {
   57803             :       CPLErr eclass = CPLGetLastErrorType();
   57804             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57805             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57806             :       }
   57807             :     }
   57808             : #endif
   57809             :   }
   57810       81493 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   57811       81493 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   57812             :   return resultobj;
   57813             : fail:
   57814             :   return NULL;
   57815             : }
   57816             : 
   57817             : 
   57818       23323 : SWIGINTERN PyObject *_wrap_Open(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   57819       23323 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57820       23323 :   char *arg1 = (char *) 0 ;
   57821       23323 :   GDALAccess arg2 = (GDALAccess) GA_ReadOnly ;
   57822       23323 :   int bToFree1 = 0 ;
   57823       23323 :   PyObject *swig_obj[2] ;
   57824       23323 :   GDALDatasetShadow *result = 0 ;
   57825             :   
   57826       23323 :   if (!SWIG_Python_UnpackTuple(args, "Open", 1, 2, swig_obj)) SWIG_fail;
   57827       23323 :   {
   57828             :     /* %typemap(in) (const char *utf8_path) */
   57829       23323 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   57830             :     {
   57831       22669 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   57832             :     }
   57833             :     else
   57834             :     {
   57835         654 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   57836             :       
   57837             :     }
   57838       23323 :     if (arg1 == NULL)
   57839             :     {
   57840           1 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   57841           1 :       SWIG_fail;
   57842             :     }
   57843             :   }
   57844       23322 :   if (swig_obj[1]) {
   57845        1530 :     {
   57846             :       // %typemap(in) GDALAccess
   57847        1530 :       int val = 0;
   57848        1530 :       int ecode = SWIG_AsVal_int(swig_obj[1], &val);
   57849        1530 :       if (!SWIG_IsOK(ecode)) {
   57850           1 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALAccess");
   57851             :       }
   57852        1529 :       if( val != GA_ReadOnly && val != GA_Update )
   57853             :       {
   57854           1 :         SWIG_exception_fail(SWIG_ValueError, "invalid value for GDALAccess");
   57855             :       }
   57856             :       arg2 = static_cast<GDALAccess>(val);
   57857             :     }
   57858             :   }
   57859       23320 :   {
   57860       23320 :     if (!arg1) {
   57861       23320 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   57862             :     }
   57863             :   }
   57864       23320 :   {
   57865       23320 :     const int bLocalUseExceptions = GetUseExceptions();
   57866       23320 :     if ( bLocalUseExceptions ) {
   57867       11480 :       pushErrorHandler();
   57868             :     }
   57869       23320 :     {
   57870       23320 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   57871       23320 :       result = (GDALDatasetShadow *)Open((char const *)arg1,arg2);
   57872       23320 :       SWIG_PYTHON_THREAD_END_ALLOW;
   57873             :     }
   57874       23320 :     if ( bLocalUseExceptions ) {
   57875       11480 :       popErrorHandler();
   57876             :     }
   57877             : #ifndef SED_HACKS
   57878             :     if( result == NULL && bLocalUseExceptions ) {
   57879             :       CPLErr eclass = CPLGetLastErrorType();
   57880             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   57881             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   57882             :       }
   57883             :     }
   57884             : #endif
   57885       23320 :     if( result != NULL && bLocalUseExceptions ) {
   57886             : #ifdef SED_HACKS
   57887       11190 :       bLocalUseExceptionsCode = FALSE;
   57888             : #endif
   57889             :     }
   57890             :   }
   57891       23320 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   57892       23320 :   {
   57893             :     /* %typemap(freearg) (const char *utf8_path) */
   57894       23320 :     GDALPythonFreeCStr(arg1, bToFree1);
   57895             :   }
   57896       23898 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   57897             :   return resultobj;
   57898           3 : fail:
   57899           3 :   {
   57900             :     /* %typemap(freearg) (const char *utf8_path) */
   57901       23325 :     GDALPythonFreeCStr(arg1, bToFree1);
   57902             :   }
   57903             :   return NULL;
   57904             : }
   57905             : 
   57906             : 
   57907        6528 : SWIGINTERN PyObject *_wrap_OpenEx(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   57908        6528 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   57909        6528 :   char *arg1 = (char *) 0 ;
   57910        6528 :   unsigned int arg2 = (unsigned int) 0 ;
   57911        6528 :   char **arg3 = (char **) NULL ;
   57912        6528 :   char **arg4 = (char **) NULL ;
   57913        6528 :   char **arg5 = (char **) NULL ;
   57914        6528 :   int bToFree1 = 0 ;
   57915        6528 :   unsigned int val2 ;
   57916        6528 :   int ecode2 = 0 ;
   57917        6528 :   PyObject * obj0 = 0 ;
   57918        6528 :   PyObject * obj1 = 0 ;
   57919        6528 :   PyObject * obj2 = 0 ;
   57920        6528 :   PyObject * obj3 = 0 ;
   57921        6528 :   PyObject * obj4 = 0 ;
   57922        6528 :   char * kwnames[] = {
   57923             :     (char *)"utf8_path",  (char *)"nOpenFlags",  (char *)"allowed_drivers",  (char *)"open_options",  (char *)"sibling_files",  NULL 
   57924             :   };
   57925        6528 :   GDALDatasetShadow *result = 0 ;
   57926             :   
   57927        6528 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOO:OpenEx", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
   57928        6528 :   {
   57929             :     /* %typemap(in) (const char *utf8_path) */
   57930        6528 :     if (PyUnicode_Check(obj0) || PyBytes_Check(obj0))
   57931             :     {
   57932        5782 :       arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   57933             :     }
   57934             :     else
   57935             :     {
   57936         746 :       arg1 = GDALPythonPathToCStr(obj0, &bToFree1);
   57937             :       
   57938             :     }
   57939        6528 :     if (arg1 == NULL)
   57940             :     {
   57941           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   57942           0 :       SWIG_fail;
   57943             :     }
   57944             :   }
   57945        6528 :   if (obj1) {
   57946        3874 :     ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
   57947        3874 :     if (!SWIG_IsOK(ecode2)) {
   57948           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OpenEx" "', argument " "2"" of type '" "unsigned int""'");
   57949             :     } 
   57950             :     arg2 = static_cast< unsigned int >(val2);
   57951             :   }
   57952        6528 :   if (obj2) {
   57953        1929 :     {
   57954             :       /* %typemap(in) char **dict */
   57955        1929 :       arg3 = NULL;
   57956        1929 :       if ( PySequence_Check( obj2 ) ) {
   57957        1929 :         int bErr = FALSE;
   57958        1929 :         arg3 = CSLFromPySequence(obj2, &bErr);
   57959        1929 :         if ( bErr )
   57960             :         {
   57961           0 :           SWIG_fail;
   57962             :         }
   57963             :       }
   57964           0 :       else if ( PyMapping_Check( obj2 ) ) {
   57965           0 :         int bErr = FALSE;
   57966           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   57967           0 :         if ( bErr )
   57968             :         {
   57969           0 :           SWIG_fail;
   57970             :         }
   57971             :       }
   57972             :       else {
   57973           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   57974           0 :         SWIG_fail;
   57975             :       }
   57976             :     }
   57977             :   }
   57978        6528 :   if (obj3) {
   57979        2615 :     {
   57980             :       /* %typemap(in) char **dict */
   57981        2615 :       arg4 = NULL;
   57982        2615 :       if ( PySequence_Check( obj3 ) ) {
   57983        2431 :         int bErr = FALSE;
   57984        2431 :         arg4 = CSLFromPySequence(obj3, &bErr);
   57985        2431 :         if ( bErr )
   57986             :         {
   57987           0 :           SWIG_fail;
   57988             :         }
   57989             :       }
   57990         184 :       else if ( PyMapping_Check( obj3 ) ) {
   57991         184 :         int bErr = FALSE;
   57992         184 :         arg4 = CSLFromPyMapping(obj3, &bErr);
   57993         184 :         if ( bErr )
   57994             :         {
   57995           0 :           SWIG_fail;
   57996             :         }
   57997             :       }
   57998             :       else {
   57999           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   58000           0 :         SWIG_fail;
   58001             :       }
   58002             :     }
   58003             :   }
   58004        6528 :   if (obj4) {
   58005           0 :     {
   58006             :       /* %typemap(in) char **dict */
   58007           0 :       arg5 = NULL;
   58008           0 :       if ( PySequence_Check( obj4 ) ) {
   58009           0 :         int bErr = FALSE;
   58010           0 :         arg5 = CSLFromPySequence(obj4, &bErr);
   58011           0 :         if ( bErr )
   58012             :         {
   58013           0 :           SWIG_fail;
   58014             :         }
   58015             :       }
   58016           0 :       else if ( PyMapping_Check( obj4 ) ) {
   58017           0 :         int bErr = FALSE;
   58018           0 :         arg5 = CSLFromPyMapping(obj4, &bErr);
   58019           0 :         if ( bErr )
   58020             :         {
   58021           0 :           SWIG_fail;
   58022             :         }
   58023             :       }
   58024             :       else {
   58025           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   58026           0 :         SWIG_fail;
   58027             :       }
   58028             :     }
   58029             :   }
   58030        6528 :   {
   58031        6528 :     if (!arg1) {
   58032        6528 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   58033             :     }
   58034             :   }
   58035        6528 :   {
   58036        6528 :     const int bLocalUseExceptions = GetUseExceptions();
   58037        6528 :     if ( bLocalUseExceptions ) {
   58038        2879 :       pushErrorHandler();
   58039             :     }
   58040        6528 :     {
   58041        6528 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58042        6528 :       result = (GDALDatasetShadow *)OpenEx((char const *)arg1,arg2,arg3,arg4,arg5);
   58043        6528 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58044             :     }
   58045        6528 :     if ( bLocalUseExceptions ) {
   58046        2879 :       popErrorHandler();
   58047             :     }
   58048             : #ifndef SED_HACKS
   58049             :     if( result == NULL && bLocalUseExceptions ) {
   58050             :       CPLErr eclass = CPLGetLastErrorType();
   58051             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58052             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58053             :       }
   58054             :     }
   58055             : #endif
   58056        6528 :     if( result != NULL && bLocalUseExceptions ) {
   58057             : #ifdef SED_HACKS
   58058        2512 :       bLocalUseExceptionsCode = FALSE;
   58059             : #endif
   58060             :     }
   58061             :   }
   58062        6528 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   58063        6528 :   {
   58064             :     /* %typemap(freearg) (const char *utf8_path) */
   58065        6528 :     GDALPythonFreeCStr(arg1, bToFree1);
   58066             :   }
   58067        6528 :   {
   58068             :     /* %typemap(freearg) char **dict */
   58069        6528 :     CSLDestroy( arg3 );
   58070             :   }
   58071        6528 :   {
   58072             :     /* %typemap(freearg) char **dict */
   58073        6528 :     CSLDestroy( arg4 );
   58074             :   }
   58075        6528 :   {
   58076             :     /* %typemap(freearg) char **dict */
   58077        6528 :     CSLDestroy( arg5 );
   58078             :   }
   58079        7262 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   58080             :   return resultobj;
   58081           0 : fail:
   58082           0 :   {
   58083             :     /* %typemap(freearg) (const char *utf8_path) */
   58084           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   58085             :   }
   58086           0 :   {
   58087             :     /* %typemap(freearg) char **dict */
   58088           0 :     CSLDestroy( arg3 );
   58089             :   }
   58090           0 :   {
   58091             :     /* %typemap(freearg) char **dict */
   58092           0 :     CSLDestroy( arg4 );
   58093             :   }
   58094           0 :   {
   58095             :     /* %typemap(freearg) char **dict */
   58096           0 :     CSLDestroy( arg5 );
   58097             :   }
   58098             :   return NULL;
   58099             : }
   58100             : 
   58101             : 
   58102        5053 : SWIGINTERN PyObject *_wrap_OpenShared(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58103        5053 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58104        5053 :   char *arg1 = (char *) 0 ;
   58105        5053 :   GDALAccess arg2 = (GDALAccess) GA_ReadOnly ;
   58106        5053 :   int bToFree1 = 0 ;
   58107        5053 :   PyObject *swig_obj[2] ;
   58108        5053 :   GDALDatasetShadow *result = 0 ;
   58109             :   
   58110        5053 :   if (!SWIG_Python_UnpackTuple(args, "OpenShared", 1, 2, swig_obj)) SWIG_fail;
   58111        5053 :   {
   58112             :     /* %typemap(in) (const char *utf8_path) */
   58113        5053 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   58114             :     {
   58115        5053 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   58116             :     }
   58117             :     else
   58118             :     {
   58119           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   58120             :       
   58121             :     }
   58122        5053 :     if (arg1 == NULL)
   58123             :     {
   58124           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   58125           0 :       SWIG_fail;
   58126             :     }
   58127             :   }
   58128        5053 :   if (swig_obj[1]) {
   58129          50 :     {
   58130             :       // %typemap(in) GDALAccess
   58131          50 :       int val = 0;
   58132          50 :       int ecode = SWIG_AsVal_int(swig_obj[1], &val);
   58133          50 :       if (!SWIG_IsOK(ecode)) {
   58134           0 :         SWIG_exception_fail(SWIG_ArgError(ecode), "invalid value for GDALAccess");
   58135             :       }
   58136          50 :       if( val != GA_ReadOnly && val != GA_Update )
   58137             :       {
   58138           0 :         SWIG_exception_fail(SWIG_ValueError, "invalid value for GDALAccess");
   58139             :       }
   58140             :       arg2 = static_cast<GDALAccess>(val);
   58141             :     }
   58142             :   }
   58143        5053 :   {
   58144        5053 :     if (!arg1) {
   58145        5053 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   58146             :     }
   58147             :   }
   58148        5053 :   {
   58149        5053 :     const int bLocalUseExceptions = GetUseExceptions();
   58150        5053 :     if ( bLocalUseExceptions ) {
   58151          51 :       pushErrorHandler();
   58152             :     }
   58153        5053 :     {
   58154        5053 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58155        5053 :       result = (GDALDatasetShadow *)OpenShared((char const *)arg1,arg2);
   58156        5053 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58157             :     }
   58158        5053 :     if ( bLocalUseExceptions ) {
   58159          51 :       popErrorHandler();
   58160             :     }
   58161             : #ifndef SED_HACKS
   58162             :     if( result == NULL && bLocalUseExceptions ) {
   58163             :       CPLErr eclass = CPLGetLastErrorType();
   58164             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58165             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58166             :       }
   58167             :     }
   58168             : #endif
   58169        5053 :     if( result != NULL && bLocalUseExceptions ) {
   58170             : #ifdef SED_HACKS
   58171          51 :       bLocalUseExceptionsCode = FALSE;
   58172             : #endif
   58173             :     }
   58174             :   }
   58175        5053 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   58176        5053 :   {
   58177             :     /* %typemap(freearg) (const char *utf8_path) */
   58178        5053 :     GDALPythonFreeCStr(arg1, bToFree1);
   58179             :   }
   58180        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; } }
   58181             :   return resultobj;
   58182           0 : fail:
   58183           0 :   {
   58184             :     /* %typemap(freearg) (const char *utf8_path) */
   58185        5053 :     GDALPythonFreeCStr(arg1, bToFree1);
   58186             :   }
   58187             :   return NULL;
   58188             : }
   58189             : 
   58190             : 
   58191          11 : SWIGINTERN PyObject *_wrap_IdentifyDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58192          11 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58193          11 :   char *arg1 = (char *) 0 ;
   58194          11 :   char **arg2 = (char **) NULL ;
   58195          11 :   int bToFree1 = 0 ;
   58196          11 :   PyObject *swig_obj[2] ;
   58197          11 :   GDALDriverShadow *result = 0 ;
   58198             :   
   58199          11 :   if (!SWIG_Python_UnpackTuple(args, "IdentifyDriver", 1, 2, swig_obj)) SWIG_fail;
   58200          11 :   {
   58201             :     /* %typemap(in) (const char *utf8_path) */
   58202          11 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   58203             :     {
   58204          11 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   58205             :     }
   58206             :     else
   58207             :     {
   58208           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   58209             :       
   58210             :     }
   58211          11 :     if (arg1 == NULL)
   58212             :     {
   58213           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   58214           0 :       SWIG_fail;
   58215             :     }
   58216             :   }
   58217          11 :   if (swig_obj[1]) {
   58218           2 :     {
   58219             :       /* %typemap(in) char **dict */
   58220           2 :       arg2 = NULL;
   58221           2 :       if ( PySequence_Check( swig_obj[1] ) ) {
   58222           2 :         int bErr = FALSE;
   58223           2 :         arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   58224           2 :         if ( bErr )
   58225             :         {
   58226           0 :           SWIG_fail;
   58227             :         }
   58228             :       }
   58229           0 :       else if ( PyMapping_Check( swig_obj[1] ) ) {
   58230           0 :         int bErr = FALSE;
   58231           0 :         arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   58232           0 :         if ( bErr )
   58233             :         {
   58234           0 :           SWIG_fail;
   58235             :         }
   58236             :       }
   58237             :       else {
   58238           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   58239           0 :         SWIG_fail;
   58240             :       }
   58241             :     }
   58242             :   }
   58243          11 :   {
   58244          11 :     if (!arg1) {
   58245          11 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   58246             :     }
   58247             :   }
   58248          11 :   {
   58249          11 :     const int bLocalUseExceptions = GetUseExceptions();
   58250          11 :     if ( bLocalUseExceptions ) {
   58251           6 :       pushErrorHandler();
   58252             :     }
   58253          11 :     {
   58254          11 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58255          11 :       result = (GDALDriverShadow *)IdentifyDriver((char const *)arg1,arg2);
   58256          11 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58257             :     }
   58258          11 :     if ( bLocalUseExceptions ) {
   58259           6 :       popErrorHandler();
   58260             :     }
   58261             : #ifndef SED_HACKS
   58262             :     if ( bLocalUseExceptions ) {
   58263             :       CPLErr eclass = CPLGetLastErrorType();
   58264             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58265             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58266             :       }
   58267             :     }
   58268             : #endif
   58269             :   }
   58270          11 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   58271          11 :   {
   58272             :     /* %typemap(freearg) (const char *utf8_path) */
   58273          11 :     GDALPythonFreeCStr(arg1, bToFree1);
   58274             :   }
   58275          11 :   {
   58276             :     /* %typemap(freearg) char **dict */
   58277          11 :     CSLDestroy( arg2 );
   58278             :   }
   58279          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; } }
   58280             :   return resultobj;
   58281           0 : fail:
   58282           0 :   {
   58283             :     /* %typemap(freearg) (const char *utf8_path) */
   58284           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   58285             :   }
   58286           0 :   {
   58287             :     /* %typemap(freearg) char **dict */
   58288           0 :     CSLDestroy( arg2 );
   58289             :   }
   58290             :   return NULL;
   58291             : }
   58292             : 
   58293             : 
   58294          50 : SWIGINTERN PyObject *_wrap_IdentifyDriverEx(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   58295          50 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58296          50 :   char *arg1 = (char *) 0 ;
   58297          50 :   unsigned int arg2 = (unsigned int) 0 ;
   58298          50 :   char **arg3 = (char **) NULL ;
   58299          50 :   char **arg4 = (char **) NULL ;
   58300          50 :   int bToFree1 = 0 ;
   58301          50 :   unsigned int val2 ;
   58302          50 :   int ecode2 = 0 ;
   58303          50 :   PyObject * obj0 = 0 ;
   58304          50 :   PyObject * obj1 = 0 ;
   58305          50 :   PyObject * obj2 = 0 ;
   58306          50 :   PyObject * obj3 = 0 ;
   58307          50 :   char * kwnames[] = {
   58308             :     (char *)"utf8_path",  (char *)"nIdentifyFlags",  (char *)"allowed_drivers",  (char *)"sibling_files",  NULL 
   58309             :   };
   58310          50 :   GDALDriverShadow *result = 0 ;
   58311             :   
   58312          50 :   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOO:IdentifyDriverEx", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
   58313          50 :   {
   58314             :     /* %typemap(in) (const char *utf8_path) */
   58315          50 :     if (PyUnicode_Check(obj0) || PyBytes_Check(obj0))
   58316             :     {
   58317          50 :       arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   58318             :     }
   58319             :     else
   58320             :     {
   58321           0 :       arg1 = GDALPythonPathToCStr(obj0, &bToFree1);
   58322             :       
   58323             :     }
   58324          50 :     if (arg1 == NULL)
   58325             :     {
   58326           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   58327           0 :       SWIG_fail;
   58328             :     }
   58329             :   }
   58330          50 :   if (obj1) {
   58331           3 :     ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
   58332           3 :     if (!SWIG_IsOK(ecode2)) {
   58333           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IdentifyDriverEx" "', argument " "2"" of type '" "unsigned int""'");
   58334             :     } 
   58335             :     arg2 = static_cast< unsigned int >(val2);
   58336             :   }
   58337          50 :   if (obj2) {
   58338          41 :     {
   58339             :       /* %typemap(in) char **dict */
   58340          41 :       arg3 = NULL;
   58341          41 :       if ( PySequence_Check( obj2 ) ) {
   58342          41 :         int bErr = FALSE;
   58343          41 :         arg3 = CSLFromPySequence(obj2, &bErr);
   58344          41 :         if ( bErr )
   58345             :         {
   58346           0 :           SWIG_fail;
   58347             :         }
   58348             :       }
   58349           0 :       else if ( PyMapping_Check( obj2 ) ) {
   58350           0 :         int bErr = FALSE;
   58351           0 :         arg3 = CSLFromPyMapping(obj2, &bErr);
   58352           0 :         if ( bErr )
   58353             :         {
   58354           0 :           SWIG_fail;
   58355             :         }
   58356             :       }
   58357             :       else {
   58358           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   58359           0 :         SWIG_fail;
   58360             :       }
   58361             :     }
   58362             :   }
   58363          50 :   if (obj3) {
   58364           2 :     {
   58365             :       /* %typemap(in) char **dict */
   58366           2 :       arg4 = NULL;
   58367           2 :       if ( PySequence_Check( obj3 ) ) {
   58368           2 :         int bErr = FALSE;
   58369           2 :         arg4 = CSLFromPySequence(obj3, &bErr);
   58370           2 :         if ( bErr )
   58371             :         {
   58372           0 :           SWIG_fail;
   58373             :         }
   58374             :       }
   58375           0 :       else if ( PyMapping_Check( obj3 ) ) {
   58376           0 :         int bErr = FALSE;
   58377           0 :         arg4 = CSLFromPyMapping(obj3, &bErr);
   58378           0 :         if ( bErr )
   58379             :         {
   58380           0 :           SWIG_fail;
   58381             :         }
   58382             :       }
   58383             :       else {
   58384           0 :         PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   58385           0 :         SWIG_fail;
   58386             :       }
   58387             :     }
   58388             :   }
   58389          50 :   {
   58390          50 :     if (!arg1) {
   58391          50 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   58392             :     }
   58393             :   }
   58394          50 :   {
   58395          50 :     const int bLocalUseExceptions = GetUseExceptions();
   58396          50 :     if ( bLocalUseExceptions ) {
   58397          45 :       pushErrorHandler();
   58398             :     }
   58399          50 :     {
   58400          50 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58401          50 :       result = (GDALDriverShadow *)IdentifyDriverEx((char const *)arg1,arg2,arg3,arg4);
   58402          50 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58403             :     }
   58404          50 :     if ( bLocalUseExceptions ) {
   58405          45 :       popErrorHandler();
   58406             :     }
   58407             : #ifndef SED_HACKS
   58408             :     if ( bLocalUseExceptions ) {
   58409             :       CPLErr eclass = CPLGetLastErrorType();
   58410             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58411             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58412             :       }
   58413             :     }
   58414             : #endif
   58415             :   }
   58416          50 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   58417          50 :   {
   58418             :     /* %typemap(freearg) (const char *utf8_path) */
   58419          50 :     GDALPythonFreeCStr(arg1, bToFree1);
   58420             :   }
   58421          50 :   {
   58422             :     /* %typemap(freearg) char **dict */
   58423          50 :     CSLDestroy( arg3 );
   58424             :   }
   58425          50 :   {
   58426             :     /* %typemap(freearg) char **dict */
   58427          50 :     CSLDestroy( arg4 );
   58428             :   }
   58429          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; } }
   58430             :   return resultobj;
   58431           0 : fail:
   58432           0 :   {
   58433             :     /* %typemap(freearg) (const char *utf8_path) */
   58434           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   58435             :   }
   58436           0 :   {
   58437             :     /* %typemap(freearg) char **dict */
   58438           0 :     CSLDestroy( arg3 );
   58439             :   }
   58440           0 :   {
   58441             :     /* %typemap(freearg) char **dict */
   58442           0 :     CSLDestroy( arg4 );
   58443             :   }
   58444             :   return NULL;
   58445             : }
   58446             : 
   58447             : 
   58448         193 : SWIGINTERN PyObject *_wrap_GeneralCmdLineProcessor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58449         193 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58450         193 :   char **arg1 = (char **) 0 ;
   58451         193 :   int arg2 = (int) 0 ;
   58452         193 :   int val2 ;
   58453         193 :   int ecode2 = 0 ;
   58454         193 :   PyObject *swig_obj[2] ;
   58455         193 :   char **result = 0 ;
   58456             :   
   58457         193 :   if (!SWIG_Python_UnpackTuple(args, "GeneralCmdLineProcessor", 1, 2, swig_obj)) SWIG_fail;
   58458         193 :   {
   58459             :     /* %typemap(in) char **dict */
   58460         193 :     arg1 = NULL;
   58461         193 :     if ( PySequence_Check( swig_obj[0] ) ) {
   58462         193 :       int bErr = FALSE;
   58463         193 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   58464         193 :       if ( bErr )
   58465             :       {
   58466           0 :         SWIG_fail;
   58467             :       }
   58468             :     }
   58469           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   58470           0 :       int bErr = FALSE;
   58471           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   58472           0 :       if ( bErr )
   58473             :       {
   58474           0 :         SWIG_fail;
   58475             :       }
   58476             :     }
   58477             :     else {
   58478           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   58479           0 :       SWIG_fail;
   58480             :     }
   58481             :   }
   58482         193 :   if (swig_obj[1]) {
   58483           0 :     ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
   58484           0 :     if (!SWIG_IsOK(ecode2)) {
   58485           0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GeneralCmdLineProcessor" "', argument " "2"" of type '" "int""'");
   58486             :     } 
   58487             :     arg2 = static_cast< int >(val2);
   58488             :   }
   58489         193 :   {
   58490         193 :     const int bLocalUseExceptions = GetUseExceptions();
   58491         193 :     if ( bLocalUseExceptions ) {
   58492         104 :       pushErrorHandler();
   58493             :     }
   58494         193 :     {
   58495         193 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58496         193 :       result = (char **)GeneralCmdLineProcessor(arg1,arg2);
   58497         193 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58498             :     }
   58499         193 :     if ( bLocalUseExceptions ) {
   58500         104 :       popErrorHandler();
   58501             :     }
   58502             : #ifndef SED_HACKS
   58503             :     if ( bLocalUseExceptions ) {
   58504             :       CPLErr eclass = CPLGetLastErrorType();
   58505             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58506             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58507             :       }
   58508             :     }
   58509             : #endif
   58510             :   }
   58511         193 :   {
   58512             :     /* %typemap(out) char **CSL -> ( string ) */
   58513         193 :     bool bErr = false;
   58514         193 :     resultobj = CSLToList(result, &bErr);
   58515         193 :     CSLDestroy(result);
   58516         193 :     if( bErr ) {
   58517           0 :       SWIG_fail;
   58518             :     }
   58519             :   }
   58520         193 :   {
   58521             :     /* %typemap(freearg) char **dict */
   58522         193 :     CSLDestroy( arg1 );
   58523             :   }
   58524         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; } }
   58525             :   return resultobj;
   58526           0 : fail:
   58527           0 :   {
   58528             :     /* %typemap(freearg) char **dict */
   58529           0 :     CSLDestroy( arg1 );
   58530             :   }
   58531             :   return NULL;
   58532             : }
   58533             : 
   58534             : 
   58535          55 : SWIGINTERN PyObject *_wrap_new_GDALInfoOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58536          55 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58537          55 :   char **arg1 = (char **) 0 ;
   58538          55 :   PyObject *swig_obj[1] ;
   58539          55 :   GDALInfoOptions *result = 0 ;
   58540             :   
   58541          55 :   if (!args) SWIG_fail;
   58542          55 :   swig_obj[0] = args;
   58543          55 :   {
   58544             :     /* %typemap(in) char **dict */
   58545          55 :     arg1 = NULL;
   58546          55 :     if ( PySequence_Check( swig_obj[0] ) ) {
   58547          55 :       int bErr = FALSE;
   58548          55 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   58549          55 :       if ( bErr )
   58550             :       {
   58551           0 :         SWIG_fail;
   58552             :       }
   58553             :     }
   58554           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   58555           0 :       int bErr = FALSE;
   58556           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   58557           0 :       if ( bErr )
   58558             :       {
   58559           0 :         SWIG_fail;
   58560             :       }
   58561             :     }
   58562             :     else {
   58563           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   58564           0 :       SWIG_fail;
   58565             :     }
   58566             :   }
   58567          55 :   {
   58568          55 :     const int bLocalUseExceptions = GetUseExceptions();
   58569          55 :     if ( bLocalUseExceptions ) {
   58570          48 :       pushErrorHandler();
   58571             :     }
   58572          55 :     {
   58573          55 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58574          55 :       result = (GDALInfoOptions *)new_GDALInfoOptions(arg1);
   58575          55 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58576             :     }
   58577          55 :     if ( bLocalUseExceptions ) {
   58578          48 :       popErrorHandler();
   58579             :     }
   58580             : #ifndef SED_HACKS
   58581             :     if ( bLocalUseExceptions ) {
   58582             :       CPLErr eclass = CPLGetLastErrorType();
   58583             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58584             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58585             :       }
   58586             :     }
   58587             : #endif
   58588             :   }
   58589          55 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALInfoOptions, SWIG_POINTER_NEW |  0 );
   58590          55 :   {
   58591             :     /* %typemap(freearg) char **dict */
   58592          55 :     CSLDestroy( arg1 );
   58593             :   }
   58594          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; } }
   58595             :   return resultobj;
   58596           0 : fail:
   58597           0 :   {
   58598             :     /* %typemap(freearg) char **dict */
   58599           0 :     CSLDestroy( arg1 );
   58600             :   }
   58601             :   return NULL;
   58602             : }
   58603             : 
   58604             : 
   58605          55 : SWIGINTERN PyObject *_wrap_delete_GDALInfoOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58606          55 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58607          55 :   GDALInfoOptions *arg1 = (GDALInfoOptions *) 0 ;
   58608          55 :   void *argp1 = 0 ;
   58609          55 :   int res1 = 0 ;
   58610          55 :   PyObject *swig_obj[1] ;
   58611             :   
   58612          55 :   if (!args) SWIG_fail;
   58613          55 :   swig_obj[0] = args;
   58614          55 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALInfoOptions, SWIG_POINTER_DISOWN |  0 );
   58615          55 :   if (!SWIG_IsOK(res1)) {
   58616           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALInfoOptions" "', argument " "1"" of type '" "GDALInfoOptions *""'"); 
   58617             :   }
   58618          55 :   arg1 = reinterpret_cast< GDALInfoOptions * >(argp1);
   58619          55 :   {
   58620          55 :     const int bLocalUseExceptions = GetUseExceptions();
   58621          55 :     if ( bLocalUseExceptions ) {
   58622          48 :       pushErrorHandler();
   58623             :     }
   58624          55 :     {
   58625          55 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58626          55 :       delete_GDALInfoOptions(arg1);
   58627          55 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58628             :     }
   58629          55 :     if ( bLocalUseExceptions ) {
   58630          48 :       popErrorHandler();
   58631             :     }
   58632             : #ifndef SED_HACKS
   58633             :     if ( bLocalUseExceptions ) {
   58634             :       CPLErr eclass = CPLGetLastErrorType();
   58635             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58636             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58637             :       }
   58638             :     }
   58639             : #endif
   58640             :   }
   58641          55 :   resultobj = SWIG_Py_Void();
   58642          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; } }
   58643             :   return resultobj;
   58644             : fail:
   58645             :   return NULL;
   58646             : }
   58647             : 
   58648             : 
   58649         277 : SWIGINTERN PyObject *GDALInfoOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58650         277 :   PyObject *obj;
   58651         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   58652         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALInfoOptions, SWIG_NewClientData(obj));
   58653         277 :   return SWIG_Py_Void();
   58654             : }
   58655             : 
   58656          55 : SWIGINTERN PyObject *GDALInfoOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58657          55 :   return SWIG_Python_InitShadowInstance(args);
   58658             : }
   58659             : 
   58660          55 : SWIGINTERN PyObject *_wrap_InfoInternal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58661          55 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58662          55 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   58663          55 :   GDALInfoOptions *arg2 = (GDALInfoOptions *) 0 ;
   58664          55 :   void *argp1 = 0 ;
   58665          55 :   int res1 = 0 ;
   58666          55 :   void *argp2 = 0 ;
   58667          55 :   int res2 = 0 ;
   58668          55 :   PyObject *swig_obj[2] ;
   58669          55 :   retStringAndCPLFree *result = 0 ;
   58670             :   
   58671          55 :   if (!SWIG_Python_UnpackTuple(args, "InfoInternal", 2, 2, swig_obj)) SWIG_fail;
   58672          55 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   58673          55 :   if (!SWIG_IsOK(res1)) {
   58674           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InfoInternal" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   58675             :   }
   58676          55 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   58677          55 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALInfoOptions, 0 |  0 );
   58678          55 :   if (!SWIG_IsOK(res2)) {
   58679           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InfoInternal" "', argument " "2"" of type '" "GDALInfoOptions *""'"); 
   58680             :   }
   58681          55 :   arg2 = reinterpret_cast< GDALInfoOptions * >(argp2);
   58682          55 :   {
   58683          55 :     const int bLocalUseExceptions = GetUseExceptions();
   58684          55 :     if ( bLocalUseExceptions ) {
   58685          48 :       pushErrorHandler();
   58686             :     }
   58687          55 :     {
   58688          55 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58689          55 :       result = (retStringAndCPLFree *)GDALInfo(arg1,arg2);
   58690          55 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58691             :     }
   58692          55 :     if ( bLocalUseExceptions ) {
   58693          48 :       popErrorHandler();
   58694             :     }
   58695             : #ifndef SED_HACKS
   58696             :     if ( bLocalUseExceptions ) {
   58697             :       CPLErr eclass = CPLGetLastErrorType();
   58698             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58699             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58700             :       }
   58701             :     }
   58702             : #endif
   58703             :   }
   58704          55 :   {
   58705             :     /* %typemap(out) (retStringAndCPLFree*) */
   58706          55 :     Py_XDECREF(resultobj);
   58707          55 :     if(result)
   58708             :     {
   58709          55 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   58710          55 :       CPLFree(result);
   58711             :     }
   58712             :     else
   58713             :     {
   58714           0 :       resultobj = Py_None;
   58715           0 :       Py_INCREF(resultobj);
   58716             :     }
   58717             :   }
   58718          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; } }
   58719             :   return resultobj;
   58720             : fail:
   58721             :   return NULL;
   58722             : }
   58723             : 
   58724             : 
   58725          36 : SWIGINTERN PyObject *_wrap_new_GDALVectorInfoOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58726          36 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58727          36 :   char **arg1 = (char **) 0 ;
   58728          36 :   PyObject *swig_obj[1] ;
   58729          36 :   GDALVectorInfoOptions *result = 0 ;
   58730             :   
   58731          36 :   if (!args) SWIG_fail;
   58732          36 :   swig_obj[0] = args;
   58733          36 :   {
   58734             :     /* %typemap(in) char **dict */
   58735          36 :     arg1 = NULL;
   58736          36 :     if ( PySequence_Check( swig_obj[0] ) ) {
   58737          36 :       int bErr = FALSE;
   58738          36 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   58739          36 :       if ( bErr )
   58740             :       {
   58741           0 :         SWIG_fail;
   58742             :       }
   58743             :     }
   58744           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   58745           0 :       int bErr = FALSE;
   58746           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   58747           0 :       if ( bErr )
   58748             :       {
   58749           0 :         SWIG_fail;
   58750             :       }
   58751             :     }
   58752             :     else {
   58753           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   58754           0 :       SWIG_fail;
   58755             :     }
   58756             :   }
   58757          36 :   {
   58758          36 :     const int bLocalUseExceptions = GetUseExceptions();
   58759          36 :     if ( bLocalUseExceptions ) {
   58760          35 :       pushErrorHandler();
   58761             :     }
   58762          36 :     {
   58763          36 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58764          36 :       result = (GDALVectorInfoOptions *)new_GDALVectorInfoOptions(arg1);
   58765          36 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58766             :     }
   58767          36 :     if ( bLocalUseExceptions ) {
   58768          35 :       popErrorHandler();
   58769             :     }
   58770             : #ifndef SED_HACKS
   58771             :     if ( bLocalUseExceptions ) {
   58772             :       CPLErr eclass = CPLGetLastErrorType();
   58773             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58774             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58775             :       }
   58776             :     }
   58777             : #endif
   58778             :   }
   58779          36 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALVectorInfoOptions, SWIG_POINTER_NEW |  0 );
   58780          36 :   {
   58781             :     /* %typemap(freearg) char **dict */
   58782          36 :     CSLDestroy( arg1 );
   58783             :   }
   58784          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; } }
   58785             :   return resultobj;
   58786           0 : fail:
   58787           0 :   {
   58788             :     /* %typemap(freearg) char **dict */
   58789           0 :     CSLDestroy( arg1 );
   58790             :   }
   58791             :   return NULL;
   58792             : }
   58793             : 
   58794             : 
   58795          36 : SWIGINTERN PyObject *_wrap_delete_GDALVectorInfoOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58796          36 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58797          36 :   GDALVectorInfoOptions *arg1 = (GDALVectorInfoOptions *) 0 ;
   58798          36 :   void *argp1 = 0 ;
   58799          36 :   int res1 = 0 ;
   58800          36 :   PyObject *swig_obj[1] ;
   58801             :   
   58802          36 :   if (!args) SWIG_fail;
   58803          36 :   swig_obj[0] = args;
   58804          36 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALVectorInfoOptions, SWIG_POINTER_DISOWN |  0 );
   58805          36 :   if (!SWIG_IsOK(res1)) {
   58806           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALVectorInfoOptions" "', argument " "1"" of type '" "GDALVectorInfoOptions *""'"); 
   58807             :   }
   58808          36 :   arg1 = reinterpret_cast< GDALVectorInfoOptions * >(argp1);
   58809          36 :   {
   58810          36 :     const int bLocalUseExceptions = GetUseExceptions();
   58811          36 :     if ( bLocalUseExceptions ) {
   58812          35 :       pushErrorHandler();
   58813             :     }
   58814          36 :     {
   58815          36 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58816          36 :       delete_GDALVectorInfoOptions(arg1);
   58817          36 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58818             :     }
   58819          36 :     if ( bLocalUseExceptions ) {
   58820          35 :       popErrorHandler();
   58821             :     }
   58822             : #ifndef SED_HACKS
   58823             :     if ( bLocalUseExceptions ) {
   58824             :       CPLErr eclass = CPLGetLastErrorType();
   58825             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58826             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58827             :       }
   58828             :     }
   58829             : #endif
   58830             :   }
   58831          36 :   resultobj = SWIG_Py_Void();
   58832          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; } }
   58833             :   return resultobj;
   58834             : fail:
   58835             :   return NULL;
   58836             : }
   58837             : 
   58838             : 
   58839         277 : SWIGINTERN PyObject *GDALVectorInfoOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58840         277 :   PyObject *obj;
   58841         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   58842         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALVectorInfoOptions, SWIG_NewClientData(obj));
   58843         277 :   return SWIG_Py_Void();
   58844             : }
   58845             : 
   58846          36 : SWIGINTERN PyObject *GDALVectorInfoOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58847          36 :   return SWIG_Python_InitShadowInstance(args);
   58848             : }
   58849             : 
   58850          36 : SWIGINTERN PyObject *_wrap_VectorInfoInternal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58851          36 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58852          36 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   58853          36 :   GDALVectorInfoOptions *arg2 = (GDALVectorInfoOptions *) 0 ;
   58854          36 :   void *argp1 = 0 ;
   58855          36 :   int res1 = 0 ;
   58856          36 :   void *argp2 = 0 ;
   58857          36 :   int res2 = 0 ;
   58858          36 :   PyObject *swig_obj[2] ;
   58859          36 :   retStringAndCPLFree *result = 0 ;
   58860             :   
   58861          36 :   if (!SWIG_Python_UnpackTuple(args, "VectorInfoInternal", 2, 2, swig_obj)) SWIG_fail;
   58862          36 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   58863          36 :   if (!SWIG_IsOK(res1)) {
   58864           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorInfoInternal" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   58865             :   }
   58866          36 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   58867          36 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALVectorInfoOptions, 0 |  0 );
   58868          36 :   if (!SWIG_IsOK(res2)) {
   58869           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VectorInfoInternal" "', argument " "2"" of type '" "GDALVectorInfoOptions *""'"); 
   58870             :   }
   58871          36 :   arg2 = reinterpret_cast< GDALVectorInfoOptions * >(argp2);
   58872          36 :   {
   58873          36 :     const int bLocalUseExceptions = GetUseExceptions();
   58874          36 :     if ( bLocalUseExceptions ) {
   58875          35 :       pushErrorHandler();
   58876             :     }
   58877          36 :     {
   58878          36 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58879          36 :       result = (retStringAndCPLFree *)GDALVectorInfo(arg1,arg2);
   58880          36 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58881             :     }
   58882          36 :     if ( bLocalUseExceptions ) {
   58883          35 :       popErrorHandler();
   58884             :     }
   58885             : #ifndef SED_HACKS
   58886             :     if ( bLocalUseExceptions ) {
   58887             :       CPLErr eclass = CPLGetLastErrorType();
   58888             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58889             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58890             :       }
   58891             :     }
   58892             : #endif
   58893             :   }
   58894          36 :   {
   58895             :     /* %typemap(out) (retStringAndCPLFree*) */
   58896          36 :     Py_XDECREF(resultobj);
   58897          36 :     if(result)
   58898             :     {
   58899          35 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   58900          35 :       CPLFree(result);
   58901             :     }
   58902             :     else
   58903             :     {
   58904           1 :       resultobj = Py_None;
   58905           1 :       Py_INCREF(resultobj);
   58906             :     }
   58907             :   }
   58908          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; } }
   58909             :   return resultobj;
   58910             : fail:
   58911             :   return NULL;
   58912             : }
   58913             : 
   58914             : 
   58915          28 : SWIGINTERN PyObject *_wrap_new_GDALMultiDimInfoOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58916          28 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58917          28 :   char **arg1 = (char **) 0 ;
   58918          28 :   PyObject *swig_obj[1] ;
   58919          28 :   GDALMultiDimInfoOptions *result = 0 ;
   58920             :   
   58921          28 :   if (!args) SWIG_fail;
   58922          28 :   swig_obj[0] = args;
   58923          28 :   {
   58924             :     /* %typemap(in) char **dict */
   58925          28 :     arg1 = NULL;
   58926          28 :     if ( PySequence_Check( swig_obj[0] ) ) {
   58927          28 :       int bErr = FALSE;
   58928          28 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   58929          28 :       if ( bErr )
   58930             :       {
   58931           0 :         SWIG_fail;
   58932             :       }
   58933             :     }
   58934           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   58935           0 :       int bErr = FALSE;
   58936           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   58937           0 :       if ( bErr )
   58938             :       {
   58939           0 :         SWIG_fail;
   58940             :       }
   58941             :     }
   58942             :     else {
   58943           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   58944           0 :       SWIG_fail;
   58945             :     }
   58946             :   }
   58947          28 :   {
   58948          28 :     const int bLocalUseExceptions = GetUseExceptions();
   58949          28 :     if ( bLocalUseExceptions ) {
   58950          22 :       pushErrorHandler();
   58951             :     }
   58952          28 :     {
   58953          28 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   58954          28 :       result = (GDALMultiDimInfoOptions *)new_GDALMultiDimInfoOptions(arg1);
   58955          28 :       SWIG_PYTHON_THREAD_END_ALLOW;
   58956             :     }
   58957          28 :     if ( bLocalUseExceptions ) {
   58958          22 :       popErrorHandler();
   58959             :     }
   58960             : #ifndef SED_HACKS
   58961             :     if ( bLocalUseExceptions ) {
   58962             :       CPLErr eclass = CPLGetLastErrorType();
   58963             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   58964             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   58965             :       }
   58966             :     }
   58967             : #endif
   58968             :   }
   58969          28 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMultiDimInfoOptions, SWIG_POINTER_NEW |  0 );
   58970          28 :   {
   58971             :     /* %typemap(freearg) char **dict */
   58972          28 :     CSLDestroy( arg1 );
   58973             :   }
   58974          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; } }
   58975             :   return resultobj;
   58976           0 : fail:
   58977           0 :   {
   58978             :     /* %typemap(freearg) char **dict */
   58979           0 :     CSLDestroy( arg1 );
   58980             :   }
   58981             :   return NULL;
   58982             : }
   58983             : 
   58984             : 
   58985          28 : SWIGINTERN PyObject *_wrap_delete_GDALMultiDimInfoOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   58986          28 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   58987          28 :   GDALMultiDimInfoOptions *arg1 = (GDALMultiDimInfoOptions *) 0 ;
   58988          28 :   void *argp1 = 0 ;
   58989          28 :   int res1 = 0 ;
   58990          28 :   PyObject *swig_obj[1] ;
   58991             :   
   58992          28 :   if (!args) SWIG_fail;
   58993          28 :   swig_obj[0] = args;
   58994          28 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMultiDimInfoOptions, SWIG_POINTER_DISOWN |  0 );
   58995          28 :   if (!SWIG_IsOK(res1)) {
   58996           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALMultiDimInfoOptions" "', argument " "1"" of type '" "GDALMultiDimInfoOptions *""'"); 
   58997             :   }
   58998          28 :   arg1 = reinterpret_cast< GDALMultiDimInfoOptions * >(argp1);
   58999          28 :   {
   59000          28 :     const int bLocalUseExceptions = GetUseExceptions();
   59001          28 :     if ( bLocalUseExceptions ) {
   59002          22 :       pushErrorHandler();
   59003             :     }
   59004          28 :     {
   59005          28 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59006          28 :       delete_GDALMultiDimInfoOptions(arg1);
   59007          28 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59008             :     }
   59009          28 :     if ( bLocalUseExceptions ) {
   59010          22 :       popErrorHandler();
   59011             :     }
   59012             : #ifndef SED_HACKS
   59013             :     if ( bLocalUseExceptions ) {
   59014             :       CPLErr eclass = CPLGetLastErrorType();
   59015             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59016             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59017             :       }
   59018             :     }
   59019             : #endif
   59020             :   }
   59021          28 :   resultobj = SWIG_Py_Void();
   59022          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; } }
   59023             :   return resultobj;
   59024             : fail:
   59025             :   return NULL;
   59026             : }
   59027             : 
   59028             : 
   59029         277 : SWIGINTERN PyObject *GDALMultiDimInfoOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59030         277 :   PyObject *obj;
   59031         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   59032         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALMultiDimInfoOptions, SWIG_NewClientData(obj));
   59033         277 :   return SWIG_Py_Void();
   59034             : }
   59035             : 
   59036          28 : SWIGINTERN PyObject *GDALMultiDimInfoOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59037          28 :   return SWIG_Python_InitShadowInstance(args);
   59038             : }
   59039             : 
   59040          27 : SWIGINTERN PyObject *_wrap_MultiDimInfoInternal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59041          27 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59042          27 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   59043          27 :   GDALMultiDimInfoOptions *arg2 = (GDALMultiDimInfoOptions *) 0 ;
   59044          27 :   void *argp1 = 0 ;
   59045          27 :   int res1 = 0 ;
   59046          27 :   void *argp2 = 0 ;
   59047          27 :   int res2 = 0 ;
   59048          27 :   PyObject *swig_obj[2] ;
   59049          27 :   retStringAndCPLFree *result = 0 ;
   59050             :   
   59051          27 :   if (!SWIG_Python_UnpackTuple(args, "MultiDimInfoInternal", 2, 2, swig_obj)) SWIG_fail;
   59052          27 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   59053          27 :   if (!SWIG_IsOK(res1)) {
   59054           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiDimInfoInternal" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   59055             :   }
   59056          27 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   59057          27 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALMultiDimInfoOptions, 0 |  0 );
   59058          27 :   if (!SWIG_IsOK(res2)) {
   59059           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultiDimInfoInternal" "', argument " "2"" of type '" "GDALMultiDimInfoOptions *""'"); 
   59060             :   }
   59061          27 :   arg2 = reinterpret_cast< GDALMultiDimInfoOptions * >(argp2);
   59062          27 :   {
   59063          27 :     const int bLocalUseExceptions = GetUseExceptions();
   59064          27 :     if ( bLocalUseExceptions ) {
   59065          21 :       pushErrorHandler();
   59066             :     }
   59067          27 :     {
   59068          27 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59069          27 :       result = (retStringAndCPLFree *)GDALMultiDimInfo(arg1,arg2);
   59070          27 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59071             :     }
   59072          27 :     if ( bLocalUseExceptions ) {
   59073          21 :       popErrorHandler();
   59074             :     }
   59075             : #ifndef SED_HACKS
   59076             :     if ( bLocalUseExceptions ) {
   59077             :       CPLErr eclass = CPLGetLastErrorType();
   59078             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59079             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59080             :       }
   59081             :     }
   59082             : #endif
   59083             :   }
   59084          27 :   {
   59085             :     /* %typemap(out) (retStringAndCPLFree*) */
   59086          27 :     Py_XDECREF(resultobj);
   59087          27 :     if(result)
   59088             :     {
   59089          26 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   59090          26 :       CPLFree(result);
   59091             :     }
   59092             :     else
   59093             :     {
   59094           1 :       resultobj = Py_None;
   59095           1 :       Py_INCREF(resultobj);
   59096             :     }
   59097             :   }
   59098          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; } }
   59099             :   return resultobj;
   59100             : fail:
   59101             :   return NULL;
   59102             : }
   59103             : 
   59104             : 
   59105        1993 : SWIGINTERN PyObject *_wrap_new_GDALTranslateOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59106        1993 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59107        1993 :   char **arg1 = (char **) 0 ;
   59108        1993 :   PyObject *swig_obj[1] ;
   59109        1993 :   GDALTranslateOptions *result = 0 ;
   59110             :   
   59111        1993 :   if (!args) SWIG_fail;
   59112        1993 :   swig_obj[0] = args;
   59113        1993 :   {
   59114             :     /* %typemap(in) char **dict */
   59115        1993 :     arg1 = NULL;
   59116        1993 :     if ( PySequence_Check( swig_obj[0] ) ) {
   59117        1993 :       int bErr = FALSE;
   59118        1993 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   59119        1993 :       if ( bErr )
   59120             :       {
   59121           0 :         SWIG_fail;
   59122             :       }
   59123             :     }
   59124           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   59125           0 :       int bErr = FALSE;
   59126           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   59127           0 :       if ( bErr )
   59128             :       {
   59129           0 :         SWIG_fail;
   59130             :       }
   59131             :     }
   59132             :     else {
   59133           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   59134           0 :       SWIG_fail;
   59135             :     }
   59136             :   }
   59137        1993 :   {
   59138        1993 :     const int bLocalUseExceptions = GetUseExceptions();
   59139        1993 :     if ( bLocalUseExceptions ) {
   59140         862 :       pushErrorHandler();
   59141             :     }
   59142        1993 :     {
   59143        1993 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59144        1993 :       result = (GDALTranslateOptions *)new_GDALTranslateOptions(arg1);
   59145        1993 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59146             :     }
   59147        1993 :     if ( bLocalUseExceptions ) {
   59148         862 :       popErrorHandler();
   59149             :     }
   59150             : #ifndef SED_HACKS
   59151             :     if ( bLocalUseExceptions ) {
   59152             :       CPLErr eclass = CPLGetLastErrorType();
   59153             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59154             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59155             :       }
   59156             :     }
   59157             : #endif
   59158             :   }
   59159        1993 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALTranslateOptions, SWIG_POINTER_NEW |  0 );
   59160        1993 :   {
   59161             :     /* %typemap(freearg) char **dict */
   59162        1993 :     CSLDestroy( arg1 );
   59163             :   }
   59164        2001 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = 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        1989 : SWIGINTERN PyObject *_wrap_delete_GDALTranslateOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59176        1989 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59177        1989 :   GDALTranslateOptions *arg1 = (GDALTranslateOptions *) 0 ;
   59178        1989 :   void *argp1 = 0 ;
   59179        1989 :   int res1 = 0 ;
   59180        1989 :   PyObject *swig_obj[1] ;
   59181             :   
   59182        1989 :   if (!args) SWIG_fail;
   59183        1989 :   swig_obj[0] = args;
   59184        1989 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTranslateOptions, SWIG_POINTER_DISOWN |  0 );
   59185        1989 :   if (!SWIG_IsOK(res1)) {
   59186           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALTranslateOptions" "', argument " "1"" of type '" "GDALTranslateOptions *""'"); 
   59187             :   }
   59188        1989 :   arg1 = reinterpret_cast< GDALTranslateOptions * >(argp1);
   59189        1989 :   {
   59190        1989 :     const int bLocalUseExceptions = GetUseExceptions();
   59191        1989 :     if ( bLocalUseExceptions ) {
   59192         858 :       pushErrorHandler();
   59193             :     }
   59194        1989 :     {
   59195        1989 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59196        1989 :       delete_GDALTranslateOptions(arg1);
   59197        1989 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59198             :     }
   59199        1989 :     if ( bLocalUseExceptions ) {
   59200         858 :       popErrorHandler();
   59201             :     }
   59202             : #ifndef SED_HACKS
   59203             :     if ( bLocalUseExceptions ) {
   59204             :       CPLErr eclass = CPLGetLastErrorType();
   59205             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59206             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59207             :       }
   59208             :     }
   59209             : #endif
   59210             :   }
   59211        1989 :   resultobj = SWIG_Py_Void();
   59212        1989 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   59213             :   return resultobj;
   59214             : fail:
   59215             :   return NULL;
   59216             : }
   59217             : 
   59218             : 
   59219         277 : SWIGINTERN PyObject *GDALTranslateOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59220         277 :   PyObject *obj;
   59221         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   59222         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALTranslateOptions, SWIG_NewClientData(obj));
   59223         277 :   return SWIG_Py_Void();
   59224             : }
   59225             : 
   59226        1989 : SWIGINTERN PyObject *GDALTranslateOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59227        1989 :   return SWIG_Python_InitShadowInstance(args);
   59228             : }
   59229             : 
   59230        1992 : SWIGINTERN PyObject *_wrap_TranslateInternal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59231        1992 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59232        1992 :   char *arg1 = (char *) 0 ;
   59233        1992 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   59234        1992 :   GDALTranslateOptions *arg3 = (GDALTranslateOptions *) 0 ;
   59235        1992 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   59236        1992 :   void *arg5 = (void *) NULL ;
   59237        1992 :   int bToFree1 = 0 ;
   59238        1992 :   void *argp2 = 0 ;
   59239        1992 :   int res2 = 0 ;
   59240        1992 :   void *argp3 = 0 ;
   59241        1992 :   int res3 = 0 ;
   59242        1992 :   PyObject *swig_obj[5] ;
   59243        1992 :   GDALDatasetShadow *result = 0 ;
   59244             :   
   59245             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   59246        1992 :   PyProgressData *psProgressInfo;
   59247        1992 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   59248        1992 :   psProgressInfo->nLastReported = -1;
   59249        1992 :   psProgressInfo->psPyCallback = NULL;
   59250        1992 :   psProgressInfo->psPyCallbackData = NULL;
   59251        1992 :   arg5 = psProgressInfo;
   59252        1992 :   if (!SWIG_Python_UnpackTuple(args, "TranslateInternal", 3, 5, swig_obj)) SWIG_fail;
   59253        1992 :   {
   59254             :     /* %typemap(in) (const char *utf8_path) */
   59255        1992 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   59256             :     {
   59257        1821 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   59258             :     }
   59259             :     else
   59260             :     {
   59261         171 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   59262             :       
   59263             :     }
   59264        1992 :     if (arg1 == NULL)
   59265             :     {
   59266           1 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   59267           1 :       SWIG_fail;
   59268             :     }
   59269             :   }
   59270        1991 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   59271        1991 :   if (!SWIG_IsOK(res2)) {
   59272           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TranslateInternal" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   59273             :   }
   59274        1991 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   59275        1991 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALTranslateOptions, 0 |  0 );
   59276        1991 :   if (!SWIG_IsOK(res3)) {
   59277           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "TranslateInternal" "', argument " "3"" of type '" "GDALTranslateOptions *""'"); 
   59278             :   }
   59279        1991 :   arg3 = reinterpret_cast< GDALTranslateOptions * >(argp3);
   59280        1991 :   if (swig_obj[3]) {
   59281        1990 :     {
   59282             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   59283             :       /* callback_func typemap */
   59284             :       
   59285             :       /* In some cases 0 is passed instead of None. */
   59286             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   59287        1990 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   59288             :       {
   59289           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   59290             :         {
   59291           0 :           swig_obj[3] = Py_None;
   59292             :         }
   59293             :       }
   59294             :       
   59295        1990 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   59296           3 :         void* cbfunction = NULL;
   59297           3 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   59298             :             (void**)&cbfunction,
   59299             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   59300             :             SWIG_POINTER_EXCEPTION | 0 ));
   59301             :         
   59302           3 :         if ( cbfunction == GDALTermProgress ) {
   59303             :           arg4 = GDALTermProgress;
   59304             :         } else {
   59305           3 :           if (!PyCallable_Check(swig_obj[3])) {
   59306           0 :             PyErr_SetString( PyExc_RuntimeError,
   59307             :               "Object given is not a Python function" );
   59308           0 :             SWIG_fail;
   59309             :           }
   59310           3 :           psProgressInfo->psPyCallback = swig_obj[3];
   59311           3 :           arg4 = PyProgressProxy;
   59312             :         }
   59313             :         
   59314             :       }
   59315             :       
   59316             :     }
   59317             :   }
   59318        1991 :   if (swig_obj[4]) {
   59319        1989 :     {
   59320             :       /* %typemap(in) ( void* callback_data=NULL)  */
   59321        1989 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   59322             :     }
   59323             :   }
   59324        1991 :   {
   59325        1991 :     if (!arg1) {
   59326        1991 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   59327             :     }
   59328             :   }
   59329        1991 :   {
   59330        1991 :     if (!arg2) {
   59331           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   59332             :     }
   59333             :   }
   59334        1991 :   {
   59335        1991 :     const int bLocalUseExceptions = GetUseExceptions();
   59336        1991 :     if ( bLocalUseExceptions ) {
   59337         860 :       pushErrorHandler();
   59338             :     }
   59339        1991 :     {
   59340        1991 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59341        1991 :       result = (GDALDatasetShadow *)wrapper_GDALTranslate((char const *)arg1,arg2,arg3,arg4,arg5);
   59342        1991 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59343             :     }
   59344        1991 :     if ( bLocalUseExceptions ) {
   59345         860 :       popErrorHandler();
   59346             :     }
   59347             : #ifndef SED_HACKS
   59348             :     if ( bLocalUseExceptions ) {
   59349             :       CPLErr eclass = CPLGetLastErrorType();
   59350             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59351             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59352             :       }
   59353             :     }
   59354             : #endif
   59355             :   }
   59356        1991 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   59357        1991 :   {
   59358             :     /* %typemap(freearg) (const char *utf8_path) */
   59359        1991 :     GDALPythonFreeCStr(arg1, bToFree1);
   59360             :   }
   59361        1991 :   {
   59362             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   59363             :     
   59364        1991 :     CPLFree(psProgressInfo);
   59365             :     
   59366             :   }
   59367        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; } }
   59368             :   return resultobj;
   59369           1 : fail:
   59370           1 :   {
   59371             :     /* %typemap(freearg) (const char *utf8_path) */
   59372           1 :     GDALPythonFreeCStr(arg1, bToFree1);
   59373             :   }
   59374           1 :   {
   59375             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   59376             :     
   59377           1 :     CPLFree(psProgressInfo);
   59378             :     
   59379             :   }
   59380             :   return NULL;
   59381             : }
   59382             : 
   59383             : 
   59384         774 : SWIGINTERN PyObject *_wrap_new_GDALWarpAppOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59385         774 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59386         774 :   char **arg1 = (char **) 0 ;
   59387         774 :   PyObject *swig_obj[1] ;
   59388         774 :   GDALWarpAppOptions *result = 0 ;
   59389             :   
   59390         774 :   if (!args) SWIG_fail;
   59391         774 :   swig_obj[0] = args;
   59392         774 :   {
   59393             :     /* %typemap(in) char **dict */
   59394         774 :     arg1 = NULL;
   59395         774 :     if ( PySequence_Check( swig_obj[0] ) ) {
   59396         774 :       int bErr = FALSE;
   59397         774 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   59398         774 :       if ( bErr )
   59399             :       {
   59400           0 :         SWIG_fail;
   59401             :       }
   59402             :     }
   59403           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   59404           0 :       int bErr = FALSE;
   59405           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   59406           0 :       if ( bErr )
   59407             :       {
   59408           0 :         SWIG_fail;
   59409             :       }
   59410             :     }
   59411             :     else {
   59412           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   59413           0 :       SWIG_fail;
   59414             :     }
   59415             :   }
   59416         774 :   {
   59417         774 :     const int bLocalUseExceptions = GetUseExceptions();
   59418         774 :     if ( bLocalUseExceptions ) {
   59419         750 :       pushErrorHandler();
   59420             :     }
   59421         774 :     {
   59422         774 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59423         774 :       result = (GDALWarpAppOptions *)new_GDALWarpAppOptions(arg1);
   59424         774 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59425             :     }
   59426         774 :     if ( bLocalUseExceptions ) {
   59427         750 :       popErrorHandler();
   59428             :     }
   59429             : #ifndef SED_HACKS
   59430             :     if ( bLocalUseExceptions ) {
   59431             :       CPLErr eclass = CPLGetLastErrorType();
   59432             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59433             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59434             :       }
   59435             :     }
   59436             : #endif
   59437             :   }
   59438         774 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALWarpAppOptions, SWIG_POINTER_NEW |  0 );
   59439         774 :   {
   59440             :     /* %typemap(freearg) char **dict */
   59441         774 :     CSLDestroy( arg1 );
   59442             :   }
   59443         778 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   59444             :   return resultobj;
   59445           0 : fail:
   59446           0 :   {
   59447             :     /* %typemap(freearg) char **dict */
   59448           0 :     CSLDestroy( arg1 );
   59449             :   }
   59450             :   return NULL;
   59451             : }
   59452             : 
   59453             : 
   59454         772 : SWIGINTERN PyObject *_wrap_delete_GDALWarpAppOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59455         772 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59456         772 :   GDALWarpAppOptions *arg1 = (GDALWarpAppOptions *) 0 ;
   59457         772 :   void *argp1 = 0 ;
   59458         772 :   int res1 = 0 ;
   59459         772 :   PyObject *swig_obj[1] ;
   59460             :   
   59461         772 :   if (!args) SWIG_fail;
   59462         772 :   swig_obj[0] = args;
   59463         772 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALWarpAppOptions, SWIG_POINTER_DISOWN |  0 );
   59464         772 :   if (!SWIG_IsOK(res1)) {
   59465           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALWarpAppOptions" "', argument " "1"" of type '" "GDALWarpAppOptions *""'"); 
   59466             :   }
   59467         772 :   arg1 = reinterpret_cast< GDALWarpAppOptions * >(argp1);
   59468         772 :   {
   59469         772 :     const int bLocalUseExceptions = GetUseExceptions();
   59470         772 :     if ( bLocalUseExceptions ) {
   59471         748 :       pushErrorHandler();
   59472             :     }
   59473         772 :     {
   59474         772 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59475         772 :       delete_GDALWarpAppOptions(arg1);
   59476         772 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59477             :     }
   59478         772 :     if ( bLocalUseExceptions ) {
   59479         748 :       popErrorHandler();
   59480             :     }
   59481             : #ifndef SED_HACKS
   59482             :     if ( bLocalUseExceptions ) {
   59483             :       CPLErr eclass = CPLGetLastErrorType();
   59484             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59485             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59486             :       }
   59487             :     }
   59488             : #endif
   59489             :   }
   59490         772 :   resultobj = SWIG_Py_Void();
   59491         772 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   59492             :   return resultobj;
   59493             : fail:
   59494             :   return NULL;
   59495             : }
   59496             : 
   59497             : 
   59498         277 : SWIGINTERN PyObject *GDALWarpAppOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59499         277 :   PyObject *obj;
   59500         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   59501         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALWarpAppOptions, SWIG_NewClientData(obj));
   59502         277 :   return SWIG_Py_Void();
   59503             : }
   59504             : 
   59505         772 : SWIGINTERN PyObject *GDALWarpAppOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59506         772 :   return SWIG_Python_InitShadowInstance(args);
   59507             : }
   59508             : 
   59509          87 : SWIGINTERN PyObject *_wrap_wrapper_GDALWarpDestDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59510          87 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59511          87 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   59512          87 :   int arg2 ;
   59513          87 :   GDALDatasetShadow **arg3 = (GDALDatasetShadow **) 0 ;
   59514          87 :   GDALWarpAppOptions *arg4 = (GDALWarpAppOptions *) 0 ;
   59515          87 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   59516          87 :   void *arg6 = (void *) NULL ;
   59517          87 :   void *argp1 = 0 ;
   59518          87 :   int res1 = 0 ;
   59519          87 :   void *argp4 = 0 ;
   59520          87 :   int res4 = 0 ;
   59521          87 :   PyObject *swig_obj[5] ;
   59522          87 :   int result;
   59523             :   
   59524             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   59525          87 :   PyProgressData *psProgressInfo;
   59526          87 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   59527          87 :   psProgressInfo->nLastReported = -1;
   59528          87 :   psProgressInfo->psPyCallback = NULL;
   59529          87 :   psProgressInfo->psPyCallbackData = NULL;
   59530          87 :   arg6 = psProgressInfo;
   59531          87 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALWarpDestDS", 3, 5, swig_obj)) SWIG_fail;
   59532          87 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   59533          87 :   if (!SWIG_IsOK(res1)) {
   59534           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALWarpDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   59535             :   }
   59536          87 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   59537          87 :   {
   59538             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDatasetShadow *optional_##GDALDatasetShadow)*/
   59539          87 :     if ( !PySequence_Check(swig_obj[1]) ) {
   59540           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   59541           0 :       SWIG_fail;
   59542             :     }
   59543          87 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   59544          87 :     if( size > (Py_ssize_t)INT_MAX ) {
   59545           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   59546           0 :       SWIG_fail;
   59547             :     }
   59548          87 :     if( (size_t)size > SIZE_MAX / sizeof(GDALDatasetShadow*) ) {
   59549           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   59550           0 :       SWIG_fail;
   59551             :     }
   59552          87 :     arg2 = (int)size;
   59553          87 :     arg3 = (GDALDatasetShadow**) VSIMalloc(arg2*sizeof(GDALDatasetShadow*));
   59554          87 :     if( !arg3) {
   59555           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   59556           0 :       SWIG_fail;
   59557             :     }
   59558             :     
   59559         172 :     for( int i = 0; i<arg2; i++ ) {
   59560          85 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   59561          85 :       GDALDatasetShadow* rawobjectpointer = NULL;
   59562          85 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0 ));
   59563          85 :       if (!rawobjectpointer) {
   59564           0 :         Py_DECREF(o);
   59565           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALDatasetShadow");
   59566           0 :         SWIG_fail;
   59567             :       }
   59568          85 :       arg3[i] = rawobjectpointer;
   59569          85 :       Py_DECREF(o);
   59570             :       
   59571             :     }
   59572             :   }
   59573          87 :   res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_GDALWarpAppOptions, 0 |  0 );
   59574          87 :   if (!SWIG_IsOK(res4)) {
   59575           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "wrapper_GDALWarpDestDS" "', argument " "4"" of type '" "GDALWarpAppOptions *""'"); 
   59576             :   }
   59577          87 :   arg4 = reinterpret_cast< GDALWarpAppOptions * >(argp4);
   59578          87 :   if (swig_obj[3]) {
   59579          86 :     {
   59580             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   59581             :       /* callback_func typemap */
   59582             :       
   59583             :       /* In some cases 0 is passed instead of None. */
   59584             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   59585          86 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   59586             :       {
   59587           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   59588             :         {
   59589           0 :           swig_obj[3] = Py_None;
   59590             :         }
   59591             :       }
   59592             :       
   59593          86 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   59594           1 :         void* cbfunction = NULL;
   59595           1 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   59596             :             (void**)&cbfunction,
   59597             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   59598             :             SWIG_POINTER_EXCEPTION | 0 ));
   59599             :         
   59600           1 :         if ( cbfunction == GDALTermProgress ) {
   59601             :           arg5 = GDALTermProgress;
   59602             :         } else {
   59603           1 :           if (!PyCallable_Check(swig_obj[3])) {
   59604           0 :             PyErr_SetString( PyExc_RuntimeError,
   59605             :               "Object given is not a Python function" );
   59606           0 :             SWIG_fail;
   59607             :           }
   59608           1 :           psProgressInfo->psPyCallback = swig_obj[3];
   59609           1 :           arg5 = PyProgressProxy;
   59610             :         }
   59611             :         
   59612             :       }
   59613             :       
   59614             :     }
   59615             :   }
   59616          87 :   if (swig_obj[4]) {
   59617          85 :     {
   59618             :       /* %typemap(in) ( void* callback_data=NULL)  */
   59619          85 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   59620             :     }
   59621             :   }
   59622          87 :   {
   59623          87 :     if (!arg1) {
   59624           1 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   59625             :     }
   59626             :   }
   59627          86 :   {
   59628          86 :     const int bLocalUseExceptions = GetUseExceptions();
   59629          86 :     if ( bLocalUseExceptions ) {
   59630          86 :       pushErrorHandler();
   59631             :     }
   59632          86 :     {
   59633          86 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59634          86 :       result = (int)wrapper_GDALWarpDestDS(arg1,arg2,arg3,arg4,arg5,arg6);
   59635          86 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59636             :     }
   59637          86 :     if ( bLocalUseExceptions ) {
   59638          86 :       popErrorHandler();
   59639             :     }
   59640             : #ifndef SED_HACKS
   59641             :     if ( bLocalUseExceptions ) {
   59642             :       CPLErr eclass = CPLGetLastErrorType();
   59643             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59644             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59645             :       }
   59646             :     }
   59647             : #endif
   59648             :   }
   59649          86 :   resultobj = SWIG_From_int(static_cast< int >(result));
   59650          86 :   {
   59651             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   59652          86 :     CPLFree( arg3 );
   59653             :   }
   59654          86 :   {
   59655             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   59656             :     
   59657          86 :     CPLFree(psProgressInfo);
   59658             :     
   59659             :   }
   59660          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; } }
   59661             :   return resultobj;
   59662           1 : fail:
   59663           1 :   {
   59664             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   59665           1 :     CPLFree( arg3 );
   59666             :   }
   59667           1 :   {
   59668             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   59669             :     
   59670           1 :     CPLFree(psProgressInfo);
   59671             :     
   59672             :   }
   59673             :   return NULL;
   59674             : }
   59675             : 
   59676             : 
   59677         690 : SWIGINTERN PyObject *_wrap_wrapper_GDALWarpDestName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59678         690 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59679         690 :   char *arg1 = (char *) 0 ;
   59680         690 :   int arg2 ;
   59681         690 :   GDALDatasetShadow **arg3 = (GDALDatasetShadow **) 0 ;
   59682         690 :   GDALWarpAppOptions *arg4 = (GDALWarpAppOptions *) 0 ;
   59683         690 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   59684         690 :   void *arg6 = (void *) NULL ;
   59685         690 :   int bToFree1 = 0 ;
   59686         690 :   void *argp4 = 0 ;
   59687         690 :   int res4 = 0 ;
   59688         690 :   PyObject *swig_obj[5] ;
   59689         690 :   GDALDatasetShadow *result = 0 ;
   59690             :   
   59691             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   59692         690 :   PyProgressData *psProgressInfo;
   59693         690 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   59694         690 :   psProgressInfo->nLastReported = -1;
   59695         690 :   psProgressInfo->psPyCallback = NULL;
   59696         690 :   psProgressInfo->psPyCallbackData = NULL;
   59697         690 :   arg6 = psProgressInfo;
   59698         690 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALWarpDestName", 3, 5, swig_obj)) SWIG_fail;
   59699         690 :   {
   59700             :     /* %typemap(in) (const char *utf8_path) */
   59701         690 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   59702             :     {
   59703         639 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   59704             :     }
   59705             :     else
   59706             :     {
   59707          51 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   59708             :       
   59709             :     }
   59710         690 :     if (arg1 == NULL)
   59711             :     {
   59712           1 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   59713           1 :       SWIG_fail;
   59714             :     }
   59715             :   }
   59716         689 :   {
   59717             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDatasetShadow *optional_##GDALDatasetShadow)*/
   59718         689 :     if ( !PySequence_Check(swig_obj[1]) ) {
   59719           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   59720           0 :       SWIG_fail;
   59721             :     }
   59722         689 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   59723         689 :     if( size > (Py_ssize_t)INT_MAX ) {
   59724           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   59725           0 :       SWIG_fail;
   59726             :     }
   59727         689 :     if( (size_t)size > SIZE_MAX / sizeof(GDALDatasetShadow*) ) {
   59728           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   59729           0 :       SWIG_fail;
   59730             :     }
   59731         689 :     arg2 = (int)size;
   59732         689 :     arg3 = (GDALDatasetShadow**) VSIMalloc(arg2*sizeof(GDALDatasetShadow*));
   59733         689 :     if( !arg3) {
   59734           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   59735           0 :       SWIG_fail;
   59736             :     }
   59737             :     
   59738        1396 :     for( int i = 0; i<arg2; i++ ) {
   59739         707 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   59740         707 :       GDALDatasetShadow* rawobjectpointer = NULL;
   59741         707 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0 ));
   59742         707 :       if (!rawobjectpointer) {
   59743           0 :         Py_DECREF(o);
   59744           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALDatasetShadow");
   59745           0 :         SWIG_fail;
   59746             :       }
   59747         707 :       arg3[i] = rawobjectpointer;
   59748         707 :       Py_DECREF(o);
   59749             :       
   59750             :     }
   59751             :   }
   59752         689 :   res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_GDALWarpAppOptions, 0 |  0 );
   59753         689 :   if (!SWIG_IsOK(res4)) {
   59754           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "wrapper_GDALWarpDestName" "', argument " "4"" of type '" "GDALWarpAppOptions *""'"); 
   59755             :   }
   59756         689 :   arg4 = reinterpret_cast< GDALWarpAppOptions * >(argp4);
   59757         689 :   if (swig_obj[3]) {
   59758         688 :     {
   59759             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   59760             :       /* callback_func typemap */
   59761             :       
   59762             :       /* In some cases 0 is passed instead of None. */
   59763             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   59764         688 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   59765             :       {
   59766           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   59767             :         {
   59768           0 :           swig_obj[3] = Py_None;
   59769             :         }
   59770             :       }
   59771             :       
   59772         688 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   59773           2 :         void* cbfunction = NULL;
   59774           2 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   59775             :             (void**)&cbfunction,
   59776             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   59777             :             SWIG_POINTER_EXCEPTION | 0 ));
   59778             :         
   59779           2 :         if ( cbfunction == GDALTermProgress ) {
   59780             :           arg5 = GDALTermProgress;
   59781             :         } else {
   59782           2 :           if (!PyCallable_Check(swig_obj[3])) {
   59783           0 :             PyErr_SetString( PyExc_RuntimeError,
   59784             :               "Object given is not a Python function" );
   59785           0 :             SWIG_fail;
   59786             :           }
   59787           2 :           psProgressInfo->psPyCallback = swig_obj[3];
   59788           2 :           arg5 = PyProgressProxy;
   59789             :         }
   59790             :         
   59791             :       }
   59792             :       
   59793             :     }
   59794             :   }
   59795         689 :   if (swig_obj[4]) {
   59796         687 :     {
   59797             :       /* %typemap(in) ( void* callback_data=NULL)  */
   59798         687 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   59799             :     }
   59800             :   }
   59801         689 :   {
   59802         689 :     if (!arg1) {
   59803         689 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   59804             :     }
   59805             :   }
   59806         689 :   {
   59807         689 :     const int bLocalUseExceptions = GetUseExceptions();
   59808         689 :     if ( bLocalUseExceptions ) {
   59809         665 :       pushErrorHandler();
   59810             :     }
   59811         689 :     {
   59812         689 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59813         689 :       result = (GDALDatasetShadow *)wrapper_GDALWarpDestName((char const *)arg1,arg2,arg3,arg4,arg5,arg6);
   59814         689 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59815             :     }
   59816         689 :     if ( bLocalUseExceptions ) {
   59817         665 :       popErrorHandler();
   59818             :     }
   59819             : #ifndef SED_HACKS
   59820             :     if ( bLocalUseExceptions ) {
   59821             :       CPLErr eclass = CPLGetLastErrorType();
   59822             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59823             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59824             :       }
   59825             :     }
   59826             : #endif
   59827             :   }
   59828         689 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   59829         689 :   {
   59830             :     /* %typemap(freearg) (const char *utf8_path) */
   59831         689 :     GDALPythonFreeCStr(arg1, bToFree1);
   59832             :   }
   59833         689 :   {
   59834             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   59835         689 :     CPLFree( arg3 );
   59836             :   }
   59837         689 :   {
   59838             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   59839             :     
   59840         689 :     CPLFree(psProgressInfo);
   59841             :     
   59842             :   }
   59843         770 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   59844             :   return resultobj;
   59845           1 : fail:
   59846           1 :   {
   59847             :     /* %typemap(freearg) (const char *utf8_path) */
   59848           1 :     GDALPythonFreeCStr(arg1, bToFree1);
   59849             :   }
   59850           1 :   {
   59851             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   59852           1 :     CPLFree( arg3 );
   59853             :   }
   59854           1 :   {
   59855             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   59856             :     
   59857           1 :     CPLFree(psProgressInfo);
   59858             :     
   59859             :   }
   59860             :   return NULL;
   59861             : }
   59862             : 
   59863             : 
   59864         648 : SWIGINTERN PyObject *_wrap_new_GDALVectorTranslateOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59865         648 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59866         648 :   char **arg1 = (char **) 0 ;
   59867         648 :   PyObject *swig_obj[1] ;
   59868         648 :   GDALVectorTranslateOptions *result = 0 ;
   59869             :   
   59870         648 :   if (!args) SWIG_fail;
   59871         648 :   swig_obj[0] = args;
   59872         648 :   {
   59873             :     /* %typemap(in) char **dict */
   59874         648 :     arg1 = NULL;
   59875         648 :     if ( PySequence_Check( swig_obj[0] ) ) {
   59876         648 :       int bErr = FALSE;
   59877         648 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   59878         648 :       if ( bErr )
   59879             :       {
   59880           0 :         SWIG_fail;
   59881             :       }
   59882             :     }
   59883           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   59884           0 :       int bErr = FALSE;
   59885           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   59886           0 :       if ( bErr )
   59887             :       {
   59888           0 :         SWIG_fail;
   59889             :       }
   59890             :     }
   59891             :     else {
   59892           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   59893           0 :       SWIG_fail;
   59894             :     }
   59895             :   }
   59896         648 :   {
   59897         648 :     const int bLocalUseExceptions = GetUseExceptions();
   59898         648 :     if ( bLocalUseExceptions ) {
   59899         496 :       pushErrorHandler();
   59900             :     }
   59901         648 :     {
   59902         648 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59903         648 :       result = (GDALVectorTranslateOptions *)new_GDALVectorTranslateOptions(arg1);
   59904         648 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59905             :     }
   59906         648 :     if ( bLocalUseExceptions ) {
   59907         496 :       popErrorHandler();
   59908             :     }
   59909             : #ifndef SED_HACKS
   59910             :     if ( bLocalUseExceptions ) {
   59911             :       CPLErr eclass = CPLGetLastErrorType();
   59912             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59913             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59914             :       }
   59915             :     }
   59916             : #endif
   59917             :   }
   59918         648 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALVectorTranslateOptions, SWIG_POINTER_NEW |  0 );
   59919         648 :   {
   59920             :     /* %typemap(freearg) char **dict */
   59921         648 :     CSLDestroy( arg1 );
   59922             :   }
   59923         702 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   59924             :   return resultobj;
   59925           0 : fail:
   59926           0 :   {
   59927             :     /* %typemap(freearg) char **dict */
   59928           0 :     CSLDestroy( arg1 );
   59929             :   }
   59930             :   return NULL;
   59931             : }
   59932             : 
   59933             : 
   59934         621 : SWIGINTERN PyObject *_wrap_delete_GDALVectorTranslateOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59935         621 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59936         621 :   GDALVectorTranslateOptions *arg1 = (GDALVectorTranslateOptions *) 0 ;
   59937         621 :   void *argp1 = 0 ;
   59938         621 :   int res1 = 0 ;
   59939         621 :   PyObject *swig_obj[1] ;
   59940             :   
   59941         621 :   if (!args) SWIG_fail;
   59942         621 :   swig_obj[0] = args;
   59943         621 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALVectorTranslateOptions, SWIG_POINTER_DISOWN |  0 );
   59944         621 :   if (!SWIG_IsOK(res1)) {
   59945           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALVectorTranslateOptions" "', argument " "1"" of type '" "GDALVectorTranslateOptions *""'"); 
   59946             :   }
   59947         621 :   arg1 = reinterpret_cast< GDALVectorTranslateOptions * >(argp1);
   59948         621 :   {
   59949         621 :     const int bLocalUseExceptions = GetUseExceptions();
   59950         621 :     if ( bLocalUseExceptions ) {
   59951         469 :       pushErrorHandler();
   59952             :     }
   59953         621 :     {
   59954         621 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   59955         621 :       delete_GDALVectorTranslateOptions(arg1);
   59956         621 :       SWIG_PYTHON_THREAD_END_ALLOW;
   59957             :     }
   59958         621 :     if ( bLocalUseExceptions ) {
   59959         469 :       popErrorHandler();
   59960             :     }
   59961             : #ifndef SED_HACKS
   59962             :     if ( bLocalUseExceptions ) {
   59963             :       CPLErr eclass = CPLGetLastErrorType();
   59964             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   59965             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   59966             :       }
   59967             :     }
   59968             : #endif
   59969             :   }
   59970         621 :   resultobj = SWIG_Py_Void();
   59971         621 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   59972             :   return resultobj;
   59973             : fail:
   59974             :   return NULL;
   59975             : }
   59976             : 
   59977             : 
   59978         277 : SWIGINTERN PyObject *GDALVectorTranslateOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59979         277 :   PyObject *obj;
   59980         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   59981         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALVectorTranslateOptions, SWIG_NewClientData(obj));
   59982         277 :   return SWIG_Py_Void();
   59983             : }
   59984             : 
   59985         621 : SWIGINTERN PyObject *GDALVectorTranslateOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59986         621 :   return SWIG_Python_InitShadowInstance(args);
   59987             : }
   59988             : 
   59989          12 : SWIGINTERN PyObject *_wrap_wrapper_GDALVectorTranslateDestDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   59990          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   59991          12 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   59992          12 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   59993          12 :   GDALVectorTranslateOptions *arg3 = (GDALVectorTranslateOptions *) 0 ;
   59994          12 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   59995          12 :   void *arg5 = (void *) NULL ;
   59996          12 :   void *argp1 = 0 ;
   59997          12 :   int res1 = 0 ;
   59998          12 :   void *argp2 = 0 ;
   59999          12 :   int res2 = 0 ;
   60000          12 :   void *argp3 = 0 ;
   60001          12 :   int res3 = 0 ;
   60002          12 :   PyObject *swig_obj[5] ;
   60003          12 :   int result;
   60004             :   
   60005             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   60006          12 :   PyProgressData *psProgressInfo;
   60007          12 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   60008          12 :   psProgressInfo->nLastReported = -1;
   60009          12 :   psProgressInfo->psPyCallback = NULL;
   60010          12 :   psProgressInfo->psPyCallbackData = NULL;
   60011          12 :   arg5 = psProgressInfo;
   60012          12 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALVectorTranslateDestDS", 3, 5, swig_obj)) SWIG_fail;
   60013          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   60014          12 :   if (!SWIG_IsOK(res1)) {
   60015           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALVectorTranslateDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   60016             :   }
   60017          12 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   60018          12 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   60019          12 :   if (!SWIG_IsOK(res2)) {
   60020           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALVectorTranslateDestDS" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   60021             :   }
   60022          12 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   60023          12 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALVectorTranslateOptions, 0 |  0 );
   60024          12 :   if (!SWIG_IsOK(res3)) {
   60025           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALVectorTranslateDestDS" "', argument " "3"" of type '" "GDALVectorTranslateOptions *""'"); 
   60026             :   }
   60027          12 :   arg3 = reinterpret_cast< GDALVectorTranslateOptions * >(argp3);
   60028          12 :   if (swig_obj[3]) {
   60029          12 :     {
   60030             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   60031             :       /* callback_func typemap */
   60032             :       
   60033             :       /* In some cases 0 is passed instead of None. */
   60034             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   60035          12 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   60036             :       {
   60037           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   60038             :         {
   60039           0 :           swig_obj[3] = Py_None;
   60040             :         }
   60041             :       }
   60042             :       
   60043          12 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   60044           0 :         void* cbfunction = NULL;
   60045           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   60046             :             (void**)&cbfunction,
   60047             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   60048             :             SWIG_POINTER_EXCEPTION | 0 ));
   60049             :         
   60050           0 :         if ( cbfunction == GDALTermProgress ) {
   60051             :           arg4 = GDALTermProgress;
   60052             :         } else {
   60053           0 :           if (!PyCallable_Check(swig_obj[3])) {
   60054           0 :             PyErr_SetString( PyExc_RuntimeError,
   60055             :               "Object given is not a Python function" );
   60056           0 :             SWIG_fail;
   60057             :           }
   60058           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   60059           0 :           arg4 = PyProgressProxy;
   60060             :         }
   60061             :         
   60062             :       }
   60063             :       
   60064             :     }
   60065             :   }
   60066          12 :   if (swig_obj[4]) {
   60067          12 :     {
   60068             :       /* %typemap(in) ( void* callback_data=NULL)  */
   60069          12 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   60070             :     }
   60071             :   }
   60072          12 :   {
   60073          12 :     const int bLocalUseExceptions = GetUseExceptions();
   60074          12 :     if ( bLocalUseExceptions ) {
   60075          11 :       pushErrorHandler();
   60076             :     }
   60077          12 :     {
   60078          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60079          12 :       result = (int)wrapper_GDALVectorTranslateDestDS(arg1,arg2,arg3,arg4,arg5);
   60080          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60081             :     }
   60082          12 :     if ( bLocalUseExceptions ) {
   60083          11 :       popErrorHandler();
   60084             :     }
   60085             : #ifndef SED_HACKS
   60086             :     if ( bLocalUseExceptions ) {
   60087             :       CPLErr eclass = CPLGetLastErrorType();
   60088             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60089             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60090             :       }
   60091             :     }
   60092             : #endif
   60093             :   }
   60094          12 :   resultobj = SWIG_From_int(static_cast< int >(result));
   60095          12 :   {
   60096             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60097             :     
   60098          12 :     CPLFree(psProgressInfo);
   60099             :     
   60100             :   }
   60101          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; } }
   60102             :   return resultobj;
   60103           0 : fail:
   60104           0 :   {
   60105             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60106             :     
   60107           0 :     CPLFree(psProgressInfo);
   60108             :     
   60109             :   }
   60110             :   return NULL;
   60111             : }
   60112             : 
   60113             : 
   60114         598 : SWIGINTERN PyObject *_wrap_wrapper_GDALVectorTranslateDestName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60115         598 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60116         598 :   char *arg1 = (char *) 0 ;
   60117         598 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   60118         598 :   GDALVectorTranslateOptions *arg3 = (GDALVectorTranslateOptions *) 0 ;
   60119         598 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   60120         598 :   void *arg5 = (void *) NULL ;
   60121         598 :   int bToFree1 = 0 ;
   60122         598 :   void *argp2 = 0 ;
   60123         598 :   int res2 = 0 ;
   60124         598 :   void *argp3 = 0 ;
   60125         598 :   int res3 = 0 ;
   60126         598 :   PyObject *swig_obj[5] ;
   60127         598 :   GDALDatasetShadow *result = 0 ;
   60128             :   
   60129             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   60130         598 :   PyProgressData *psProgressInfo;
   60131         598 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   60132         598 :   psProgressInfo->nLastReported = -1;
   60133         598 :   psProgressInfo->psPyCallback = NULL;
   60134         598 :   psProgressInfo->psPyCallbackData = NULL;
   60135         598 :   arg5 = psProgressInfo;
   60136         598 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALVectorTranslateDestName", 3, 5, swig_obj)) SWIG_fail;
   60137         598 :   {
   60138             :     /* %typemap(in) (const char *utf8_path) */
   60139         598 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   60140             :     {
   60141         479 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   60142             :     }
   60143             :     else
   60144             :     {
   60145         119 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   60146             :       
   60147             :     }
   60148         598 :     if (arg1 == NULL)
   60149             :     {
   60150           1 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   60151           1 :       SWIG_fail;
   60152             :     }
   60153             :   }
   60154         597 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   60155         597 :   if (!SWIG_IsOK(res2)) {
   60156           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALVectorTranslateDestName" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   60157             :   }
   60158         597 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   60159         597 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALVectorTranslateOptions, 0 |  0 );
   60160         597 :   if (!SWIG_IsOK(res3)) {
   60161           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALVectorTranslateDestName" "', argument " "3"" of type '" "GDALVectorTranslateOptions *""'"); 
   60162             :   }
   60163         597 :   arg3 = reinterpret_cast< GDALVectorTranslateOptions * >(argp3);
   60164         597 :   if (swig_obj[3]) {
   60165         597 :     {
   60166             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   60167             :       /* callback_func typemap */
   60168             :       
   60169             :       /* In some cases 0 is passed instead of None. */
   60170             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   60171         597 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   60172             :       {
   60173           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   60174             :         {
   60175           0 :           swig_obj[3] = Py_None;
   60176             :         }
   60177             :       }
   60178             :       
   60179         597 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   60180           3 :         void* cbfunction = NULL;
   60181           3 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   60182             :             (void**)&cbfunction,
   60183             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   60184             :             SWIG_POINTER_EXCEPTION | 0 ));
   60185             :         
   60186           3 :         if ( cbfunction == GDALTermProgress ) {
   60187             :           arg4 = GDALTermProgress;
   60188             :         } else {
   60189           3 :           if (!PyCallable_Check(swig_obj[3])) {
   60190           0 :             PyErr_SetString( PyExc_RuntimeError,
   60191             :               "Object given is not a Python function" );
   60192           0 :             SWIG_fail;
   60193             :           }
   60194           3 :           psProgressInfo->psPyCallback = swig_obj[3];
   60195           3 :           arg4 = PyProgressProxy;
   60196             :         }
   60197             :         
   60198             :       }
   60199             :       
   60200             :     }
   60201             :   }
   60202         597 :   if (swig_obj[4]) {
   60203         597 :     {
   60204             :       /* %typemap(in) ( void* callback_data=NULL)  */
   60205         597 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   60206             :     }
   60207             :   }
   60208         597 :   {
   60209         597 :     if (!arg1) {
   60210         597 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   60211             :     }
   60212             :   }
   60213         597 :   {
   60214         597 :     const int bLocalUseExceptions = GetUseExceptions();
   60215         597 :     if ( bLocalUseExceptions ) {
   60216         446 :       pushErrorHandler();
   60217             :     }
   60218         597 :     {
   60219         597 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60220         597 :       result = (GDALDatasetShadow *)wrapper_GDALVectorTranslateDestName((char const *)arg1,arg2,arg3,arg4,arg5);
   60221         597 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60222             :     }
   60223         597 :     if ( bLocalUseExceptions ) {
   60224         446 :       popErrorHandler();
   60225             :     }
   60226             : #ifndef SED_HACKS
   60227             :     if ( bLocalUseExceptions ) {
   60228             :       CPLErr eclass = CPLGetLastErrorType();
   60229             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60230             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60231             :       }
   60232             :     }
   60233             : #endif
   60234             :   }
   60235         597 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   60236         597 :   {
   60237             :     /* %typemap(freearg) (const char *utf8_path) */
   60238         597 :     GDALPythonFreeCStr(arg1, bToFree1);
   60239             :   }
   60240         597 :   {
   60241             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60242             :     
   60243         597 :     CPLFree(psProgressInfo);
   60244             :     
   60245             :   }
   60246         630 :   if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
   60247             :   return resultobj;
   60248           1 : fail:
   60249           1 :   {
   60250             :     /* %typemap(freearg) (const char *utf8_path) */
   60251           1 :     GDALPythonFreeCStr(arg1, bToFree1);
   60252             :   }
   60253           1 :   {
   60254             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60255             :     
   60256           1 :     CPLFree(psProgressInfo);
   60257             :     
   60258             :   }
   60259             :   return NULL;
   60260             : }
   60261             : 
   60262             : 
   60263          81 : SWIGINTERN PyObject *_wrap_new_GDALDEMProcessingOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60264          81 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60265          81 :   char **arg1 = (char **) 0 ;
   60266          81 :   PyObject *swig_obj[1] ;
   60267          81 :   GDALDEMProcessingOptions *result = 0 ;
   60268             :   
   60269          81 :   if (!args) SWIG_fail;
   60270          81 :   swig_obj[0] = args;
   60271          81 :   {
   60272             :     /* %typemap(in) char **dict */
   60273          81 :     arg1 = NULL;
   60274          81 :     if ( PySequence_Check( swig_obj[0] ) ) {
   60275          81 :       int bErr = FALSE;
   60276          81 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   60277          81 :       if ( bErr )
   60278             :       {
   60279           0 :         SWIG_fail;
   60280             :       }
   60281             :     }
   60282           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   60283           0 :       int bErr = FALSE;
   60284           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   60285           0 :       if ( bErr )
   60286             :       {
   60287           0 :         SWIG_fail;
   60288             :       }
   60289             :     }
   60290             :     else {
   60291           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   60292           0 :       SWIG_fail;
   60293             :     }
   60294             :   }
   60295          81 :   {
   60296          81 :     const int bLocalUseExceptions = GetUseExceptions();
   60297          81 :     if ( bLocalUseExceptions ) {
   60298          81 :       pushErrorHandler();
   60299             :     }
   60300          81 :     {
   60301          81 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60302          81 :       result = (GDALDEMProcessingOptions *)new_GDALDEMProcessingOptions(arg1);
   60303          81 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60304             :     }
   60305          81 :     if ( bLocalUseExceptions ) {
   60306          81 :       popErrorHandler();
   60307             :     }
   60308             : #ifndef SED_HACKS
   60309             :     if ( bLocalUseExceptions ) {
   60310             :       CPLErr eclass = CPLGetLastErrorType();
   60311             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60312             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60313             :       }
   60314             :     }
   60315             : #endif
   60316             :   }
   60317          81 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDEMProcessingOptions, SWIG_POINTER_NEW |  0 );
   60318          81 :   {
   60319             :     /* %typemap(freearg) char **dict */
   60320          81 :     CSLDestroy( arg1 );
   60321             :   }
   60322          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; } }
   60323             :   return resultobj;
   60324           0 : fail:
   60325           0 :   {
   60326             :     /* %typemap(freearg) char **dict */
   60327           0 :     CSLDestroy( arg1 );
   60328             :   }
   60329             :   return NULL;
   60330             : }
   60331             : 
   60332             : 
   60333          77 : SWIGINTERN PyObject *_wrap_delete_GDALDEMProcessingOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60334          77 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60335          77 :   GDALDEMProcessingOptions *arg1 = (GDALDEMProcessingOptions *) 0 ;
   60336          77 :   void *argp1 = 0 ;
   60337          77 :   int res1 = 0 ;
   60338          77 :   PyObject *swig_obj[1] ;
   60339             :   
   60340          77 :   if (!args) SWIG_fail;
   60341          77 :   swig_obj[0] = args;
   60342          77 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDEMProcessingOptions, SWIG_POINTER_DISOWN |  0 );
   60343          77 :   if (!SWIG_IsOK(res1)) {
   60344           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALDEMProcessingOptions" "', argument " "1"" of type '" "GDALDEMProcessingOptions *""'"); 
   60345             :   }
   60346          77 :   arg1 = reinterpret_cast< GDALDEMProcessingOptions * >(argp1);
   60347          77 :   {
   60348          77 :     const int bLocalUseExceptions = GetUseExceptions();
   60349          77 :     if ( bLocalUseExceptions ) {
   60350          77 :       pushErrorHandler();
   60351             :     }
   60352          77 :     {
   60353          77 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60354          77 :       delete_GDALDEMProcessingOptions(arg1);
   60355          77 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60356             :     }
   60357          77 :     if ( bLocalUseExceptions ) {
   60358          77 :       popErrorHandler();
   60359             :     }
   60360             : #ifndef SED_HACKS
   60361             :     if ( bLocalUseExceptions ) {
   60362             :       CPLErr eclass = CPLGetLastErrorType();
   60363             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60364             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60365             :       }
   60366             :     }
   60367             : #endif
   60368             :   }
   60369          77 :   resultobj = SWIG_Py_Void();
   60370          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; } }
   60371             :   return resultobj;
   60372             : fail:
   60373             :   return NULL;
   60374             : }
   60375             : 
   60376             : 
   60377         277 : SWIGINTERN PyObject *GDALDEMProcessingOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60378         277 :   PyObject *obj;
   60379         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   60380         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALDEMProcessingOptions, SWIG_NewClientData(obj));
   60381         277 :   return SWIG_Py_Void();
   60382             : }
   60383             : 
   60384          77 : SWIGINTERN PyObject *GDALDEMProcessingOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60385          77 :   return SWIG_Python_InitShadowInstance(args);
   60386             : }
   60387             : 
   60388          77 : SWIGINTERN PyObject *_wrap_DEMProcessingInternal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60389          77 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60390          77 :   char *arg1 = (char *) 0 ;
   60391          77 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   60392          77 :   char *arg3 = (char *) 0 ;
   60393          77 :   char *arg4 = (char *) 0 ;
   60394          77 :   GDALDEMProcessingOptions *arg5 = (GDALDEMProcessingOptions *) 0 ;
   60395          77 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   60396          77 :   void *arg7 = (void *) NULL ;
   60397          77 :   int bToFree1 = 0 ;
   60398          77 :   void *argp2 = 0 ;
   60399          77 :   int res2 = 0 ;
   60400          77 :   int res3 ;
   60401          77 :   char *buf3 = 0 ;
   60402          77 :   int alloc3 = 0 ;
   60403          77 :   int res4 ;
   60404          77 :   char *buf4 = 0 ;
   60405          77 :   int alloc4 = 0 ;
   60406          77 :   void *argp5 = 0 ;
   60407          77 :   int res5 = 0 ;
   60408          77 :   PyObject *swig_obj[7] ;
   60409          77 :   GDALDatasetShadow *result = 0 ;
   60410             :   
   60411             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   60412          77 :   PyProgressData *psProgressInfo;
   60413          77 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   60414          77 :   psProgressInfo->nLastReported = -1;
   60415          77 :   psProgressInfo->psPyCallback = NULL;
   60416          77 :   psProgressInfo->psPyCallbackData = NULL;
   60417          77 :   arg7 = psProgressInfo;
   60418          77 :   if (!SWIG_Python_UnpackTuple(args, "DEMProcessingInternal", 5, 7, swig_obj)) SWIG_fail;
   60419          77 :   {
   60420             :     /* %typemap(in) (const char *utf8_path) */
   60421          77 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   60422             :     {
   60423          76 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   60424             :     }
   60425             :     else
   60426             :     {
   60427           1 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   60428             :       
   60429             :     }
   60430          77 :     if (arg1 == NULL)
   60431             :     {
   60432           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   60433           0 :       SWIG_fail;
   60434             :     }
   60435             :   }
   60436          77 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   60437          77 :   if (!SWIG_IsOK(res2)) {
   60438           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DEMProcessingInternal" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   60439             :   }
   60440          77 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   60441          77 :   res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
   60442          77 :   if (!SWIG_IsOK(res3)) {
   60443           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DEMProcessingInternal" "', argument " "3"" of type '" "char const *""'");
   60444             :   }
   60445          77 :   arg3 = reinterpret_cast< char * >(buf3);
   60446          77 :   res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
   60447          77 :   if (!SWIG_IsOK(res4)) {
   60448           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DEMProcessingInternal" "', argument " "4"" of type '" "char const *""'");
   60449             :   }
   60450          77 :   arg4 = reinterpret_cast< char * >(buf4);
   60451          77 :   res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_GDALDEMProcessingOptions, 0 |  0 );
   60452          77 :   if (!SWIG_IsOK(res5)) {
   60453           0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "DEMProcessingInternal" "', argument " "5"" of type '" "GDALDEMProcessingOptions *""'"); 
   60454             :   }
   60455          77 :   arg5 = reinterpret_cast< GDALDEMProcessingOptions * >(argp5);
   60456          77 :   if (swig_obj[5]) {
   60457          77 :     {
   60458             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   60459             :       /* callback_func typemap */
   60460             :       
   60461             :       /* In some cases 0 is passed instead of None. */
   60462             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   60463          77 :       if ( PyLong_Check(swig_obj[5]) || PyInt_Check(swig_obj[5]) )
   60464             :       {
   60465           0 :         if( PyLong_AsLong(swig_obj[5]) == 0 )
   60466             :         {
   60467           0 :           swig_obj[5] = Py_None;
   60468             :         }
   60469             :       }
   60470             :       
   60471          77 :       if (swig_obj[5] && swig_obj[5] != Py_None ) {
   60472           0 :         void* cbfunction = NULL;
   60473           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[5],
   60474             :             (void**)&cbfunction,
   60475             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   60476             :             SWIG_POINTER_EXCEPTION | 0 ));
   60477             :         
   60478           0 :         if ( cbfunction == GDALTermProgress ) {
   60479             :           arg6 = GDALTermProgress;
   60480             :         } else {
   60481           0 :           if (!PyCallable_Check(swig_obj[5])) {
   60482           0 :             PyErr_SetString( PyExc_RuntimeError,
   60483             :               "Object given is not a Python function" );
   60484           0 :             SWIG_fail;
   60485             :           }
   60486           0 :           psProgressInfo->psPyCallback = swig_obj[5];
   60487           0 :           arg6 = PyProgressProxy;
   60488             :         }
   60489             :         
   60490             :       }
   60491             :       
   60492             :     }
   60493             :   }
   60494          77 :   if (swig_obj[6]) {
   60495          77 :     {
   60496             :       /* %typemap(in) ( void* callback_data=NULL)  */
   60497          77 :       psProgressInfo->psPyCallbackData = swig_obj[6] ;
   60498             :     }
   60499             :   }
   60500          77 :   {
   60501          77 :     if (!arg1) {
   60502          77 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   60503             :     }
   60504             :   }
   60505          77 :   {
   60506          77 :     if (!arg2) {
   60507           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   60508             :     }
   60509             :   }
   60510          77 :   {
   60511          77 :     if (!arg3) {
   60512           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   60513             :     }
   60514             :   }
   60515          77 :   {
   60516          77 :     const int bLocalUseExceptions = GetUseExceptions();
   60517          77 :     if ( bLocalUseExceptions ) {
   60518          77 :       pushErrorHandler();
   60519             :     }
   60520          77 :     {
   60521          77 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60522          77 :       result = (GDALDatasetShadow *)wrapper_GDALDEMProcessing((char const *)arg1,arg2,(char const *)arg3,(char const *)arg4,arg5,arg6,arg7);
   60523          77 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60524             :     }
   60525          77 :     if ( bLocalUseExceptions ) {
   60526          77 :       popErrorHandler();
   60527             :     }
   60528             : #ifndef SED_HACKS
   60529             :     if ( bLocalUseExceptions ) {
   60530             :       CPLErr eclass = CPLGetLastErrorType();
   60531             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60532             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60533             :       }
   60534             :     }
   60535             : #endif
   60536             :   }
   60537          77 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   60538          77 :   {
   60539             :     /* %typemap(freearg) (const char *utf8_path) */
   60540          77 :     GDALPythonFreeCStr(arg1, bToFree1);
   60541             :   }
   60542          77 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   60543          77 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   60544          77 :   {
   60545             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60546             :     
   60547          77 :     CPLFree(psProgressInfo);
   60548             :     
   60549             :   }
   60550          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; } }
   60551             :   return resultobj;
   60552           0 : fail:
   60553           0 :   {
   60554             :     /* %typemap(freearg) (const char *utf8_path) */
   60555           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   60556             :   }
   60557           0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   60558           0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   60559           0 :   {
   60560             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60561             :     
   60562           0 :     CPLFree(psProgressInfo);
   60563             :     
   60564             :   }
   60565             :   return NULL;
   60566             : }
   60567             : 
   60568             : 
   60569          45 : SWIGINTERN PyObject *_wrap_new_GDALNearblackOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60570          45 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60571          45 :   char **arg1 = (char **) 0 ;
   60572          45 :   PyObject *swig_obj[1] ;
   60573          45 :   GDALNearblackOptions *result = 0 ;
   60574             :   
   60575          45 :   if (!args) SWIG_fail;
   60576          45 :   swig_obj[0] = args;
   60577          45 :   {
   60578             :     /* %typemap(in) char **dict */
   60579          45 :     arg1 = NULL;
   60580          45 :     if ( PySequence_Check( swig_obj[0] ) ) {
   60581          45 :       int bErr = FALSE;
   60582          45 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   60583          45 :       if ( bErr )
   60584             :       {
   60585           0 :         SWIG_fail;
   60586             :       }
   60587             :     }
   60588           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   60589           0 :       int bErr = FALSE;
   60590           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   60591           0 :       if ( bErr )
   60592             :       {
   60593           0 :         SWIG_fail;
   60594             :       }
   60595             :     }
   60596             :     else {
   60597           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   60598           0 :       SWIG_fail;
   60599             :     }
   60600             :   }
   60601          45 :   {
   60602          45 :     const int bLocalUseExceptions = GetUseExceptions();
   60603          45 :     if ( bLocalUseExceptions ) {
   60604          45 :       pushErrorHandler();
   60605             :     }
   60606          45 :     {
   60607          45 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60608          45 :       result = (GDALNearblackOptions *)new_GDALNearblackOptions(arg1);
   60609          45 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60610             :     }
   60611          45 :     if ( bLocalUseExceptions ) {
   60612          45 :       popErrorHandler();
   60613             :     }
   60614             : #ifndef SED_HACKS
   60615             :     if ( bLocalUseExceptions ) {
   60616             :       CPLErr eclass = CPLGetLastErrorType();
   60617             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60618             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60619             :       }
   60620             :     }
   60621             : #endif
   60622             :   }
   60623          45 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALNearblackOptions, SWIG_POINTER_NEW |  0 );
   60624          45 :   {
   60625             :     /* %typemap(freearg) char **dict */
   60626          45 :     CSLDestroy( arg1 );
   60627             :   }
   60628          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; } }
   60629             :   return resultobj;
   60630           0 : fail:
   60631           0 :   {
   60632             :     /* %typemap(freearg) char **dict */
   60633           0 :     CSLDestroy( arg1 );
   60634             :   }
   60635             :   return NULL;
   60636             : }
   60637             : 
   60638             : 
   60639          45 : SWIGINTERN PyObject *_wrap_delete_GDALNearblackOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60640          45 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60641          45 :   GDALNearblackOptions *arg1 = (GDALNearblackOptions *) 0 ;
   60642          45 :   void *argp1 = 0 ;
   60643          45 :   int res1 = 0 ;
   60644          45 :   PyObject *swig_obj[1] ;
   60645             :   
   60646          45 :   if (!args) SWIG_fail;
   60647          45 :   swig_obj[0] = args;
   60648          45 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALNearblackOptions, SWIG_POINTER_DISOWN |  0 );
   60649          45 :   if (!SWIG_IsOK(res1)) {
   60650           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALNearblackOptions" "', argument " "1"" of type '" "GDALNearblackOptions *""'"); 
   60651             :   }
   60652          45 :   arg1 = reinterpret_cast< GDALNearblackOptions * >(argp1);
   60653          45 :   {
   60654          45 :     const int bLocalUseExceptions = GetUseExceptions();
   60655          45 :     if ( bLocalUseExceptions ) {
   60656          45 :       pushErrorHandler();
   60657             :     }
   60658          45 :     {
   60659          45 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60660          45 :       delete_GDALNearblackOptions(arg1);
   60661          45 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60662             :     }
   60663          45 :     if ( bLocalUseExceptions ) {
   60664          45 :       popErrorHandler();
   60665             :     }
   60666             : #ifndef SED_HACKS
   60667             :     if ( bLocalUseExceptions ) {
   60668             :       CPLErr eclass = CPLGetLastErrorType();
   60669             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60670             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60671             :       }
   60672             :     }
   60673             : #endif
   60674             :   }
   60675          45 :   resultobj = SWIG_Py_Void();
   60676          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; } }
   60677             :   return resultobj;
   60678             : fail:
   60679             :   return NULL;
   60680             : }
   60681             : 
   60682             : 
   60683         277 : SWIGINTERN PyObject *GDALNearblackOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60684         277 :   PyObject *obj;
   60685         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   60686         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALNearblackOptions, SWIG_NewClientData(obj));
   60687         277 :   return SWIG_Py_Void();
   60688             : }
   60689             : 
   60690          45 : SWIGINTERN PyObject *GDALNearblackOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60691          45 :   return SWIG_Python_InitShadowInstance(args);
   60692             : }
   60693             : 
   60694           2 : SWIGINTERN PyObject *_wrap_wrapper_GDALNearblackDestDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60695           2 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60696           2 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   60697           2 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   60698           2 :   GDALNearblackOptions *arg3 = (GDALNearblackOptions *) 0 ;
   60699           2 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   60700           2 :   void *arg5 = (void *) NULL ;
   60701           2 :   void *argp1 = 0 ;
   60702           2 :   int res1 = 0 ;
   60703           2 :   void *argp2 = 0 ;
   60704           2 :   int res2 = 0 ;
   60705           2 :   void *argp3 = 0 ;
   60706           2 :   int res3 = 0 ;
   60707           2 :   PyObject *swig_obj[5] ;
   60708           2 :   int result;
   60709             :   
   60710             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   60711           2 :   PyProgressData *psProgressInfo;
   60712           2 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   60713           2 :   psProgressInfo->nLastReported = -1;
   60714           2 :   psProgressInfo->psPyCallback = NULL;
   60715           2 :   psProgressInfo->psPyCallbackData = NULL;
   60716           2 :   arg5 = psProgressInfo;
   60717           2 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALNearblackDestDS", 3, 5, swig_obj)) SWIG_fail;
   60718           2 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   60719           2 :   if (!SWIG_IsOK(res1)) {
   60720           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALNearblackDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   60721             :   }
   60722           2 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   60723           2 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   60724           2 :   if (!SWIG_IsOK(res2)) {
   60725           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALNearblackDestDS" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   60726             :   }
   60727           2 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   60728           2 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALNearblackOptions, 0 |  0 );
   60729           2 :   if (!SWIG_IsOK(res3)) {
   60730           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALNearblackDestDS" "', argument " "3"" of type '" "GDALNearblackOptions *""'"); 
   60731             :   }
   60732           2 :   arg3 = reinterpret_cast< GDALNearblackOptions * >(argp3);
   60733           2 :   if (swig_obj[3]) {
   60734           2 :     {
   60735             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   60736             :       /* callback_func typemap */
   60737             :       
   60738             :       /* In some cases 0 is passed instead of None. */
   60739             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   60740           2 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   60741             :       {
   60742           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   60743             :         {
   60744           0 :           swig_obj[3] = Py_None;
   60745             :         }
   60746             :       }
   60747             :       
   60748           2 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   60749           0 :         void* cbfunction = NULL;
   60750           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   60751             :             (void**)&cbfunction,
   60752             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   60753             :             SWIG_POINTER_EXCEPTION | 0 ));
   60754             :         
   60755           0 :         if ( cbfunction == GDALTermProgress ) {
   60756             :           arg4 = GDALTermProgress;
   60757             :         } else {
   60758           0 :           if (!PyCallable_Check(swig_obj[3])) {
   60759           0 :             PyErr_SetString( PyExc_RuntimeError,
   60760             :               "Object given is not a Python function" );
   60761           0 :             SWIG_fail;
   60762             :           }
   60763           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   60764           0 :           arg4 = PyProgressProxy;
   60765             :         }
   60766             :         
   60767             :       }
   60768             :       
   60769             :     }
   60770             :   }
   60771           2 :   if (swig_obj[4]) {
   60772           2 :     {
   60773             :       /* %typemap(in) ( void* callback_data=NULL)  */
   60774           2 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   60775             :     }
   60776             :   }
   60777           2 :   {
   60778           2 :     const int bLocalUseExceptions = GetUseExceptions();
   60779           2 :     if ( bLocalUseExceptions ) {
   60780           2 :       pushErrorHandler();
   60781             :     }
   60782           2 :     {
   60783           2 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60784           2 :       result = (int)wrapper_GDALNearblackDestDS(arg1,arg2,arg3,arg4,arg5);
   60785           2 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60786             :     }
   60787           2 :     if ( bLocalUseExceptions ) {
   60788           2 :       popErrorHandler();
   60789             :     }
   60790             : #ifndef SED_HACKS
   60791             :     if ( bLocalUseExceptions ) {
   60792             :       CPLErr eclass = CPLGetLastErrorType();
   60793             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60794             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60795             :       }
   60796             :     }
   60797             : #endif
   60798             :   }
   60799           2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   60800           2 :   {
   60801             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60802             :     
   60803           2 :     CPLFree(psProgressInfo);
   60804             :     
   60805             :   }
   60806           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; } }
   60807             :   return resultobj;
   60808           0 : fail:
   60809           0 :   {
   60810             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60811             :     
   60812           0 :     CPLFree(psProgressInfo);
   60813             :     
   60814             :   }
   60815             :   return NULL;
   60816             : }
   60817             : 
   60818             : 
   60819          43 : SWIGINTERN PyObject *_wrap_wrapper_GDALNearblackDestName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60820          43 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60821          43 :   char *arg1 = (char *) 0 ;
   60822          43 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   60823          43 :   GDALNearblackOptions *arg3 = (GDALNearblackOptions *) 0 ;
   60824          43 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   60825          43 :   void *arg5 = (void *) NULL ;
   60826          43 :   int bToFree1 = 0 ;
   60827          43 :   void *argp2 = 0 ;
   60828          43 :   int res2 = 0 ;
   60829          43 :   void *argp3 = 0 ;
   60830          43 :   int res3 = 0 ;
   60831          43 :   PyObject *swig_obj[5] ;
   60832          43 :   GDALDatasetShadow *result = 0 ;
   60833             :   
   60834             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   60835          43 :   PyProgressData *psProgressInfo;
   60836          43 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   60837          43 :   psProgressInfo->nLastReported = -1;
   60838          43 :   psProgressInfo->psPyCallback = NULL;
   60839          43 :   psProgressInfo->psPyCallbackData = NULL;
   60840          43 :   arg5 = psProgressInfo;
   60841          43 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALNearblackDestName", 3, 5, swig_obj)) SWIG_fail;
   60842          43 :   {
   60843             :     /* %typemap(in) (const char *utf8_path) */
   60844          43 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   60845             :     {
   60846          41 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   60847             :     }
   60848             :     else
   60849             :     {
   60850           2 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   60851             :       
   60852             :     }
   60853          43 :     if (arg1 == NULL)
   60854             :     {
   60855           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   60856           0 :       SWIG_fail;
   60857             :     }
   60858             :   }
   60859          43 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   60860          43 :   if (!SWIG_IsOK(res2)) {
   60861           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALNearblackDestName" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   60862             :   }
   60863          43 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   60864          43 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALNearblackOptions, 0 |  0 );
   60865          43 :   if (!SWIG_IsOK(res3)) {
   60866           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALNearblackDestName" "', argument " "3"" of type '" "GDALNearblackOptions *""'"); 
   60867             :   }
   60868          43 :   arg3 = reinterpret_cast< GDALNearblackOptions * >(argp3);
   60869          43 :   if (swig_obj[3]) {
   60870          43 :     {
   60871             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   60872             :       /* callback_func typemap */
   60873             :       
   60874             :       /* In some cases 0 is passed instead of None. */
   60875             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   60876          43 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   60877             :       {
   60878           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   60879             :         {
   60880           0 :           swig_obj[3] = Py_None;
   60881             :         }
   60882             :       }
   60883             :       
   60884          43 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   60885           0 :         void* cbfunction = NULL;
   60886           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   60887             :             (void**)&cbfunction,
   60888             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   60889             :             SWIG_POINTER_EXCEPTION | 0 ));
   60890             :         
   60891           0 :         if ( cbfunction == GDALTermProgress ) {
   60892             :           arg4 = GDALTermProgress;
   60893             :         } else {
   60894           0 :           if (!PyCallable_Check(swig_obj[3])) {
   60895           0 :             PyErr_SetString( PyExc_RuntimeError,
   60896             :               "Object given is not a Python function" );
   60897           0 :             SWIG_fail;
   60898             :           }
   60899           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   60900           0 :           arg4 = PyProgressProxy;
   60901             :         }
   60902             :         
   60903             :       }
   60904             :       
   60905             :     }
   60906             :   }
   60907          43 :   if (swig_obj[4]) {
   60908          43 :     {
   60909             :       /* %typemap(in) ( void* callback_data=NULL)  */
   60910          43 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   60911             :     }
   60912             :   }
   60913          43 :   {
   60914          43 :     if (!arg1) {
   60915          43 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   60916             :     }
   60917             :   }
   60918          43 :   {
   60919          43 :     const int bLocalUseExceptions = GetUseExceptions();
   60920          43 :     if ( bLocalUseExceptions ) {
   60921          43 :       pushErrorHandler();
   60922             :     }
   60923          43 :     {
   60924          43 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   60925          43 :       result = (GDALDatasetShadow *)wrapper_GDALNearblackDestName((char const *)arg1,arg2,arg3,arg4,arg5);
   60926          43 :       SWIG_PYTHON_THREAD_END_ALLOW;
   60927             :     }
   60928          43 :     if ( bLocalUseExceptions ) {
   60929          43 :       popErrorHandler();
   60930             :     }
   60931             : #ifndef SED_HACKS
   60932             :     if ( bLocalUseExceptions ) {
   60933             :       CPLErr eclass = CPLGetLastErrorType();
   60934             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   60935             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   60936             :       }
   60937             :     }
   60938             : #endif
   60939             :   }
   60940          43 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   60941          43 :   {
   60942             :     /* %typemap(freearg) (const char *utf8_path) */
   60943          43 :     GDALPythonFreeCStr(arg1, bToFree1);
   60944             :   }
   60945          43 :   {
   60946             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60947             :     
   60948          43 :     CPLFree(psProgressInfo);
   60949             :     
   60950             :   }
   60951          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; } }
   60952             :   return resultobj;
   60953           0 : fail:
   60954           0 :   {
   60955             :     /* %typemap(freearg) (const char *utf8_path) */
   60956           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   60957             :   }
   60958           0 :   {
   60959             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   60960             :     
   60961           0 :     CPLFree(psProgressInfo);
   60962             :     
   60963             :   }
   60964             :   return NULL;
   60965             : }
   60966             : 
   60967             : 
   60968          52 : SWIGINTERN PyObject *_wrap_new_GDALGridOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   60969          52 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   60970          52 :   char **arg1 = (char **) 0 ;
   60971          52 :   PyObject *swig_obj[1] ;
   60972          52 :   GDALGridOptions *result = 0 ;
   60973             :   
   60974          52 :   if (!args) SWIG_fail;
   60975          52 :   swig_obj[0] = args;
   60976          52 :   {
   60977             :     /* %typemap(in) char **dict */
   60978          52 :     arg1 = NULL;
   60979          52 :     if ( PySequence_Check( swig_obj[0] ) ) {
   60980          52 :       int bErr = FALSE;
   60981          52 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   60982          52 :       if ( bErr )
   60983             :       {
   60984           0 :         SWIG_fail;
   60985             :       }
   60986             :     }
   60987           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   60988           0 :       int bErr = FALSE;
   60989           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   60990           0 :       if ( bErr )
   60991             :       {
   60992           0 :         SWIG_fail;
   60993             :       }
   60994             :     }
   60995             :     else {
   60996           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   60997           0 :       SWIG_fail;
   60998             :     }
   60999             :   }
   61000          52 :   {
   61001          52 :     const int bLocalUseExceptions = GetUseExceptions();
   61002          52 :     if ( bLocalUseExceptions ) {
   61003          51 :       pushErrorHandler();
   61004             :     }
   61005          52 :     {
   61006          52 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61007          52 :       result = (GDALGridOptions *)new_GDALGridOptions(arg1);
   61008          52 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61009             :     }
   61010          52 :     if ( bLocalUseExceptions ) {
   61011          51 :       popErrorHandler();
   61012             :     }
   61013             : #ifndef SED_HACKS
   61014             :     if ( bLocalUseExceptions ) {
   61015             :       CPLErr eclass = CPLGetLastErrorType();
   61016             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61017             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61018             :       }
   61019             :     }
   61020             : #endif
   61021             :   }
   61022          52 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALGridOptions, SWIG_POINTER_NEW |  0 );
   61023          52 :   {
   61024             :     /* %typemap(freearg) char **dict */
   61025          52 :     CSLDestroy( arg1 );
   61026             :   }
   61027          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; } }
   61028             :   return resultobj;
   61029           0 : fail:
   61030           0 :   {
   61031             :     /* %typemap(freearg) char **dict */
   61032           0 :     CSLDestroy( arg1 );
   61033             :   }
   61034             :   return NULL;
   61035             : }
   61036             : 
   61037             : 
   61038          52 : SWIGINTERN PyObject *_wrap_delete_GDALGridOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61039          52 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61040          52 :   GDALGridOptions *arg1 = (GDALGridOptions *) 0 ;
   61041          52 :   void *argp1 = 0 ;
   61042          52 :   int res1 = 0 ;
   61043          52 :   PyObject *swig_obj[1] ;
   61044             :   
   61045          52 :   if (!args) SWIG_fail;
   61046          52 :   swig_obj[0] = args;
   61047          52 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALGridOptions, SWIG_POINTER_DISOWN |  0 );
   61048          52 :   if (!SWIG_IsOK(res1)) {
   61049           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALGridOptions" "', argument " "1"" of type '" "GDALGridOptions *""'"); 
   61050             :   }
   61051          52 :   arg1 = reinterpret_cast< GDALGridOptions * >(argp1);
   61052          52 :   {
   61053          52 :     const int bLocalUseExceptions = GetUseExceptions();
   61054          52 :     if ( bLocalUseExceptions ) {
   61055          51 :       pushErrorHandler();
   61056             :     }
   61057          52 :     {
   61058          52 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61059          52 :       delete_GDALGridOptions(arg1);
   61060          52 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61061             :     }
   61062          52 :     if ( bLocalUseExceptions ) {
   61063          51 :       popErrorHandler();
   61064             :     }
   61065             : #ifndef SED_HACKS
   61066             :     if ( bLocalUseExceptions ) {
   61067             :       CPLErr eclass = CPLGetLastErrorType();
   61068             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61069             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61070             :       }
   61071             :     }
   61072             : #endif
   61073             :   }
   61074          52 :   resultobj = SWIG_Py_Void();
   61075          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; } }
   61076             :   return resultobj;
   61077             : fail:
   61078             :   return NULL;
   61079             : }
   61080             : 
   61081             : 
   61082         277 : SWIGINTERN PyObject *GDALGridOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61083         277 :   PyObject *obj;
   61084         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   61085         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALGridOptions, SWIG_NewClientData(obj));
   61086         277 :   return SWIG_Py_Void();
   61087             : }
   61088             : 
   61089          52 : SWIGINTERN PyObject *GDALGridOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61090          52 :   return SWIG_Python_InitShadowInstance(args);
   61091             : }
   61092             : 
   61093          52 : SWIGINTERN PyObject *_wrap_GridInternal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61094          52 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61095          52 :   char *arg1 = (char *) 0 ;
   61096          52 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   61097          52 :   GDALGridOptions *arg3 = (GDALGridOptions *) 0 ;
   61098          52 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   61099          52 :   void *arg5 = (void *) NULL ;
   61100          52 :   int bToFree1 = 0 ;
   61101          52 :   void *argp2 = 0 ;
   61102          52 :   int res2 = 0 ;
   61103          52 :   void *argp3 = 0 ;
   61104          52 :   int res3 = 0 ;
   61105          52 :   PyObject *swig_obj[5] ;
   61106          52 :   GDALDatasetShadow *result = 0 ;
   61107             :   
   61108             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   61109          52 :   PyProgressData *psProgressInfo;
   61110          52 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   61111          52 :   psProgressInfo->nLastReported = -1;
   61112          52 :   psProgressInfo->psPyCallback = NULL;
   61113          52 :   psProgressInfo->psPyCallbackData = NULL;
   61114          52 :   arg5 = psProgressInfo;
   61115          52 :   if (!SWIG_Python_UnpackTuple(args, "GridInternal", 3, 5, swig_obj)) SWIG_fail;
   61116          52 :   {
   61117             :     /* %typemap(in) (const char *utf8_path) */
   61118          52 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   61119             :     {
   61120          52 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   61121             :     }
   61122             :     else
   61123             :     {
   61124           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   61125             :       
   61126             :     }
   61127          52 :     if (arg1 == NULL)
   61128             :     {
   61129           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   61130           0 :       SWIG_fail;
   61131             :     }
   61132             :   }
   61133          52 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   61134          52 :   if (!SWIG_IsOK(res2)) {
   61135           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridInternal" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   61136             :   }
   61137          52 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   61138          52 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALGridOptions, 0 |  0 );
   61139          52 :   if (!SWIG_IsOK(res3)) {
   61140           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GridInternal" "', argument " "3"" of type '" "GDALGridOptions *""'"); 
   61141             :   }
   61142          52 :   arg3 = reinterpret_cast< GDALGridOptions * >(argp3);
   61143          52 :   if (swig_obj[3]) {
   61144          52 :     {
   61145             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   61146             :       /* callback_func typemap */
   61147             :       
   61148             :       /* In some cases 0 is passed instead of None. */
   61149             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   61150          52 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   61151             :       {
   61152           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   61153             :         {
   61154           0 :           swig_obj[3] = Py_None;
   61155             :         }
   61156             :       }
   61157             :       
   61158          52 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   61159           0 :         void* cbfunction = NULL;
   61160           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   61161             :             (void**)&cbfunction,
   61162             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   61163             :             SWIG_POINTER_EXCEPTION | 0 ));
   61164             :         
   61165           0 :         if ( cbfunction == GDALTermProgress ) {
   61166             :           arg4 = GDALTermProgress;
   61167             :         } else {
   61168           0 :           if (!PyCallable_Check(swig_obj[3])) {
   61169           0 :             PyErr_SetString( PyExc_RuntimeError,
   61170             :               "Object given is not a Python function" );
   61171           0 :             SWIG_fail;
   61172             :           }
   61173           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   61174           0 :           arg4 = PyProgressProxy;
   61175             :         }
   61176             :         
   61177             :       }
   61178             :       
   61179             :     }
   61180             :   }
   61181          52 :   if (swig_obj[4]) {
   61182          52 :     {
   61183             :       /* %typemap(in) ( void* callback_data=NULL)  */
   61184          52 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   61185             :     }
   61186             :   }
   61187          52 :   {
   61188          52 :     if (!arg1) {
   61189          52 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   61190             :     }
   61191             :   }
   61192          52 :   {
   61193          52 :     if (!arg2) {
   61194           0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   61195             :     }
   61196             :   }
   61197          52 :   {
   61198          52 :     const int bLocalUseExceptions = GetUseExceptions();
   61199          52 :     if ( bLocalUseExceptions ) {
   61200          51 :       pushErrorHandler();
   61201             :     }
   61202          52 :     {
   61203          52 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61204          52 :       result = (GDALDatasetShadow *)wrapper_GDALGrid((char const *)arg1,arg2,arg3,arg4,arg5);
   61205          52 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61206             :     }
   61207          52 :     if ( bLocalUseExceptions ) {
   61208          51 :       popErrorHandler();
   61209             :     }
   61210             : #ifndef SED_HACKS
   61211             :     if ( bLocalUseExceptions ) {
   61212             :       CPLErr eclass = CPLGetLastErrorType();
   61213             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61214             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61215             :       }
   61216             :     }
   61217             : #endif
   61218             :   }
   61219          52 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   61220          52 :   {
   61221             :     /* %typemap(freearg) (const char *utf8_path) */
   61222          52 :     GDALPythonFreeCStr(arg1, bToFree1);
   61223             :   }
   61224          52 :   {
   61225             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   61226             :     
   61227          52 :     CPLFree(psProgressInfo);
   61228             :     
   61229             :   }
   61230          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; } }
   61231             :   return resultobj;
   61232           0 : fail:
   61233           0 :   {
   61234             :     /* %typemap(freearg) (const char *utf8_path) */
   61235           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   61236             :   }
   61237           0 :   {
   61238             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   61239             :     
   61240           0 :     CPLFree(psProgressInfo);
   61241             :     
   61242             :   }
   61243             :   return NULL;
   61244             : }
   61245             : 
   61246             : 
   61247          12 : SWIGINTERN PyObject *_wrap_new_GDALContourOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61248          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61249          12 :   char **arg1 = (char **) 0 ;
   61250          12 :   PyObject *swig_obj[1] ;
   61251          12 :   GDALContourOptions *result = 0 ;
   61252             :   
   61253          12 :   if (!args) SWIG_fail;
   61254          12 :   swig_obj[0] = args;
   61255          12 :   {
   61256             :     /* %typemap(in) char **dict */
   61257          12 :     arg1 = NULL;
   61258          12 :     if ( PySequence_Check( swig_obj[0] ) ) {
   61259          12 :       int bErr = FALSE;
   61260          12 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   61261          12 :       if ( bErr )
   61262             :       {
   61263           0 :         SWIG_fail;
   61264             :       }
   61265             :     }
   61266           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   61267           0 :       int bErr = FALSE;
   61268           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   61269           0 :       if ( bErr )
   61270             :       {
   61271           0 :         SWIG_fail;
   61272             :       }
   61273             :     }
   61274             :     else {
   61275           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   61276           0 :       SWIG_fail;
   61277             :     }
   61278             :   }
   61279          12 :   {
   61280          12 :     const int bLocalUseExceptions = GetUseExceptions();
   61281          12 :     if ( bLocalUseExceptions ) {
   61282          12 :       pushErrorHandler();
   61283             :     }
   61284          12 :     {
   61285          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61286          12 :       result = (GDALContourOptions *)new_GDALContourOptions(arg1);
   61287          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61288             :     }
   61289          12 :     if ( bLocalUseExceptions ) {
   61290          12 :       popErrorHandler();
   61291             :     }
   61292             : #ifndef SED_HACKS
   61293             :     if ( bLocalUseExceptions ) {
   61294             :       CPLErr eclass = CPLGetLastErrorType();
   61295             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61296             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61297             :       }
   61298             :     }
   61299             : #endif
   61300             :   }
   61301          12 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALContourOptions, SWIG_POINTER_NEW |  0 );
   61302          12 :   {
   61303             :     /* %typemap(freearg) char **dict */
   61304          12 :     CSLDestroy( arg1 );
   61305             :   }
   61306          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; } }
   61307             :   return resultobj;
   61308           0 : fail:
   61309           0 :   {
   61310             :     /* %typemap(freearg) char **dict */
   61311           0 :     CSLDestroy( arg1 );
   61312             :   }
   61313             :   return NULL;
   61314             : }
   61315             : 
   61316             : 
   61317          12 : SWIGINTERN PyObject *_wrap_delete_GDALContourOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61318          12 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61319          12 :   GDALContourOptions *arg1 = (GDALContourOptions *) 0 ;
   61320          12 :   void *argp1 = 0 ;
   61321          12 :   int res1 = 0 ;
   61322          12 :   PyObject *swig_obj[1] ;
   61323             :   
   61324          12 :   if (!args) SWIG_fail;
   61325          12 :   swig_obj[0] = args;
   61326          12 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALContourOptions, SWIG_POINTER_DISOWN |  0 );
   61327          12 :   if (!SWIG_IsOK(res1)) {
   61328           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALContourOptions" "', argument " "1"" of type '" "GDALContourOptions *""'"); 
   61329             :   }
   61330          12 :   arg1 = reinterpret_cast< GDALContourOptions * >(argp1);
   61331          12 :   {
   61332          12 :     const int bLocalUseExceptions = GetUseExceptions();
   61333          12 :     if ( bLocalUseExceptions ) {
   61334          12 :       pushErrorHandler();
   61335             :     }
   61336          12 :     {
   61337          12 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61338          12 :       delete_GDALContourOptions(arg1);
   61339          12 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61340             :     }
   61341          12 :     if ( bLocalUseExceptions ) {
   61342          12 :       popErrorHandler();
   61343             :     }
   61344             : #ifndef SED_HACKS
   61345             :     if ( bLocalUseExceptions ) {
   61346             :       CPLErr eclass = CPLGetLastErrorType();
   61347             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61348             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61349             :       }
   61350             :     }
   61351             : #endif
   61352             :   }
   61353          12 :   resultobj = SWIG_Py_Void();
   61354          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; } }
   61355             :   return resultobj;
   61356             : fail:
   61357             :   return NULL;
   61358             : }
   61359             : 
   61360             : 
   61361         277 : SWIGINTERN PyObject *GDALContourOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61362         277 :   PyObject *obj;
   61363         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   61364         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALContourOptions, SWIG_NewClientData(obj));
   61365         277 :   return SWIG_Py_Void();
   61366             : }
   61367             : 
   61368          12 : SWIGINTERN PyObject *GDALContourOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61369          12 :   return SWIG_Python_InitShadowInstance(args);
   61370             : }
   61371             : 
   61372           6 : SWIGINTERN PyObject *_wrap_wrapper_GDALContourDestDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61373           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61374           6 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   61375           6 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   61376           6 :   GDALContourOptions *arg3 = (GDALContourOptions *) 0 ;
   61377           6 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   61378           6 :   void *arg5 = (void *) NULL ;
   61379           6 :   void *argp1 = 0 ;
   61380           6 :   int res1 = 0 ;
   61381           6 :   void *argp2 = 0 ;
   61382           6 :   int res2 = 0 ;
   61383           6 :   void *argp3 = 0 ;
   61384           6 :   int res3 = 0 ;
   61385           6 :   PyObject *swig_obj[5] ;
   61386           6 :   int result;
   61387             :   
   61388             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   61389           6 :   PyProgressData *psProgressInfo;
   61390           6 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   61391           6 :   psProgressInfo->nLastReported = -1;
   61392           6 :   psProgressInfo->psPyCallback = NULL;
   61393           6 :   psProgressInfo->psPyCallbackData = NULL;
   61394           6 :   arg5 = psProgressInfo;
   61395           6 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALContourDestDS", 3, 5, swig_obj)) SWIG_fail;
   61396           6 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   61397           6 :   if (!SWIG_IsOK(res1)) {
   61398           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALContourDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   61399             :   }
   61400           6 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   61401           6 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   61402           6 :   if (!SWIG_IsOK(res2)) {
   61403           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALContourDestDS" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   61404             :   }
   61405           6 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   61406           6 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALContourOptions, 0 |  0 );
   61407           6 :   if (!SWIG_IsOK(res3)) {
   61408           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALContourDestDS" "', argument " "3"" of type '" "GDALContourOptions *""'"); 
   61409             :   }
   61410           6 :   arg3 = reinterpret_cast< GDALContourOptions * >(argp3);
   61411           6 :   if (swig_obj[3]) {
   61412           6 :     {
   61413             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   61414             :       /* callback_func typemap */
   61415             :       
   61416             :       /* In some cases 0 is passed instead of None. */
   61417             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   61418           6 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   61419             :       {
   61420           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   61421             :         {
   61422           0 :           swig_obj[3] = Py_None;
   61423             :         }
   61424             :       }
   61425             :       
   61426           6 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   61427           0 :         void* cbfunction = NULL;
   61428           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   61429             :             (void**)&cbfunction,
   61430             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   61431             :             SWIG_POINTER_EXCEPTION | 0 ));
   61432             :         
   61433           0 :         if ( cbfunction == GDALTermProgress ) {
   61434             :           arg4 = GDALTermProgress;
   61435             :         } else {
   61436           0 :           if (!PyCallable_Check(swig_obj[3])) {
   61437           0 :             PyErr_SetString( PyExc_RuntimeError,
   61438             :               "Object given is not a Python function" );
   61439           0 :             SWIG_fail;
   61440             :           }
   61441           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   61442           0 :           arg4 = PyProgressProxy;
   61443             :         }
   61444             :         
   61445             :       }
   61446             :       
   61447             :     }
   61448             :   }
   61449           6 :   if (swig_obj[4]) {
   61450           6 :     {
   61451             :       /* %typemap(in) ( void* callback_data=NULL)  */
   61452           6 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   61453             :     }
   61454             :   }
   61455           6 :   {
   61456           6 :     const int bLocalUseExceptions = GetUseExceptions();
   61457           6 :     if ( bLocalUseExceptions ) {
   61458           6 :       pushErrorHandler();
   61459             :     }
   61460           6 :     {
   61461           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61462           6 :       result = (int)wrapper_GDALContourDestDS(arg1,arg2,arg3,arg4,arg5);
   61463           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61464             :     }
   61465           6 :     if ( bLocalUseExceptions ) {
   61466           6 :       popErrorHandler();
   61467             :     }
   61468             : #ifndef SED_HACKS
   61469             :     if ( bLocalUseExceptions ) {
   61470             :       CPLErr eclass = CPLGetLastErrorType();
   61471             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61472             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61473             :       }
   61474             :     }
   61475             : #endif
   61476             :   }
   61477           6 :   resultobj = SWIG_From_int(static_cast< int >(result));
   61478           6 :   {
   61479             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   61480             :     
   61481           6 :     CPLFree(psProgressInfo);
   61482             :     
   61483             :   }
   61484           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; } }
   61485             :   return resultobj;
   61486           0 : fail:
   61487           0 :   {
   61488             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   61489             :     
   61490           0 :     CPLFree(psProgressInfo);
   61491             :     
   61492             :   }
   61493             :   return NULL;
   61494             : }
   61495             : 
   61496             : 
   61497           6 : SWIGINTERN PyObject *_wrap_wrapper_GDALContourDestName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61498           6 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61499           6 :   char *arg1 = (char *) 0 ;
   61500           6 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   61501           6 :   GDALContourOptions *arg3 = (GDALContourOptions *) 0 ;
   61502           6 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   61503           6 :   void *arg5 = (void *) NULL ;
   61504           6 :   int bToFree1 = 0 ;
   61505           6 :   void *argp2 = 0 ;
   61506           6 :   int res2 = 0 ;
   61507           6 :   void *argp3 = 0 ;
   61508           6 :   int res3 = 0 ;
   61509           6 :   PyObject *swig_obj[5] ;
   61510           6 :   GDALDatasetShadow *result = 0 ;
   61511             :   
   61512             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   61513           6 :   PyProgressData *psProgressInfo;
   61514           6 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   61515           6 :   psProgressInfo->nLastReported = -1;
   61516           6 :   psProgressInfo->psPyCallback = NULL;
   61517           6 :   psProgressInfo->psPyCallbackData = NULL;
   61518           6 :   arg5 = psProgressInfo;
   61519           6 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALContourDestName", 3, 5, swig_obj)) SWIG_fail;
   61520           6 :   {
   61521             :     /* %typemap(in) (const char *utf8_path) */
   61522           6 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   61523             :     {
   61524           6 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   61525             :     }
   61526             :     else
   61527             :     {
   61528           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   61529             :       
   61530             :     }
   61531           6 :     if (arg1 == NULL)
   61532             :     {
   61533           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   61534           0 :       SWIG_fail;
   61535             :     }
   61536             :   }
   61537           6 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   61538           6 :   if (!SWIG_IsOK(res2)) {
   61539           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALContourDestName" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   61540             :   }
   61541           6 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   61542           6 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALContourOptions, 0 |  0 );
   61543           6 :   if (!SWIG_IsOK(res3)) {
   61544           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALContourDestName" "', argument " "3"" of type '" "GDALContourOptions *""'"); 
   61545             :   }
   61546           6 :   arg3 = reinterpret_cast< GDALContourOptions * >(argp3);
   61547           6 :   if (swig_obj[3]) {
   61548           6 :     {
   61549             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   61550             :       /* callback_func typemap */
   61551             :       
   61552             :       /* In some cases 0 is passed instead of None. */
   61553             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   61554           6 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   61555             :       {
   61556           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   61557             :         {
   61558           0 :           swig_obj[3] = Py_None;
   61559             :         }
   61560             :       }
   61561             :       
   61562           6 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   61563           0 :         void* cbfunction = NULL;
   61564           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   61565             :             (void**)&cbfunction,
   61566             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   61567             :             SWIG_POINTER_EXCEPTION | 0 ));
   61568             :         
   61569           0 :         if ( cbfunction == GDALTermProgress ) {
   61570             :           arg4 = GDALTermProgress;
   61571             :         } else {
   61572           0 :           if (!PyCallable_Check(swig_obj[3])) {
   61573           0 :             PyErr_SetString( PyExc_RuntimeError,
   61574             :               "Object given is not a Python function" );
   61575           0 :             SWIG_fail;
   61576             :           }
   61577           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   61578           0 :           arg4 = PyProgressProxy;
   61579             :         }
   61580             :         
   61581             :       }
   61582             :       
   61583             :     }
   61584             :   }
   61585           6 :   if (swig_obj[4]) {
   61586           6 :     {
   61587             :       /* %typemap(in) ( void* callback_data=NULL)  */
   61588           6 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   61589             :     }
   61590             :   }
   61591           6 :   {
   61592           6 :     if (!arg1) {
   61593           6 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   61594             :     }
   61595             :   }
   61596           6 :   {
   61597           6 :     const int bLocalUseExceptions = GetUseExceptions();
   61598           6 :     if ( bLocalUseExceptions ) {
   61599           6 :       pushErrorHandler();
   61600             :     }
   61601           6 :     {
   61602           6 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61603           6 :       result = (GDALDatasetShadow *)wrapper_GDALContourDestName((char const *)arg1,arg2,arg3,arg4,arg5);
   61604           6 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61605             :     }
   61606           6 :     if ( bLocalUseExceptions ) {
   61607           6 :       popErrorHandler();
   61608             :     }
   61609             : #ifndef SED_HACKS
   61610             :     if ( bLocalUseExceptions ) {
   61611             :       CPLErr eclass = CPLGetLastErrorType();
   61612             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61613             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61614             :       }
   61615             :     }
   61616             : #endif
   61617             :   }
   61618           6 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   61619           6 :   {
   61620             :     /* %typemap(freearg) (const char *utf8_path) */
   61621           6 :     GDALPythonFreeCStr(arg1, bToFree1);
   61622             :   }
   61623           6 :   {
   61624             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   61625             :     
   61626           6 :     CPLFree(psProgressInfo);
   61627             :     
   61628             :   }
   61629           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; } }
   61630             :   return resultobj;
   61631           0 : fail:
   61632           0 :   {
   61633             :     /* %typemap(freearg) (const char *utf8_path) */
   61634           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   61635             :   }
   61636           0 :   {
   61637             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   61638             :     
   61639           0 :     CPLFree(psProgressInfo);
   61640             :     
   61641             :   }
   61642             :   return NULL;
   61643             : }
   61644             : 
   61645             : 
   61646          23 : SWIGINTERN PyObject *_wrap_new_GDALRasterizeOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61647          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61648          23 :   char **arg1 = (char **) 0 ;
   61649          23 :   PyObject *swig_obj[1] ;
   61650          23 :   GDALRasterizeOptions *result = 0 ;
   61651             :   
   61652          23 :   if (!args) SWIG_fail;
   61653          23 :   swig_obj[0] = args;
   61654          23 :   {
   61655             :     /* %typemap(in) char **dict */
   61656          23 :     arg1 = NULL;
   61657          23 :     if ( PySequence_Check( swig_obj[0] ) ) {
   61658          23 :       int bErr = FALSE;
   61659          23 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   61660          23 :       if ( bErr )
   61661             :       {
   61662           0 :         SWIG_fail;
   61663             :       }
   61664             :     }
   61665           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   61666           0 :       int bErr = FALSE;
   61667           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   61668           0 :       if ( bErr )
   61669             :       {
   61670           0 :         SWIG_fail;
   61671             :       }
   61672             :     }
   61673             :     else {
   61674           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   61675           0 :       SWIG_fail;
   61676             :     }
   61677             :   }
   61678          23 :   {
   61679          23 :     const int bLocalUseExceptions = GetUseExceptions();
   61680          23 :     if ( bLocalUseExceptions ) {
   61681          23 :       pushErrorHandler();
   61682             :     }
   61683          23 :     {
   61684          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61685          23 :       result = (GDALRasterizeOptions *)new_GDALRasterizeOptions(arg1);
   61686          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61687             :     }
   61688          23 :     if ( bLocalUseExceptions ) {
   61689          23 :       popErrorHandler();
   61690             :     }
   61691             : #ifndef SED_HACKS
   61692             :     if ( bLocalUseExceptions ) {
   61693             :       CPLErr eclass = CPLGetLastErrorType();
   61694             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61695             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61696             :       }
   61697             :     }
   61698             : #endif
   61699             :   }
   61700          23 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterizeOptions, SWIG_POINTER_NEW |  0 );
   61701          23 :   {
   61702             :     /* %typemap(freearg) char **dict */
   61703          23 :     CSLDestroy( arg1 );
   61704             :   }
   61705          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; } }
   61706             :   return resultobj;
   61707           0 : fail:
   61708           0 :   {
   61709             :     /* %typemap(freearg) char **dict */
   61710           0 :     CSLDestroy( arg1 );
   61711             :   }
   61712             :   return NULL;
   61713             : }
   61714             : 
   61715             : 
   61716          23 : SWIGINTERN PyObject *_wrap_delete_GDALRasterizeOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61717          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61718          23 :   GDALRasterizeOptions *arg1 = (GDALRasterizeOptions *) 0 ;
   61719          23 :   void *argp1 = 0 ;
   61720          23 :   int res1 = 0 ;
   61721          23 :   PyObject *swig_obj[1] ;
   61722             :   
   61723          23 :   if (!args) SWIG_fail;
   61724          23 :   swig_obj[0] = args;
   61725          23 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALRasterizeOptions, SWIG_POINTER_DISOWN |  0 );
   61726          23 :   if (!SWIG_IsOK(res1)) {
   61727           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALRasterizeOptions" "', argument " "1"" of type '" "GDALRasterizeOptions *""'"); 
   61728             :   }
   61729          23 :   arg1 = reinterpret_cast< GDALRasterizeOptions * >(argp1);
   61730          23 :   {
   61731          23 :     const int bLocalUseExceptions = GetUseExceptions();
   61732          23 :     if ( bLocalUseExceptions ) {
   61733          23 :       pushErrorHandler();
   61734             :     }
   61735          23 :     {
   61736          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61737          23 :       delete_GDALRasterizeOptions(arg1);
   61738          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61739             :     }
   61740          23 :     if ( bLocalUseExceptions ) {
   61741          23 :       popErrorHandler();
   61742             :     }
   61743             : #ifndef SED_HACKS
   61744             :     if ( bLocalUseExceptions ) {
   61745             :       CPLErr eclass = CPLGetLastErrorType();
   61746             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61747             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61748             :       }
   61749             :     }
   61750             : #endif
   61751             :   }
   61752          23 :   resultobj = SWIG_Py_Void();
   61753          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; } }
   61754             :   return resultobj;
   61755             : fail:
   61756             :   return NULL;
   61757             : }
   61758             : 
   61759             : 
   61760         277 : SWIGINTERN PyObject *GDALRasterizeOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61761         277 :   PyObject *obj;
   61762         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   61763         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALRasterizeOptions, SWIG_NewClientData(obj));
   61764         277 :   return SWIG_Py_Void();
   61765             : }
   61766             : 
   61767          23 : SWIGINTERN PyObject *GDALRasterizeOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61768          23 :   return SWIG_Python_InitShadowInstance(args);
   61769             : }
   61770             : 
   61771          13 : SWIGINTERN PyObject *_wrap_wrapper_GDALRasterizeDestDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61772          13 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61773          13 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   61774          13 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   61775          13 :   GDALRasterizeOptions *arg3 = (GDALRasterizeOptions *) 0 ;
   61776          13 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   61777          13 :   void *arg5 = (void *) NULL ;
   61778          13 :   void *argp1 = 0 ;
   61779          13 :   int res1 = 0 ;
   61780          13 :   void *argp2 = 0 ;
   61781          13 :   int res2 = 0 ;
   61782          13 :   void *argp3 = 0 ;
   61783          13 :   int res3 = 0 ;
   61784          13 :   PyObject *swig_obj[5] ;
   61785          13 :   int result;
   61786             :   
   61787             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   61788          13 :   PyProgressData *psProgressInfo;
   61789          13 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   61790          13 :   psProgressInfo->nLastReported = -1;
   61791          13 :   psProgressInfo->psPyCallback = NULL;
   61792          13 :   psProgressInfo->psPyCallbackData = NULL;
   61793          13 :   arg5 = psProgressInfo;
   61794          13 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALRasterizeDestDS", 3, 5, swig_obj)) SWIG_fail;
   61795          13 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   61796          13 :   if (!SWIG_IsOK(res1)) {
   61797           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALRasterizeDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   61798             :   }
   61799          13 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   61800          13 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   61801          13 :   if (!SWIG_IsOK(res2)) {
   61802           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALRasterizeDestDS" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   61803             :   }
   61804          13 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   61805          13 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALRasterizeOptions, 0 |  0 );
   61806          13 :   if (!SWIG_IsOK(res3)) {
   61807           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALRasterizeDestDS" "', argument " "3"" of type '" "GDALRasterizeOptions *""'"); 
   61808             :   }
   61809          13 :   arg3 = reinterpret_cast< GDALRasterizeOptions * >(argp3);
   61810          13 :   if (swig_obj[3]) {
   61811          13 :     {
   61812             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   61813             :       /* callback_func typemap */
   61814             :       
   61815             :       /* In some cases 0 is passed instead of None. */
   61816             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   61817          13 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   61818             :       {
   61819           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   61820             :         {
   61821           0 :           swig_obj[3] = Py_None;
   61822             :         }
   61823             :       }
   61824             :       
   61825          13 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   61826           0 :         void* cbfunction = NULL;
   61827           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   61828             :             (void**)&cbfunction,
   61829             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   61830             :             SWIG_POINTER_EXCEPTION | 0 ));
   61831             :         
   61832           0 :         if ( cbfunction == GDALTermProgress ) {
   61833             :           arg4 = GDALTermProgress;
   61834             :         } else {
   61835           0 :           if (!PyCallable_Check(swig_obj[3])) {
   61836           0 :             PyErr_SetString( PyExc_RuntimeError,
   61837             :               "Object given is not a Python function" );
   61838           0 :             SWIG_fail;
   61839             :           }
   61840           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   61841           0 :           arg4 = PyProgressProxy;
   61842             :         }
   61843             :         
   61844             :       }
   61845             :       
   61846             :     }
   61847             :   }
   61848          13 :   if (swig_obj[4]) {
   61849          13 :     {
   61850             :       /* %typemap(in) ( void* callback_data=NULL)  */
   61851          13 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   61852             :     }
   61853             :   }
   61854          13 :   {
   61855          13 :     const int bLocalUseExceptions = GetUseExceptions();
   61856          13 :     if ( bLocalUseExceptions ) {
   61857          13 :       pushErrorHandler();
   61858             :     }
   61859          13 :     {
   61860          13 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   61861          13 :       result = (int)wrapper_GDALRasterizeDestDS(arg1,arg2,arg3,arg4,arg5);
   61862          13 :       SWIG_PYTHON_THREAD_END_ALLOW;
   61863             :     }
   61864          13 :     if ( bLocalUseExceptions ) {
   61865          13 :       popErrorHandler();
   61866             :     }
   61867             : #ifndef SED_HACKS
   61868             :     if ( bLocalUseExceptions ) {
   61869             :       CPLErr eclass = CPLGetLastErrorType();
   61870             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   61871             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   61872             :       }
   61873             :     }
   61874             : #endif
   61875             :   }
   61876          13 :   resultobj = SWIG_From_int(static_cast< int >(result));
   61877          13 :   {
   61878             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   61879             :     
   61880          13 :     CPLFree(psProgressInfo);
   61881             :     
   61882             :   }
   61883          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; } }
   61884             :   return resultobj;
   61885           0 : fail:
   61886           0 :   {
   61887             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   61888             :     
   61889           0 :     CPLFree(psProgressInfo);
   61890             :     
   61891             :   }
   61892             :   return NULL;
   61893             : }
   61894             : 
   61895             : 
   61896          10 : SWIGINTERN PyObject *_wrap_wrapper_GDALRasterizeDestName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   61897          10 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   61898          10 :   char *arg1 = (char *) 0 ;
   61899          10 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   61900          10 :   GDALRasterizeOptions *arg3 = (GDALRasterizeOptions *) 0 ;
   61901          10 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   61902          10 :   void *arg5 = (void *) NULL ;
   61903          10 :   int bToFree1 = 0 ;
   61904          10 :   void *argp2 = 0 ;
   61905          10 :   int res2 = 0 ;
   61906          10 :   void *argp3 = 0 ;
   61907          10 :   int res3 = 0 ;
   61908          10 :   PyObject *swig_obj[5] ;
   61909          10 :   GDALDatasetShadow *result = 0 ;
   61910             :   
   61911             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   61912          10 :   PyProgressData *psProgressInfo;
   61913          10 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   61914          10 :   psProgressInfo->nLastReported = -1;
   61915          10 :   psProgressInfo->psPyCallback = NULL;
   61916          10 :   psProgressInfo->psPyCallbackData = NULL;
   61917          10 :   arg5 = psProgressInfo;
   61918          10 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALRasterizeDestName", 3, 5, swig_obj)) SWIG_fail;
   61919          10 :   {
   61920             :     /* %typemap(in) (const char *utf8_path) */
   61921          10 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   61922             :     {
   61923           6 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   61924             :     }
   61925             :     else
   61926             :     {
   61927           4 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   61928             :       
   61929             :     }
   61930          10 :     if (arg1 == NULL)
   61931             :     {
   61932           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   61933           0 :       SWIG_fail;
   61934             :     }
   61935             :   }
   61936          10 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   61937          10 :   if (!SWIG_IsOK(res2)) {
   61938           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALRasterizeDestName" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   61939             :   }
   61940          10 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   61941          10 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALRasterizeOptions, 0 |  0 );
   61942          10 :   if (!SWIG_IsOK(res3)) {
   61943           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALRasterizeDestName" "', argument " "3"" of type '" "GDALRasterizeOptions *""'"); 
   61944             :   }
   61945          10 :   arg3 = reinterpret_cast< GDALRasterizeOptions * >(argp3);
   61946          10 :   if (swig_obj[3]) {
   61947          10 :     {
   61948             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   61949             :       /* callback_func typemap */
   61950             :       
   61951             :       /* In some cases 0 is passed instead of None. */
   61952             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   61953          10 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   61954             :       {
   61955           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   61956             :         {
   61957           0 :           swig_obj[3] = Py_None;
   61958             :         }
   61959             :       }
   61960             :       
   61961          10 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   61962           0 :         void* cbfunction = NULL;
   61963           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   61964             :             (void**)&cbfunction,
   61965             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   61966             :             SWIG_POINTER_EXCEPTION | 0 ));
   61967             :         
   61968           0 :         if ( cbfunction == GDALTermProgress ) {
   61969             :           arg4 = GDALTermProgress;
   61970             :         } else {
   61971           0 :           if (!PyCallable_Check(swig_obj[3])) {
   61972           0 :             PyErr_SetString( PyExc_RuntimeError,
   61973             :               "Object given is not a Python function" );
   61974           0 :             SWIG_fail;
   61975             :           }
   61976           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   61977           0 :           arg4 = PyProgressProxy;
   61978             :         }
   61979             :         
   61980             :       }
   61981             :       
   61982             :     }
   61983             :   }
   61984          10 :   if (swig_obj[4]) {
   61985          10 :     {
   61986             :       /* %typemap(in) ( void* callback_data=NULL)  */
   61987          10 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   61988             :     }
   61989             :   }
   61990          10 :   {
   61991          10 :     if (!arg1) {
   61992          10 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   61993             :     }
   61994             :   }
   61995          10 :   {
   61996          10 :     const int bLocalUseExceptions = GetUseExceptions();
   61997          10 :     if ( bLocalUseExceptions ) {
   61998          10 :       pushErrorHandler();
   61999             :     }
   62000          10 :     {
   62001          10 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   62002          10 :       result = (GDALDatasetShadow *)wrapper_GDALRasterizeDestName((char const *)arg1,arg2,arg3,arg4,arg5);
   62003          10 :       SWIG_PYTHON_THREAD_END_ALLOW;
   62004             :     }
   62005          10 :     if ( bLocalUseExceptions ) {
   62006          10 :       popErrorHandler();
   62007             :     }
   62008             : #ifndef SED_HACKS
   62009             :     if ( bLocalUseExceptions ) {
   62010             :       CPLErr eclass = CPLGetLastErrorType();
   62011             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   62012             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   62013             :       }
   62014             :     }
   62015             : #endif
   62016             :   }
   62017          10 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   62018          10 :   {
   62019             :     /* %typemap(freearg) (const char *utf8_path) */
   62020          10 :     GDALPythonFreeCStr(arg1, bToFree1);
   62021             :   }
   62022          10 :   {
   62023             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   62024             :     
   62025          10 :     CPLFree(psProgressInfo);
   62026             :     
   62027             :   }
   62028          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; } }
   62029             :   return resultobj;
   62030           0 : fail:
   62031           0 :   {
   62032             :     /* %typemap(freearg) (const char *utf8_path) */
   62033           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   62034             :   }
   62035           0 :   {
   62036             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   62037             :     
   62038           0 :     CPLFree(psProgressInfo);
   62039             :     
   62040             :   }
   62041             :   return NULL;
   62042             : }
   62043             : 
   62044             : 
   62045          39 : SWIGINTERN PyObject *_wrap_new_GDALFootprintOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62046          39 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   62047          39 :   char **arg1 = (char **) 0 ;
   62048          39 :   PyObject *swig_obj[1] ;
   62049          39 :   GDALFootprintOptions *result = 0 ;
   62050             :   
   62051          39 :   if (!args) SWIG_fail;
   62052          39 :   swig_obj[0] = args;
   62053          39 :   {
   62054             :     /* %typemap(in) char **dict */
   62055          39 :     arg1 = NULL;
   62056          39 :     if ( PySequence_Check( swig_obj[0] ) ) {
   62057          39 :       int bErr = FALSE;
   62058          39 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   62059          39 :       if ( bErr )
   62060             :       {
   62061           0 :         SWIG_fail;
   62062             :       }
   62063             :     }
   62064           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   62065           0 :       int bErr = FALSE;
   62066           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   62067           0 :       if ( bErr )
   62068             :       {
   62069           0 :         SWIG_fail;
   62070             :       }
   62071             :     }
   62072             :     else {
   62073           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   62074           0 :       SWIG_fail;
   62075             :     }
   62076             :   }
   62077          39 :   {
   62078          39 :     const int bLocalUseExceptions = GetUseExceptions();
   62079          39 :     if ( bLocalUseExceptions ) {
   62080          39 :       pushErrorHandler();
   62081             :     }
   62082          39 :     {
   62083          39 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   62084          39 :       result = (GDALFootprintOptions *)new_GDALFootprintOptions(arg1);
   62085          39 :       SWIG_PYTHON_THREAD_END_ALLOW;
   62086             :     }
   62087          39 :     if ( bLocalUseExceptions ) {
   62088          39 :       popErrorHandler();
   62089             :     }
   62090             : #ifndef SED_HACKS
   62091             :     if ( bLocalUseExceptions ) {
   62092             :       CPLErr eclass = CPLGetLastErrorType();
   62093             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   62094             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   62095             :       }
   62096             :     }
   62097             : #endif
   62098             :   }
   62099          39 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALFootprintOptions, SWIG_POINTER_NEW |  0 );
   62100          39 :   {
   62101             :     /* %typemap(freearg) char **dict */
   62102          39 :     CSLDestroy( arg1 );
   62103             :   }
   62104          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; } }
   62105             :   return resultobj;
   62106           0 : fail:
   62107           0 :   {
   62108             :     /* %typemap(freearg) char **dict */
   62109           0 :     CSLDestroy( arg1 );
   62110             :   }
   62111             :   return NULL;
   62112             : }
   62113             : 
   62114             : 
   62115          37 : SWIGINTERN PyObject *_wrap_delete_GDALFootprintOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62116          37 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   62117          37 :   GDALFootprintOptions *arg1 = (GDALFootprintOptions *) 0 ;
   62118          37 :   void *argp1 = 0 ;
   62119          37 :   int res1 = 0 ;
   62120          37 :   PyObject *swig_obj[1] ;
   62121             :   
   62122          37 :   if (!args) SWIG_fail;
   62123          37 :   swig_obj[0] = args;
   62124          37 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALFootprintOptions, SWIG_POINTER_DISOWN |  0 );
   62125          37 :   if (!SWIG_IsOK(res1)) {
   62126           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALFootprintOptions" "', argument " "1"" of type '" "GDALFootprintOptions *""'"); 
   62127             :   }
   62128          37 :   arg1 = reinterpret_cast< GDALFootprintOptions * >(argp1);
   62129          37 :   {
   62130          37 :     const int bLocalUseExceptions = GetUseExceptions();
   62131          37 :     if ( bLocalUseExceptions ) {
   62132          37 :       pushErrorHandler();
   62133             :     }
   62134          37 :     {
   62135          37 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   62136          37 :       delete_GDALFootprintOptions(arg1);
   62137          37 :       SWIG_PYTHON_THREAD_END_ALLOW;
   62138             :     }
   62139          37 :     if ( bLocalUseExceptions ) {
   62140          37 :       popErrorHandler();
   62141             :     }
   62142             : #ifndef SED_HACKS
   62143             :     if ( bLocalUseExceptions ) {
   62144             :       CPLErr eclass = CPLGetLastErrorType();
   62145             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   62146             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   62147             :       }
   62148             :     }
   62149             : #endif
   62150             :   }
   62151          37 :   resultobj = SWIG_Py_Void();
   62152          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; } }
   62153             :   return resultobj;
   62154             : fail:
   62155             :   return NULL;
   62156             : }
   62157             : 
   62158             : 
   62159         277 : SWIGINTERN PyObject *GDALFootprintOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62160         277 :   PyObject *obj;
   62161         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   62162         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALFootprintOptions, SWIG_NewClientData(obj));
   62163         277 :   return SWIG_Py_Void();
   62164             : }
   62165             : 
   62166          37 : SWIGINTERN PyObject *GDALFootprintOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62167          37 :   return SWIG_Python_InitShadowInstance(args);
   62168             : }
   62169             : 
   62170           3 : SWIGINTERN PyObject *_wrap_wrapper_GDALFootprintDestDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62171           3 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   62172           3 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   62173           3 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   62174           3 :   GDALFootprintOptions *arg3 = (GDALFootprintOptions *) 0 ;
   62175           3 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   62176           3 :   void *arg5 = (void *) NULL ;
   62177           3 :   void *argp1 = 0 ;
   62178           3 :   int res1 = 0 ;
   62179           3 :   void *argp2 = 0 ;
   62180           3 :   int res2 = 0 ;
   62181           3 :   void *argp3 = 0 ;
   62182           3 :   int res3 = 0 ;
   62183           3 :   PyObject *swig_obj[5] ;
   62184           3 :   int result;
   62185             :   
   62186             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   62187           3 :   PyProgressData *psProgressInfo;
   62188           3 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   62189           3 :   psProgressInfo->nLastReported = -1;
   62190           3 :   psProgressInfo->psPyCallback = NULL;
   62191           3 :   psProgressInfo->psPyCallbackData = NULL;
   62192           3 :   arg5 = psProgressInfo;
   62193           3 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALFootprintDestDS", 3, 5, swig_obj)) SWIG_fail;
   62194           3 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   62195           3 :   if (!SWIG_IsOK(res1)) {
   62196           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrapper_GDALFootprintDestDS" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   62197             :   }
   62198           3 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   62199           3 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   62200           3 :   if (!SWIG_IsOK(res2)) {
   62201           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALFootprintDestDS" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   62202             :   }
   62203           3 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   62204           3 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALFootprintOptions, 0 |  0 );
   62205           3 :   if (!SWIG_IsOK(res3)) {
   62206           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALFootprintDestDS" "', argument " "3"" of type '" "GDALFootprintOptions *""'"); 
   62207             :   }
   62208           3 :   arg3 = reinterpret_cast< GDALFootprintOptions * >(argp3);
   62209           3 :   if (swig_obj[3]) {
   62210           3 :     {
   62211             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   62212             :       /* callback_func typemap */
   62213             :       
   62214             :       /* In some cases 0 is passed instead of None. */
   62215             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   62216           3 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   62217             :       {
   62218           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   62219             :         {
   62220           0 :           swig_obj[3] = Py_None;
   62221             :         }
   62222             :       }
   62223             :       
   62224           3 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   62225           0 :         void* cbfunction = NULL;
   62226           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   62227             :             (void**)&cbfunction,
   62228             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   62229             :             SWIG_POINTER_EXCEPTION | 0 ));
   62230             :         
   62231           0 :         if ( cbfunction == GDALTermProgress ) {
   62232             :           arg4 = GDALTermProgress;
   62233             :         } else {
   62234           0 :           if (!PyCallable_Check(swig_obj[3])) {
   62235           0 :             PyErr_SetString( PyExc_RuntimeError,
   62236             :               "Object given is not a Python function" );
   62237           0 :             SWIG_fail;
   62238             :           }
   62239           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   62240           0 :           arg4 = PyProgressProxy;
   62241             :         }
   62242             :         
   62243             :       }
   62244             :       
   62245             :     }
   62246             :   }
   62247           3 :   if (swig_obj[4]) {
   62248           3 :     {
   62249             :       /* %typemap(in) ( void* callback_data=NULL)  */
   62250           3 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   62251             :     }
   62252             :   }
   62253           3 :   {
   62254           3 :     const int bLocalUseExceptions = GetUseExceptions();
   62255           3 :     if ( bLocalUseExceptions ) {
   62256           3 :       pushErrorHandler();
   62257             :     }
   62258           3 :     {
   62259           3 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   62260           3 :       result = (int)wrapper_GDALFootprintDestDS(arg1,arg2,arg3,arg4,arg5);
   62261           3 :       SWIG_PYTHON_THREAD_END_ALLOW;
   62262             :     }
   62263           3 :     if ( bLocalUseExceptions ) {
   62264           3 :       popErrorHandler();
   62265             :     }
   62266             : #ifndef SED_HACKS
   62267             :     if ( bLocalUseExceptions ) {
   62268             :       CPLErr eclass = CPLGetLastErrorType();
   62269             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   62270             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   62271             :       }
   62272             :     }
   62273             : #endif
   62274             :   }
   62275           3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   62276           3 :   {
   62277             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   62278             :     
   62279           3 :     CPLFree(psProgressInfo);
   62280             :     
   62281             :   }
   62282           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; } }
   62283             :   return resultobj;
   62284           0 : fail:
   62285           0 :   {
   62286             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   62287             :     
   62288           0 :     CPLFree(psProgressInfo);
   62289             :     
   62290             :   }
   62291             :   return NULL;
   62292             : }
   62293             : 
   62294             : 
   62295          34 : SWIGINTERN PyObject *_wrap_wrapper_GDALFootprintDestName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62296          34 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   62297          34 :   char *arg1 = (char *) 0 ;
   62298          34 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   62299          34 :   GDALFootprintOptions *arg3 = (GDALFootprintOptions *) 0 ;
   62300          34 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   62301          34 :   void *arg5 = (void *) NULL ;
   62302          34 :   int bToFree1 = 0 ;
   62303          34 :   void *argp2 = 0 ;
   62304          34 :   int res2 = 0 ;
   62305          34 :   void *argp3 = 0 ;
   62306          34 :   int res3 = 0 ;
   62307          34 :   PyObject *swig_obj[5] ;
   62308          34 :   GDALDatasetShadow *result = 0 ;
   62309             :   
   62310             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   62311          34 :   PyProgressData *psProgressInfo;
   62312          34 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   62313          34 :   psProgressInfo->nLastReported = -1;
   62314          34 :   psProgressInfo->psPyCallback = NULL;
   62315          34 :   psProgressInfo->psPyCallbackData = NULL;
   62316          34 :   arg5 = psProgressInfo;
   62317          34 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALFootprintDestName", 3, 5, swig_obj)) SWIG_fail;
   62318          34 :   {
   62319             :     /* %typemap(in) (const char *utf8_path) */
   62320          34 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   62321             :     {
   62322          33 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   62323             :     }
   62324             :     else
   62325             :     {
   62326           1 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   62327             :       
   62328             :     }
   62329          34 :     if (arg1 == NULL)
   62330             :     {
   62331           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   62332           0 :       SWIG_fail;
   62333             :     }
   62334             :   }
   62335          34 :   res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   62336          34 :   if (!SWIG_IsOK(res2)) {
   62337           0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrapper_GDALFootprintDestName" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   62338             :   }
   62339          34 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   62340          34 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALFootprintOptions, 0 |  0 );
   62341          34 :   if (!SWIG_IsOK(res3)) {
   62342           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrapper_GDALFootprintDestName" "', argument " "3"" of type '" "GDALFootprintOptions *""'"); 
   62343             :   }
   62344          34 :   arg3 = reinterpret_cast< GDALFootprintOptions * >(argp3);
   62345          34 :   if (swig_obj[3]) {
   62346          34 :     {
   62347             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   62348             :       /* callback_func typemap */
   62349             :       
   62350             :       /* In some cases 0 is passed instead of None. */
   62351             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   62352          34 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   62353             :       {
   62354           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   62355             :         {
   62356           0 :           swig_obj[3] = Py_None;
   62357             :         }
   62358             :       }
   62359             :       
   62360          34 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   62361           0 :         void* cbfunction = NULL;
   62362           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   62363             :             (void**)&cbfunction,
   62364             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   62365             :             SWIG_POINTER_EXCEPTION | 0 ));
   62366             :         
   62367           0 :         if ( cbfunction == GDALTermProgress ) {
   62368             :           arg4 = GDALTermProgress;
   62369             :         } else {
   62370           0 :           if (!PyCallable_Check(swig_obj[3])) {
   62371           0 :             PyErr_SetString( PyExc_RuntimeError,
   62372             :               "Object given is not a Python function" );
   62373           0 :             SWIG_fail;
   62374             :           }
   62375           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   62376           0 :           arg4 = PyProgressProxy;
   62377             :         }
   62378             :         
   62379             :       }
   62380             :       
   62381             :     }
   62382             :   }
   62383          34 :   if (swig_obj[4]) {
   62384          34 :     {
   62385             :       /* %typemap(in) ( void* callback_data=NULL)  */
   62386          34 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   62387             :     }
   62388             :   }
   62389          34 :   {
   62390          34 :     if (!arg1) {
   62391          34 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   62392             :     }
   62393             :   }
   62394          34 :   {
   62395          34 :     const int bLocalUseExceptions = GetUseExceptions();
   62396          34 :     if ( bLocalUseExceptions ) {
   62397          34 :       pushErrorHandler();
   62398             :     }
   62399          34 :     {
   62400          34 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   62401          34 :       result = (GDALDatasetShadow *)wrapper_GDALFootprintDestName((char const *)arg1,arg2,arg3,arg4,arg5);
   62402          34 :       SWIG_PYTHON_THREAD_END_ALLOW;
   62403             :     }
   62404          34 :     if ( bLocalUseExceptions ) {
   62405          34 :       popErrorHandler();
   62406             :     }
   62407             : #ifndef SED_HACKS
   62408             :     if ( bLocalUseExceptions ) {
   62409             :       CPLErr eclass = CPLGetLastErrorType();
   62410             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   62411             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   62412             :       }
   62413             :     }
   62414             : #endif
   62415             :   }
   62416          34 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   62417          34 :   {
   62418             :     /* %typemap(freearg) (const char *utf8_path) */
   62419          34 :     GDALPythonFreeCStr(arg1, bToFree1);
   62420             :   }
   62421          34 :   {
   62422             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   62423             :     
   62424          34 :     CPLFree(psProgressInfo);
   62425             :     
   62426             :   }
   62427          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; } }
   62428             :   return resultobj;
   62429           0 : fail:
   62430           0 :   {
   62431             :     /* %typemap(freearg) (const char *utf8_path) */
   62432           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   62433             :   }
   62434           0 :   {
   62435             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   62436             :     
   62437           0 :     CPLFree(psProgressInfo);
   62438             :     
   62439             :   }
   62440             :   return NULL;
   62441             : }
   62442             : 
   62443             : 
   62444         171 : SWIGINTERN PyObject *_wrap_new_GDALBuildVRTOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62445         171 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   62446         171 :   char **arg1 = (char **) 0 ;
   62447         171 :   PyObject *swig_obj[1] ;
   62448         171 :   GDALBuildVRTOptions *result = 0 ;
   62449             :   
   62450         171 :   if (!args) SWIG_fail;
   62451         171 :   swig_obj[0] = args;
   62452         171 :   {
   62453             :     /* %typemap(in) char **dict */
   62454         171 :     arg1 = NULL;
   62455         171 :     if ( PySequence_Check( swig_obj[0] ) ) {
   62456         171 :       int bErr = FALSE;
   62457         171 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   62458         171 :       if ( bErr )
   62459             :       {
   62460           0 :         SWIG_fail;
   62461             :       }
   62462             :     }
   62463           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   62464           0 :       int bErr = FALSE;
   62465           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   62466           0 :       if ( bErr )
   62467             :       {
   62468           0 :         SWIG_fail;
   62469             :       }
   62470             :     }
   62471             :     else {
   62472           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   62473           0 :       SWIG_fail;
   62474             :     }
   62475             :   }
   62476         171 :   {
   62477         171 :     const int bLocalUseExceptions = GetUseExceptions();
   62478         171 :     if ( bLocalUseExceptions ) {
   62479         143 :       pushErrorHandler();
   62480             :     }
   62481         171 :     {
   62482         171 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   62483         171 :       result = (GDALBuildVRTOptions *)new_GDALBuildVRTOptions(arg1);
   62484         171 :       SWIG_PYTHON_THREAD_END_ALLOW;
   62485             :     }
   62486         171 :     if ( bLocalUseExceptions ) {
   62487         143 :       popErrorHandler();
   62488             :     }
   62489             : #ifndef SED_HACKS
   62490             :     if ( bLocalUseExceptions ) {
   62491             :       CPLErr eclass = CPLGetLastErrorType();
   62492             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   62493             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   62494             :       }
   62495             :     }
   62496             : #endif
   62497             :   }
   62498         171 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALBuildVRTOptions, SWIG_POINTER_NEW |  0 );
   62499         171 :   {
   62500             :     /* %typemap(freearg) char **dict */
   62501         171 :     CSLDestroy( arg1 );
   62502             :   }
   62503         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; } }
   62504             :   return resultobj;
   62505           0 : fail:
   62506           0 :   {
   62507             :     /* %typemap(freearg) char **dict */
   62508           0 :     CSLDestroy( arg1 );
   62509             :   }
   62510             :   return NULL;
   62511             : }
   62512             : 
   62513             : 
   62514         168 : SWIGINTERN PyObject *_wrap_delete_GDALBuildVRTOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62515         168 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   62516         168 :   GDALBuildVRTOptions *arg1 = (GDALBuildVRTOptions *) 0 ;
   62517         168 :   void *argp1 = 0 ;
   62518         168 :   int res1 = 0 ;
   62519         168 :   PyObject *swig_obj[1] ;
   62520             :   
   62521         168 :   if (!args) SWIG_fail;
   62522         168 :   swig_obj[0] = args;
   62523         168 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALBuildVRTOptions, SWIG_POINTER_DISOWN |  0 );
   62524         168 :   if (!SWIG_IsOK(res1)) {
   62525           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALBuildVRTOptions" "', argument " "1"" of type '" "GDALBuildVRTOptions *""'"); 
   62526             :   }
   62527         168 :   arg1 = reinterpret_cast< GDALBuildVRTOptions * >(argp1);
   62528         168 :   {
   62529         168 :     const int bLocalUseExceptions = GetUseExceptions();
   62530         168 :     if ( bLocalUseExceptions ) {
   62531         140 :       pushErrorHandler();
   62532             :     }
   62533         168 :     {
   62534         168 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   62535         168 :       delete_GDALBuildVRTOptions(arg1);
   62536         168 :       SWIG_PYTHON_THREAD_END_ALLOW;
   62537             :     }
   62538         168 :     if ( bLocalUseExceptions ) {
   62539         140 :       popErrorHandler();
   62540             :     }
   62541             : #ifndef SED_HACKS
   62542             :     if ( bLocalUseExceptions ) {
   62543             :       CPLErr eclass = CPLGetLastErrorType();
   62544             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   62545             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   62546             :       }
   62547             :     }
   62548             : #endif
   62549             :   }
   62550         168 :   resultobj = SWIG_Py_Void();
   62551         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; } }
   62552             :   return resultobj;
   62553             : fail:
   62554             :   return NULL;
   62555             : }
   62556             : 
   62557             : 
   62558         277 : SWIGINTERN PyObject *GDALBuildVRTOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62559         277 :   PyObject *obj;
   62560         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   62561         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALBuildVRTOptions, SWIG_NewClientData(obj));
   62562         277 :   return SWIG_Py_Void();
   62563             : }
   62564             : 
   62565         168 : SWIGINTERN PyObject *GDALBuildVRTOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62566         168 :   return SWIG_Python_InitShadowInstance(args);
   62567             : }
   62568             : 
   62569          68 : SWIGINTERN PyObject *_wrap_BuildVRTInternalObjects(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62570          68 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   62571          68 :   char *arg1 = (char *) 0 ;
   62572          68 :   int arg2 ;
   62573          68 :   GDALDatasetShadow **arg3 = (GDALDatasetShadow **) 0 ;
   62574          68 :   GDALBuildVRTOptions *arg4 = (GDALBuildVRTOptions *) 0 ;
   62575          68 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   62576          68 :   void *arg6 = (void *) NULL ;
   62577          68 :   int bToFree1 = 0 ;
   62578          68 :   void *argp4 = 0 ;
   62579          68 :   int res4 = 0 ;
   62580          68 :   PyObject *swig_obj[5] ;
   62581          68 :   GDALDatasetShadow *result = 0 ;
   62582             :   
   62583             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   62584          68 :   PyProgressData *psProgressInfo;
   62585          68 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   62586          68 :   psProgressInfo->nLastReported = -1;
   62587          68 :   psProgressInfo->psPyCallback = NULL;
   62588          68 :   psProgressInfo->psPyCallbackData = NULL;
   62589          68 :   arg6 = psProgressInfo;
   62590          68 :   if (!SWIG_Python_UnpackTuple(args, "BuildVRTInternalObjects", 3, 5, swig_obj)) SWIG_fail;
   62591          68 :   {
   62592             :     /* %typemap(in) (const char *utf8_path) */
   62593          68 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   62594             :     {
   62595          63 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   62596             :     }
   62597             :     else
   62598             :     {
   62599           5 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   62600             :       
   62601             :     }
   62602          68 :     if (arg1 == NULL)
   62603             :     {
   62604           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   62605           0 :       SWIG_fail;
   62606             :     }
   62607             :   }
   62608          68 :   {
   62609             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDatasetShadow *optional_##GDALDatasetShadow)*/
   62610          68 :     if ( !PySequence_Check(swig_obj[1]) ) {
   62611           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   62612           0 :       SWIG_fail;
   62613             :     }
   62614          68 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   62615          68 :     if( size > (Py_ssize_t)INT_MAX ) {
   62616           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   62617           0 :       SWIG_fail;
   62618             :     }
   62619          68 :     if( (size_t)size > SIZE_MAX / sizeof(GDALDatasetShadow*) ) {
   62620           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   62621           0 :       SWIG_fail;
   62622             :     }
   62623          68 :     arg2 = (int)size;
   62624          68 :     arg3 = (GDALDatasetShadow**) VSIMalloc(arg2*sizeof(GDALDatasetShadow*));
   62625          68 :     if( !arg3) {
   62626           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   62627           0 :       SWIG_fail;
   62628             :     }
   62629             :     
   62630        1171 :     for( int i = 0; i<arg2; i++ ) {
   62631        1103 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   62632        1103 :       GDALDatasetShadow* rawobjectpointer = NULL;
   62633        1103 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0 ));
   62634        1103 :       if (!rawobjectpointer) {
   62635           0 :         Py_DECREF(o);
   62636           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALDatasetShadow");
   62637           0 :         SWIG_fail;
   62638             :       }
   62639        1103 :       arg3[i] = rawobjectpointer;
   62640        1103 :       Py_DECREF(o);
   62641             :       
   62642             :     }
   62643             :   }
   62644          68 :   res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_GDALBuildVRTOptions, 0 |  0 );
   62645          68 :   if (!SWIG_IsOK(res4)) {
   62646           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BuildVRTInternalObjects" "', argument " "4"" of type '" "GDALBuildVRTOptions *""'"); 
   62647             :   }
   62648          68 :   arg4 = reinterpret_cast< GDALBuildVRTOptions * >(argp4);
   62649          68 :   if (swig_obj[3]) {
   62650          68 :     {
   62651             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   62652             :       /* callback_func typemap */
   62653             :       
   62654             :       /* In some cases 0 is passed instead of None. */
   62655             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   62656          68 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   62657             :       {
   62658           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   62659             :         {
   62660           0 :           swig_obj[3] = Py_None;
   62661             :         }
   62662             :       }
   62663             :       
   62664          68 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   62665           0 :         void* cbfunction = NULL;
   62666           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   62667             :             (void**)&cbfunction,
   62668             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   62669             :             SWIG_POINTER_EXCEPTION | 0 ));
   62670             :         
   62671           0 :         if ( cbfunction == GDALTermProgress ) {
   62672             :           arg5 = GDALTermProgress;
   62673             :         } else {
   62674           0 :           if (!PyCallable_Check(swig_obj[3])) {
   62675           0 :             PyErr_SetString( PyExc_RuntimeError,
   62676             :               "Object given is not a Python function" );
   62677           0 :             SWIG_fail;
   62678             :           }
   62679           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   62680           0 :           arg5 = PyProgressProxy;
   62681             :         }
   62682             :         
   62683             :       }
   62684             :       
   62685             :     }
   62686             :   }
   62687          68 :   if (swig_obj[4]) {
   62688          68 :     {
   62689             :       /* %typemap(in) ( void* callback_data=NULL)  */
   62690          68 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   62691             :     }
   62692             :   }
   62693          68 :   {
   62694          68 :     if (!arg1) {
   62695          68 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   62696             :     }
   62697             :   }
   62698          68 :   {
   62699          68 :     const int bLocalUseExceptions = GetUseExceptions();
   62700          68 :     if ( bLocalUseExceptions ) {
   62701          55 :       pushErrorHandler();
   62702             :     }
   62703          68 :     {
   62704          68 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   62705          68 :       result = (GDALDatasetShadow *)wrapper_GDALBuildVRT_objects((char const *)arg1,arg2,arg3,arg4,arg5,arg6);
   62706          68 :       SWIG_PYTHON_THREAD_END_ALLOW;
   62707             :     }
   62708          68 :     if ( bLocalUseExceptions ) {
   62709          55 :       popErrorHandler();
   62710             :     }
   62711             : #ifndef SED_HACKS
   62712             :     if ( bLocalUseExceptions ) {
   62713             :       CPLErr eclass = CPLGetLastErrorType();
   62714             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   62715             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   62716             :       }
   62717             :     }
   62718             : #endif
   62719             :   }
   62720          68 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   62721          68 :   {
   62722             :     /* %typemap(freearg) (const char *utf8_path) */
   62723          68 :     GDALPythonFreeCStr(arg1, bToFree1);
   62724             :   }
   62725          68 :   {
   62726             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   62727          68 :     CPLFree( arg3 );
   62728             :   }
   62729          68 :   {
   62730             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   62731             :     
   62732          68 :     CPLFree(psProgressInfo);
   62733             :     
   62734             :   }
   62735          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; } }
   62736             :   return resultobj;
   62737           0 : fail:
   62738           0 :   {
   62739             :     /* %typemap(freearg) (const char *utf8_path) */
   62740           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   62741             :   }
   62742           0 :   {
   62743             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   62744           0 :     CPLFree( arg3 );
   62745             :   }
   62746           0 :   {
   62747             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   62748             :     
   62749           0 :     CPLFree(psProgressInfo);
   62750             :     
   62751             :   }
   62752             :   return NULL;
   62753             : }
   62754             : 
   62755             : 
   62756         100 : SWIGINTERN PyObject *_wrap_BuildVRTInternalNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62757         100 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   62758         100 :   char *arg1 = (char *) 0 ;
   62759         100 :   char **arg2 = (char **) 0 ;
   62760         100 :   GDALBuildVRTOptions *arg3 = (GDALBuildVRTOptions *) 0 ;
   62761         100 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   62762         100 :   void *arg5 = (void *) NULL ;
   62763         100 :   int bToFree1 = 0 ;
   62764         100 :   void *argp3 = 0 ;
   62765         100 :   int res3 = 0 ;
   62766         100 :   PyObject *swig_obj[5] ;
   62767         100 :   GDALDatasetShadow *result = 0 ;
   62768             :   
   62769             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   62770         100 :   PyProgressData *psProgressInfo;
   62771         100 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   62772         100 :   psProgressInfo->nLastReported = -1;
   62773         100 :   psProgressInfo->psPyCallback = NULL;
   62774         100 :   psProgressInfo->psPyCallbackData = NULL;
   62775         100 :   arg5 = psProgressInfo;
   62776         100 :   if (!SWIG_Python_UnpackTuple(args, "BuildVRTInternalNames", 3, 5, swig_obj)) SWIG_fail;
   62777         100 :   {
   62778             :     /* %typemap(in) (const char *utf8_path) */
   62779         100 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   62780             :     {
   62781          93 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   62782             :     }
   62783             :     else
   62784             :     {
   62785           7 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   62786             :       
   62787             :     }
   62788         100 :     if (arg1 == NULL)
   62789             :     {
   62790           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   62791           0 :       SWIG_fail;
   62792             :     }
   62793             :   }
   62794         100 :   {
   62795             :     /* %typemap(in) char **dict */
   62796         100 :     arg2 = NULL;
   62797         100 :     if ( PySequence_Check( swig_obj[1] ) ) {
   62798         100 :       int bErr = FALSE;
   62799         100 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   62800         100 :       if ( bErr )
   62801             :       {
   62802           0 :         SWIG_fail;
   62803             :       }
   62804             :     }
   62805           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   62806           0 :       int bErr = FALSE;
   62807           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   62808           0 :       if ( bErr )
   62809             :       {
   62810           0 :         SWIG_fail;
   62811             :       }
   62812             :     }
   62813             :     else {
   62814           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   62815           0 :       SWIG_fail;
   62816             :     }
   62817             :   }
   62818         100 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALBuildVRTOptions, 0 |  0 );
   62819         100 :   if (!SWIG_IsOK(res3)) {
   62820           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BuildVRTInternalNames" "', argument " "3"" of type '" "GDALBuildVRTOptions *""'"); 
   62821             :   }
   62822         100 :   arg3 = reinterpret_cast< GDALBuildVRTOptions * >(argp3);
   62823         100 :   if (swig_obj[3]) {
   62824         100 :     {
   62825             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   62826             :       /* callback_func typemap */
   62827             :       
   62828             :       /* In some cases 0 is passed instead of None. */
   62829             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   62830         100 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   62831             :       {
   62832           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   62833             :         {
   62834           0 :           swig_obj[3] = Py_None;
   62835             :         }
   62836             :       }
   62837             :       
   62838         100 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   62839           1 :         void* cbfunction = NULL;
   62840           1 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   62841             :             (void**)&cbfunction,
   62842             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   62843             :             SWIG_POINTER_EXCEPTION | 0 ));
   62844             :         
   62845           1 :         if ( cbfunction == GDALTermProgress ) {
   62846             :           arg4 = GDALTermProgress;
   62847             :         } else {
   62848           1 :           if (!PyCallable_Check(swig_obj[3])) {
   62849           0 :             PyErr_SetString( PyExc_RuntimeError,
   62850             :               "Object given is not a Python function" );
   62851           0 :             SWIG_fail;
   62852             :           }
   62853           1 :           psProgressInfo->psPyCallback = swig_obj[3];
   62854           1 :           arg4 = PyProgressProxy;
   62855             :         }
   62856             :         
   62857             :       }
   62858             :       
   62859             :     }
   62860             :   }
   62861         100 :   if (swig_obj[4]) {
   62862         100 :     {
   62863             :       /* %typemap(in) ( void* callback_data=NULL)  */
   62864         100 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   62865             :     }
   62866             :   }
   62867         100 :   {
   62868         100 :     if (!arg1) {
   62869         100 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   62870             :     }
   62871             :   }
   62872         100 :   {
   62873         100 :     const int bLocalUseExceptions = GetUseExceptions();
   62874         100 :     if ( bLocalUseExceptions ) {
   62875          85 :       pushErrorHandler();
   62876             :     }
   62877         100 :     {
   62878         100 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   62879         100 :       result = (GDALDatasetShadow *)wrapper_GDALBuildVRT_names((char const *)arg1,arg2,arg3,arg4,arg5);
   62880         100 :       SWIG_PYTHON_THREAD_END_ALLOW;
   62881             :     }
   62882         100 :     if ( bLocalUseExceptions ) {
   62883          85 :       popErrorHandler();
   62884             :     }
   62885             : #ifndef SED_HACKS
   62886             :     if ( bLocalUseExceptions ) {
   62887             :       CPLErr eclass = CPLGetLastErrorType();
   62888             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   62889             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   62890             :       }
   62891             :     }
   62892             : #endif
   62893             :   }
   62894         100 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   62895         100 :   {
   62896             :     /* %typemap(freearg) (const char *utf8_path) */
   62897         100 :     GDALPythonFreeCStr(arg1, bToFree1);
   62898             :   }
   62899         100 :   {
   62900             :     /* %typemap(freearg) char **dict */
   62901         100 :     CSLDestroy( arg2 );
   62902             :   }
   62903         100 :   {
   62904             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   62905             :     
   62906         100 :     CPLFree(psProgressInfo);
   62907             :     
   62908             :   }
   62909         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; } }
   62910             :   return resultobj;
   62911           0 : fail:
   62912           0 :   {
   62913             :     /* %typemap(freearg) (const char *utf8_path) */
   62914           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   62915             :   }
   62916           0 :   {
   62917             :     /* %typemap(freearg) char **dict */
   62918           0 :     CSLDestroy( arg2 );
   62919             :   }
   62920           0 :   {
   62921             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   62922             :     
   62923           0 :     CPLFree(psProgressInfo);
   62924             :     
   62925             :   }
   62926             :   return NULL;
   62927             : }
   62928             : 
   62929             : 
   62930          23 : SWIGINTERN PyObject *_wrap_new_GDALTileIndexOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   62931          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   62932          23 :   char **arg1 = (char **) 0 ;
   62933          23 :   PyObject *swig_obj[1] ;
   62934          23 :   GDALTileIndexOptions *result = 0 ;
   62935             :   
   62936          23 :   if (!args) SWIG_fail;
   62937          23 :   swig_obj[0] = args;
   62938          23 :   {
   62939             :     /* %typemap(in) char **dict */
   62940          23 :     arg1 = NULL;
   62941          23 :     if ( PySequence_Check( swig_obj[0] ) ) {
   62942          23 :       int bErr = FALSE;
   62943          23 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   62944          23 :       if ( bErr )
   62945             :       {
   62946           0 :         SWIG_fail;
   62947             :       }
   62948             :     }
   62949           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   62950           0 :       int bErr = FALSE;
   62951           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   62952           0 :       if ( bErr )
   62953             :       {
   62954           0 :         SWIG_fail;
   62955             :       }
   62956             :     }
   62957             :     else {
   62958           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   62959           0 :       SWIG_fail;
   62960             :     }
   62961             :   }
   62962          23 :   {
   62963          23 :     const int bLocalUseExceptions = GetUseExceptions();
   62964          23 :     if ( bLocalUseExceptions ) {
   62965          23 :       pushErrorHandler();
   62966             :     }
   62967          23 :     {
   62968          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   62969          23 :       result = (GDALTileIndexOptions *)new_GDALTileIndexOptions(arg1);
   62970          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   62971             :     }
   62972          23 :     if ( bLocalUseExceptions ) {
   62973          23 :       popErrorHandler();
   62974             :     }
   62975             : #ifndef SED_HACKS
   62976             :     if ( bLocalUseExceptions ) {
   62977             :       CPLErr eclass = CPLGetLastErrorType();
   62978             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   62979             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   62980             :       }
   62981             :     }
   62982             : #endif
   62983             :   }
   62984          23 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALTileIndexOptions, SWIG_POINTER_NEW |  0 );
   62985          23 :   {
   62986             :     /* %typemap(freearg) char **dict */
   62987          23 :     CSLDestroy( arg1 );
   62988             :   }
   62989          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; } }
   62990             :   return resultobj;
   62991           0 : fail:
   62992           0 :   {
   62993             :     /* %typemap(freearg) char **dict */
   62994           0 :     CSLDestroy( arg1 );
   62995             :   }
   62996             :   return NULL;
   62997             : }
   62998             : 
   62999             : 
   63000          23 : SWIGINTERN PyObject *_wrap_delete_GDALTileIndexOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63001          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   63002          23 :   GDALTileIndexOptions *arg1 = (GDALTileIndexOptions *) 0 ;
   63003          23 :   void *argp1 = 0 ;
   63004          23 :   int res1 = 0 ;
   63005          23 :   PyObject *swig_obj[1] ;
   63006             :   
   63007          23 :   if (!args) SWIG_fail;
   63008          23 :   swig_obj[0] = args;
   63009          23 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALTileIndexOptions, SWIG_POINTER_DISOWN |  0 );
   63010          23 :   if (!SWIG_IsOK(res1)) {
   63011           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALTileIndexOptions" "', argument " "1"" of type '" "GDALTileIndexOptions *""'"); 
   63012             :   }
   63013          23 :   arg1 = reinterpret_cast< GDALTileIndexOptions * >(argp1);
   63014          23 :   {
   63015          23 :     const int bLocalUseExceptions = GetUseExceptions();
   63016          23 :     if ( bLocalUseExceptions ) {
   63017          23 :       pushErrorHandler();
   63018             :     }
   63019          23 :     {
   63020          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   63021          23 :       delete_GDALTileIndexOptions(arg1);
   63022          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   63023             :     }
   63024          23 :     if ( bLocalUseExceptions ) {
   63025          23 :       popErrorHandler();
   63026             :     }
   63027             : #ifndef SED_HACKS
   63028             :     if ( bLocalUseExceptions ) {
   63029             :       CPLErr eclass = CPLGetLastErrorType();
   63030             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   63031             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   63032             :       }
   63033             :     }
   63034             : #endif
   63035             :   }
   63036          23 :   resultobj = SWIG_Py_Void();
   63037          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; } }
   63038             :   return resultobj;
   63039             : fail:
   63040             :   return NULL;
   63041             : }
   63042             : 
   63043             : 
   63044         277 : SWIGINTERN PyObject *GDALTileIndexOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63045         277 :   PyObject *obj;
   63046         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   63047         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALTileIndexOptions, SWIG_NewClientData(obj));
   63048         277 :   return SWIG_Py_Void();
   63049             : }
   63050             : 
   63051          23 : SWIGINTERN PyObject *GDALTileIndexOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63052          23 :   return SWIG_Python_InitShadowInstance(args);
   63053             : }
   63054             : 
   63055          23 : SWIGINTERN PyObject *_wrap_TileIndexInternalNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63056          23 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   63057          23 :   char *arg1 = (char *) 0 ;
   63058          23 :   char **arg2 = (char **) 0 ;
   63059          23 :   GDALTileIndexOptions *arg3 = (GDALTileIndexOptions *) 0 ;
   63060          23 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   63061          23 :   void *arg5 = (void *) NULL ;
   63062          23 :   int bToFree1 = 0 ;
   63063          23 :   void *argp3 = 0 ;
   63064          23 :   int res3 = 0 ;
   63065          23 :   PyObject *swig_obj[5] ;
   63066          23 :   GDALDatasetShadow *result = 0 ;
   63067             :   
   63068             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   63069          23 :   PyProgressData *psProgressInfo;
   63070          23 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   63071          23 :   psProgressInfo->nLastReported = -1;
   63072          23 :   psProgressInfo->psPyCallback = NULL;
   63073          23 :   psProgressInfo->psPyCallbackData = NULL;
   63074          23 :   arg5 = psProgressInfo;
   63075          23 :   if (!SWIG_Python_UnpackTuple(args, "TileIndexInternalNames", 3, 5, swig_obj)) SWIG_fail;
   63076          23 :   {
   63077             :     /* %typemap(in) (const char *utf8_path) */
   63078          23 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   63079             :     {
   63080          23 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   63081             :     }
   63082             :     else
   63083             :     {
   63084           0 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   63085             :       
   63086             :     }
   63087          23 :     if (arg1 == NULL)
   63088             :     {
   63089           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   63090           0 :       SWIG_fail;
   63091             :     }
   63092             :   }
   63093          23 :   {
   63094             :     /* %typemap(in) char **dict */
   63095          23 :     arg2 = NULL;
   63096          23 :     if ( PySequence_Check( swig_obj[1] ) ) {
   63097          23 :       int bErr = FALSE;
   63098          23 :       arg2 = CSLFromPySequence(swig_obj[1], &bErr);
   63099          23 :       if ( bErr )
   63100             :       {
   63101           0 :         SWIG_fail;
   63102             :       }
   63103             :     }
   63104           0 :     else if ( PyMapping_Check( swig_obj[1] ) ) {
   63105           0 :       int bErr = FALSE;
   63106           0 :       arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
   63107           0 :       if ( bErr )
   63108             :       {
   63109           0 :         SWIG_fail;
   63110             :       }
   63111             :     }
   63112             :     else {
   63113           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   63114           0 :       SWIG_fail;
   63115             :     }
   63116             :   }
   63117          23 :   res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_GDALTileIndexOptions, 0 |  0 );
   63118          23 :   if (!SWIG_IsOK(res3)) {
   63119           0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "TileIndexInternalNames" "', argument " "3"" of type '" "GDALTileIndexOptions *""'"); 
   63120             :   }
   63121          23 :   arg3 = reinterpret_cast< GDALTileIndexOptions * >(argp3);
   63122          23 :   if (swig_obj[3]) {
   63123          23 :     {
   63124             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   63125             :       /* callback_func typemap */
   63126             :       
   63127             :       /* In some cases 0 is passed instead of None. */
   63128             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   63129          23 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   63130             :       {
   63131           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   63132             :         {
   63133           0 :           swig_obj[3] = Py_None;
   63134             :         }
   63135             :       }
   63136             :       
   63137          23 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   63138           0 :         void* cbfunction = NULL;
   63139           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   63140             :             (void**)&cbfunction,
   63141             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   63142             :             SWIG_POINTER_EXCEPTION | 0 ));
   63143             :         
   63144           0 :         if ( cbfunction == GDALTermProgress ) {
   63145             :           arg4 = GDALTermProgress;
   63146             :         } else {
   63147           0 :           if (!PyCallable_Check(swig_obj[3])) {
   63148           0 :             PyErr_SetString( PyExc_RuntimeError,
   63149             :               "Object given is not a Python function" );
   63150           0 :             SWIG_fail;
   63151             :           }
   63152           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   63153           0 :           arg4 = PyProgressProxy;
   63154             :         }
   63155             :         
   63156             :       }
   63157             :       
   63158             :     }
   63159             :   }
   63160          23 :   if (swig_obj[4]) {
   63161          23 :     {
   63162             :       /* %typemap(in) ( void* callback_data=NULL)  */
   63163          23 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   63164             :     }
   63165             :   }
   63166          23 :   {
   63167          23 :     if (!arg1) {
   63168          23 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   63169             :     }
   63170             :   }
   63171          23 :   {
   63172          23 :     const int bLocalUseExceptions = GetUseExceptions();
   63173          23 :     if ( bLocalUseExceptions ) {
   63174          23 :       pushErrorHandler();
   63175             :     }
   63176          23 :     {
   63177          23 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   63178          23 :       result = (GDALDatasetShadow *)wrapper_TileIndex_names((char const *)arg1,arg2,arg3,arg4,arg5);
   63179          23 :       SWIG_PYTHON_THREAD_END_ALLOW;
   63180             :     }
   63181          23 :     if ( bLocalUseExceptions ) {
   63182          23 :       popErrorHandler();
   63183             :     }
   63184             : #ifndef SED_HACKS
   63185             :     if ( bLocalUseExceptions ) {
   63186             :       CPLErr eclass = CPLGetLastErrorType();
   63187             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   63188             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   63189             :       }
   63190             :     }
   63191             : #endif
   63192             :   }
   63193          23 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   63194          23 :   {
   63195             :     /* %typemap(freearg) (const char *utf8_path) */
   63196          23 :     GDALPythonFreeCStr(arg1, bToFree1);
   63197             :   }
   63198          23 :   {
   63199             :     /* %typemap(freearg) char **dict */
   63200          23 :     CSLDestroy( arg2 );
   63201             :   }
   63202          23 :   {
   63203             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   63204             :     
   63205          23 :     CPLFree(psProgressInfo);
   63206             :     
   63207             :   }
   63208          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; } }
   63209             :   return resultobj;
   63210           0 : fail:
   63211           0 :   {
   63212             :     /* %typemap(freearg) (const char *utf8_path) */
   63213           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   63214             :   }
   63215           0 :   {
   63216             :     /* %typemap(freearg) char **dict */
   63217           0 :     CSLDestroy( arg2 );
   63218             :   }
   63219           0 :   {
   63220             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   63221             :     
   63222           0 :     CPLFree(psProgressInfo);
   63223             :     
   63224             :   }
   63225             :   return NULL;
   63226             : }
   63227             : 
   63228             : 
   63229         104 : SWIGINTERN PyObject *_wrap_new_GDALMultiDimTranslateOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63230         104 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   63231         104 :   char **arg1 = (char **) 0 ;
   63232         104 :   PyObject *swig_obj[1] ;
   63233         104 :   GDALMultiDimTranslateOptions *result = 0 ;
   63234             :   
   63235         104 :   if (!args) SWIG_fail;
   63236         104 :   swig_obj[0] = args;
   63237         104 :   {
   63238             :     /* %typemap(in) char **dict */
   63239         104 :     arg1 = NULL;
   63240         104 :     if ( PySequence_Check( swig_obj[0] ) ) {
   63241         104 :       int bErr = FALSE;
   63242         104 :       arg1 = CSLFromPySequence(swig_obj[0], &bErr);
   63243         104 :       if ( bErr )
   63244             :       {
   63245           0 :         SWIG_fail;
   63246             :       }
   63247             :     }
   63248           0 :     else if ( PyMapping_Check( swig_obj[0] ) ) {
   63249           0 :       int bErr = FALSE;
   63250           0 :       arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
   63251           0 :       if ( bErr )
   63252             :       {
   63253           0 :         SWIG_fail;
   63254             :       }
   63255             :     }
   63256             :     else {
   63257           0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
   63258           0 :       SWIG_fail;
   63259             :     }
   63260             :   }
   63261         104 :   {
   63262         104 :     const int bLocalUseExceptions = GetUseExceptions();
   63263         104 :     if ( bLocalUseExceptions ) {
   63264          25 :       pushErrorHandler();
   63265             :     }
   63266         104 :     {
   63267         104 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   63268         104 :       result = (GDALMultiDimTranslateOptions *)new_GDALMultiDimTranslateOptions(arg1);
   63269         104 :       SWIG_PYTHON_THREAD_END_ALLOW;
   63270             :     }
   63271         104 :     if ( bLocalUseExceptions ) {
   63272          25 :       popErrorHandler();
   63273             :     }
   63274             : #ifndef SED_HACKS
   63275             :     if ( bLocalUseExceptions ) {
   63276             :       CPLErr eclass = CPLGetLastErrorType();
   63277             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   63278             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   63279             :       }
   63280             :     }
   63281             : #endif
   63282             :   }
   63283         104 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALMultiDimTranslateOptions, SWIG_POINTER_NEW |  0 );
   63284         104 :   {
   63285             :     /* %typemap(freearg) char **dict */
   63286         104 :     CSLDestroy( arg1 );
   63287             :   }
   63288         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; } }
   63289             :   return resultobj;
   63290           0 : fail:
   63291           0 :   {
   63292             :     /* %typemap(freearg) char **dict */
   63293           0 :     CSLDestroy( arg1 );
   63294             :   }
   63295             :   return NULL;
   63296             : }
   63297             : 
   63298             : 
   63299         104 : SWIGINTERN PyObject *_wrap_delete_GDALMultiDimTranslateOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63300         104 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   63301         104 :   GDALMultiDimTranslateOptions *arg1 = (GDALMultiDimTranslateOptions *) 0 ;
   63302         104 :   void *argp1 = 0 ;
   63303         104 :   int res1 = 0 ;
   63304         104 :   PyObject *swig_obj[1] ;
   63305             :   
   63306         104 :   if (!args) SWIG_fail;
   63307         104 :   swig_obj[0] = args;
   63308         104 :   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMultiDimTranslateOptions, SWIG_POINTER_DISOWN |  0 );
   63309         104 :   if (!SWIG_IsOK(res1)) {
   63310           0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GDALMultiDimTranslateOptions" "', argument " "1"" of type '" "GDALMultiDimTranslateOptions *""'"); 
   63311             :   }
   63312         104 :   arg1 = reinterpret_cast< GDALMultiDimTranslateOptions * >(argp1);
   63313         104 :   {
   63314         104 :     const int bLocalUseExceptions = GetUseExceptions();
   63315         104 :     if ( bLocalUseExceptions ) {
   63316          25 :       pushErrorHandler();
   63317             :     }
   63318         104 :     {
   63319         104 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   63320         104 :       delete_GDALMultiDimTranslateOptions(arg1);
   63321         104 :       SWIG_PYTHON_THREAD_END_ALLOW;
   63322             :     }
   63323         104 :     if ( bLocalUseExceptions ) {
   63324          25 :       popErrorHandler();
   63325             :     }
   63326             : #ifndef SED_HACKS
   63327             :     if ( bLocalUseExceptions ) {
   63328             :       CPLErr eclass = CPLGetLastErrorType();
   63329             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   63330             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   63331             :       }
   63332             :     }
   63333             : #endif
   63334             :   }
   63335         104 :   resultobj = SWIG_Py_Void();
   63336         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; } }
   63337             :   return resultobj;
   63338             : fail:
   63339             :   return NULL;
   63340             : }
   63341             : 
   63342             : 
   63343         277 : SWIGINTERN PyObject *GDALMultiDimTranslateOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63344         277 :   PyObject *obj;
   63345         277 :   if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
   63346         277 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALMultiDimTranslateOptions, SWIG_NewClientData(obj));
   63347         277 :   return SWIG_Py_Void();
   63348             : }
   63349             : 
   63350         104 : SWIGINTERN PyObject *GDALMultiDimTranslateOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63351         104 :   return SWIG_Python_InitShadowInstance(args);
   63352             : }
   63353             : 
   63354         104 : SWIGINTERN PyObject *_wrap_wrapper_GDALMultiDimTranslateDestName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   63355         104 :   PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
   63356         104 :   char *arg1 = (char *) 0 ;
   63357         104 :   int arg2 ;
   63358         104 :   GDALDatasetShadow **arg3 = (GDALDatasetShadow **) 0 ;
   63359         104 :   GDALMultiDimTranslateOptions *arg4 = (GDALMultiDimTranslateOptions *) 0 ;
   63360         104 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   63361         104 :   void *arg6 = (void *) NULL ;
   63362         104 :   int bToFree1 = 0 ;
   63363         104 :   void *argp4 = 0 ;
   63364         104 :   int res4 = 0 ;
   63365         104 :   PyObject *swig_obj[5] ;
   63366         104 :   GDALDatasetShadow *result = 0 ;
   63367             :   
   63368             :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   63369         104 :   PyProgressData *psProgressInfo;
   63370         104 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   63371         104 :   psProgressInfo->nLastReported = -1;
   63372         104 :   psProgressInfo->psPyCallback = NULL;
   63373         104 :   psProgressInfo->psPyCallbackData = NULL;
   63374         104 :   arg6 = psProgressInfo;
   63375         104 :   if (!SWIG_Python_UnpackTuple(args, "wrapper_GDALMultiDimTranslateDestName", 3, 5, swig_obj)) SWIG_fail;
   63376         104 :   {
   63377             :     /* %typemap(in) (const char *utf8_path) */
   63378         104 :     if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
   63379             :     {
   63380           7 :       arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
   63381             :     }
   63382             :     else
   63383             :     {
   63384          97 :       arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
   63385             :       
   63386             :     }
   63387         104 :     if (arg1 == NULL)
   63388             :     {
   63389           0 :       PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
   63390           0 :       SWIG_fail;
   63391             :     }
   63392             :   }
   63393         104 :   {
   63394             :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALDatasetShadow *optional_##GDALDatasetShadow)*/
   63395         104 :     if ( !PySequence_Check(swig_obj[1]) ) {
   63396           0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   63397           0 :       SWIG_fail;
   63398             :     }
   63399         104 :     Py_ssize_t size = PySequence_Size(swig_obj[1]);
   63400         104 :     if( size > (Py_ssize_t)INT_MAX ) {
   63401           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   63402           0 :       SWIG_fail;
   63403             :     }
   63404         104 :     if( (size_t)size > SIZE_MAX / sizeof(GDALDatasetShadow*) ) {
   63405           0 :       PyErr_SetString(PyExc_TypeError, "too big sequence");
   63406           0 :       SWIG_fail;
   63407             :     }
   63408         104 :     arg2 = (int)size;
   63409         104 :     arg3 = (GDALDatasetShadow**) VSIMalloc(arg2*sizeof(GDALDatasetShadow*));
   63410         104 :     if( !arg3) {
   63411           0 :       PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
   63412           0 :       SWIG_fail;
   63413             :     }
   63414             :     
   63415         208 :     for( int i = 0; i<arg2; i++ ) {
   63416         104 :       PyObject *o = PySequence_GetItem(swig_obj[1],i);
   63417         104 :       GDALDatasetShadow* rawobjectpointer = NULL;
   63418         104 :       CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( o, (void**)&rawobjectpointer, SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_EXCEPTION | 0 ));
   63419         104 :       if (!rawobjectpointer) {
   63420           0 :         Py_DECREF(o);
   63421           0 :         PyErr_SetString(PyExc_TypeError, "object of wrong GDALDatasetShadow");
   63422           0 :         SWIG_fail;
   63423             :       }
   63424         104 :       arg3[i] = rawobjectpointer;
   63425         104 :       Py_DECREF(o);
   63426             :       
   63427             :     }
   63428             :   }
   63429         104 :   res4 = SWIG_ConvertPtr(swig_obj[2], &argp4,SWIGTYPE_p_GDALMultiDimTranslateOptions, 0 |  0 );
   63430         104 :   if (!SWIG_IsOK(res4)) {
   63431           0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "wrapper_GDALMultiDimTranslateDestName" "', argument " "4"" of type '" "GDALMultiDimTranslateOptions *""'"); 
   63432             :   }
   63433         104 :   arg4 = reinterpret_cast< GDALMultiDimTranslateOptions * >(argp4);
   63434         104 :   if (swig_obj[3]) {
   63435         104 :     {
   63436             :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   63437             :       /* callback_func typemap */
   63438             :       
   63439             :       /* In some cases 0 is passed instead of None. */
   63440             :       /* See https://github.com/OSGeo/gdal/pull/219 */
   63441         104 :       if ( PyLong_Check(swig_obj[3]) || PyInt_Check(swig_obj[3]) )
   63442             :       {
   63443           0 :         if( PyLong_AsLong(swig_obj[3]) == 0 )
   63444             :         {
   63445           0 :           swig_obj[3] = Py_None;
   63446             :         }
   63447             :       }
   63448             :       
   63449         104 :       if (swig_obj[3] && swig_obj[3] != Py_None ) {
   63450           0 :         void* cbfunction = NULL;
   63451           0 :         CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( swig_obj[3],
   63452             :             (void**)&cbfunction,
   63453             :             SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
   63454             :             SWIG_POINTER_EXCEPTION | 0 ));
   63455             :         
   63456           0 :         if ( cbfunction == GDALTermProgress ) {
   63457             :           arg5 = GDALTermProgress;
   63458             :         } else {
   63459           0 :           if (!PyCallable_Check(swig_obj[3])) {
   63460           0 :             PyErr_SetString( PyExc_RuntimeError,
   63461             :               "Object given is not a Python function" );
   63462           0 :             SWIG_fail;
   63463             :           }
   63464           0 :           psProgressInfo->psPyCallback = swig_obj[3];
   63465           0 :           arg5 = PyProgressProxy;
   63466             :         }
   63467             :         
   63468             :       }
   63469             :       
   63470             :     }
   63471             :   }
   63472         104 :   if (swig_obj[4]) {
   63473         104 :     {
   63474             :       /* %typemap(in) ( void* callback_data=NULL)  */
   63475         104 :       psProgressInfo->psPyCallbackData = swig_obj[4] ;
   63476             :     }
   63477             :   }
   63478         104 :   {
   63479         104 :     if (!arg1) {
   63480         104 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   63481             :     }
   63482             :   }
   63483         104 :   {
   63484         104 :     const int bLocalUseExceptions = GetUseExceptions();
   63485         104 :     if ( bLocalUseExceptions ) {
   63486          25 :       pushErrorHandler();
   63487             :     }
   63488         104 :     {
   63489         104 :       SWIG_PYTHON_THREAD_BEGIN_ALLOW;
   63490         104 :       result = (GDALDatasetShadow *)wrapper_GDALMultiDimTranslateDestName((char const *)arg1,arg2,arg3,arg4,arg5,arg6);
   63491         104 :       SWIG_PYTHON_THREAD_END_ALLOW;
   63492             :     }
   63493         104 :     if ( bLocalUseExceptions ) {
   63494          25 :       popErrorHandler();
   63495             :     }
   63496             : #ifndef SED_HACKS
   63497             :     if ( bLocalUseExceptions ) {
   63498             :       CPLErr eclass = CPLGetLastErrorType();
   63499             :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   63500             :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   63501             :       }
   63502             :     }
   63503             : #endif
   63504             :   }
   63505         104 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   63506         104 :   {
   63507             :     /* %typemap(freearg) (const char *utf8_path) */
   63508         104 :     GDALPythonFreeCStr(arg1, bToFree1);
   63509             :   }
   63510         104 :   {
   63511             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   63512         104 :     CPLFree( arg3 );
   63513             :   }
   63514         104 :   {
   63515             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   63516             :     
   63517         104 :     CPLFree(psProgressInfo);
   63518             :     
   63519             :   }
   63520         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; } }
   63521             :   return resultobj;
   63522           0 : fail:
   63523           0 :   {
   63524             :     /* %typemap(freearg) (const char *utf8_path) */
   63525           0 :     GDALPythonFreeCStr(arg1, bToFree1);
   63526             :   }
   63527           0 :   {
   63528             :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALDatasetShadow **poObjects)*/
   63529           0 :     CPLFree( arg3 );
   63530             :   }
   63531           0 :   {
   63532             :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   63533             :     
   63534           0 :     CPLFree(psProgressInfo);
   63535             :     
   63536             :   }
   63537             :   return NULL;
   63538             : }
   63539             : 
   63540             : 
   63541             : static PyMethodDef SwigMethods[] = {
   63542             :    { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL},
   63543             :    { "GetUseExceptions", _wrap_GetUseExceptions, METH_NOARGS, "GetUseExceptions() -> int"},
   63544             :    { "_GetExceptionsLocal", _wrap__GetExceptionsLocal, METH_NOARGS, "_GetExceptionsLocal() -> int"},
   63545             :    { "_SetExceptionsLocal", _wrap__SetExceptionsLocal, METH_O, "_SetExceptionsLocal(int bVal)"},
   63546             :    { "_UseExceptions", _wrap__UseExceptions, METH_NOARGS, "_UseExceptions()"},
   63547             :    { "_DontUseExceptions", _wrap__DontUseExceptions, METH_NOARGS, "_DontUseExceptions()"},
   63548             :    { "_UserHasSpecifiedIfUsingExceptions", _wrap__UserHasSpecifiedIfUsingExceptions, METH_NOARGS, "_UserHasSpecifiedIfUsingExceptions() -> int"},
   63549             :    { "VSIFReadL", _wrap_VSIFReadL, METH_VARARGS, "VSIFReadL(unsigned int nMembSize, unsigned int nMembCount, VSILFILE fp) -> unsigned int"},
   63550             :    { "VSIGetMemFileBuffer_unsafe", _wrap_VSIGetMemFileBuffer_unsafe, METH_O, "VSIGetMemFileBuffer_unsafe(char const * utf8_path)"},
   63551             :    { "Debug", _wrap_Debug, METH_VARARGS, "Debug(char const * msg_class, char const * message)"},
   63552             :    { "SetErrorHandler", _wrap_SetErrorHandler, METH_VARARGS, "SetErrorHandler(CPLErrorHandler pfnErrorHandler=0) -> CPLErr"},
   63553             :    { "SetCurrentErrorHandlerCatchDebug", _wrap_SetCurrentErrorHandlerCatchDebug, METH_O, "SetCurrentErrorHandlerCatchDebug(int bCatchDebug)"},
   63554             :    { "PushErrorHandler", _wrap_PushErrorHandler, METH_VARARGS, "PushErrorHandler(CPLErrorHandler pfnErrorHandler=0) -> CPLErr"},
   63555             :    { "PopErrorHandler", _wrap_PopErrorHandler, METH_NOARGS, "PopErrorHandler()"},
   63556             :    { "Error", _wrap_Error, METH_VARARGS, "Error(CPLErr msg_class=CE_Failure, int err_code=0, char const * msg=\"error\")"},
   63557             :    { "GOA2GetAuthorizationURL", _wrap_GOA2GetAuthorizationURL, METH_O, "GOA2GetAuthorizationURL(char const * pszScope) -> retStringAndCPLFree *"},
   63558             :    { "GOA2GetRefreshToken", _wrap_GOA2GetRefreshToken, METH_VARARGS, "GOA2GetRefreshToken(char const * pszAuthToken, char const * pszScope) -> retStringAndCPLFree *"},
   63559             :    { "GOA2GetAccessToken", _wrap_GOA2GetAccessToken, METH_VARARGS, "GOA2GetAccessToken(char const * pszRefreshToken, char const * pszScope) -> retStringAndCPLFree *"},
   63560             :    { "ErrorReset", _wrap_ErrorReset, METH_NOARGS, "ErrorReset()"},
   63561             :    { "wrapper_EscapeString", (PyCFunction)(void(*)(void))_wrap_wrapper_EscapeString, METH_VARARGS|METH_KEYWORDS, "wrapper_EscapeString(int len, int scheme=CPLES_SQL) -> retStringAndCPLFree *"},
   63562             :    { "EscapeBinary", (PyCFunction)(void(*)(void))_wrap_EscapeBinary, METH_VARARGS|METH_KEYWORDS, "EscapeBinary(int len, int scheme=CPLES_SQL)"},
   63563             :    { "GetLastErrorNo", _wrap_GetLastErrorNo, METH_NOARGS, "GetLastErrorNo() -> int"},
   63564             :    { "GetLastErrorType", _wrap_GetLastErrorType, METH_NOARGS, "GetLastErrorType() -> int"},
   63565             :    { "GetLastErrorMsg", _wrap_GetLastErrorMsg, METH_NOARGS, "GetLastErrorMsg() -> char const *"},
   63566             :    { "GetErrorCounter", _wrap_GetErrorCounter, METH_NOARGS, "GetErrorCounter() -> unsigned int"},
   63567             :    { "VSIGetLastErrorNo", _wrap_VSIGetLastErrorNo, METH_NOARGS, "VSIGetLastErrorNo() -> int"},
   63568             :    { "VSIGetLastErrorMsg", _wrap_VSIGetLastErrorMsg, METH_NOARGS, "VSIGetLastErrorMsg() -> char const *"},
   63569             :    { "VSIErrorReset", _wrap_VSIErrorReset, METH_NOARGS, "VSIErrorReset()"},
   63570             :    { "PushFinderLocation", _wrap_PushFinderLocation, METH_O, "PushFinderLocation(char const * utf8_path)"},
   63571             :    { "PopFinderLocation", _wrap_PopFinderLocation, METH_NOARGS, "PopFinderLocation()"},
   63572             :    { "FinderClean", _wrap_FinderClean, METH_NOARGS, "FinderClean()"},
   63573             :    { "FindFile", _wrap_FindFile, METH_VARARGS, "FindFile(char const * pszClass, char const * utf8_path) -> char const *"},
   63574             :    { "ReadDir", _wrap_ReadDir, METH_VARARGS, "ReadDir(char const * utf8_path, int nMaxFiles=0) -> char **"},
   63575             :    { "ReadDirRecursive", _wrap_ReadDirRecursive, METH_O, "ReadDirRecursive(char const * utf8_path) -> char **"},
   63576             :    { "OpenDir", _wrap_OpenDir, METH_VARARGS, "OpenDir(char const * utf8_path, int nRecurseDepth=-1, char ** options=None) -> VSIDIR *"},
   63577             :    { "DirEntry_name_get", _wrap_DirEntry_name_get, METH_O, "DirEntry_name_get(DirEntry self) -> char *"},
   63578             :    { "DirEntry_mode_get", _wrap_DirEntry_mode_get, METH_O, "DirEntry_mode_get(DirEntry self) -> int"},
   63579             :    { "DirEntry_size_get", _wrap_DirEntry_size_get, METH_O, "DirEntry_size_get(DirEntry self) -> GIntBig"},
   63580             :    { "DirEntry_mtime_get", _wrap_DirEntry_mtime_get, METH_O, "DirEntry_mtime_get(DirEntry self) -> GIntBig"},
   63581             :    { "DirEntry_modeKnown_get", _wrap_DirEntry_modeKnown_get, METH_O, "DirEntry_modeKnown_get(DirEntry self) -> bool"},
   63582             :    { "DirEntry_sizeKnown_get", _wrap_DirEntry_sizeKnown_get, METH_O, "DirEntry_sizeKnown_get(DirEntry self) -> bool"},
   63583             :    { "DirEntry_mtimeKnown_get", _wrap_DirEntry_mtimeKnown_get, METH_O, "DirEntry_mtimeKnown_get(DirEntry self) -> bool"},
   63584             :    { "DirEntry_extra_get", _wrap_DirEntry_extra_get, METH_O, "DirEntry_extra_get(DirEntry self) -> char **"},
   63585             :    { "new_DirEntry", _wrap_new_DirEntry, METH_O, "new_DirEntry(DirEntry entryIn) -> DirEntry"},
   63586             :    { "delete_DirEntry", _wrap_delete_DirEntry, METH_O, "delete_DirEntry(DirEntry self)"},
   63587             :    { "DirEntry_IsDirectory", _wrap_DirEntry_IsDirectory, METH_O, "DirEntry_IsDirectory(DirEntry self) -> bool"},
   63588             :    { "DirEntry_swigregister", DirEntry_swigregister, METH_O, NULL},
   63589             :    { "DirEntry_swiginit", DirEntry_swiginit, METH_VARARGS, NULL},
   63590             :    { "GetNextDirEntry", _wrap_GetNextDirEntry, METH_O, "GetNextDirEntry(VSIDIR * dir) -> DirEntry"},
   63591             :    { "CloseDir", _wrap_CloseDir, METH_O, "CloseDir(VSIDIR * dir)"},
   63592             :    { "SetConfigOption", _wrap_SetConfigOption, METH_VARARGS, "\n"
   63593             :     "SetConfigOption(char const * pszKey, char const * pszValue)\n"
   63594             :     "\n"
   63595             :     "\n"
   63596             :     "Set the value of a configuration option for all threads.\n"
   63597             :     "See :cpp:func:`CPLSetConfigOption`.\n"
   63598             :     "\n"
   63599             :     "Parameters\n"
   63600             :     "----------\n"
   63601             :     "pszKey : str\n"
   63602             :     "    name of the configuration option\n"
   63603             :     "pszValue : str\n"
   63604             :     "    value of the configuration option\n"
   63605             :     "\n"
   63606             :     "See Also\n"
   63607             :     "--------\n"
   63608             :     ":py:func:`SetThreadLocalConfigOption`\n"
   63609             :     ":py:func:`config_option`\n"
   63610             :     ":py:func:`config_options`\n"
   63611             :     "\n"
   63612             :     "\n"
   63613             :     ""},
   63614             :    { "SetThreadLocalConfigOption", _wrap_SetThreadLocalConfigOption, METH_VARARGS, "\n"
   63615             :     "SetThreadLocalConfigOption(char const * pszKey, char const * pszValue)\n"
   63616             :     "\n"
   63617             :     "\n"
   63618             :     "Set the value of a configuration option for the current thread.\n"
   63619             :     "See :cpp:func:`CPLSetThreadLocalConfigOption`.\n"
   63620             :     "\n"
   63621             :     "Parameters\n"
   63622             :     "----------\n"
   63623             :     "pszKey : str\n"
   63624             :     "    name of the configuration option\n"
   63625             :     "pszValue : str\n"
   63626             :     "    value of the configuration option\n"
   63627             :     "\n"
   63628             :     "See Also\n"
   63629             :     "--------\n"
   63630             :     ":py:func:`SetConfigOption`\n"
   63631             :     ":py:func:`config_option`\n"
   63632             :     ":py:func:`config_options`\n"
   63633             :     "\n"
   63634             :     ""},
   63635             :    { "GetConfigOption", _wrap_GetConfigOption, METH_VARARGS, "\n"
   63636             :     "GetConfigOption(char const * pszKey, char const * pszDefault=None) -> char const *\n"
   63637             :     "\n"
   63638             :     "\n"
   63639             :     "Return the value of a configuration option.\n"
   63640             :     "See :cpp:func:`CPLGetConfigOption`.\n"
   63641             :     "\n"
   63642             :     "Parameters\n"
   63643             :     "----------\n"
   63644             :     "pszKey : str\n"
   63645             :     "    name of the configuration option\n"
   63646             :     "pszDefault : str, optional\n"
   63647             :     "    default value to return if the option has not been set\n"
   63648             :     "\n"
   63649             :     "Returns\n"
   63650             :     "-------\n"
   63651             :     "str\n"
   63652             :     "\n"
   63653             :     "See Also\n"
   63654             :     "--------\n"
   63655             :     ":py:func:`GetConfigOptions`\n"
   63656             :     ":py:func:`GetThreadLocalConfigOption`\n"
   63657             :     "\n"
   63658             :     ""},
   63659             :    { "GetGlobalConfigOption", _wrap_GetGlobalConfigOption, METH_VARARGS, "\n"
   63660             :     "GetGlobalConfigOption(char const * pszKey, char const * pszDefault=None) -> char const *\n"
   63661             :     "\n"
   63662             :     "\n"
   63663             :     "Return the value of a global (not thread-local) configuration option.\n"
   63664             :     "See :cpp:func:`CPLGetGlobalConfigOption`.\n"
   63665             :     "\n"
   63666             :     "Parameters\n"
   63667             :     "----------\n"
   63668             :     "pszKey : str\n"
   63669             :     "    name of the configuration option\n"
   63670             :     "pszDefault : str, optional\n"
   63671             :     "    default value to return if the option has not been set\n"
   63672             :     "\n"
   63673             :     "Returns\n"
   63674             :     "-------\n"
   63675             :     "str\n"
   63676             :     "\n"
   63677             :     ""},
   63678             :    { "GetThreadLocalConfigOption", _wrap_GetThreadLocalConfigOption, METH_VARARGS, "\n"
   63679             :     "GetThreadLocalConfigOption(char const * pszKey, char const * pszDefault=None) -> char const *\n"
   63680             :     "\n"
   63681             :     "\n"
   63682             :     "Return the value of a thread-local configuration option.\n"
   63683             :     "See :cpp:func:`CPLGetThreadLocalConfigOption`.\n"
   63684             :     "\n"
   63685             :     "Parameters\n"
   63686             :     "----------\n"
   63687             :     "pszKey : str\n"
   63688             :     "    name of the configuration option\n"
   63689             :     "pszDefault : str, optional\n"
   63690             :     "    default value to return if the option has not been set\n"
   63691             :     "\n"
   63692             :     "Returns\n"
   63693             :     "-------\n"
   63694             :     "str\n"
   63695             :     "\n"
   63696             :     "\n"
   63697             :     ""},
   63698             :    { "GetConfigOptions", _wrap_GetConfigOptions, METH_NOARGS, "\n"
   63699             :     "GetConfigOptions() -> char **\n"
   63700             :     "\n"
   63701             :     "\n"
   63702             :     "Return a dictionary of currently set configuration options.\n"
   63703             :     "See :cpp:func:`CPLGetConfigOptions`.\n"
   63704             :     "\n"
   63705             :     "Returns\n"
   63706             :     "-------\n"
   63707             :     "dict\n"
   63708             :     "\n"
   63709             :     "Examples\n"
   63710             :     "--------\n"
   63711             :     ">>> with gdal.config_options({'A': '3', 'B': '4'}):\n"
   63712             :     "...     gdal.SetConfigOption('C', '5')\n"
   63713             :     "...     gdal.GetConfigOptions()\n"
   63714             :     "...\n"
   63715             :     "{'C': '5', 'A': '3', 'B': '4'}\n"
   63716             :     "\n"
   63717             :     "See Also\n"
   63718             :     "--------\n"
   63719             :     ":py:func:`GetConfigOption`\n"
   63720             :     ":py:func:`GetGlobalConfigOptions`\n"
   63721             :     "\n"
   63722             :     ""},
   63723             :    { "SetPathSpecificOption", _wrap_SetPathSpecificOption, METH_VARARGS, "SetPathSpecificOption(char const * pszPathPrefix, char const * pszKey, char const * pszValue)"},
   63724             :    { "SetCredential", _wrap_SetCredential, METH_VARARGS, "SetCredential(char const * pszPathPrefix, char const * pszKey, char const * pszValue)"},
   63725             :    { "GetCredential", _wrap_GetCredential, METH_VARARGS, "GetCredential(char const * pszPathPrefix, char const * pszKey, char const * pszDefault=None) -> char const *"},
   63726             :    { "GetPathSpecificOption", _wrap_GetPathSpecificOption, METH_VARARGS, "GetPathSpecificOption(char const * pszPathPrefix, char const * pszKey, char const * pszDefault=None) -> char const *"},
   63727             :    { "ClearCredentials", _wrap_ClearCredentials, METH_VARARGS, "ClearCredentials(char const * pszPathPrefix=None)"},
   63728             :    { "ClearPathSpecificOptions", _wrap_ClearPathSpecificOptions, METH_VARARGS, "ClearPathSpecificOptions(char const * pszPathPrefix=None)"},
   63729             :    { "CPLBinaryToHex", _wrap_CPLBinaryToHex, METH_O, "CPLBinaryToHex(int nBytes) -> retStringAndCPLFree *"},
   63730             :    { "CPLHexToBinary", _wrap_CPLHexToBinary, METH_VARARGS, "CPLHexToBinary(char const * pszHex, int * pnBytes) -> GByte *"},
   63731             :    { "FileFromMemBuffer", _wrap_FileFromMemBuffer, METH_VARARGS, "FileFromMemBuffer(char const * utf8_path, GIntBig nBytes) -> VSI_RETVAL"},
   63732             :    { "Unlink", _wrap_Unlink, METH_O, "Unlink(char const * utf8_path) -> VSI_RETVAL"},
   63733             :    { "UnlinkBatch", _wrap_UnlinkBatch, METH_O, "UnlinkBatch(char ** files) -> bool"},
   63734             :    { "HasThreadSupport", _wrap_HasThreadSupport, METH_NOARGS, "HasThreadSupport() -> int"},
   63735             :    { "GetCurrentThreadCount", _wrap_GetCurrentThreadCount, METH_NOARGS, "GetCurrentThreadCount() -> int"},
   63736             :    { "Mkdir", _wrap_Mkdir, METH_VARARGS, "Mkdir(char const * utf8_path, int mode) -> VSI_RETVAL"},
   63737             :    { "Rmdir", _wrap_Rmdir, METH_O, "Rmdir(char const * utf8_path) -> VSI_RETVAL"},
   63738             :    { "MkdirRecursive", _wrap_MkdirRecursive, METH_VARARGS, "MkdirRecursive(char const * utf8_path, int mode) -> VSI_RETVAL"},
   63739             :    { "RmdirRecursive", _wrap_RmdirRecursive, METH_O, "RmdirRecursive(char const * utf8_path) -> VSI_RETVAL"},
   63740             :    { "Rename", _wrap_Rename, METH_VARARGS, "Rename(char const * old_path, char const * new_path) -> VSI_RETVAL"},
   63741             :    { "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"},
   63742             :    { "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"},
   63743             :    { "AbortPendingUploads", _wrap_AbortPendingUploads, METH_O, "AbortPendingUploads(char const * utf8_path) -> bool"},
   63744             :    { "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"},
   63745             :    { "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)"},
   63746             :    { "MoveFile", _wrap_MoveFile, METH_VARARGS, "MoveFile(char const * pszSource, char const * pszTarget) -> int"},
   63747             :    { "GetActualURL", _wrap_GetActualURL, METH_O, "GetActualURL(char const * utf8_path) -> char const *"},
   63748             :    { "GetSignedURL", _wrap_GetSignedURL, METH_VARARGS, "GetSignedURL(char const * utf8_path, char ** options=None) -> retStringAndCPLFree *"},
   63749             :    { "GetFileSystemsPrefixes", _wrap_GetFileSystemsPrefixes, METH_NOARGS, "GetFileSystemsPrefixes() -> char **"},
   63750             :    { "GetFileSystemOptions", _wrap_GetFileSystemOptions, METH_O, "GetFileSystemOptions(char const * utf8_path) -> char const *"},
   63751             :    { "VSILFILE_swigregister", VSILFILE_swigregister, METH_O, NULL},
   63752             :    { "StatBuf_mode_get", _wrap_StatBuf_mode_get, METH_O, "StatBuf_mode_get(StatBuf self) -> int"},
   63753             :    { "StatBuf_size_get", _wrap_StatBuf_size_get, METH_O, "StatBuf_size_get(StatBuf self) -> GIntBig"},
   63754             :    { "StatBuf_mtime_get", _wrap_StatBuf_mtime_get, METH_O, "StatBuf_mtime_get(StatBuf self) -> GIntBig"},
   63755             :    { "new_StatBuf", _wrap_new_StatBuf, METH_O, "new_StatBuf(StatBuf psStatBuf) -> StatBuf"},
   63756             :    { "delete_StatBuf", _wrap_delete_StatBuf, METH_O, "delete_StatBuf(StatBuf self)"},
   63757             :    { "StatBuf_IsDirectory", _wrap_StatBuf_IsDirectory, METH_O, "StatBuf_IsDirectory(StatBuf self) -> int"},
   63758             :    { "StatBuf_swigregister", StatBuf_swigregister, METH_O, NULL},
   63759             :    { "StatBuf_swiginit", StatBuf_swiginit, METH_VARARGS, NULL},
   63760             :    { "VSIStatL", _wrap_VSIStatL, METH_VARARGS, "VSIStatL(char const * utf8_path, int nFlags=0) -> int"},
   63761             :    { "GetFileMetadata", _wrap_GetFileMetadata, METH_VARARGS, "GetFileMetadata(char const * utf8_path, char const * domain, char ** options=None) -> char **"},
   63762             :    { "SetFileMetadata", _wrap_SetFileMetadata, METH_VARARGS, "SetFileMetadata(char const * utf8_path, char ** metadata, char const * domain, char ** options=None) -> bool"},
   63763             :    { "VSIFOpenL", _wrap_VSIFOpenL, METH_VARARGS, "VSIFOpenL(char const * utf8_path, char const * pszMode) -> VSILFILE"},
   63764             :    { "VSIFOpenExL", _wrap_VSIFOpenExL, METH_VARARGS, "VSIFOpenExL(char const * utf8_path, char const * pszMode, int bSetError=FALSE, char ** options=None) -> VSILFILE"},
   63765             :    { "VSIFEofL", _wrap_VSIFEofL, METH_O, "VSIFEofL(VSILFILE fp) -> int"},
   63766             :    { "VSIFErrorL", _wrap_VSIFErrorL, METH_O, "VSIFErrorL(VSILFILE fp) -> int"},
   63767             :    { "VSIFClearErrL", _wrap_VSIFClearErrL, METH_O, "VSIFClearErrL(VSILFILE fp)"},
   63768             :    { "VSIFFlushL", _wrap_VSIFFlushL, METH_O, "VSIFFlushL(VSILFILE fp) -> int"},
   63769             :    { "VSIFCloseL", _wrap_VSIFCloseL, METH_O, "VSIFCloseL(VSILFILE fp) -> VSI_RETVAL"},
   63770             :    { "VSIFSeekL", _wrap_VSIFSeekL, METH_VARARGS, "VSIFSeekL(VSILFILE fp, GIntBig offset, int whence) -> int"},
   63771             :    { "VSIFTellL", _wrap_VSIFTellL, METH_O, "VSIFTellL(VSILFILE fp) -> GIntBig"},
   63772             :    { "VSIFTruncateL", _wrap_VSIFTruncateL, METH_VARARGS, "VSIFTruncateL(VSILFILE fp, GIntBig length) -> int"},
   63773             :    { "VSISupportsSparseFiles", _wrap_VSISupportsSparseFiles, METH_O, "VSISupportsSparseFiles(char const * utf8_path) -> int"},
   63774             :    { "VSIFGetRangeStatusL", _wrap_VSIFGetRangeStatusL, METH_VARARGS, "VSIFGetRangeStatusL(VSILFILE fp, GIntBig offset, GIntBig length) -> int"},
   63775             :    { "VSIFWriteL", _wrap_VSIFWriteL, METH_VARARGS, "VSIFWriteL(int nLen, int size, int memb, VSILFILE fp) -> int"},
   63776             :    { "CPLReadLineL", _wrap_CPLReadLineL, METH_O, "CPLReadLineL(VSILFILE fp) -> char const *"},
   63777             :    { "VSICurlClearCache", _wrap_VSICurlClearCache, METH_NOARGS, "VSICurlClearCache()"},
   63778             :    { "VSICurlPartialClearCache", _wrap_VSICurlPartialClearCache, METH_O, "VSICurlPartialClearCache(char const * utf8_path)"},
   63779             :    { "NetworkStatsReset", _wrap_NetworkStatsReset, METH_NOARGS, "NetworkStatsReset()"},
   63780             :    { "NetworkStatsGetAsSerializedJSON", _wrap_NetworkStatsGetAsSerializedJSON, METH_VARARGS, "NetworkStatsGetAsSerializedJSON(char ** options=None) -> retStringAndCPLFree *"},
   63781             :    { "ParseCommandLine", _wrap_ParseCommandLine, METH_O, "ParseCommandLine(char const * utf8_path) -> char **"},
   63782             :    { "GetNumCPUs", _wrap_GetNumCPUs, METH_NOARGS, "\n"
   63783             :     "GetNumCPUs() -> int\n"
   63784             :     "\n"
   63785             :     "\n"
   63786             :     "Return the number of processors detected by GDAL.\n"
   63787             :     "\n"
   63788             :     "Returns\n"
   63789             :     "-------\n"
   63790             :     "int\n"
   63791             :     "\n"
   63792             :     ""},
   63793             :    { "GetUsablePhysicalRAM", _wrap_GetUsablePhysicalRAM, METH_NOARGS, "GetUsablePhysicalRAM() -> GIntBig"},
   63794             :    { "MultipartUploadGetCapabilities", _wrap_MultipartUploadGetCapabilities, METH_O, "MultipartUploadGetCapabilities(char const * pszFilename)"},
   63795             :    { "MultipartUploadStart", _wrap_MultipartUploadStart, METH_VARARGS, "MultipartUploadStart(char const * pszFilename, char ** options=None) -> retStringAndCPLFree *"},
   63796             :    { "MultipartUploadAddPart", _wrap_MultipartUploadAddPart, METH_VARARGS, "MultipartUploadAddPart(char const * pszFilename, char const * pszUploadId, int nPartNumber, GUIntBig nFileOffset, size_t nDataLength, char ** options=None) -> retStringAndCPLFree *"},
   63797             :    { "MultipartUploadEnd", _wrap_MultipartUploadEnd, METH_VARARGS, "MultipartUploadEnd(char const * pszFilename, char const * pszUploadId, char ** partIds, GUIntBig nTotalSize, char ** options=None) -> bool"},
   63798             :    { "MultipartUploadAbort", _wrap_MultipartUploadAbort, METH_VARARGS, "MultipartUploadAbort(char const * pszFilename, char const * pszUploadId, char ** options=None) -> bool"},
   63799             :    { "MajorObject_GetDescription", _wrap_MajorObject_GetDescription, METH_O, "MajorObject_GetDescription(MajorObject self) -> char const *"},
   63800             :    { "MajorObject_SetDescription", _wrap_MajorObject_SetDescription, METH_VARARGS, "MajorObject_SetDescription(MajorObject self, char const * pszNewDesc)"},
   63801             :    { "MajorObject_GetMetadataDomainList", _wrap_MajorObject_GetMetadataDomainList, METH_O, "MajorObject_GetMetadataDomainList(MajorObject self) -> char **"},
   63802             :    { "MajorObject_GetMetadata_Dict", _wrap_MajorObject_GetMetadata_Dict, METH_VARARGS, "MajorObject_GetMetadata_Dict(MajorObject self, char const * pszDomain=\"\") -> char **"},
   63803             :    { "MajorObject_GetMetadata_List", _wrap_MajorObject_GetMetadata_List, METH_VARARGS, "MajorObject_GetMetadata_List(MajorObject self, char const * pszDomain=\"\") -> char **"},
   63804             :    { "MajorObject_SetMetadata", _wrap_MajorObject_SetMetadata, METH_VARARGS, "\n"
   63805             :     "MajorObject_SetMetadata(MajorObject self, char ** papszMetadata, char const * pszDomain=\"\") -> CPLErr\n"
   63806             :     "MajorObject_SetMetadata(MajorObject self, char * pszMetadataString, char const * pszDomain=\"\") -> CPLErr\n"
   63807             :     ""},
   63808             :    { "MajorObject_GetMetadataItem", _wrap_MajorObject_GetMetadataItem, METH_VARARGS, "MajorObject_GetMetadataItem(MajorObject self, char const * pszName, char const * pszDomain=\"\") -> char const *"},
   63809             :    { "MajorObject_SetMetadataItem", _wrap_MajorObject_SetMetadataItem, METH_VARARGS, "MajorObject_SetMetadataItem(MajorObject self, char const * pszName, char const * pszValue, char const * pszDomain=\"\") -> CPLErr"},
   63810             :    { "MajorObject_swigregister", MajorObject_swigregister, METH_O, NULL},
   63811             :    { "Driver_ShortName_get", _wrap_Driver_ShortName_get, METH_O, "\n"
   63812             :     "Driver_ShortName_get(Driver self) -> char const *\n"
   63813             :     "\n"
   63814             :     "The short name of a :py:class:`Driver` that can be passed to\n"
   63815             :     ":py:func:`GetDriverByName`.\n"
   63816             :     "See :cpp:func:`GDALGetDriverShortName`.\n"
   63817             :     "\n"
   63818             :     ""},
   63819             :    { "Driver_LongName_get", _wrap_Driver_LongName_get, METH_O, "\n"
   63820             :     "Driver_LongName_get(Driver self) -> char const *\n"
   63821             :     "\n"
   63822             :     "The long name of the driver.\n"
   63823             :     "See :cpp:func:`GDALGetDriverLongName`.\n"
   63824             :     "\n"
   63825             :     ""},
   63826             :    { "Driver_HelpTopic_get", _wrap_Driver_HelpTopic_get, METH_O, "\n"
   63827             :     "Driver_HelpTopic_get(Driver self) -> char const *\n"
   63828             :     "\n"
   63829             :     "The URL for driver documentation, relative to the GDAL documentation directory.\n"
   63830             :     "See :cpp:func:`GDALGetDriverHelpTopic`.\n"
   63831             :     "\n"
   63832             :     ""},
   63833             :    { "Driver_Create", (PyCFunction)(void(*)(void))_wrap_Driver_Create, METH_VARARGS|METH_KEYWORDS, "\n"
   63834             :     "Driver_Create(Driver self, char const * utf8_path, int xsize, int ysize, int bands=1, GDALDataType eType=GDT_Byte, char ** options=None) -> Dataset\n"
   63835             :     "\n"
   63836             :     "\n"
   63837             :     "Create a new :py:class:`Dataset` with this driver.\n"
   63838             :     "See :cpp:func:`GDALDriver::Create`.\n"
   63839             :     "\n"
   63840             :     "Parameters\n"
   63841             :     "----------\n"
   63842             :     "utf8_path : str\n"
   63843             :     "   Path of the dataset to create.\n"
   63844             :     "xsize : int\n"
   63845             :     "   Width of created raster in pixels. Set to zero for vector datasets.\n"
   63846             :     "ysize : int\n"
   63847             :     "   Height of created raster in pixels. Set to zero for vector datasets.\n"
   63848             :     "bands : int, default = 1\n"
   63849             :     "    Number of bands. Set to zero for vector datasets.\n"
   63850             :     "eType : int/NumPy dtype, default = :py:const:`GDT_Byte`\n"
   63851             :     "    Raster data type. Set to :py:const:`GDT_Unknown` for vector datasets.\n"
   63852             :     "options : list/dict\n"
   63853             :     "    List of driver-specific options\n"
   63854             :     "\n"
   63855             :     "Returns\n"
   63856             :     "-------\n"
   63857             :     "Dataset\n"
   63858             :     "\n"
   63859             :     "Examples\n"
   63860             :     "--------\n"
   63861             :     ">>> with gdal.GetDriverByName('GTiff').Create('test.tif', 12, 4, 2, gdal.GDT_Float32, {'COMPRESS': 'DEFLATE'}) as ds:\n"
   63862             :     "...     print(gdal.Info(ds))\n"
   63863             :     "...\n"
   63864             :     "Driver: GTiff/GeoTIFF\n"
   63865             :     "Files: test.tif\n"
   63866             :     "Size is 12, 4\n"
   63867             :     "Image Structure Metadata:\n"
   63868             :     "  INTERLEAVE=PIXEL\n"
   63869             :     "Corner Coordinates:\n"
   63870             :     "Upper Left  (    0.0,    0.0)\n"
   63871             :     "Lower Left  (    0.0,    4.0)\n"
   63872             :     "Upper Right (   12.0,    0.0)\n"
   63873             :     "Lower Right (   12.0,    4.0)\n"
   63874             :     "Center      (    6.0,    2.0)\n"
   63875             :     "Band 1 Block=12x4 Type=Float32, ColorInterp=Gray\n"
   63876             :     "Band 2 Block=12x4 Type=Float32, ColorInterp=Undefined\n"
   63877             :     "\n"
   63878             :     ">>> with gdal.GetDriverByName('ESRI Shapefile').Create('test.shp', 0, 0, 0, gdal.GDT_Unknown) as ds:\n"
   63879             :     "...     print(gdal.VectorInfo(ds))\n"
   63880             :     "...\n"
   63881             :     "INFO: Open of `test.shp'\n"
   63882             :     "      using driver `ESRI Shapefile' successful.\n"
   63883             :     "\n"
   63884             :     ""},
   63885             :    { "Driver_CreateVector", (PyCFunction)(void(*)(void))_wrap_Driver_CreateVector, METH_VARARGS|METH_KEYWORDS, "\n"
   63886             :     "Driver_CreateVector(Driver self, char const * utf8_path, char ** options=None) -> Dataset\n"
   63887             :     "\n"
   63888             :     "\n"
   63889             :     "Create a new vector :py:class:`Dataset` with this driver.\n"
   63890             :     "This method is an alias for ``Create(name, 0, 0, 0, gdal.GDT_Unknown)``.\n"
   63891             :     "\n"
   63892             :     "Parameters\n"
   63893             :     "----------\n"
   63894             :     "utf8_path : str\n"
   63895             :     "   Path of the dataset to create.\n"
   63896             :     "\n"
   63897             :     "Returns\n"
   63898             :     "-------\n"
   63899             :     "Dataset\n"
   63900             :     "\n"
   63901             :     "Examples\n"
   63902             :     "--------\n"
   63903             :     ">>> with gdal.GetDriverByName('ESRI Shapefile').CreateVector('test.shp') as ds:\n"
   63904             :     "...     print(ds.GetLayerCount())\n"
   63905             :     "... \n"
   63906             :     "0\n"
   63907             :     "\n"
   63908             :     "\n"
   63909             :     ""},
   63910             :    { "Driver_CreateMultiDimensional", (PyCFunction)(void(*)(void))_wrap_Driver_CreateMultiDimensional, METH_VARARGS|METH_KEYWORDS, "\n"
   63911             :     "Driver_CreateMultiDimensional(Driver self, char const * utf8_path, char ** root_group_options=None, char ** options=None) -> Dataset\n"
   63912             :     "\n"
   63913             :     "\n"
   63914             :     "Create a new multidimensional dataset.\n"
   63915             :     "See :cpp:func:`GDALDriver::CreateMultiDimensional`.\n"
   63916             :     "\n"
   63917             :     "Parameters\n"
   63918             :     "----------\n"
   63919             :     "utf8_path : str\n"
   63920             :     "   Path of the dataset to create.\n"
   63921             :     "root_group_options : dict/list\n"
   63922             :     "   Driver-specific options regarding the creation of the\n"
   63923             :     "   root group.\n"
   63924             :     "options : list/dict\n"
   63925             :     "   List of driver-specific options regarding the creation\n"
   63926             :     "   of the Dataset.\n"
   63927             :     "\n"
   63928             :     "Returns\n"
   63929             :     "-------\n"
   63930             :     "Dataset\n"
   63931             :     "\n"
   63932             :     "Examples\n"
   63933             :     "--------\n"
   63934             :     ">>> with gdal.GetDriverByName('netCDF').CreateMultiDimensional('test.nc') as ds:\n"
   63935             :     "...     gdal.MultiDimInfo(ds)\n"
   63936             :     "...\n"
   63937             :     "{'type': 'group', 'driver': 'netCDF', 'name': '/', 'attributes': {'Conventions': 'CF-1.6'}, 'structural_info': {'NC_FORMAT': 'NETCDF4'}}\n"
   63938             :     "\n"
   63939             :     "\n"
   63940             :     ""},
   63941             :    { "Driver_CreateCopy", (PyCFunction)(void(*)(void))_wrap_Driver_CreateCopy, METH_VARARGS|METH_KEYWORDS, "\n"
   63942             :     "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"
   63943             :     "\n"
   63944             :     "\n"
   63945             :     "Create a copy of a :py:class:`Dataset`.\n"
   63946             :     "See :cpp:func:`GDALDriver::CreateCopy`.\n"
   63947             :     "\n"
   63948             :     "Parameters\n"
   63949             :     "----------\n"
   63950             :     "utf8_path : str\n"
   63951             :     "   Path of the dataset to create.\n"
   63952             :     "src : Dataset\n"
   63953             :     "   The Dataset being duplicated.\n"
   63954             :     "strict : bool, default=1\n"
   63955             :     "   Indicates whether the copy must be strictly equivalent or if\n"
   63956             :     "   it may be adapted as needed for the output format.\n"
   63957             :     "options : list/dict\n"
   63958             :     "   List of driver-specific options\n"
   63959             :     "callback : function, optional\n"
   63960             :     "   A progress callback function\n"
   63961             :     "callback_data: optional\n"
   63962             :     "   Optional data to be passed to callback function\n"
   63963             :     "\n"
   63964             :     "Returns\n"
   63965             :     "-------\n"
   63966             :     "Dataset\n"
   63967             :     "\n"
   63968             :     ""},
   63969             :    { "Driver_Delete", _wrap_Driver_Delete, METH_VARARGS, "\n"
   63970             :     "Driver_Delete(Driver self, char const * utf8_path) -> CPLErr\n"
   63971             :     "\n"
   63972             :     "Delete a :py:class:`Dataset`.\n"
   63973             :     "See :cpp:func:`GDALDriver::Delete`.\n"
   63974             :     "\n"
   63975             :     "Parameters\n"
   63976             :     "----------\n"
   63977             :     "utf8_path : str\n"
   63978             :     "   Path of the dataset to delete.\n"
   63979             :     "\n"
   63980             :     "Returns\n"
   63981             :     "-------\n"
   63982             :     "int:\n"
   63983             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   63984             :     "\n"
   63985             :     ""},
   63986             :    { "Driver_Rename", _wrap_Driver_Rename, METH_VARARGS, "\n"
   63987             :     "Driver_Rename(Driver self, char const * newName, char const * oldName) -> CPLErr\n"
   63988             :     "\n"
   63989             :     "Rename a :py:class:`Dataset`.\n"
   63990             :     "See :cpp:func:`GDALDriver::Rename`.\n"
   63991             :     "\n"
   63992             :     "Parameters\n"
   63993             :     "----------\n"
   63994             :     "newName : str\n"
   63995             :     "    new path for the dataset\n"
   63996             :     "oldName : str\n"
   63997             :     "    old path for the dataset\n"
   63998             :     "\n"
   63999             :     "Returns\n"
   64000             :     "-------\n"
   64001             :     "int:\n"
   64002             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   64003             :     "\n"
   64004             :     ""},
   64005             :    { "Driver_CopyFiles", _wrap_Driver_CopyFiles, METH_VARARGS, "\n"
   64006             :     "Driver_CopyFiles(Driver self, char const * newName, char const * oldName) -> CPLErr\n"
   64007             :     "\n"
   64008             :     "Copy all the files associated with a :py:class:`Dataset`.\n"
   64009             :     "\n"
   64010             :     "Parameters\n"
   64011             :     "----------\n"
   64012             :     "newName : str\n"
   64013             :     "    new path for the dataset\n"
   64014             :     "oldName : str\n"
   64015             :     "    old path for the dataset\n"
   64016             :     "\n"
   64017             :     "Returns\n"
   64018             :     "-------\n"
   64019             :     "int:\n"
   64020             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   64021             :     "\n"
   64022             :     ""},
   64023             :    { "Driver_HasOpenOption", _wrap_Driver_HasOpenOption, METH_VARARGS, "\n"
   64024             :     "Driver_HasOpenOption(Driver self, char const * openOptionName) -> bool\n"
   64025             :     "\n"
   64026             :     "\n"
   64027             :     "Reports whether the driver supports a specified open option.\n"
   64028             :     "\n"
   64029             :     "Parameters\n"
   64030             :     "----------\n"
   64031             :     "openOptionName : str\n"
   64032             :     "   The name of the option to test\n"
   64033             :     "\n"
   64034             :     "Returns\n"
   64035             :     "-------\n"
   64036             :     "bool:\n"
   64037             :     "   ``True``, if the option is supported by this driver, ``False`` otherwise.\n"
   64038             :     "\n"
   64039             :     "Examples\n"
   64040             :     "--------\n"
   64041             :     ">>> gdal.GetDriverByName('GPKG').HasOpenOption('PRELUDE_STATEMENTS')\n"
   64042             :     "True\n"
   64043             :     ">>> gdal.GetDriverByName('GPKG').HasOpenOption('CLOSING_STATEMENTS')\n"
   64044             :     "False\n"
   64045             :     "\n"
   64046             :     "\n"
   64047             :     ""},
   64048             :    { "Driver_TestCapability", _wrap_Driver_TestCapability, METH_VARARGS, "\n"
   64049             :     "Driver_TestCapability(Driver self, char const * cap) -> bool\n"
   64050             :     "\n"
   64051             :     "\n"
   64052             :     "Check whether the driver supports a specified capability\n"
   64053             :     "(:py:const:`ogr.ODrCCreateDataSource` or\n"
   64054             :     ":py:const:`ogr.ODrCDeleteDataSource`)`.\n"
   64055             :     "\n"
   64056             :     "Parameters\n"
   64057             :     "----------\n"
   64058             :     "cap : str\n"
   64059             :     "    The name of the capability to test\n"
   64060             :     "\n"
   64061             :     "Returns\n"
   64062             :     "-------\n"
   64063             :     "bool:\n"
   64064             :     "   ``True`` if the driver supports the capability, ``False`` otherwise.\n"
   64065             :     "\n"
   64066             :     "Examples\n"
   64067             :     "--------\n"
   64068             :     ">>> gdal.GetDriverByName('ESRI Shapefile').TestCapability(ogr.ODrCCreateDataSource)\n"
   64069             :     "True\n"
   64070             :     ">>> gdal.GetDriverByName('GTiff').TestCapability(ogr.ODrCCreateDataSource)\n"
   64071             :     "True\n"
   64072             :     "\n"
   64073             :     "\n"
   64074             :     ""},
   64075             :    { "Driver_Register", _wrap_Driver_Register, METH_O, "\n"
   64076             :     "Driver_Register(Driver self) -> int\n"
   64077             :     "\n"
   64078             :     "Register the driver for use.\n"
   64079             :     "See :cpp:func:`GDALDriverManager::RegisterDriver`.\n"
   64080             :     "\n"
   64081             :     ""},
   64082             :    { "Driver_Deregister", _wrap_Driver_Deregister, METH_O, "\n"
   64083             :     "Driver_Deregister(Driver self)\n"
   64084             :     "\n"
   64085             :     "Deregister the driver.\n"
   64086             :     "See :cpp:func:`GDALDriverManager::DeregisterDriver`.\n"
   64087             :     "\n"
   64088             :     ""},
   64089             :    { "Driver_swigregister", Driver_swigregister, METH_O, NULL},
   64090             :    { "ColorEntry_c1_set", _wrap_ColorEntry_c1_set, METH_VARARGS, "ColorEntry_c1_set(ColorEntry self, short c1)"},
   64091             :    { "ColorEntry_c1_get", _wrap_ColorEntry_c1_get, METH_O, "ColorEntry_c1_get(ColorEntry self) -> short"},
   64092             :    { "ColorEntry_c2_set", _wrap_ColorEntry_c2_set, METH_VARARGS, "ColorEntry_c2_set(ColorEntry self, short c2)"},
   64093             :    { "ColorEntry_c2_get", _wrap_ColorEntry_c2_get, METH_O, "ColorEntry_c2_get(ColorEntry self) -> short"},
   64094             :    { "ColorEntry_c3_set", _wrap_ColorEntry_c3_set, METH_VARARGS, "ColorEntry_c3_set(ColorEntry self, short c3)"},
   64095             :    { "ColorEntry_c3_get", _wrap_ColorEntry_c3_get, METH_O, "ColorEntry_c3_get(ColorEntry self) -> short"},
   64096             :    { "ColorEntry_c4_set", _wrap_ColorEntry_c4_set, METH_VARARGS, "ColorEntry_c4_set(ColorEntry self, short c4)"},
   64097             :    { "ColorEntry_c4_get", _wrap_ColorEntry_c4_get, METH_O, "ColorEntry_c4_get(ColorEntry self) -> short"},
   64098             :    { "ColorEntry_swigregister", ColorEntry_swigregister, METH_O, NULL},
   64099             :    { "GCP_GCPX_set", _wrap_GCP_GCPX_set, METH_VARARGS, "GCP_GCPX_set(GCP self, double GCPX)"},
   64100             :    { "GCP_GCPX_get", _wrap_GCP_GCPX_get, METH_O, "GCP_GCPX_get(GCP self) -> double"},
   64101             :    { "GCP_GCPY_set", _wrap_GCP_GCPY_set, METH_VARARGS, "GCP_GCPY_set(GCP self, double GCPY)"},
   64102             :    { "GCP_GCPY_get", _wrap_GCP_GCPY_get, METH_O, "GCP_GCPY_get(GCP self) -> double"},
   64103             :    { "GCP_GCPZ_set", _wrap_GCP_GCPZ_set, METH_VARARGS, "GCP_GCPZ_set(GCP self, double GCPZ)"},
   64104             :    { "GCP_GCPZ_get", _wrap_GCP_GCPZ_get, METH_O, "GCP_GCPZ_get(GCP self) -> double"},
   64105             :    { "GCP_GCPPixel_set", _wrap_GCP_GCPPixel_set, METH_VARARGS, "GCP_GCPPixel_set(GCP self, double GCPPixel)"},
   64106             :    { "GCP_GCPPixel_get", _wrap_GCP_GCPPixel_get, METH_O, "GCP_GCPPixel_get(GCP self) -> double"},
   64107             :    { "GCP_GCPLine_set", _wrap_GCP_GCPLine_set, METH_VARARGS, "GCP_GCPLine_set(GCP self, double GCPLine)"},
   64108             :    { "GCP_GCPLine_get", _wrap_GCP_GCPLine_get, METH_O, "GCP_GCPLine_get(GCP self) -> double"},
   64109             :    { "GCP_Info_set", _wrap_GCP_Info_set, METH_VARARGS, "GCP_Info_set(GCP self, char * Info)"},
   64110             :    { "GCP_Info_get", _wrap_GCP_Info_get, METH_O, "GCP_Info_get(GCP self) -> char *"},
   64111             :    { "GCP_Id_set", _wrap_GCP_Id_set, METH_VARARGS, "GCP_Id_set(GCP self, char * Id)"},
   64112             :    { "GCP_Id_get", _wrap_GCP_Id_get, METH_O, "GCP_Id_get(GCP self) -> char *"},
   64113             :    { "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"},
   64114             :    { "delete_GCP", _wrap_delete_GCP, METH_O, "delete_GCP(GCP self)"},
   64115             :    { "GCP_swigregister", GCP_swigregister, METH_O, NULL},
   64116             :    { "GCP_swiginit", GCP_swiginit, METH_VARARGS, NULL},
   64117             :    { "GDAL_GCP_GCPX_get", _wrap_GDAL_GCP_GCPX_get, METH_O, "GDAL_GCP_GCPX_get(GCP gcp) -> double"},
   64118             :    { "GDAL_GCP_GCPX_set", _wrap_GDAL_GCP_GCPX_set, METH_VARARGS, "GDAL_GCP_GCPX_set(GCP gcp, double dfGCPX)"},
   64119             :    { "GDAL_GCP_GCPY_get", _wrap_GDAL_GCP_GCPY_get, METH_O, "GDAL_GCP_GCPY_get(GCP gcp) -> double"},
   64120             :    { "GDAL_GCP_GCPY_set", _wrap_GDAL_GCP_GCPY_set, METH_VARARGS, "GDAL_GCP_GCPY_set(GCP gcp, double dfGCPY)"},
   64121             :    { "GDAL_GCP_GCPZ_get", _wrap_GDAL_GCP_GCPZ_get, METH_O, "GDAL_GCP_GCPZ_get(GCP gcp) -> double"},
   64122             :    { "GDAL_GCP_GCPZ_set", _wrap_GDAL_GCP_GCPZ_set, METH_VARARGS, "GDAL_GCP_GCPZ_set(GCP gcp, double dfGCPZ)"},
   64123             :    { "GDAL_GCP_GCPPixel_get", _wrap_GDAL_GCP_GCPPixel_get, METH_O, "GDAL_GCP_GCPPixel_get(GCP gcp) -> double"},
   64124             :    { "GDAL_GCP_GCPPixel_set", _wrap_GDAL_GCP_GCPPixel_set, METH_VARARGS, "GDAL_GCP_GCPPixel_set(GCP gcp, double dfGCPPixel)"},
   64125             :    { "GDAL_GCP_GCPLine_get", _wrap_GDAL_GCP_GCPLine_get, METH_O, "GDAL_GCP_GCPLine_get(GCP gcp) -> double"},
   64126             :    { "GDAL_GCP_GCPLine_set", _wrap_GDAL_GCP_GCPLine_set, METH_VARARGS, "GDAL_GCP_GCPLine_set(GCP gcp, double dfGCPLine)"},
   64127             :    { "GDAL_GCP_Info_get", _wrap_GDAL_GCP_Info_get, METH_O, "GDAL_GCP_Info_get(GCP gcp) -> char const *"},
   64128             :    { "GDAL_GCP_Info_set", _wrap_GDAL_GCP_Info_set, METH_VARARGS, "GDAL_GCP_Info_set(GCP gcp, char const * pszInfo)"},
   64129             :    { "GDAL_GCP_Id_get", _wrap_GDAL_GCP_Id_get, METH_O, "GDAL_GCP_Id_get(GCP gcp) -> char const *"},
   64130             :    { "GDAL_GCP_Id_set", _wrap_GDAL_GCP_Id_set, METH_VARARGS, "GDAL_GCP_Id_set(GCP gcp, char const * pszId)"},
   64131             :    { "GCPsToGeoTransform", _wrap_GCPsToGeoTransform, METH_VARARGS, "GCPsToGeoTransform(int nGCPs, int bApproxOK=1) -> RETURN_NONE"},
   64132             :    { "GCPsToHomography", _wrap_GCPsToHomography, METH_O, "GCPsToHomography(int nGCPs) -> RETURN_NONE"},
   64133             :    { "delete_VirtualMem", _wrap_delete_VirtualMem, METH_O, "delete_VirtualMem(VirtualMem self)"},
   64134             :    { "VirtualMem_GetAddr", _wrap_VirtualMem_GetAddr, METH_O, "VirtualMem_GetAddr(VirtualMem self)"},
   64135             :    { "VirtualMem_Pin", _wrap_VirtualMem_Pin, METH_VARARGS, "VirtualMem_Pin(VirtualMem self, size_t start_offset=0, size_t nsize=0, int bWriteOp=0)"},
   64136             :    { "VirtualMem_swigregister", VirtualMem_swigregister, METH_O, NULL},
   64137             :    { "delete_AsyncReader", _wrap_delete_AsyncReader, METH_O, "delete_AsyncReader(AsyncReader self)"},
   64138             :    { "AsyncReader_GetNextUpdatedRegion", _wrap_AsyncReader_GetNextUpdatedRegion, METH_VARARGS, "AsyncReader_GetNextUpdatedRegion(AsyncReader self, double timeout) -> GDALAsyncStatusType"},
   64139             :    { "AsyncReader_GetBuffer", _wrap_AsyncReader_GetBuffer, METH_O, "AsyncReader_GetBuffer(AsyncReader self)"},
   64140             :    { "AsyncReader_LockBuffer", _wrap_AsyncReader_LockBuffer, METH_VARARGS, "AsyncReader_LockBuffer(AsyncReader self, double timeout) -> int"},
   64141             :    { "AsyncReader_UnlockBuffer", _wrap_AsyncReader_UnlockBuffer, METH_O, "AsyncReader_UnlockBuffer(AsyncReader self)"},
   64142             :    { "AsyncReader_swigregister", AsyncReader_swigregister, METH_O, NULL},
   64143             :    { "Dataset_RasterXSize_get", _wrap_Dataset_RasterXSize_get, METH_O, "\n"
   64144             :     "Dataset_RasterXSize_get(Dataset self) -> int\n"
   64145             :     "\n"
   64146             :     "\n"
   64147             :     "Raster width in pixels. See :cpp:func:`GDALGetRasterXSize`.\n"
   64148             :     "\n"
   64149             :     "\n"
   64150             :     ""},
   64151             :    { "Dataset_RasterYSize_get", _wrap_Dataset_RasterYSize_get, METH_O, "\n"
   64152             :     "Dataset_RasterYSize_get(Dataset self) -> int\n"
   64153             :     "\n"
   64154             :     "\n"
   64155             :     "Raster height in pixels. See :cpp:func:`GDALGetRasterYSize`.\n"
   64156             :     "\n"
   64157             :     "\n"
   64158             :     ""},
   64159             :    { "Dataset_RasterCount_get", _wrap_Dataset_RasterCount_get, METH_O, "\n"
   64160             :     "Dataset_RasterCount_get(Dataset self) -> int\n"
   64161             :     "\n"
   64162             :     "\n"
   64163             :     "The number of bands in this dataset.\n"
   64164             :     "\n"
   64165             :     "\n"
   64166             :     ""},
   64167             :    { "delete_Dataset", _wrap_delete_Dataset, METH_O, "delete_Dataset(Dataset self)"},
   64168             :    { "Dataset_MarkSuppressOnClose", _wrap_Dataset_MarkSuppressOnClose, METH_O, "Dataset_MarkSuppressOnClose(Dataset self)"},
   64169             :    { "Dataset_Close", _wrap_Dataset_Close, METH_O, "\n"
   64170             :     "Dataset_Close(Dataset self) -> CPLErr\n"
   64171             :     "\n"
   64172             :     "Closes opened dataset and releases allocated resources.\n"
   64173             :     "\n"
   64174             :     "This method can be used to force the dataset to close\n"
   64175             :     "when one more references to the dataset are still\n"
   64176             :     "reachable. If :py:meth:`Close` is never called, the dataset will\n"
   64177             :     "be closed automatically during garbage collection.\n"
   64178             :     "\n"
   64179             :     "In most cases, it is preferable to open or create a dataset\n"
   64180             :     "using a context manager instead of calling :py:meth:`Close`\n"
   64181             :     "directly.\n"
   64182             :     "\n"
   64183             :     "\n"
   64184             :     ""},
   64185             :    { "Dataset_GetDriver", _wrap_Dataset_GetDriver, METH_O, "\n"
   64186             :     "Dataset_GetDriver(Dataset self) -> Driver\n"
   64187             :     "\n"
   64188             :     "\n"
   64189             :     "Fetch the driver used to open or create this :py:class:`Dataset`.\n"
   64190             :     "\n"
   64191             :     "\n"
   64192             :     ""},
   64193             :    { "Dataset_GetRasterBand", _wrap_Dataset_GetRasterBand, METH_VARARGS, "\n"
   64194             :     "Dataset_GetRasterBand(Dataset self, int nBand) -> Band\n"
   64195             :     "\n"
   64196             :     "\n"
   64197             :     "Fetch a :py:class:`Band` band from a :py:class:`Dataset`. See :cpp:func:`GDALGetRasterBand`.\n"
   64198             :     "\n"
   64199             :     "Parameters\n"
   64200             :     "-----------\n"
   64201             :     "nBand : int\n"
   64202             :     "    the index of the band to fetch, from 1 to :py:attr:`RasterCount`\n"
   64203             :     "\n"
   64204             :     "Returns\n"
   64205             :     "--------\n"
   64206             :     "Band:\n"
   64207             :     "    the :py:class:`Band`, or ``None`` on error.\n"
   64208             :     "\n"
   64209             :     "\n"
   64210             :     ""},
   64211             :    { "Dataset_IsThreadSafe", _wrap_Dataset_IsThreadSafe, METH_VARARGS, "Dataset_IsThreadSafe(Dataset self, int nScopeFlags) -> bool"},
   64212             :    { "Dataset_GetThreadSafeDataset", _wrap_Dataset_GetThreadSafeDataset, METH_VARARGS, "Dataset_GetThreadSafeDataset(Dataset self, int nScopeFlags) -> Dataset"},
   64213             :    { "Dataset_GetRootGroup", _wrap_Dataset_GetRootGroup, METH_O, "\n"
   64214             :     "Dataset_GetRootGroup(Dataset self) -> Group\n"
   64215             :     "\n"
   64216             :     "\n"
   64217             :     "Return the root :py:class:`Group` of this dataset.\n"
   64218             :     "Only value for multidimensional datasets.\n"
   64219             :     "\n"
   64220             :     "Returns\n"
   64221             :     "-------\n"
   64222             :     "Group\n"
   64223             :     "\n"
   64224             :     "\n"
   64225             :     ""},
   64226             :    { "Dataset_GetProjection", _wrap_Dataset_GetProjection, METH_O, "\n"
   64227             :     "Dataset_GetProjection(Dataset self) -> char const *\n"
   64228             :     "\n"
   64229             :     "\n"
   64230             :     "Return a WKT representation of the dataset spatial reference.\n"
   64231             :     "Equivalent to :py:meth:`GetProjectionRef`.\n"
   64232             :     "\n"
   64233             :     "Returns\n"
   64234             :     "-------\n"
   64235             :     "str\n"
   64236             :     "\n"
   64237             :     "\n"
   64238             :     ""},
   64239             :    { "Dataset_GetProjectionRef", _wrap_Dataset_GetProjectionRef, METH_O, "\n"
   64240             :     "Dataset_GetProjectionRef(Dataset self) -> char const *\n"
   64241             :     "\n"
   64242             :     "\n"
   64243             :     "Return a WKT representation of the dataset spatial reference.\n"
   64244             :     "\n"
   64245             :     "Returns\n"
   64246             :     "-------\n"
   64247             :     "str\n"
   64248             :     "\n"
   64249             :     "\n"
   64250             :     ""},
   64251             :    { "Dataset_GetRefCount", _wrap_Dataset_GetRefCount, METH_O, "Dataset_GetRefCount(Dataset self) -> int"},
   64252             :    { "Dataset_GetSummaryRefCount", _wrap_Dataset_GetSummaryRefCount, METH_O, "Dataset_GetSummaryRefCount(Dataset self) -> int"},
   64253             :    { "Dataset_GetSpatialRef", _wrap_Dataset_GetSpatialRef, METH_O, "\n"
   64254             :     "Dataset_GetSpatialRef(Dataset self) -> SpatialReference\n"
   64255             :     "\n"
   64256             :     "\n"
   64257             :     "Fetch the spatial reference for this dataset.\n"
   64258             :     "\n"
   64259             :     "Returns\n"
   64260             :     "--------\n"
   64261             :     "osr.SpatialReference\n"
   64262             :     "\n"
   64263             :     "\n"
   64264             :     ""},
   64265             :    { "Dataset_SetProjection", _wrap_Dataset_SetProjection, METH_VARARGS, "\n"
   64266             :     "Dataset_SetProjection(Dataset self, char const * prj) -> CPLErr\n"
   64267             :     "\n"
   64268             :     "\n"
   64269             :     "Set the spatial reference system for this dataset.\n"
   64270             :     "\n"
   64271             :     "See :cpp:func:`GDALDataset::SetProjection`.\n"
   64272             :     "\n"
   64273             :     "Parameters\n"
   64274             :     "----------\n"
   64275             :     "prj:\n"
   64276             :     "   The projection string in OGC WKT or PROJ.4 format\n"
   64277             :     "\n"
   64278             :     "Returns\n"
   64279             :     "-------\n"
   64280             :     ":py:const:`CE_Failure` if an error occurs, otherwise :py:const:`CE_None`.\n"
   64281             :     "\n"
   64282             :     "\n"
   64283             :     ""},
   64284             :    { "Dataset_SetSpatialRef", _wrap_Dataset_SetSpatialRef, METH_VARARGS, "\n"
   64285             :     "Dataset_SetSpatialRef(Dataset self, SpatialReference srs) -> CPLErr\n"
   64286             :     "\n"
   64287             :     "\n"
   64288             :     "Set the spatial reference system for this dataset.\n"
   64289             :     "\n"
   64290             :     "Parameters\n"
   64291             :     "----------\n"
   64292             :     "srs : SpatialReference\n"
   64293             :     "\n"
   64294             :     "Returns\n"
   64295             :     "-------\n"
   64296             :     ":py:const:`CE_Failure` if an error occurs, otherwise :py:const:`CE_None`.\n"
   64297             :     "\n"
   64298             :     "\n"
   64299             :     ""},
   64300             :    { "Dataset_GetGeoTransform", (PyCFunction)(void(*)(void))_wrap_Dataset_GetGeoTransform, METH_VARARGS|METH_KEYWORDS, "\n"
   64301             :     "Dataset_GetGeoTransform(Dataset self, int * can_return_null=None)\n"
   64302             :     "\n"
   64303             :     "\n"
   64304             :     "Fetch the affine transformation coefficients.\n"
   64305             :     "\n"
   64306             :     "See :cpp:func:`GDALGetGeoTransform`.\n"
   64307             :     "\n"
   64308             :     "Parameters\n"
   64309             :     "-----------\n"
   64310             :     "can_return_null : bool, default=False\n"
   64311             :     "    if ``True``, return ``None`` instead of the default transformation\n"
   64312             :     "    if the transformation for this :py:class:`Dataset` has not been defined.\n"
   64313             :     "\n"
   64314             :     "Returns\n"
   64315             :     "-------\n"
   64316             :     "tuple:\n"
   64317             :     "    a 6-member tuple representing the transformation coefficients\n"
   64318             :     "\n"
   64319             :     "\n"
   64320             :     "\n"
   64321             :     ""},
   64322             :    { "Dataset_SetGeoTransform", _wrap_Dataset_SetGeoTransform, METH_VARARGS, "\n"
   64323             :     "Dataset_SetGeoTransform(Dataset self, double [6] argin) -> CPLErr\n"
   64324             :     "\n"
   64325             :     "\n"
   64326             :     "Set the affine transformation coefficients.\n"
   64327             :     "\n"
   64328             :     "See :py:meth:`GetGeoTransform` for details on the meaning of the coefficients.\n"
   64329             :     "\n"
   64330             :     "Parameters\n"
   64331             :     "----------\n"
   64332             :     "argin : tuple\n"
   64333             :     "\n"
   64334             :     "Returns\n"
   64335             :     "-------\n"
   64336             :     ":py:const:`CE_Failure` if an error occurs, otherwise :py:const:`CE_None`.\n"
   64337             :     "\n"
   64338             :     "\n"
   64339             :     ""},
   64340             :    { "Dataset_GetExtent", (PyCFunction)(void(*)(void))_wrap_Dataset_GetExtent, METH_VARARGS|METH_KEYWORDS, "Dataset_GetExtent(Dataset self, SpatialReference srs=None)"},
   64341             :    { "Dataset_GetExtentWGS84LongLat", _wrap_Dataset_GetExtentWGS84LongLat, METH_O, "Dataset_GetExtentWGS84LongLat(Dataset self)"},
   64342             :    { "Dataset_BuildOverviews", (PyCFunction)(void(*)(void))_wrap_Dataset_BuildOverviews, METH_VARARGS|METH_KEYWORDS, "\n"
   64343             :     "Dataset_BuildOverviews(Dataset self, char const * resampling=\"NEAREST\", int overviewlist=0, GDALProgressFunc callback=0, void * callback_data=None, char ** options=None) -> int\n"
   64344             :     "\n"
   64345             :     "\n"
   64346             :     "Build raster overview(s) for all bands.\n"
   64347             :     "\n"
   64348             :     "See :cpp:func:`GDALDataset::BuildOverviews`\n"
   64349             :     "\n"
   64350             :     "Parameters\n"
   64351             :     "----------\n"
   64352             :     "resampling : str, optional\n"
   64353             :     "             The resampling method to use. See :cpp:func:`GDALDataset::BuildOverviews`.\n"
   64354             :     "overviewlist : list\n"
   64355             :     "             A list of overview levels (decimation factors) to build, or an\n"
   64356             :     "             empty list to clear existing overviews.\n"
   64357             :     "callback : function, optional\n"
   64358             :     "             A progress callback function\n"
   64359             :     "callback_data: optional\n"
   64360             :     "             Optional data to be passed to callback function\n"
   64361             :     "options : dict/list, optional\n"
   64362             :     "             A dict or list of key=value options\n"
   64363             :     "\n"
   64364             :     "Returns\n"
   64365             :     "-------\n"
   64366             :     ":py:const:`CE_Failure` if an error occurs, otherwise :py:const:`CE_None`.\n"
   64367             :     "\n"
   64368             :     "Examples\n"
   64369             :     "--------\n"
   64370             :     ">>> import numpy as np\n"
   64371             :     ">>> ds = gdal.GetDriverByName('GTiff').Create('test.tif', 12, 12)\n"
   64372             :     ">>> ds.GetRasterBand(1).WriteArray(np.arange(12*12).reshape((12, 12)))\n"
   64373             :     "0\n"
   64374             :     ">>> ds.BuildOverviews('AVERAGE', [2, 4])\n"
   64375             :     "0\n"
   64376             :     ">>> ds.GetRasterBand(1).GetOverviewCount()\n"
   64377             :     "2\n"
   64378             :     ">>> ds.BuildOverviews(overviewlist=[])\n"
   64379             :     "0\n"
   64380             :     ">>> ds.GetRasterBand(1).GetOverviewCount()\n"
   64381             :     "0\n"
   64382             :     "\n"
   64383             :     ""},
   64384             :    { "Dataset_GetGCPCount", _wrap_Dataset_GetGCPCount, METH_O, "\n"
   64385             :     "Dataset_GetGCPCount(Dataset self) -> int\n"
   64386             :     "\n"
   64387             :     "\n"
   64388             :     "Get number of GCPs. See :cpp:func:`GDALGetGCPCount`.\n"
   64389             :     "\n"
   64390             :     "Returns\n"
   64391             :     "--------\n"
   64392             :     "int\n"
   64393             :     "\n"
   64394             :     "\n"
   64395             :     ""},
   64396             :    { "Dataset_GetGCPProjection", _wrap_Dataset_GetGCPProjection, METH_O, "\n"
   64397             :     "Dataset_GetGCPProjection(Dataset self) -> char const *\n"
   64398             :     "\n"
   64399             :     "\n"
   64400             :     "Return a WKT representation of the GCP spatial reference.\n"
   64401             :     "\n"
   64402             :     "Returns\n"
   64403             :     "--------\n"
   64404             :     "string\n"
   64405             :     "\n"
   64406             :     "\n"
   64407             :     ""},
   64408             :    { "Dataset_GetGCPSpatialRef", _wrap_Dataset_GetGCPSpatialRef, METH_O, "\n"
   64409             :     "Dataset_GetGCPSpatialRef(Dataset self) -> SpatialReference\n"
   64410             :     "\n"
   64411             :     "\n"
   64412             :     "Get output spatial reference system for GCPs.\n"
   64413             :     "\n"
   64414             :     "See :cpp:func:`GDALGetGCPSpatialRef`\n"
   64415             :     "\n"
   64416             :     "\n"
   64417             :     ""},
   64418             :    { "Dataset_GetGCPs", _wrap_Dataset_GetGCPs, METH_O, "\n"
   64419             :     "Dataset_GetGCPs(Dataset self)\n"
   64420             :     "\n"
   64421             :     "\n"
   64422             :     "Get the GCPs. See :cpp:func:`GDALGetGCPs`.\n"
   64423             :     "\n"
   64424             :     "Returns\n"
   64425             :     "--------\n"
   64426             :     "tuple\n"
   64427             :     "    a tuple of :py:class:`GCP` objects.\n"
   64428             :     "\n"
   64429             :     "\n"
   64430             :     ""},
   64431             :    { "Dataset__SetGCPs", _wrap_Dataset__SetGCPs, METH_VARARGS, "\n"
   64432             :     "Dataset__SetGCPs(Dataset self, int nGCPs, char const * pszGCPProjection) -> CPLErr\n"
   64433             :     "\n"
   64434             :     "\n"
   64435             :     ""},
   64436             :    { "Dataset__SetGCPs2", _wrap_Dataset__SetGCPs2, METH_VARARGS, "Dataset__SetGCPs2(Dataset self, int nGCPs, SpatialReference hSRS) -> CPLErr"},
   64437             :    { "Dataset_FlushCache", _wrap_Dataset_FlushCache, METH_O, "\n"
   64438             :     "Dataset_FlushCache(Dataset self) -> CPLErr\n"
   64439             :     "\n"
   64440             :     "\n"
   64441             :     "Flush all write-cached data to disk.\n"
   64442             :     "\n"
   64443             :     "See :cpp:func:`GDALDataset::FlushCache`.\n"
   64444             :     "\n"
   64445             :     "Returns\n"
   64446             :     "-------\n"
   64447             :     "int\n"
   64448             :     "    `gdal.CE_None` in case of success\n"
   64449             :     "\n"
   64450             :     ""},
   64451             :    { "Dataset_AddBand", (PyCFunction)(void(*)(void))_wrap_Dataset_AddBand, METH_VARARGS|METH_KEYWORDS, "\n"
   64452             :     "Dataset_AddBand(Dataset self, GDALDataType datatype=GDT_Byte, char ** options=None) -> CPLErr\n"
   64453             :     "\n"
   64454             :     "\n"
   64455             :     "Adds a band to a :py:class:`Dataset`.\n"
   64456             :     "\n"
   64457             :     "Not supported by all drivers.\n"
   64458             :     "\n"
   64459             :     "Parameters\n"
   64460             :     "-----------\n"
   64461             :     "datatype: int\n"
   64462             :     "    the data type of the pixels in the new band\n"
   64463             :     "options: dict/list\n"
   64464             :     "    an optional dict or list of format-specific ``NAME=VALUE`` option strings.\n"
   64465             :     "\n"
   64466             :     "Returns\n"
   64467             :     "-------\n"
   64468             :     "int:\n"
   64469             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   64470             :     "\n"
   64471             :     "Examples\n"
   64472             :     "--------\n"
   64473             :     ">>> ds=gdal.GetDriverByName('MEM').Create('', 10, 10)\n"
   64474             :     ">>> ds.RasterCount\n"
   64475             :     "1\n"
   64476             :     ">>> ds.AddBand(gdal.GDT_Float32)\n"
   64477             :     "0\n"
   64478             :     ">>> ds.RasterCount\n"
   64479             :     "2\n"
   64480             :     "\n"
   64481             :     ""},
   64482             :    { "Dataset_CreateMaskBand", _wrap_Dataset_CreateMaskBand, METH_VARARGS, "\n"
   64483             :     "Dataset_CreateMaskBand(Dataset self, int nFlags) -> CPLErr\n"
   64484             :     "\n"
   64485             :     "\n"
   64486             :     "Adds a mask band to the dataset.\n"
   64487             :     "\n"
   64488             :     "See :cpp:func:`GDALDataset::CreateMaskBand`.\n"
   64489             :     "\n"
   64490             :     "Parameters\n"
   64491             :     "----------\n"
   64492             :     "flags : int\n"
   64493             :     "\n"
   64494             :     "Returns\n"
   64495             :     "-------\n"
   64496             :     "int\n"
   64497             :     "    :py:const:`CE_Failure` if an error occurs, otherwise :py:const:`CE_None`.\n"
   64498             :     "\n"
   64499             :     "\n"
   64500             :     ""},
   64501             :    { "Dataset_GetFileList", _wrap_Dataset_GetFileList, METH_O, "\n"
   64502             :     "Dataset_GetFileList(Dataset self) -> char **\n"
   64503             :     "\n"
   64504             :     "\n"
   64505             :     "Returns a list of files believed to be part of this dataset.\n"
   64506             :     "See :cpp:func:`GDALGetFileList`.\n"
   64507             :     "\n"
   64508             :     "\n"
   64509             :     ""},
   64510             :    { "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"},
   64511             :    { "Dataset_AdviseRead", _wrap_Dataset_AdviseRead, METH_VARARGS, "\n"
   64512             :     "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"
   64513             :     "\n"
   64514             :     "\n"
   64515             :     "Advise driver of upcoming read requests.\n"
   64516             :     "\n"
   64517             :     "See :cpp:func:`GDALDataset::AdviseRead`.\n"
   64518             :     "\n"
   64519             :     "\n"
   64520             :     ""},
   64521             :    { "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"},
   64522             :    { "Dataset_EndAsyncReader", _wrap_Dataset_EndAsyncReader, METH_VARARGS, "Dataset_EndAsyncReader(Dataset self, AsyncReader ario)"},
   64523             :    { "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"},
   64524             :    { "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"},
   64525             :    { "Dataset_CreateLayer", (PyCFunction)(void(*)(void))_wrap_Dataset_CreateLayer, METH_VARARGS|METH_KEYWORDS, "\n"
   64526             :     "Dataset_CreateLayer(Dataset self, char const * name, SpatialReference srs=None, OGRwkbGeometryType geom_type=wkbUnknown, char ** options=None) -> Layer\n"
   64527             :     "\n"
   64528             :     "\n"
   64529             :     "Create a new layer in a vector Dataset.\n"
   64530             :     "\n"
   64531             :     "Parameters\n"
   64532             :     "----------\n"
   64533             :     "name : string\n"
   64534             :     "       the name for the new layer.  This should ideally not\n"
   64535             :     "       match any existing layer on the datasource.\n"
   64536             :     "srs : osr.SpatialReference, default=None\n"
   64537             :     "      the coordinate system to use for the new layer, or ``None`` if\n"
   64538             :     "      no coordinate system is available.\n"
   64539             :     "geom_type : int, default = :py:const:`ogr.wkbUnknown`\n"
   64540             :     "      geometry type for the layer.  Use :py:const:`ogr.wkbUnknown` if there\n"
   64541             :     "      are no constraints on the types geometry to be written.\n"
   64542             :     "options : dict/list, optional\n"
   64543             :     "      Driver-specific dict or list of name=value options\n"
   64544             :     "\n"
   64545             :     "Returns\n"
   64546             :     "-------\n"
   64547             :     "ogr.Layer or ``None`` on failure.\n"
   64548             :     "\n"
   64549             :     "\n"
   64550             :     "Examples\n"
   64551             :     "--------\n"
   64552             :     ">>> ds = gdal.GetDriverByName('GPKG').Create('test.gpkg', 0, 0)\n"
   64553             :     ">>> ds.GetLayerCount()\n"
   64554             :     "0\n"
   64555             :     ">>> lyr = ds.CreateLayer('poly', geom_type=ogr.wkbPolygon)\n"
   64556             :     ">>> ds.GetLayerCount()\n"
   64557             :     "1\n"
   64558             :     "\n"
   64559             :     "\n"
   64560             :     ""},
   64561             :    { "Dataset_CreateLayerFromGeomFieldDefn", _wrap_Dataset_CreateLayerFromGeomFieldDefn, METH_VARARGS, "Dataset_CreateLayerFromGeomFieldDefn(Dataset self, char const * name, GeomFieldDefn geom_field, char ** options=None) -> Layer"},
   64562             :    { "Dataset_CopyLayer", (PyCFunction)(void(*)(void))_wrap_Dataset_CopyLayer, METH_VARARGS|METH_KEYWORDS, "\n"
   64563             :     "Dataset_CopyLayer(Dataset self, Layer src_layer, char const * new_name, char ** options=None) -> Layer\n"
   64564             :     "\n"
   64565             :     "\n"
   64566             :     "Duplicate an existing :py:class:`ogr.Layer`.\n"
   64567             :     "\n"
   64568             :     "See :cpp:func:`GDALDataset::CopyLayer`.\n"
   64569             :     "\n"
   64570             :     "Parameters\n"
   64571             :     "----------\n"
   64572             :     "src_layer : ogr.Layer\n"
   64573             :     "            source layer\n"
   64574             :     "new_name : str\n"
   64575             :     "           name of the layer to create\n"
   64576             :     "options : dict/list\n"
   64577             :     "          a dict or list of name=value driver-specific creation options\n"
   64578             :     "\n"
   64579             :     "Returns\n"
   64580             :     "-------\n"
   64581             :     "ogr.Layer, or ``None`` if an error occurs\n"
   64582             :     "\n"
   64583             :     ""},
   64584             :    { "Dataset_DeleteLayer", _wrap_Dataset_DeleteLayer, METH_VARARGS, "Dataset_DeleteLayer(Dataset self, int index) -> OGRErr"},
   64585             :    { "Dataset_IsLayerPrivate", _wrap_Dataset_IsLayerPrivate, METH_VARARGS, "\n"
   64586             :     "Dataset_IsLayerPrivate(Dataset self, int index) -> bool\n"
   64587             :     "\n"
   64588             :     "\n"
   64589             :     "Parameters\n"
   64590             :     "----------\n"
   64591             :     "index : int\n"
   64592             :     "        Index o layer to check\n"
   64593             :     "\n"
   64594             :     "Returns\n"
   64595             :     "-------\n"
   64596             :     "bool\n"
   64597             :     "     ``True`` if the layer is a private or system table, ``False`` otherwise\n"
   64598             :     "\n"
   64599             :     "\n"
   64600             :     "\n"
   64601             :     ""},
   64602             :    { "Dataset_GetNextFeature", (PyCFunction)(void(*)(void))_wrap_Dataset_GetNextFeature, METH_VARARGS|METH_KEYWORDS, "\n"
   64603             :     "Dataset_GetNextFeature(Dataset self, bool include_layer=True, bool include_pct=False, GDALProgressFunc callback=0, void * callback_data=None) -> Feature\n"
   64604             :     "\n"
   64605             :     "\n"
   64606             :     "Fetch the next available feature from this dataset.\n"
   64607             :     "\n"
   64608             :     "This method is intended for the few drivers where\n"
   64609             :     ":py:meth:`OGRLayer.GetNextFeature` is not efficient, but in general\n"
   64610             :     ":py:meth:`OGRLayer.GetNextFeature` is a more natural API.\n"
   64611             :     "\n"
   64612             :     "See :cpp:func:`GDALDataset::GetNextFeature`.\n"
   64613             :     "\n"
   64614             :     "Returns\n"
   64615             :     "-------\n"
   64616             :     "ogr.Feature\n"
   64617             :     "\n"
   64618             :     "\n"
   64619             :     ""},
   64620             :    { "Dataset_TestCapability", _wrap_Dataset_TestCapability, METH_VARARGS, "\n"
   64621             :     "Dataset_TestCapability(Dataset self, char const * cap) -> bool\n"
   64622             :     "\n"
   64623             :     "\n"
   64624             :     "Test if a capability is available.\n"
   64625             :     "\n"
   64626             :     "Parameters\n"
   64627             :     "----------\n"
   64628             :     "cap : str\n"
   64629             :     "   Name of the capability (e.g., :py:const:`ogr.ODsCTransactions`)\n"
   64630             :     "\n"
   64631             :     "Returns\n"
   64632             :     "-------\n"
   64633             :     "bool\n"
   64634             :     "    ``True`` if the capability is available, ``False`` if invalid or unavailable\n"
   64635             :     "\n"
   64636             :     "Examples\n"
   64637             :     "--------\n"
   64638             :     ">>> ds = gdal.GetDriverByName('ESRI Shapefile').Create('test.shp', 0, 0, 0, gdal.GDT_Unknown)\n"
   64639             :     ">>> ds.TestCapability(ogr.ODsCTransactions)\n"
   64640             :     "False\n"
   64641             :     ">>> ds.TestCapability(ogr.ODsCMeasuredGeometries)\n"
   64642             :     "True\n"
   64643             :     ">>> ds.TestCapability(gdal.GDsCAddRelationship)\n"
   64644             :     "False\n"
   64645             :     "\n"
   64646             :     "\n"
   64647             :     ""},
   64648             :    { "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"},
   64649             :    { "Dataset_ReleaseResultSet", _wrap_Dataset_ReleaseResultSet, METH_VARARGS, "Dataset_ReleaseResultSet(Dataset self, Layer layer)"},
   64650             :    { "Dataset_GetStyleTable", _wrap_Dataset_GetStyleTable, METH_O, "\n"
   64651             :     "Dataset_GetStyleTable(Dataset self) -> StyleTable\n"
   64652             :     "\n"
   64653             :     "\n"
   64654             :     "Returns dataset style table.\n"
   64655             :     "\n"
   64656             :     "Returns\n"
   64657             :     "-------\n"
   64658             :     "ogr.StyleTable\n"
   64659             :     "\n"
   64660             :     "\n"
   64661             :     ""},
   64662             :    { "Dataset_SetStyleTable", _wrap_Dataset_SetStyleTable, METH_VARARGS, "\n"
   64663             :     "Dataset_SetStyleTable(Dataset self, StyleTable table)\n"
   64664             :     "\n"
   64665             :     "\n"
   64666             :     "Set dataset style table\n"
   64667             :     "\n"
   64668             :     "Parameters\n"
   64669             :     "----------\n"
   64670             :     "table : ogr.StyleTable\n"
   64671             :     "\n"
   64672             :     ""},
   64673             :    { "Dataset_GetLayerByIndex", _wrap_Dataset_GetLayerByIndex, METH_VARARGS, "\n"
   64674             :     "Dataset_GetLayerByIndex(Dataset self, int index=0) -> Layer\n"
   64675             :     "\n"
   64676             :     "\n"
   64677             :     "Fetch a layer by index.\n"
   64678             :     "\n"
   64679             :     "Parameters\n"
   64680             :     "----------\n"
   64681             :     "index : int\n"
   64682             :     "    A layer number between 0 and ``GetLayerCount() - 1``\n"
   64683             :     "\n"
   64684             :     "Returns\n"
   64685             :     "-------\n"
   64686             :     "ogr.Layer\n"
   64687             :     "\n"
   64688             :     "\n"
   64689             :     ""},
   64690             :    { "Dataset_GetLayerByName", _wrap_Dataset_GetLayerByName, METH_VARARGS, "Dataset_GetLayerByName(Dataset self, char const * layer_name) -> Layer"},
   64691             :    { "Dataset_ResetReading", _wrap_Dataset_ResetReading, METH_O, "\n"
   64692             :     "Dataset_ResetReading(Dataset self)\n"
   64693             :     "\n"
   64694             :     "\n"
   64695             :     "Reset feature reading to start on the first feature.\n"
   64696             :     "\n"
   64697             :     "This affects :py:meth:`GetNextFeature`.\n"
   64698             :     "\n"
   64699             :     "Depending on drivers, this may also have the side effect of calling\n"
   64700             :     ":py:meth:`OGRLayer.ResetReading` on the layers of this dataset.\n"
   64701             :     "\n"
   64702             :     "\n"
   64703             :     ""},
   64704             :    { "Dataset_GetLayerCount", _wrap_Dataset_GetLayerCount, METH_O, "\n"
   64705             :     "Dataset_GetLayerCount(Dataset self) -> int\n"
   64706             :     "\n"
   64707             :     "\n"
   64708             :     "Get the number of layers in this dataset.\n"
   64709             :     "\n"
   64710             :     "Returns\n"
   64711             :     "-------\n"
   64712             :     "int\n"
   64713             :     "\n"
   64714             :     "\n"
   64715             :     ""},
   64716             :    { "Dataset_AbortSQL", _wrap_Dataset_AbortSQL, METH_O, "\n"
   64717             :     "Dataset_AbortSQL(Dataset self) -> OGRErr\n"
   64718             :     "\n"
   64719             :     "\n"
   64720             :     "Abort any SQL statement running in the data store.\n"
   64721             :     "\n"
   64722             :     "Not implemented by all drivers. See :cpp:func:`GDALDataset::AbortSQL`.\n"
   64723             :     "\n"
   64724             :     "Returns\n"
   64725             :     "-------\n"
   64726             :     ":py:const:`ogr.OGRERR_NONE` on success or :py:const:`ogr.OGRERR_UNSUPPORTED_OPERATION` if AbortSQL is not supported for this dataset.\n"
   64727             :     "\n"
   64728             :     ""},
   64729             :    { "Dataset_StartTransaction", (PyCFunction)(void(*)(void))_wrap_Dataset_StartTransaction, METH_VARARGS|METH_KEYWORDS, "\n"
   64730             :     "Dataset_StartTransaction(Dataset self, int force=FALSE) -> OGRErr\n"
   64731             :     "\n"
   64732             :     "\n"
   64733             :     "Creates a transaction. See :cpp:func:`GDALDataset::StartTransaction`.\n"
   64734             :     "\n"
   64735             :     "Returns\n"
   64736             :     "-------\n"
   64737             :     "int\n"
   64738             :     "    If starting the transaction fails, will return\n"
   64739             :     "    :py:const:`ogr.OGRERR_FAILURE`. Datasources which do not support transactions will\n"
   64740             :     "    always return :py:const:`OGRERR_UNSUPPORTED_OPERATION`.\n"
   64741             :     "\n"
   64742             :     "\n"
   64743             :     ""},
   64744             :    { "Dataset_CommitTransaction", _wrap_Dataset_CommitTransaction, METH_O, "\n"
   64745             :     "Dataset_CommitTransaction(Dataset self) -> OGRErr\n"
   64746             :     "\n"
   64747             :     "Commits a transaction, for `Datasets` that support transactions.\n"
   64748             :     "\n"
   64749             :     "See :cpp:func:`GDALDataset::CommitTransaction`.\n"
   64750             :     "\n"
   64751             :     ""},
   64752             :    { "Dataset_RollbackTransaction", _wrap_Dataset_RollbackTransaction, METH_O, "\n"
   64753             :     "Dataset_RollbackTransaction(Dataset self) -> OGRErr\n"
   64754             :     "\n"
   64755             :     "\n"
   64756             :     "Roll back a Dataset to its state before the start of the current transaction.\n"
   64757             :     "\n"
   64758             :     "For datasets that support transactions.\n"
   64759             :     "\n"
   64760             :     "Returns\n"
   64761             :     "-------\n"
   64762             :     "int\n"
   64763             :     "    If no transaction is active, or the rollback fails, will return\n"
   64764             :     "    :py:const:`OGRERR_FAILURE`. Datasources which do not support transactions will\n"
   64765             :     "    always return :py:const:`OGRERR_UNSUPPORTED_OPERATION`.\n"
   64766             :     "\n"
   64767             :     "\n"
   64768             :     ""},
   64769             :    { "Dataset_ClearStatistics", _wrap_Dataset_ClearStatistics, METH_O, "\n"
   64770             :     "Dataset_ClearStatistics(Dataset self)\n"
   64771             :     "\n"
   64772             :     "\n"
   64773             :     "Clear statistics\n"
   64774             :     "\n"
   64775             :     "See :cpp:func:`GDALDataset::ClearStatistics`.\n"
   64776             :     "\n"
   64777             :     "\n"
   64778             :     ""},
   64779             :    { "Dataset_GetFieldDomainNames", _wrap_Dataset_GetFieldDomainNames, METH_VARARGS, "\n"
   64780             :     "Dataset_GetFieldDomainNames(Dataset self, char ** options=None) -> char **\n"
   64781             :     "\n"
   64782             :     "\n"
   64783             :     "Get a list of the names of all field domains stored in the dataset.\n"
   64784             :     "\n"
   64785             :     "Parameters\n"
   64786             :     "----------\n"
   64787             :     "options: dict/list, optional\n"
   64788             :     "         Driver-specific options determining how attributes should\n"
   64789             :     "         be retrieved.\n"
   64790             :     "\n"
   64791             :     "Returns\n"
   64792             :     "-------\n"
   64793             :     "list, or ``None`` if no field domains are stored in the dataset.\n"
   64794             :     "\n"
   64795             :     ""},
   64796             :    { "Dataset_GetFieldDomain", _wrap_Dataset_GetFieldDomain, METH_VARARGS, "\n"
   64797             :     "Dataset_GetFieldDomain(Dataset self, char const * name) -> FieldDomain\n"
   64798             :     "\n"
   64799             :     "\n"
   64800             :     "Get a field domain from its name.\n"
   64801             :     "\n"
   64802             :     "Parameters\n"
   64803             :     "----------\n"
   64804             :     "name: str\n"
   64805             :     "      The name of the field domain\n"
   64806             :     "\n"
   64807             :     "Returns\n"
   64808             :     "-------\n"
   64809             :     "ogr.FieldDomain, or ``None`` if it is not found.\n"
   64810             :     "\n"
   64811             :     ""},
   64812             :    { "Dataset_AddFieldDomain", _wrap_Dataset_AddFieldDomain, METH_VARARGS, "\n"
   64813             :     "Dataset_AddFieldDomain(Dataset self, FieldDomain fieldDomain) -> bool\n"
   64814             :     "\n"
   64815             :     "\n"
   64816             :     "Add a :py:class:`ogr.FieldDomain` to the dataset.\n"
   64817             :     "\n"
   64818             :     "Only a few drivers support this operation. See :cpp:func:`GDALDataset::AddFieldDomain`.\n"
   64819             :     "\n"
   64820             :     "Parameters\n"
   64821             :     "----------\n"
   64822             :     "fieldDomain : ogr.FieldDomain\n"
   64823             :     "              The field domain to add\n"
   64824             :     "\n"
   64825             :     "Returns\n"
   64826             :     "--------\n"
   64827             :     "bool:\n"
   64828             :     "    ``True`` if the field domain was added, ``False`` in case of error.\n"
   64829             :     "\n"
   64830             :     "\n"
   64831             :     "\n"
   64832             :     ""},
   64833             :    { "Dataset_DeleteFieldDomain", _wrap_Dataset_DeleteFieldDomain, METH_VARARGS, "\n"
   64834             :     "Dataset_DeleteFieldDomain(Dataset self, char const * name) -> bool\n"
   64835             :     "\n"
   64836             :     "\n"
   64837             :     "Removes a field domain from the Dataset.\n"
   64838             :     "\n"
   64839             :     "Parameters\n"
   64840             :     "----------\n"
   64841             :     "name : str\n"
   64842             :     "       Name of the field domain to delete\n"
   64843             :     "\n"
   64844             :     "Returns\n"
   64845             :     "-------\n"
   64846             :     "bool\n"
   64847             :     "     ``True`` if the field domain was removed, otherwise ``False``.\n"
   64848             :     "\n"
   64849             :     "\n"
   64850             :     ""},
   64851             :    { "Dataset_UpdateFieldDomain", _wrap_Dataset_UpdateFieldDomain, METH_VARARGS, "\n"
   64852             :     "Dataset_UpdateFieldDomain(Dataset self, FieldDomain fieldDomain) -> bool\n"
   64853             :     "\n"
   64854             :     "\n"
   64855             :     "Update an existing field domain by replacing its definition.\n"
   64856             :     "\n"
   64857             :     "The existing field domain with matching name will be replaced.\n"
   64858             :     "\n"
   64859             :     "Requires the :py:const:`ogr.ODsCUpdateFieldDomain` datasset capability.\n"
   64860             :     "\n"
   64861             :     "Parameters\n"
   64862             :     "----------\n"
   64863             :     "fieldDomain : ogr.FieldDomain\n"
   64864             :     "    Updated field domain.\n"
   64865             :     "\n"
   64866             :     "Returns\n"
   64867             :     "-------\n"
   64868             :     "bool\n"
   64869             :     "    ``True`` in case of success\n"
   64870             :     "\n"
   64871             :     "\n"
   64872             :     ""},
   64873             :    { "Dataset_GetRelationshipNames", _wrap_Dataset_GetRelationshipNames, METH_VARARGS, "\n"
   64874             :     "Dataset_GetRelationshipNames(Dataset self, char ** options=None) -> char **\n"
   64875             :     "\n"
   64876             :     "\n"
   64877             :     "Get a list of the names of all relationships stored in the dataset.\n"
   64878             :     "\n"
   64879             :     "Parameters\n"
   64880             :     "----------\n"
   64881             :     "options : dict/list, optional\n"
   64882             :     "    driver-specific options determining how the relationships should be retrieved\n"
   64883             :     "\n"
   64884             :     "\n"
   64885             :     ""},
   64886             :    { "Dataset_GetRelationship", _wrap_Dataset_GetRelationship, METH_VARARGS, "\n"
   64887             :     "Dataset_GetRelationship(Dataset self, char const * name) -> Relationship\n"
   64888             :     "\n"
   64889             :     "\n"
   64890             :     "Get a relationship from its name.\n"
   64891             :     "\n"
   64892             :     "Returns\n"
   64893             :     "-------\n"
   64894             :     "Relationship, or ``None`` if not found.\n"
   64895             :     "\n"
   64896             :     ""},
   64897             :    { "Dataset_AddRelationship", _wrap_Dataset_AddRelationship, METH_VARARGS, "\n"
   64898             :     "Dataset_AddRelationship(Dataset self, Relationship relationship) -> bool\n"
   64899             :     "\n"
   64900             :     "\n"
   64901             :     "Add a :py:class:`Relationship` to the dataset.\n"
   64902             :     "\n"
   64903             :     "See :cpp:func:`GDALDataset::AddRelationship`.\n"
   64904             :     "\n"
   64905             :     "Parameters\n"
   64906             :     "----------\n"
   64907             :     "relationship : Relationship\n"
   64908             :     "               The relationship to add\n"
   64909             :     "\n"
   64910             :     "Returns\n"
   64911             :     "-------\n"
   64912             :     "bool:\n"
   64913             :     "    ``True`` if the field domain was added, ``False`` in case of error.\n"
   64914             :     "\n"
   64915             :     "\n"
   64916             :     ""},
   64917             :    { "Dataset_DeleteRelationship", _wrap_Dataset_DeleteRelationship, METH_VARARGS, "\n"
   64918             :     "Dataset_DeleteRelationship(Dataset self, char const * name) -> bool\n"
   64919             :     "\n"
   64920             :     "\n"
   64921             :     "Removes a relationship from the Dataset.\n"
   64922             :     "\n"
   64923             :     "Parameters\n"
   64924             :     "----------\n"
   64925             :     "name : str\n"
   64926             :     "       Name of the relationship to remove.\n"
   64927             :     "\n"
   64928             :     "Returns\n"
   64929             :     "-------\n"
   64930             :     "bool\n"
   64931             :     "     ``True`` if the relationship  was removed, otherwise ``False``.\n"
   64932             :     "\n"
   64933             :     "\n"
   64934             :     "\n"
   64935             :     ""},
   64936             :    { "Dataset_UpdateRelationship", _wrap_Dataset_UpdateRelationship, METH_VARARGS, "\n"
   64937             :     "Dataset_UpdateRelationship(Dataset self, Relationship relationship) -> bool\n"
   64938             :     "\n"
   64939             :     "\n"
   64940             :     "Update an existing relationship by replacing its definition.\n"
   64941             :     "\n"
   64942             :     "The existing relationship with matching name will be replaced.\n"
   64943             :     "\n"
   64944             :     "Requires the :py:const:`gdal.GDsCUpdateFieldDomain` dataset capability.\n"
   64945             :     "\n"
   64946             :     "Parameters\n"
   64947             :     "----------\n"
   64948             :     "relationship : Relationship\n"
   64949             :     "    Updated relationship\n"
   64950             :     "\n"
   64951             :     "Returns\n"
   64952             :     "-------\n"
   64953             :     "bool\n"
   64954             :     "    ``True`` in case of success\n"
   64955             :     "\n"
   64956             :     "\n"
   64957             :     ""},
   64958             :    { "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"},
   64959             :    { "Dataset_swigregister", Dataset_swigregister, METH_O, NULL},
   64960             :    { "new_RasterAttributeTable", _wrap_new_RasterAttributeTable, METH_NOARGS, "new_RasterAttributeTable() -> RasterAttributeTable"},
   64961             :    { "delete_RasterAttributeTable", _wrap_delete_RasterAttributeTable, METH_O, "delete_RasterAttributeTable(RasterAttributeTable self)"},
   64962             :    { "RasterAttributeTable_Clone", _wrap_RasterAttributeTable_Clone, METH_O, "RasterAttributeTable_Clone(RasterAttributeTable self) -> RasterAttributeTable"},
   64963             :    { "RasterAttributeTable_GetColumnCount", _wrap_RasterAttributeTable_GetColumnCount, METH_O, "RasterAttributeTable_GetColumnCount(RasterAttributeTable self) -> int"},
   64964             :    { "RasterAttributeTable_GetNameOfCol", _wrap_RasterAttributeTable_GetNameOfCol, METH_VARARGS, "RasterAttributeTable_GetNameOfCol(RasterAttributeTable self, int iCol) -> char const *"},
   64965             :    { "RasterAttributeTable_GetUsageOfCol", _wrap_RasterAttributeTable_GetUsageOfCol, METH_VARARGS, "RasterAttributeTable_GetUsageOfCol(RasterAttributeTable self, int iCol) -> GDALRATFieldUsage"},
   64966             :    { "RasterAttributeTable_GetTypeOfCol", _wrap_RasterAttributeTable_GetTypeOfCol, METH_VARARGS, "RasterAttributeTable_GetTypeOfCol(RasterAttributeTable self, int iCol) -> GDALRATFieldType"},
   64967             :    { "RasterAttributeTable_GetColOfUsage", _wrap_RasterAttributeTable_GetColOfUsage, METH_VARARGS, "RasterAttributeTable_GetColOfUsage(RasterAttributeTable self, GDALRATFieldUsage eUsage) -> int"},
   64968             :    { "RasterAttributeTable_GetRowCount", _wrap_RasterAttributeTable_GetRowCount, METH_O, "RasterAttributeTable_GetRowCount(RasterAttributeTable self) -> int"},
   64969             :    { "RasterAttributeTable_GetValueAsString", _wrap_RasterAttributeTable_GetValueAsString, METH_VARARGS, "RasterAttributeTable_GetValueAsString(RasterAttributeTable self, int iRow, int iCol) -> char const *"},
   64970             :    { "RasterAttributeTable_GetValueAsInt", _wrap_RasterAttributeTable_GetValueAsInt, METH_VARARGS, "RasterAttributeTable_GetValueAsInt(RasterAttributeTable self, int iRow, int iCol) -> int"},
   64971             :    { "RasterAttributeTable_GetValueAsDouble", _wrap_RasterAttributeTable_GetValueAsDouble, METH_VARARGS, "RasterAttributeTable_GetValueAsDouble(RasterAttributeTable self, int iRow, int iCol) -> double"},
   64972             :    { "RasterAttributeTable_ReadValuesIOAsString", _wrap_RasterAttributeTable_ReadValuesIOAsString, METH_VARARGS, "RasterAttributeTable_ReadValuesIOAsString(RasterAttributeTable self, int iField, int iStartRow, int iLength) -> CPLErr"},
   64973             :    { "RasterAttributeTable_ReadValuesIOAsInteger", _wrap_RasterAttributeTable_ReadValuesIOAsInteger, METH_VARARGS, "RasterAttributeTable_ReadValuesIOAsInteger(RasterAttributeTable self, int iField, int iStartRow, int iLength) -> CPLErr"},
   64974             :    { "RasterAttributeTable_ReadValuesIOAsDouble", _wrap_RasterAttributeTable_ReadValuesIOAsDouble, METH_VARARGS, "RasterAttributeTable_ReadValuesIOAsDouble(RasterAttributeTable self, int iField, int iStartRow, int iLength) -> CPLErr"},
   64975             :    { "RasterAttributeTable_SetValueAsString", _wrap_RasterAttributeTable_SetValueAsString, METH_VARARGS, "RasterAttributeTable_SetValueAsString(RasterAttributeTable self, int iRow, int iCol, char const * pszValue)"},
   64976             :    { "RasterAttributeTable_SetValueAsInt", _wrap_RasterAttributeTable_SetValueAsInt, METH_VARARGS, "RasterAttributeTable_SetValueAsInt(RasterAttributeTable self, int iRow, int iCol, int nValue)"},
   64977             :    { "RasterAttributeTable_SetValueAsDouble", _wrap_RasterAttributeTable_SetValueAsDouble, METH_VARARGS, "RasterAttributeTable_SetValueAsDouble(RasterAttributeTable self, int iRow, int iCol, double dfValue)"},
   64978             :    { "RasterAttributeTable_SetRowCount", _wrap_RasterAttributeTable_SetRowCount, METH_VARARGS, "RasterAttributeTable_SetRowCount(RasterAttributeTable self, int nCount)"},
   64979             :    { "RasterAttributeTable_CreateColumn", _wrap_RasterAttributeTable_CreateColumn, METH_VARARGS, "RasterAttributeTable_CreateColumn(RasterAttributeTable self, char const * pszName, GDALRATFieldType eType, GDALRATFieldUsage eUsage) -> int"},
   64980             :    { "RasterAttributeTable_GetLinearBinning", _wrap_RasterAttributeTable_GetLinearBinning, METH_O, "RasterAttributeTable_GetLinearBinning(RasterAttributeTable self) -> bool"},
   64981             :    { "RasterAttributeTable_SetLinearBinning", _wrap_RasterAttributeTable_SetLinearBinning, METH_VARARGS, "RasterAttributeTable_SetLinearBinning(RasterAttributeTable self, double dfRow0Min, double dfBinSize) -> int"},
   64982             :    { "RasterAttributeTable_GetRowOfValue", _wrap_RasterAttributeTable_GetRowOfValue, METH_VARARGS, "RasterAttributeTable_GetRowOfValue(RasterAttributeTable self, double dfValue) -> int"},
   64983             :    { "RasterAttributeTable_ChangesAreWrittenToFile", _wrap_RasterAttributeTable_ChangesAreWrittenToFile, METH_O, "RasterAttributeTable_ChangesAreWrittenToFile(RasterAttributeTable self) -> int"},
   64984             :    { "RasterAttributeTable_DumpReadable", _wrap_RasterAttributeTable_DumpReadable, METH_O, "RasterAttributeTable_DumpReadable(RasterAttributeTable self)"},
   64985             :    { "RasterAttributeTable_SetTableType", _wrap_RasterAttributeTable_SetTableType, METH_VARARGS, "RasterAttributeTable_SetTableType(RasterAttributeTable self, GDALRATTableType eTableType)"},
   64986             :    { "RasterAttributeTable_GetTableType", _wrap_RasterAttributeTable_GetTableType, METH_O, "RasterAttributeTable_GetTableType(RasterAttributeTable self) -> GDALRATTableType"},
   64987             :    { "RasterAttributeTable_RemoveStatistics", _wrap_RasterAttributeTable_RemoveStatistics, METH_O, "RasterAttributeTable_RemoveStatistics(RasterAttributeTable self)"},
   64988             :    { "RasterAttributeTable_swigregister", RasterAttributeTable_swigregister, METH_O, NULL},
   64989             :    { "RasterAttributeTable_swiginit", RasterAttributeTable_swiginit, METH_VARARGS, NULL},
   64990             :    { "delete_Group", _wrap_delete_Group, METH_O, "delete_Group(Group self)"},
   64991             :    { "Group_GetName", _wrap_Group_GetName, METH_O, "Group_GetName(Group self) -> char const *"},
   64992             :    { "Group_GetFullName", _wrap_Group_GetFullName, METH_O, "Group_GetFullName(Group self) -> char const *"},
   64993             :    { "Group_GetMDArrayNames", _wrap_Group_GetMDArrayNames, METH_VARARGS, "Group_GetMDArrayNames(Group self, char ** options=None) -> char **"},
   64994             :    { "Group_GetMDArrayFullNamesRecursive", _wrap_Group_GetMDArrayFullNamesRecursive, METH_VARARGS, "Group_GetMDArrayFullNamesRecursive(Group self, char ** groupOptions=None, char ** arrayOptions=None) -> char **"},
   64995             :    { "Group_OpenMDArray", _wrap_Group_OpenMDArray, METH_VARARGS, "Group_OpenMDArray(Group self, char const * name, char ** options=None) -> MDArray"},
   64996             :    { "Group_OpenMDArrayFromFullname", _wrap_Group_OpenMDArrayFromFullname, METH_VARARGS, "Group_OpenMDArrayFromFullname(Group self, char const * name, char ** options=None) -> MDArray"},
   64997             :    { "Group_ResolveMDArray", _wrap_Group_ResolveMDArray, METH_VARARGS, "Group_ResolveMDArray(Group self, char const * name, char const * starting_point, char ** options=None) -> MDArray"},
   64998             :    { "Group_GetGroupNames", _wrap_Group_GetGroupNames, METH_VARARGS, "Group_GetGroupNames(Group self, char ** options=None) -> char **"},
   64999             :    { "Group_OpenGroup", _wrap_Group_OpenGroup, METH_VARARGS, "Group_OpenGroup(Group self, char const * name, char ** options=None) -> Group"},
   65000             :    { "Group_OpenGroupFromFullname", _wrap_Group_OpenGroupFromFullname, METH_VARARGS, "Group_OpenGroupFromFullname(Group self, char const * name, char ** options=None) -> Group"},
   65001             :    { "Group_GetVectorLayerNames", _wrap_Group_GetVectorLayerNames, METH_VARARGS, "Group_GetVectorLayerNames(Group self, char ** options=None) -> char **"},
   65002             :    { "Group_OpenVectorLayer", _wrap_Group_OpenVectorLayer, METH_VARARGS, "Group_OpenVectorLayer(Group self, char const * name, char ** options=None) -> Layer"},
   65003             :    { "Group_GetDimensions", _wrap_Group_GetDimensions, METH_VARARGS, "Group_GetDimensions(Group self, char ** options=None)"},
   65004             :    { "Group_GetAttribute", _wrap_Group_GetAttribute, METH_VARARGS, "Group_GetAttribute(Group self, char const * name) -> Attribute"},
   65005             :    { "Group_GetAttributes", _wrap_Group_GetAttributes, METH_VARARGS, "Group_GetAttributes(Group self, char ** options=None)"},
   65006             :    { "Group_GetStructuralInfo", _wrap_Group_GetStructuralInfo, METH_O, "Group_GetStructuralInfo(Group self) -> char **"},
   65007             :    { "Group_CreateGroup", (PyCFunction)(void(*)(void))_wrap_Group_CreateGroup, METH_VARARGS|METH_KEYWORDS, "Group_CreateGroup(Group self, char const * name, char ** options=None) -> Group"},
   65008             :    { "Group_DeleteGroup", _wrap_Group_DeleteGroup, METH_VARARGS, "Group_DeleteGroup(Group self, char const * name, char ** options=None) -> CPLErr"},
   65009             :    { "Group_CreateDimension", (PyCFunction)(void(*)(void))_wrap_Group_CreateDimension, METH_VARARGS|METH_KEYWORDS, "\n"
   65010             :     "Group_CreateDimension(Group self, char const * name, char const * dim_type, char const * direction, GUIntBig size, char ** options=None) -> Dimension\n"
   65011             :     "\n"
   65012             :     "\n"
   65013             :     "Create a dimension within a :py:class:`Group`.\n"
   65014             :     "\n"
   65015             :     "See :cpp:func:`GDALGroup::CreateDimension`.\n"
   65016             :     "\n"
   65017             :     "Parameters\n"
   65018             :     "----------\n"
   65019             :     "name : str\n"
   65020             :     "    Dimension name\n"
   65021             :     "dim_type : str\n"
   65022             :     "    Dimension type (might be empty, and ignored by drivers)\n"
   65023             :     "direction: str\n"
   65024             :     "    Dimension direction (might be empty, and ignored by drivers)\n"
   65025             :     "size : int\n"
   65026             :     "    Number of values indexed by this dimension. Should be > 0\n"
   65027             :     "options: dict/list\n"
   65028             :     "    an optional dict or list of driver specific ``NAME=VALUE`` option strings.\n"
   65029             :     "\n"
   65030             :     "Returns\n"
   65031             :     "-------\n"
   65032             :     "\n"
   65033             :     "Dimension:\n"
   65034             :     "    the new :py:class:`Dimension` or ``None`` on failure.\n"
   65035             :     "\n"
   65036             :     "Examples\n"
   65037             :     "--------\n"
   65038             :     "\n"
   65039             :     ">>> drv = gdal.GetDriverByName('MEM')\n"
   65040             :     ">>> mem_ds = drv.CreateMultiDimensional('myds')\n"
   65041             :     ">>> rg = mem_ds.GetRootGroup()\n"
   65042             :     ">>> dim_band = rg.CreateDimension('band', None, None, 3)\n"
   65043             :     ">>> dim_x = rg.CreateDimension('X', None, None, 2)\n"
   65044             :     ">>> dim_x.GetFullName()\n"
   65045             :     "'/X'\n"
   65046             :     ">>> lat = rg.CreateDimension('latitude', gdal.DIM_TYPE_HORIZONTAL_X, None, 2)\n"
   65047             :     ">>> lat.GetType()\n"
   65048             :     "'HORIZONTAL_X'\n"
   65049             :     "\n"
   65050             :     ""},
   65051             :    { "Group_CreateMDArray", _wrap_Group_CreateMDArray, METH_VARARGS, "\n"
   65052             :     "Group_CreateMDArray(Group self, char const * name, int dimensions, ExtendedDataType data_type, char ** options=None) -> MDArray\n"
   65053             :     "\n"
   65054             :     "\n"
   65055             :     "Create a multidimensional array within a group.\n"
   65056             :     "\n"
   65057             :     "It is recommended that the GDALDimension objects passed in ``dimensions``\n"
   65058             :     "belong to this group, either by retrieving them with :py:meth:`GetDimensions`\n"
   65059             :     "or creating a new one with :py:meth:`CreateDimension`.\n"
   65060             :     "\n"
   65061             :     "See :cpp:func:`GDALGroup::CreateMDArray`.\n"
   65062             :     "\n"
   65063             :     "Parameters\n"
   65064             :     "----------\n"
   65065             :     "name : str\n"
   65066             :     "    name\n"
   65067             :     "dimensions : list\n"
   65068             :     "    List of dimensions, ordered from the slowest varying\n"
   65069             :     "    dimension first to the fastest varying dimension last.\n"
   65070             :     "    Might be empty for a scalar array (if supported by driver)\n"
   65071             :     "data_type: :py:class:`ExtendedDataType`\n"
   65072             :     "    Array data type\n"
   65073             :     "options: dict/list\n"
   65074             :     "    an optional dict or list of driver specific ``NAME=VALUE`` option strings.\n"
   65075             :     "\n"
   65076             :     "Returns\n"
   65077             :     "-------\n"
   65078             :     "\n"
   65079             :     "MDArray:\n"
   65080             :     "    the new :py:class:`MDArray` or ``None`` on failure.\n"
   65081             :     "\n"
   65082             :     "Examples\n"
   65083             :     "--------\n"
   65084             :     ">>> drv = gdal.GetDriverByName('MEM')\n"
   65085             :     ">>> mem_ds = drv.CreateMultiDimensional('myds')\n"
   65086             :     ">>> rg = mem_ds.GetRootGroup()\n"
   65087             :     ">>> dimX = rg.CreateDimension('X', None, None, 3)\n"
   65088             :     ">>> ar = rg.CreateMDArray('ar', [dimX], gdal.ExtendedDataType.Create(gdal.GDT_Byte))\n"
   65089             :     "\n"
   65090             :     "\n"
   65091             :     ""},
   65092             :    { "Group_DeleteMDArray", _wrap_Group_DeleteMDArray, METH_VARARGS, "Group_DeleteMDArray(Group self, char const * name, char ** options=None) -> CPLErr"},
   65093             :    { "Group_CreateAttribute", _wrap_Group_CreateAttribute, METH_VARARGS, "\n"
   65094             :     "Group_CreateAttribute(Group self, char const * name, int dimensions, ExtendedDataType data_type, char ** options=None) -> Attribute\n"
   65095             :     "\n"
   65096             :     "\n"
   65097             :     "Create an attribute within a :py:class:`MDArray` or :py:class:`Group`.\n"
   65098             :     "\n"
   65099             :     "See :cpp:func:`GDALIHasAttribute::CreateAttribute`.\n"
   65100             :     "\n"
   65101             :     "Parameters\n"
   65102             :     "----------\n"
   65103             :     "name : str\n"
   65104             :     "    name\n"
   65105             :     "dimensions : list\n"
   65106             :     "    List of dimensions, ordered from the slowest varying\n"
   65107             :     "    dimension first to the fastest varying dimension last.\n"
   65108             :     "    Might be empty for a scalar array (if supported by driver)\n"
   65109             :     "data_type: :py:class:`ExtendedDataType`\n"
   65110             :     "    Attribute data type\n"
   65111             :     "options: dict/list\n"
   65112             :     "    an optional dict or list of driver specific ``NAME=VALUE`` option strings.\n"
   65113             :     "\n"
   65114             :     "Returns\n"
   65115             :     "-------\n"
   65116             :     "\n"
   65117             :     "Attribute:\n"
   65118             :     "    the new :py:class:`Attribute` or ``None`` on failure.\n"
   65119             :     "\n"
   65120             :     "Examples\n"
   65121             :     "--------\n"
   65122             :     "\n"
   65123             :     ">>> drv = gdal.GetDriverByName('MEM')\n"
   65124             :     ">>> mem_ds = drv.CreateMultiDimensional('myds')\n"
   65125             :     ">>> rg = mem_ds.GetRootGroup()\n"
   65126             :     ">>> dim = rg.CreateDimension('dim', None, None, 2)\n"
   65127             :     ">>> ar = rg.CreateMDArray('ar_double', [dim], gdal.ExtendedDataType.Create(gdal.GDT_Float64))\n"
   65128             :     ">>> numeric_attr = ar.CreateAttribute('numeric_attr', [], gdal.ExtendedDataType.Create(gdal.GDT_Float64))\n"
   65129             :     ">>> string_attr = ar.CreateAttribute('string_attr', [], gdal.ExtendedDataType.CreateString())\n"
   65130             :     "\n"
   65131             :     "\n"
   65132             :     ""},
   65133             :    { "Group_DeleteAttribute", _wrap_Group_DeleteAttribute, METH_VARARGS, "Group_DeleteAttribute(Group self, char const * name, char ** options=None) -> CPLErr"},
   65134             :    { "Group_Rename", _wrap_Group_Rename, METH_VARARGS, "Group_Rename(Group self, char const * newName) -> CPLErr"},
   65135             :    { "Group_SubsetDimensionFromSelection", _wrap_Group_SubsetDimensionFromSelection, METH_VARARGS, "Group_SubsetDimensionFromSelection(Group self, char const * selection, char ** options=None) -> Group"},
   65136             :    { "Group_GetDataTypeCount", _wrap_Group_GetDataTypeCount, METH_O, "Group_GetDataTypeCount(Group self) -> size_t"},
   65137             :    { "Group_GetDataType", _wrap_Group_GetDataType, METH_VARARGS, "Group_GetDataType(Group self, size_t idx) -> ExtendedDataType"},
   65138             :    { "Group_swigregister", Group_swigregister, METH_O, NULL},
   65139             :    { "Statistics_min_get", _wrap_Statistics_min_get, METH_O, "Statistics_min_get(Statistics self) -> double"},
   65140             :    { "Statistics_max_get", _wrap_Statistics_max_get, METH_O, "Statistics_max_get(Statistics self) -> double"},
   65141             :    { "Statistics_mean_get", _wrap_Statistics_mean_get, METH_O, "Statistics_mean_get(Statistics self) -> double"},
   65142             :    { "Statistics_std_dev_get", _wrap_Statistics_std_dev_get, METH_O, "Statistics_std_dev_get(Statistics self) -> double"},
   65143             :    { "Statistics_valid_count_get", _wrap_Statistics_valid_count_get, METH_O, "Statistics_valid_count_get(Statistics self) -> GIntBig"},
   65144             :    { "delete_Statistics", _wrap_delete_Statistics, METH_O, "delete_Statistics(Statistics self)"},
   65145             :    { "new_Statistics", _wrap_new_Statistics, METH_NOARGS, "new_Statistics() -> Statistics"},
   65146             :    { "Statistics_swigregister", Statistics_swigregister, METH_O, NULL},
   65147             :    { "Statistics_swiginit", Statistics_swiginit, METH_VARARGS, NULL},
   65148             :    { "delete_MDArray", _wrap_delete_MDArray, METH_O, "delete_MDArray(MDArray self)"},
   65149             :    { "MDArray_GetName", _wrap_MDArray_GetName, METH_O, "MDArray_GetName(MDArray self) -> char const *"},
   65150             :    { "MDArray_GetFullName", _wrap_MDArray_GetFullName, METH_O, "MDArray_GetFullName(MDArray self) -> char const *"},
   65151             :    { "MDArray_GetTotalElementsCount", _wrap_MDArray_GetTotalElementsCount, METH_O, "MDArray_GetTotalElementsCount(MDArray self) -> GUIntBig"},
   65152             :    { "MDArray_GetDimensionCount", _wrap_MDArray_GetDimensionCount, METH_O, "MDArray_GetDimensionCount(MDArray self) -> size_t"},
   65153             :    { "MDArray_GetDimensions", _wrap_MDArray_GetDimensions, METH_O, "MDArray_GetDimensions(MDArray self)"},
   65154             :    { "MDArray_GetCoordinateVariables", _wrap_MDArray_GetCoordinateVariables, METH_O, "MDArray_GetCoordinateVariables(MDArray self)"},
   65155             :    { "MDArray_GetBlockSize", _wrap_MDArray_GetBlockSize, METH_O, "MDArray_GetBlockSize(MDArray self)"},
   65156             :    { "MDArray_GetProcessingChunkSize", _wrap_MDArray_GetProcessingChunkSize, METH_VARARGS, "MDArray_GetProcessingChunkSize(MDArray self, size_t nMaxChunkMemory)"},
   65157             :    { "MDArray_GetDataType", _wrap_MDArray_GetDataType, METH_O, "MDArray_GetDataType(MDArray self) -> ExtendedDataType"},
   65158             :    { "MDArray_GetStructuralInfo", _wrap_MDArray_GetStructuralInfo, METH_O, "MDArray_GetStructuralInfo(MDArray self) -> char **"},
   65159             :    { "MDArray_Resize", _wrap_MDArray_Resize, METH_VARARGS, "MDArray_Resize(MDArray self, int newDimensions, char ** options=None) -> CPLErr"},
   65160             :    { "MDArray_Read", _wrap_MDArray_Read, METH_VARARGS, "MDArray_Read(MDArray self, int nDims1, int nDims2, int nDims3, int nDims4, ExtendedDataType buffer_datatype) -> CPLErr"},
   65161             :    { "MDArray_WriteStringArray", _wrap_MDArray_WriteStringArray, METH_VARARGS, "MDArray_WriteStringArray(MDArray self, int nDims1, int nDims2, int nDims3, ExtendedDataType buffer_datatype, char ** options) -> CPLErr"},
   65162             :    { "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"},
   65163             :    { "MDArray_AdviseRead", _wrap_MDArray_AdviseRead, METH_VARARGS, "MDArray_AdviseRead(MDArray self, int nDims1, int nDims2, char ** options=None) -> CPLErr"},
   65164             :    { "MDArray_GetAttribute", _wrap_MDArray_GetAttribute, METH_VARARGS, "MDArray_GetAttribute(MDArray self, char const * name) -> Attribute"},
   65165             :    { "MDArray_GetAttributes", _wrap_MDArray_GetAttributes, METH_VARARGS, "MDArray_GetAttributes(MDArray self, char ** options=None)"},
   65166             :    { "MDArray_CreateAttribute", _wrap_MDArray_CreateAttribute, METH_VARARGS, "\n"
   65167             :     "MDArray_CreateAttribute(MDArray self, char const * name, int dimensions, ExtendedDataType data_type, char ** options=None) -> Attribute\n"
   65168             :     "\n"
   65169             :     "\n"
   65170             :     "Create an attribute within a :py:class:`MDArray` or :py:class:`Group`.\n"
   65171             :     "\n"
   65172             :     "See :cpp:func:`GDALIHasAttribute::CreateAttribute`.\n"
   65173             :     "\n"
   65174             :     "Parameters\n"
   65175             :     "----------\n"
   65176             :     "name : str\n"
   65177             :     "    name\n"
   65178             :     "dimensions : list\n"
   65179             :     "    List of dimensions, ordered from the slowest varying\n"
   65180             :     "    dimension first to the fastest varying dimension last.\n"
   65181             :     "    Might be empty for a scalar array (if supported by driver)\n"
   65182             :     "data_type: :py:class:`ExtendedDataType`\n"
   65183             :     "    Attribute data type\n"
   65184             :     "options: dict/list\n"
   65185             :     "    an optional dict or list of driver specific ``NAME=VALUE`` option strings.\n"
   65186             :     "\n"
   65187             :     "Returns\n"
   65188             :     "-------\n"
   65189             :     "\n"
   65190             :     "Attribute:\n"
   65191             :     "    the new :py:class:`Attribute` or ``None`` on failure.\n"
   65192             :     "\n"
   65193             :     "Examples\n"
   65194             :     "--------\n"
   65195             :     "\n"
   65196             :     ">>> drv = gdal.GetDriverByName('MEM')\n"
   65197             :     ">>> mem_ds = drv.CreateMultiDimensional('myds')\n"
   65198             :     ">>> rg = mem_ds.GetRootGroup()\n"
   65199             :     ">>> dim = rg.CreateDimension('dim', None, None, 2)\n"
   65200             :     ">>> ar = rg.CreateMDArray('ar_double', [dim], gdal.ExtendedDataType.Create(gdal.GDT_Float64))\n"
   65201             :     ">>> numeric_attr = ar.CreateAttribute('numeric_attr', [], gdal.ExtendedDataType.Create(gdal.GDT_Float64))\n"
   65202             :     ">>> string_attr = ar.CreateAttribute('string_attr', [], gdal.ExtendedDataType.CreateString())\n"
   65203             :     "\n"
   65204             :     "\n"
   65205             :     ""},
   65206             :    { "MDArray_DeleteAttribute", _wrap_MDArray_DeleteAttribute, METH_VARARGS, "MDArray_DeleteAttribute(MDArray self, char const * name, char ** options=None) -> CPLErr"},
   65207             :    { "MDArray_GetNoDataValueAsRaw", _wrap_MDArray_GetNoDataValueAsRaw, METH_O, "MDArray_GetNoDataValueAsRaw(MDArray self) -> CPLErr"},
   65208             :    { "MDArray_GetNoDataValueAsDouble", _wrap_MDArray_GetNoDataValueAsDouble, METH_O, "MDArray_GetNoDataValueAsDouble(MDArray self)"},
   65209             :    { "MDArray_GetNoDataValueAsInt64", _wrap_MDArray_GetNoDataValueAsInt64, METH_O, "MDArray_GetNoDataValueAsInt64(MDArray self)"},
   65210             :    { "MDArray_GetNoDataValueAsUInt64", _wrap_MDArray_GetNoDataValueAsUInt64, METH_O, "MDArray_GetNoDataValueAsUInt64(MDArray self)"},
   65211             :    { "MDArray_GetNoDataValueAsString", _wrap_MDArray_GetNoDataValueAsString, METH_O, "MDArray_GetNoDataValueAsString(MDArray self) -> retStringAndCPLFree *"},
   65212             :    { "MDArray_SetNoDataValueDouble", _wrap_MDArray_SetNoDataValueDouble, METH_VARARGS, "MDArray_SetNoDataValueDouble(MDArray self, double d) -> CPLErr"},
   65213             :    { "MDArray_SetNoDataValueInt64", _wrap_MDArray_SetNoDataValueInt64, METH_VARARGS, "MDArray_SetNoDataValueInt64(MDArray self, GIntBig v) -> CPLErr"},
   65214             :    { "MDArray_SetNoDataValueUInt64", _wrap_MDArray_SetNoDataValueUInt64, METH_VARARGS, "MDArray_SetNoDataValueUInt64(MDArray self, GUIntBig v) -> CPLErr"},
   65215             :    { "MDArray_SetNoDataValueString", _wrap_MDArray_SetNoDataValueString, METH_VARARGS, "MDArray_SetNoDataValueString(MDArray self, char const * nodata) -> CPLErr"},
   65216             :    { "MDArray_SetNoDataValueRaw", _wrap_MDArray_SetNoDataValueRaw, METH_VARARGS, "MDArray_SetNoDataValueRaw(MDArray self, GIntBig nLen) -> CPLErr"},
   65217             :    { "MDArray_DeleteNoDataValue", _wrap_MDArray_DeleteNoDataValue, METH_O, "MDArray_DeleteNoDataValue(MDArray self) -> CPLErr"},
   65218             :    { "MDArray_GetOffset", _wrap_MDArray_GetOffset, METH_O, "MDArray_GetOffset(MDArray self)"},
   65219             :    { "MDArray_GetOffsetStorageType", _wrap_MDArray_GetOffsetStorageType, METH_O, "MDArray_GetOffsetStorageType(MDArray self) -> GDALDataType"},
   65220             :    { "MDArray_GetScale", _wrap_MDArray_GetScale, METH_O, "MDArray_GetScale(MDArray self)"},
   65221             :    { "MDArray_GetScaleStorageType", _wrap_MDArray_GetScaleStorageType, METH_O, "MDArray_GetScaleStorageType(MDArray self) -> GDALDataType"},
   65222             :    { "MDArray_SetOffset", (PyCFunction)(void(*)(void))_wrap_MDArray_SetOffset, METH_VARARGS|METH_KEYWORDS, "MDArray_SetOffset(MDArray self, double val, GDALDataType storageType=GDT_Unknown) -> CPLErr"},
   65223             :    { "MDArray_SetScale", (PyCFunction)(void(*)(void))_wrap_MDArray_SetScale, METH_VARARGS|METH_KEYWORDS, "MDArray_SetScale(MDArray self, double val, GDALDataType storageType=GDT_Unknown) -> CPLErr"},
   65224             :    { "MDArray_SetUnit", _wrap_MDArray_SetUnit, METH_VARARGS, "MDArray_SetUnit(MDArray self, char const * unit) -> CPLErr"},
   65225             :    { "MDArray_GetUnit", _wrap_MDArray_GetUnit, METH_O, "MDArray_GetUnit(MDArray self) -> char const *"},
   65226             :    { "MDArray_SetSpatialRef", _wrap_MDArray_SetSpatialRef, METH_VARARGS, "MDArray_SetSpatialRef(MDArray self, SpatialReference srs) -> OGRErr"},
   65227             :    { "MDArray_GetSpatialRef", _wrap_MDArray_GetSpatialRef, METH_O, "MDArray_GetSpatialRef(MDArray self) -> SpatialReference"},
   65228             :    { "MDArray_GetView", _wrap_MDArray_GetView, METH_VARARGS, "MDArray_GetView(MDArray self, char const * viewExpr) -> MDArray"},
   65229             :    { "MDArray_Transpose", _wrap_MDArray_Transpose, METH_VARARGS, "MDArray_Transpose(MDArray self, int axisMap) -> MDArray"},
   65230             :    { "MDArray_GetUnscaled", _wrap_MDArray_GetUnscaled, METH_O, "MDArray_GetUnscaled(MDArray self) -> MDArray"},
   65231             :    { "MDArray_GetMask", _wrap_MDArray_GetMask, METH_VARARGS, "MDArray_GetMask(MDArray self, char ** options=None) -> MDArray"},
   65232             :    { "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"},
   65233             :    { "MDArray_AsClassicDataset", _wrap_MDArray_AsClassicDataset, METH_VARARGS, "MDArray_AsClassicDataset(MDArray self, size_t iXDim, size_t iYDim, Group hRootGroup=None, char ** options=None) -> Dataset"},
   65234             :    { "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"},
   65235             :    { "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"},
   65236             :    { "MDArray_GetResampled", _wrap_MDArray_GetResampled, METH_VARARGS, "MDArray_GetResampled(MDArray self, int nDimensions, GDALRIOResampleAlg resample_alg, OSRSpatialReferenceShadow ** srs, char ** options=None) -> MDArray"},
   65237             :    { "MDArray_GetMeshGrid", _wrap_MDArray_GetMeshGrid, METH_VARARGS, "MDArray_GetMeshGrid(int nInputArrays, char ** options=None)"},
   65238             :    { "MDArray_Cache", _wrap_MDArray_Cache, METH_VARARGS, "MDArray_Cache(MDArray self, char ** options=None) -> bool"},
   65239             :    { "MDArray_Rename", _wrap_MDArray_Rename, METH_VARARGS, "MDArray_Rename(MDArray self, char const * newName) -> CPLErr"},
   65240             :    { "MDArray_swigregister", MDArray_swigregister, METH_O, NULL},
   65241             :    { "delete_Attribute", _wrap_delete_Attribute, METH_O, "delete_Attribute(Attribute self)"},
   65242             :    { "Attribute_GetName", _wrap_Attribute_GetName, METH_O, "Attribute_GetName(Attribute self) -> char const *"},
   65243             :    { "Attribute_GetFullName", _wrap_Attribute_GetFullName, METH_O, "Attribute_GetFullName(Attribute self) -> char const *"},
   65244             :    { "Attribute_GetTotalElementsCount", _wrap_Attribute_GetTotalElementsCount, METH_O, "Attribute_GetTotalElementsCount(Attribute self) -> GUIntBig"},
   65245             :    { "Attribute_GetDimensionCount", _wrap_Attribute_GetDimensionCount, METH_O, "Attribute_GetDimensionCount(Attribute self) -> size_t"},
   65246             :    { "Attribute_GetDimensionsSize", _wrap_Attribute_GetDimensionsSize, METH_O, "Attribute_GetDimensionsSize(Attribute self)"},
   65247             :    { "Attribute_GetDataType", _wrap_Attribute_GetDataType, METH_O, "Attribute_GetDataType(Attribute self) -> ExtendedDataType"},
   65248             :    { "Attribute_ReadAsRaw", _wrap_Attribute_ReadAsRaw, METH_O, "Attribute_ReadAsRaw(Attribute self) -> CPLErr"},
   65249             :    { "Attribute_ReadAsString", _wrap_Attribute_ReadAsString, METH_O, "Attribute_ReadAsString(Attribute self) -> char const *"},
   65250             :    { "Attribute_ReadAsInt", _wrap_Attribute_ReadAsInt, METH_O, "Attribute_ReadAsInt(Attribute self) -> int"},
   65251             :    { "Attribute_ReadAsInt64", _wrap_Attribute_ReadAsInt64, METH_O, "Attribute_ReadAsInt64(Attribute self) -> long long"},
   65252             :    { "Attribute_ReadAsDouble", _wrap_Attribute_ReadAsDouble, METH_O, "Attribute_ReadAsDouble(Attribute self) -> double"},
   65253             :    { "Attribute_ReadAsStringArray", _wrap_Attribute_ReadAsStringArray, METH_O, "Attribute_ReadAsStringArray(Attribute self) -> char **"},
   65254             :    { "Attribute_ReadAsIntArray", _wrap_Attribute_ReadAsIntArray, METH_O, "Attribute_ReadAsIntArray(Attribute self)"},
   65255             :    { "Attribute_ReadAsInt64Array", _wrap_Attribute_ReadAsInt64Array, METH_O, "Attribute_ReadAsInt64Array(Attribute self)"},
   65256             :    { "Attribute_ReadAsDoubleArray", _wrap_Attribute_ReadAsDoubleArray, METH_O, "Attribute_ReadAsDoubleArray(Attribute self)"},
   65257             :    { "Attribute_WriteRaw", _wrap_Attribute_WriteRaw, METH_VARARGS, "Attribute_WriteRaw(Attribute self, GIntBig nLen) -> CPLErr"},
   65258             :    { "Attribute_WriteString", _wrap_Attribute_WriteString, METH_VARARGS, "Attribute_WriteString(Attribute self, char const * val) -> CPLErr"},
   65259             :    { "Attribute_WriteStringArray", _wrap_Attribute_WriteStringArray, METH_VARARGS, "Attribute_WriteStringArray(Attribute self, char ** vals) -> CPLErr"},
   65260             :    { "Attribute_WriteInt", _wrap_Attribute_WriteInt, METH_VARARGS, "Attribute_WriteInt(Attribute self, int val) -> CPLErr"},
   65261             :    { "Attribute_WriteInt64", _wrap_Attribute_WriteInt64, METH_VARARGS, "Attribute_WriteInt64(Attribute self, long long val) -> CPLErr"},
   65262             :    { "Attribute_WriteDouble", _wrap_Attribute_WriteDouble, METH_VARARGS, "Attribute_WriteDouble(Attribute self, double val) -> CPLErr"},
   65263             :    { "Attribute_WriteIntArray", _wrap_Attribute_WriteIntArray, METH_VARARGS, "Attribute_WriteIntArray(Attribute self, int nList) -> CPLErr"},
   65264             :    { "Attribute_WriteInt64Array", _wrap_Attribute_WriteInt64Array, METH_VARARGS, "Attribute_WriteInt64Array(Attribute self, int nList) -> CPLErr"},
   65265             :    { "Attribute_WriteDoubleArray", _wrap_Attribute_WriteDoubleArray, METH_VARARGS, "Attribute_WriteDoubleArray(Attribute self, int nList) -> CPLErr"},
   65266             :    { "Attribute_Rename", _wrap_Attribute_Rename, METH_VARARGS, "Attribute_Rename(Attribute self, char const * newName) -> CPLErr"},
   65267             :    { "Attribute_swigregister", Attribute_swigregister, METH_O, NULL},
   65268             :    { "delete_Dimension", _wrap_delete_Dimension, METH_O, "delete_Dimension(Dimension self)"},
   65269             :    { "Dimension_GetName", _wrap_Dimension_GetName, METH_O, "Dimension_GetName(Dimension self) -> char const *"},
   65270             :    { "Dimension_GetFullName", _wrap_Dimension_GetFullName, METH_O, "Dimension_GetFullName(Dimension self) -> char const *"},
   65271             :    { "Dimension_GetType", _wrap_Dimension_GetType, METH_O, "Dimension_GetType(Dimension self) -> char const *"},
   65272             :    { "Dimension_GetDirection", _wrap_Dimension_GetDirection, METH_O, "Dimension_GetDirection(Dimension self) -> char const *"},
   65273             :    { "Dimension_GetSize", _wrap_Dimension_GetSize, METH_O, "Dimension_GetSize(Dimension self) -> GUIntBig"},
   65274             :    { "Dimension_GetIndexingVariable", _wrap_Dimension_GetIndexingVariable, METH_O, "Dimension_GetIndexingVariable(Dimension self) -> MDArray"},
   65275             :    { "Dimension_SetIndexingVariable", _wrap_Dimension_SetIndexingVariable, METH_VARARGS, "Dimension_SetIndexingVariable(Dimension self, MDArray array) -> bool"},
   65276             :    { "Dimension_Rename", _wrap_Dimension_Rename, METH_VARARGS, "Dimension_Rename(Dimension self, char const * newName) -> CPLErr"},
   65277             :    { "Dimension_swigregister", Dimension_swigregister, METH_O, NULL},
   65278             :    { "delete_ExtendedDataType", _wrap_delete_ExtendedDataType, METH_O, "delete_ExtendedDataType(ExtendedDataType self)"},
   65279             :    { "ExtendedDataType_Create", _wrap_ExtendedDataType_Create, METH_O, "ExtendedDataType_Create(GDALDataType dt) -> ExtendedDataType"},
   65280             :    { "ExtendedDataType_CreateString", _wrap_ExtendedDataType_CreateString, METH_VARARGS, "ExtendedDataType_CreateString(size_t nMaxStringLength=0, GDALExtendedDataTypeSubType eSubType=GEDTST_NONE) -> ExtendedDataType"},
   65281             :    { "ExtendedDataType_CreateCompound", _wrap_ExtendedDataType_CreateCompound, METH_VARARGS, "ExtendedDataType_CreateCompound(char const * name, size_t nTotalSize, int nComps) -> ExtendedDataType"},
   65282             :    { "ExtendedDataType_GetName", _wrap_ExtendedDataType_GetName, METH_O, "ExtendedDataType_GetName(ExtendedDataType self) -> char const *"},
   65283             :    { "ExtendedDataType_GetClass", _wrap_ExtendedDataType_GetClass, METH_O, "ExtendedDataType_GetClass(ExtendedDataType self) -> GDALExtendedDataTypeClass"},
   65284             :    { "ExtendedDataType_GetNumericDataType", _wrap_ExtendedDataType_GetNumericDataType, METH_O, "ExtendedDataType_GetNumericDataType(ExtendedDataType self) -> GDALDataType"},
   65285             :    { "ExtendedDataType_GetSize", _wrap_ExtendedDataType_GetSize, METH_O, "ExtendedDataType_GetSize(ExtendedDataType self) -> size_t"},
   65286             :    { "ExtendedDataType_GetMaxStringLength", _wrap_ExtendedDataType_GetMaxStringLength, METH_O, "ExtendedDataType_GetMaxStringLength(ExtendedDataType self) -> size_t"},
   65287             :    { "ExtendedDataType_GetSubType", _wrap_ExtendedDataType_GetSubType, METH_O, "ExtendedDataType_GetSubType(ExtendedDataType self) -> GDALExtendedDataTypeSubType"},
   65288             :    { "ExtendedDataType_GetRAT", _wrap_ExtendedDataType_GetRAT, METH_O, "ExtendedDataType_GetRAT(ExtendedDataType self) -> RasterAttributeTable"},
   65289             :    { "ExtendedDataType_GetComponents", _wrap_ExtendedDataType_GetComponents, METH_O, "ExtendedDataType_GetComponents(ExtendedDataType self)"},
   65290             :    { "ExtendedDataType_CanConvertTo", _wrap_ExtendedDataType_CanConvertTo, METH_VARARGS, "ExtendedDataType_CanConvertTo(ExtendedDataType self, ExtendedDataType other) -> bool"},
   65291             :    { "ExtendedDataType_Equals", _wrap_ExtendedDataType_Equals, METH_VARARGS, "ExtendedDataType_Equals(ExtendedDataType self, ExtendedDataType other) -> bool"},
   65292             :    { "ExtendedDataType_swigregister", ExtendedDataType_swigregister, METH_O, NULL},
   65293             :    { "delete_EDTComponent", _wrap_delete_EDTComponent, METH_O, "delete_EDTComponent(EDTComponent self)"},
   65294             :    { "EDTComponent_Create", _wrap_EDTComponent_Create, METH_VARARGS, "EDTComponent_Create(char const * name, size_t offset, ExtendedDataType type) -> EDTComponent"},
   65295             :    { "EDTComponent_GetName", _wrap_EDTComponent_GetName, METH_O, "EDTComponent_GetName(EDTComponent self) -> char const *"},
   65296             :    { "EDTComponent_GetOffset", _wrap_EDTComponent_GetOffset, METH_O, "EDTComponent_GetOffset(EDTComponent self) -> size_t"},
   65297             :    { "EDTComponent_GetType", _wrap_EDTComponent_GetType, METH_O, "EDTComponent_GetType(EDTComponent self) -> ExtendedDataType"},
   65298             :    { "EDTComponent_swigregister", EDTComponent_swigregister, METH_O, NULL},
   65299             :    { "CreateRasterAttributeTableFromMDArrays", _wrap_CreateRasterAttributeTableFromMDArrays, METH_VARARGS, "CreateRasterAttributeTableFromMDArrays(GDALRATTableType eTableType, int nArrays, int nUsages=0) -> RasterAttributeTable"},
   65300             :    { "Band_XSize_get", _wrap_Band_XSize_get, METH_O, "Band_XSize_get(Band self) -> int"},
   65301             :    { "Band_YSize_get", _wrap_Band_YSize_get, METH_O, "Band_YSize_get(Band self) -> int"},
   65302             :    { "Band_DataType_get", _wrap_Band_DataType_get, METH_O, "Band_DataType_get(Band self) -> GDALDataType"},
   65303             :    { "Band_GetDataset", _wrap_Band_GetDataset, METH_O, "\n"
   65304             :     "Band_GetDataset(Band self) -> Dataset\n"
   65305             :     "\n"
   65306             :     "\n"
   65307             :     "Fetch the :py:class:`Dataset` associated with this Band.\n"
   65308             :     "See :cpp:func:`GDALRasterBand::GetDataset`.\n"
   65309             :     "\n"
   65310             :     ""},
   65311             :    { "Band_GetBand", _wrap_Band_GetBand, METH_O, "\n"
   65312             :     "Band_GetBand(Band self) -> int\n"
   65313             :     "\n"
   65314             :     "\n"
   65315             :     "Return the index of this band.\n"
   65316             :     "See :cpp:func:`GDALRasterBand::GetBand`.\n"
   65317             :     "\n"
   65318             :     "Returns\n"
   65319             :     "-------\n"
   65320             :     "int\n"
   65321             :     "    the (1-based) index of this band\n"
   65322             :     "\n"
   65323             :     ""},
   65324             :    { "Band_GetBlockSize", _wrap_Band_GetBlockSize, METH_O, "\n"
   65325             :     "Band_GetBlockSize(Band self)\n"
   65326             :     "\n"
   65327             :     "\n"
   65328             :     "Fetch the natural block size of this band.\n"
   65329             :     "See :cpp:func:`GDALRasterBand::GetBlockSize`.\n"
   65330             :     "\n"
   65331             :     "Returns\n"
   65332             :     "-------\n"
   65333             :     "list\n"
   65334             :     "    list with the x and y dimensions of a block\n"
   65335             :     "\n"
   65336             :     ""},
   65337             :    { "Band_GetActualBlockSize", _wrap_Band_GetActualBlockSize, METH_VARARGS, "\n"
   65338             :     "Band_GetActualBlockSize(Band self, int nXBlockOff, int nYBlockOff)\n"
   65339             :     "\n"
   65340             :     "\n"
   65341             :     "Fetch the actual block size for a given block offset.\n"
   65342             :     "See :cpp:func:`GDALRasterBand::GetActualBlockSize`.\n"
   65343             :     "\n"
   65344             :     "Parameters\n"
   65345             :     "----------\n"
   65346             :     "nXBlockOff : int\n"
   65347             :     "    the horizontal block offset for which to calculate the\n"
   65348             :     "    number of valid pixels, with zero indicating the left most block, 1 the next\n"
   65349             :     "    block and so forth.\n"
   65350             :     "nYBlockOff : int\n"
   65351             :     "    the vertical block offset, with zero indicating\n"
   65352             :     "    the top most block, 1 the next block and so forth.\n"
   65353             :     "\n"
   65354             :     "Returns\n"
   65355             :     "-------\n"
   65356             :     "tuple\n"
   65357             :     "    tuple with the x and y dimensions of the block\n"
   65358             :     "\n"
   65359             :     ""},
   65360             :    { "Band_GetColorInterpretation", _wrap_Band_GetColorInterpretation, METH_O, "\n"
   65361             :     "Band_GetColorInterpretation(Band self) -> GDALColorInterp\n"
   65362             :     "\n"
   65363             :     "\n"
   65364             :     "Get the :cpp:enum:`GDALColorInterp` value for this band.\n"
   65365             :     "See :cpp:func:`GDALRasterBand::GetColorInterpretation`.\n"
   65366             :     "\n"
   65367             :     "Returns\n"
   65368             :     "-------\n"
   65369             :     "int\n"
   65370             :     "\n"
   65371             :     ""},
   65372             :    { "Band_GetRasterColorInterpretation", _wrap_Band_GetRasterColorInterpretation, METH_O, "\n"
   65373             :     "Band_GetRasterColorInterpretation(Band self) -> GDALColorInterp\n"
   65374             :     "\n"
   65375             :     "\n"
   65376             :     "Return the color interpretation code for this band.\n"
   65377             :     "See :cpp:func:`GDALRasterBand::GetColorInterpretation`.\n"
   65378             :     "\n"
   65379             :     "Returns\n"
   65380             :     "-------\n"
   65381             :     "int\n"
   65382             :     "    The color interpretation code (default :py:const:`gdal.GCI_Undefined`)\n"
   65383             :     "\n"
   65384             :     "\n"
   65385             :     ""},
   65386             :    { "Band_SetColorInterpretation", _wrap_Band_SetColorInterpretation, METH_VARARGS, "\n"
   65387             :     "Band_SetColorInterpretation(Band self, GDALColorInterp val) -> CPLErr\n"
   65388             :     "\n"
   65389             :     "\n"
   65390             :     "Set color interpretation of the band\n"
   65391             :     "See :cpp:func:`GDALRasterBand::SetColorInterpretation`.\n"
   65392             :     "\n"
   65393             :     "Parameters\n"
   65394             :     "----------\n"
   65395             :     "val : int\n"
   65396             :     "    A color interpretation code such as :py:const:`gdal.GCI_RedBand`\n"
   65397             :     "\n"
   65398             :     "Returns\n"
   65399             :     "-------\n"
   65400             :     "int:\n"
   65401             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   65402             :     "\n"
   65403             :     ""},
   65404             :    { "Band_SetRasterColorInterpretation", _wrap_Band_SetRasterColorInterpretation, METH_VARARGS, "\n"
   65405             :     "Band_SetRasterColorInterpretation(Band self, GDALColorInterp val) -> CPLErr\n"
   65406             :     "\n"
   65407             :     "Deprecated.  Alternate name for :py:meth:`SetColorInterpretation`.\n"
   65408             :     "\n"
   65409             :     ""},
   65410             :    { "Band_GetNoDataValue", _wrap_Band_GetNoDataValue, METH_O, "Band_GetNoDataValue(Band self)"},
   65411             :    { "Band_GetNoDataValueAsInt64", _wrap_Band_GetNoDataValueAsInt64, METH_O, "\n"
   65412             :     "Band_GetNoDataValueAsInt64(Band self)\n"
   65413             :     "\n"
   65414             :     "\n"
   65415             :     "Fetch the nodata value for this band.\n"
   65416             :     "See :cpp:func:`GDALRasterBand::GetNoDataValueAsInt64`.\n"
   65417             :     "\n"
   65418             :     "Returns\n"
   65419             :     "-------\n"
   65420             :     "int\n"
   65421             :     "    The nodata value, or ``None`` if it has not been set or\n"
   65422             :     "    the data type of this band is not :py:const:`gdal.GDT_Int64`.\n"
   65423             :     "\n"
   65424             :     "\n"
   65425             :     ""},
   65426             :    { "Band_GetNoDataValueAsUInt64", _wrap_Band_GetNoDataValueAsUInt64, METH_O, "\n"
   65427             :     "Band_GetNoDataValueAsUInt64(Band self)\n"
   65428             :     "\n"
   65429             :     "\n"
   65430             :     "Fetch the nodata value for this band.\n"
   65431             :     "See :cpp:func:`GDALRasterBand::GetNoDataValueAsUInt64`.\n"
   65432             :     "\n"
   65433             :     "Returns\n"
   65434             :     "-------\n"
   65435             :     "int\n"
   65436             :     "    The nodata value, or ``None`` if it has not been set or\n"
   65437             :     "    the data type of this band is not :py:const:`gdal.GDT_UInt64`.\n"
   65438             :     "\n"
   65439             :     "\n"
   65440             :     ""},
   65441             :    { "Band_SetNoDataValue", _wrap_Band_SetNoDataValue, METH_VARARGS, "Band_SetNoDataValue(Band self, double d) -> CPLErr"},
   65442             :    { "Band_SetNoDataValueAsInt64", _wrap_Band_SetNoDataValueAsInt64, METH_VARARGS, "Band_SetNoDataValueAsInt64(Band self, GIntBig v) -> CPLErr"},
   65443             :    { "Band_SetNoDataValueAsUInt64", _wrap_Band_SetNoDataValueAsUInt64, METH_VARARGS, "Band_SetNoDataValueAsUInt64(Band self, GUIntBig v) -> CPLErr"},
   65444             :    { "Band_DeleteNoDataValue", _wrap_Band_DeleteNoDataValue, METH_O, "\n"
   65445             :     "Band_DeleteNoDataValue(Band self) -> CPLErr\n"
   65446             :     "\n"
   65447             :     "\n"
   65448             :     "Remove the nodata value for this band.\n"
   65449             :     "\n"
   65450             :     "Returns\n"
   65451             :     "-------\n"
   65452             :     "int:\n"
   65453             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   65454             :     "\n"
   65455             :     "\n"
   65456             :     ""},
   65457             :    { "Band_GetUnitType", _wrap_Band_GetUnitType, METH_O, "\n"
   65458             :     "Band_GetUnitType(Band self) -> char const *\n"
   65459             :     "\n"
   65460             :     "\n"
   65461             :     "Return a name for the units of this raster's values.\n"
   65462             :     "See :cpp:func:`GDALRasterBand::GetUnitType`.\n"
   65463             :     "\n"
   65464             :     "Returns\n"
   65465             :     "-------\n"
   65466             :     "str\n"
   65467             :     "\n"
   65468             :     "Examples\n"
   65469             :     "--------\n"
   65470             :     ">>> ds = gdal.GetDriverByName('MEM').Create('', 10, 10)\n"
   65471             :     ">>> ds.GetRasterBand(1).SetUnitType('ft')\n"
   65472             :     "0\n"
   65473             :     ">>> ds.GetRasterBand(1).GetUnitType()\n"
   65474             :     "'ft'\n"
   65475             :     "\n"
   65476             :     ""},
   65477             :    { "Band_SetUnitType", _wrap_Band_SetUnitType, METH_VARARGS, "\n"
   65478             :     "Band_SetUnitType(Band self, char const * val) -> CPLErr\n"
   65479             :     "\n"
   65480             :     "\n"
   65481             :     "Set unit type.\n"
   65482             :     "See :cpp:func:`GDALRasterBand::SetUnitType`.\n"
   65483             :     "\n"
   65484             :     "Parameters\n"
   65485             :     "----------\n"
   65486             :     "val : str\n"
   65487             :     "\n"
   65488             :     "Returns\n"
   65489             :     "-------\n"
   65490             :     "int:\n"
   65491             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   65492             :     "\n"
   65493             :     ""},
   65494             :    { "Band_GetRasterCategoryNames", _wrap_Band_GetRasterCategoryNames, METH_O, "\n"
   65495             :     "Band_GetRasterCategoryNames(Band self) -> char **\n"
   65496             :     "\n"
   65497             :     "\n"
   65498             :     "Fetch the list of category names for this band.\n"
   65499             :     "See :cpp:func:`GDALRasterBand::GetCategoryNames`.\n"
   65500             :     "\n"
   65501             :     "Returns\n"
   65502             :     "-------\n"
   65503             :     "list\n"
   65504             :     "    The list of names, or ``None`` if no names exist.\n"
   65505             :     "\n"
   65506             :     "\n"
   65507             :     ""},
   65508             :    { "Band_SetRasterCategoryNames", _wrap_Band_SetRasterCategoryNames, METH_VARARGS, "\n"
   65509             :     "Band_SetRasterCategoryNames(Band self, char ** names) -> CPLErr\n"
   65510             :     "\n"
   65511             :     "Deprecated.  Alternate name for :py:meth:`SetCategoryNames`.\n"
   65512             :     "\n"
   65513             :     ""},
   65514             :    { "Band_GetMinimum", _wrap_Band_GetMinimum, METH_O, "\n"
   65515             :     "Band_GetMinimum(Band self)\n"
   65516             :     "\n"
   65517             :     "\n"
   65518             :     "Fetch a previously stored maximum value for this band.\n"
   65519             :     "See :cpp:func:`GDALRasterBand::GetMinimum`.\n"
   65520             :     "\n"
   65521             :     "Returns\n"
   65522             :     "-------\n"
   65523             :     "float\n"
   65524             :     "    The stored minimum value, or ``None`` if no value\n"
   65525             :     "    has been stored.\n"
   65526             :     "\n"
   65527             :     "\n"
   65528             :     ""},
   65529             :    { "Band_GetMaximum", _wrap_Band_GetMaximum, METH_O, "\n"
   65530             :     "Band_GetMaximum(Band self)\n"
   65531             :     "\n"
   65532             :     "\n"
   65533             :     "Fetch a previously stored maximum value for this band.\n"
   65534             :     "See :cpp:func:`GDALRasterBand::GetMaximum`.\n"
   65535             :     "\n"
   65536             :     "Returns\n"
   65537             :     "-------\n"
   65538             :     "float\n"
   65539             :     "    The stored maximum value, or ``None`` if no value\n"
   65540             :     "    has been stored.\n"
   65541             :     "\n"
   65542             :     "\n"
   65543             :     ""},
   65544             :    { "Band_GetOffset", _wrap_Band_GetOffset, METH_O, "\n"
   65545             :     "Band_GetOffset(Band self)\n"
   65546             :     "\n"
   65547             :     "\n"
   65548             :     "Fetch the raster value offset.\n"
   65549             :     "See :cpp:func:`GDALRasterBand::GetOffset`.\n"
   65550             :     "\n"
   65551             :     "Returns\n"
   65552             :     "-------\n"
   65553             :     "double\n"
   65554             :     "    The offset value, or ``0.0``.\n"
   65555             :     "\n"
   65556             :     "\n"
   65557             :     ""},
   65558             :    { "Band_GetScale", _wrap_Band_GetScale, METH_O, "\n"
   65559             :     "Band_GetScale(Band self)\n"
   65560             :     "\n"
   65561             :     "\n"
   65562             :     "Fetch the band scale value.\n"
   65563             :     "See :cpp:func:`GDALRasterBand::GetScale`.\n"
   65564             :     "\n"
   65565             :     "Returns\n"
   65566             :     "-------\n"
   65567             :     "double\n"
   65568             :     "    The scale value, or ``1.0``.\n"
   65569             :     "\n"
   65570             :     ""},
   65571             :    { "Band_SetOffset", _wrap_Band_SetOffset, METH_VARARGS, "\n"
   65572             :     "Band_SetOffset(Band self, double val) -> CPLErr\n"
   65573             :     "\n"
   65574             :     "\n"
   65575             :     "Set scaling offset.\n"
   65576             :     "See :cpp:func:`GDALRasterBand::SetOffset`.\n"
   65577             :     "\n"
   65578             :     "Parameters\n"
   65579             :     "----------\n"
   65580             :     "val : float\n"
   65581             :     "\n"
   65582             :     "Returns\n"
   65583             :     "-------\n"
   65584             :     "int:\n"
   65585             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   65586             :     "\n"
   65587             :     "See Also\n"
   65588             :     "--------\n"
   65589             :     ":py:meth:`SetScale`\n"
   65590             :     "\n"
   65591             :     ""},
   65592             :    { "Band_SetScale", _wrap_Band_SetScale, METH_VARARGS, "\n"
   65593             :     "Band_SetScale(Band self, double val) -> CPLErr\n"
   65594             :     "\n"
   65595             :     "Set scaling ratio.\n"
   65596             :     "See :cpp:func:`GDALRasterBand::SetScale`.\n"
   65597             :     "\n"
   65598             :     "Parameters\n"
   65599             :     "----------\n"
   65600             :     "val : float\n"
   65601             :     "\n"
   65602             :     "Returns\n"
   65603             :     "-------\n"
   65604             :     "int:\n"
   65605             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   65606             :     "\n"
   65607             :     "See Also\n"
   65608             :     "--------\n"
   65609             :     ":py:meth:`SetOffset`\n"
   65610             :     "\n"
   65611             :     ""},
   65612             :    { "Band_GetStatistics", _wrap_Band_GetStatistics, METH_VARARGS, "\n"
   65613             :     "Band_GetStatistics(Band self, int approx_ok, int force) -> CPLErr\n"
   65614             :     "\n"
   65615             :     "\n"
   65616             :     "Return the minimum, maximum, mean, and standard deviation of all pixel values\n"
   65617             :     "in this band.\n"
   65618             :     "See :cpp:func:`GDALRasterBand::GetStatistics`\n"
   65619             :     "\n"
   65620             :     "Parameters\n"
   65621             :     "----------\n"
   65622             :     "approx_ok : bool\n"
   65623             :     "    If ``True``, allow overviews or a subset of image tiles to be used in\n"
   65624             :     "    computing the statistics.\n"
   65625             :     "force : bool\n"
   65626             :     "    If ``False``, only return a result if it can be obtained without scanning\n"
   65627             :     "    the image, i.e. from pre-existing metadata.\n"
   65628             :     "\n"
   65629             :     "Returns\n"
   65630             :     "-------\n"
   65631             :     "list\n"
   65632             :     "   a list with the min, max, mean, and standard deviation of values\n"
   65633             :     "   in the Band.\n"
   65634             :     "\n"
   65635             :     "See Also\n"
   65636             :     "--------\n"
   65637             :     ":py:meth:`ComputeBandStats`\n"
   65638             :     ":py:meth:`ComputeRasterMinMax`\n"
   65639             :     ":py:meth:`GetMaximum`\n"
   65640             :     ":py:meth:`GetMinimum`\n"
   65641             :     ":py:meth:`GetStatistics`\n"
   65642             :     "\n"
   65643             :     ""},
   65644             :    { "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"},
   65645             :    { "Band_SetStatistics", _wrap_Band_SetStatistics, METH_VARARGS, "\n"
   65646             :     "Band_SetStatistics(Band self, double min, double max, double mean, double stddev) -> CPLErr\n"
   65647             :     "\n"
   65648             :     "\n"
   65649             :     "Set statistics on band.\n"
   65650             :     "See :cpp:func:`GDALRasterBand::SetStatistics`.\n"
   65651             :     "\n"
   65652             :     "Parameters\n"
   65653             :     "----------\n"
   65654             :     "min : float\n"
   65655             :     "max : float\n"
   65656             :     "mean : float\n"
   65657             :     "stdev : float\n"
   65658             :     "\n"
   65659             :     "Returns\n"
   65660             :     "-------\n"
   65661             :     "int:\n"
   65662             :     "   :py:const:`CE_None` on apparent success or :py:const:`CE_Failure` on\n"
   65663             :     "   failure.  This method cannot detect whether metadata will be properly saved and\n"
   65664             :     "   so may return :py:const:`gdal.`CE_None` even if the statistics will never be\n"
   65665             :     "   saved.\n"
   65666             :     "\n"
   65667             :     "See Also\n"
   65668             :     "--------\n"
   65669             :     ":py:meth:`ComputeBandStats`\n"
   65670             :     ":py:meth:`ComputeRasterMinMax`\n"
   65671             :     ":py:meth:`ComputeStatistics`\n"
   65672             :     ":py:meth:`GetMaximum`\n"
   65673             :     ":py:meth:`GetMinimum`\n"
   65674             :     ":py:meth:`GetStatistics`\n"
   65675             :     "\n"
   65676             :     ""},
   65677             :    { "Band_GetOverviewCount", _wrap_Band_GetOverviewCount, METH_O, "\n"
   65678             :     "Band_GetOverviewCount(Band self) -> int\n"
   65679             :     "\n"
   65680             :     "\n"
   65681             :     "Return the number of overview layers available.\n"
   65682             :     "See :cpp:func:`GDALRasterBand::GetOverviewCount`.\n"
   65683             :     "\n"
   65684             :     "Returns\n"
   65685             :     "-------\n"
   65686             :     "int\n"
   65687             :     "\n"
   65688             :     "\n"
   65689             :     ""},
   65690             :    { "Band_GetOverview", _wrap_Band_GetOverview, METH_VARARGS, "\n"
   65691             :     "Band_GetOverview(Band self, int i) -> Band\n"
   65692             :     "\n"
   65693             :     "\n"
   65694             :     "Fetch a raster overview.\n"
   65695             :     "See :cpp:func:`GDALRasterBand::GetOverview`.\n"
   65696             :     "\n"
   65697             :     "Parameters\n"
   65698             :     "----------\n"
   65699             :     "i : int\n"
   65700             :     "    Overview index between 0 and ``GetOverviewCount() - 1``.\n"
   65701             :     "\n"
   65702             :     "Returns\n"
   65703             :     "-------\n"
   65704             :     "Band\n"
   65705             :     "\n"
   65706             :     "\n"
   65707             :     ""},
   65708             :    { "Band_GetSampleOverview", _wrap_Band_GetSampleOverview, METH_VARARGS, "Band_GetSampleOverview(Band self, GUIntBig nDesiredSamples) -> Band"},
   65709             :    { "Band_Checksum", (PyCFunction)(void(*)(void))_wrap_Band_Checksum, METH_VARARGS|METH_KEYWORDS, "\n"
   65710             :     "Band_Checksum(Band self, int xoff=0, int yoff=0, int * xsize=None, int * ysize=None) -> int\n"
   65711             :     "\n"
   65712             :     "\n"
   65713             :     "Computes a checksum from a region of a RasterBand.\n"
   65714             :     "See :cpp:func:`GDALChecksumImage`.\n"
   65715             :     "\n"
   65716             :     "Parameters\n"
   65717             :     "----------\n"
   65718             :     "xoff : int, default=0\n"
   65719             :     "   The pixel offset to left side of the region of the band to\n"
   65720             :     "   be read. This would be zero to start from the left side.\n"
   65721             :     "yoff : int, default=0\n"
   65722             :     "   The line offset to top side of the region of the band to\n"
   65723             :     "   be read. This would be zero to start from the top side.\n"
   65724             :     "xsize : int, optional\n"
   65725             :     "     The number of pixels to read in the x direction. By default,\n"
   65726             :     "     equal to the number of columns in the raster.\n"
   65727             :     "ysize : int, optional\n"
   65728             :     "     The number of rows to read in the y direction. By default,\n"
   65729             :     "     equal to the number of bands in the raster.\n"
   65730             :     "\n"
   65731             :     "Returns\n"
   65732             :     "-------\n"
   65733             :     "int\n"
   65734             :     "    checksum value, or -1 in case of error\n"
   65735             :     "\n"
   65736             :     "\n"
   65737             :     ""},
   65738             :    { "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)"},
   65739             :    { "Band_ComputeBandStats", _wrap_Band_ComputeBandStats, METH_VARARGS, "\n"
   65740             :     "Band_ComputeBandStats(Band self, int samplestep=1)\n"
   65741             :     "\n"
   65742             :     "\n"
   65743             :     "Computes the mean and standard deviation of values in this Band.\n"
   65744             :     "See :cpp:func:`GDALComputeBandStats`.\n"
   65745             :     "\n"
   65746             :     "Parameters\n"
   65747             :     "----------\n"
   65748             :     "samplestep : int, default=1\n"
   65749             :     "    Step between scanlines used to compute statistics.\n"
   65750             :     "\n"
   65751             :     "Returns\n"
   65752             :     "-------\n"
   65753             :     "tuple\n"
   65754             :     "    tuple of length 2 with value of mean and standard deviation\n"
   65755             :     "\n"
   65756             :     "See Also\n"
   65757             :     "--------\n"
   65758             :     ":py:meth:`ComputeRasterMinMax`\n"
   65759             :     ":py:meth:`ComputeStatistics`\n"
   65760             :     ":py:meth:`GetMaximum`\n"
   65761             :     ":py:meth:`GetMinimum`\n"
   65762             :     ":py:meth:`GetStatistics`\n"
   65763             :     ":py:meth:`SetStatistics`\n"
   65764             :     "\n"
   65765             :     ""},
   65766             :    { "Band_Fill", _wrap_Band_Fill, METH_VARARGS, "\n"
   65767             :     "Band_Fill(Band self, double real_fill, double imag_fill=0.0) -> CPLErr\n"
   65768             :     "\n"
   65769             :     "\n"
   65770             :     "Fill this band with a constant value.\n"
   65771             :     "See :cpp:func:`GDALRasterBand::Fill`.\n"
   65772             :     "\n"
   65773             :     "Parameters\n"
   65774             :     "----------\n"
   65775             :     "real_fill : float\n"
   65776             :     "    real component of the fill value\n"
   65777             :     "imag_fill : float, default = 0.0\n"
   65778             :     "    imaginary component of the fill value\n"
   65779             :     "\n"
   65780             :     "Returns\n"
   65781             :     "-------\n"
   65782             :     "int:\n"
   65783             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   65784             :     "\n"
   65785             :     "\n"
   65786             :     ""},
   65787             :    { "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"},
   65788             :    { "Band_FlushCache", _wrap_Band_FlushCache, METH_O, "\n"
   65789             :     "Band_FlushCache(Band self)\n"
   65790             :     "\n"
   65791             :     "\n"
   65792             :     "Flush raster data cache.\n"
   65793             :     "See :cpp:func:`GDALRasterBand::FlushCache`.\n"
   65794             :     "\n"
   65795             :     ""},
   65796             :    { "Band_GetRasterColorTable", _wrap_Band_GetRasterColorTable, METH_O, "\n"
   65797             :     "Band_GetRasterColorTable(Band self) -> ColorTable\n"
   65798             :     "\n"
   65799             :     "\n"
   65800             :     "Fetch the color table associated with this band.\n"
   65801             :     "See :cpp:func:`GDALRasterBand::GetColorTable`.\n"
   65802             :     "\n"
   65803             :     "Returns\n"
   65804             :     "-------\n"
   65805             :     "ColorTable\n"
   65806             :     "    The :py:class:`ColorTable`, or ``None`` if it has not been defined.\n"
   65807             :     "\n"
   65808             :     ""},
   65809             :    { "Band_GetColorTable", _wrap_Band_GetColorTable, METH_O, "\n"
   65810             :     "Band_GetColorTable(Band self) -> ColorTable\n"
   65811             :     "\n"
   65812             :     "\n"
   65813             :     "Get the color table associated with this band.\n"
   65814             :     "See :cpp:func:`GDALRasterBand::GetColorTable`.\n"
   65815             :     "\n"
   65816             :     "Returns\n"
   65817             :     "-------\n"
   65818             :     "ColorTable or ``None``\n"
   65819             :     "\n"
   65820             :     ""},
   65821             :    { "Band_SetRasterColorTable", _wrap_Band_SetRasterColorTable, METH_VARARGS, "\n"
   65822             :     "Band_SetRasterColorTable(Band self, ColorTable arg) -> int\n"
   65823             :     "\n"
   65824             :     "Deprecated. Alternate name for :py:meth:`SetColorTable`.\n"
   65825             :     "\n"
   65826             :     ""},
   65827             :    { "Band_SetColorTable", _wrap_Band_SetColorTable, METH_VARARGS, "\n"
   65828             :     "Band_SetColorTable(Band self, ColorTable arg) -> int\n"
   65829             :     "\n"
   65830             :     "\n"
   65831             :     "Set the raster color table.\n"
   65832             :     "See :cpp:func:`GDALRasterBand::SetColorTable`.\n"
   65833             :     "\n"
   65834             :     "Parameters\n"
   65835             :     "----------\n"
   65836             :     "arg : ColorTable\n"
   65837             :     "\n"
   65838             :     "Returns\n"
   65839             :     "-------\n"
   65840             :     "int:\n"
   65841             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   65842             :     "\n"
   65843             :     ""},
   65844             :    { "Band_GetDefaultRAT", _wrap_Band_GetDefaultRAT, METH_O, "Band_GetDefaultRAT(Band self) -> RasterAttributeTable"},
   65845             :    { "Band_SetDefaultRAT", _wrap_Band_SetDefaultRAT, METH_VARARGS, "Band_SetDefaultRAT(Band self, RasterAttributeTable table) -> int"},
   65846             :    { "Band_GetMaskBand", _wrap_Band_GetMaskBand, METH_O, "\n"
   65847             :     "Band_GetMaskBand(Band self) -> Band\n"
   65848             :     "\n"
   65849             :     "\n"
   65850             :     "Return the mask band associated with this band.\n"
   65851             :     "See :cpp:func:`GDALRasterBand::GetMaskBand`.\n"
   65852             :     "\n"
   65853             :     "Returns\n"
   65854             :     "-------\n"
   65855             :     "Band\n"
   65856             :     "\n"
   65857             :     "\n"
   65858             :     ""},
   65859             :    { "Band_GetMaskFlags", _wrap_Band_GetMaskFlags, METH_O, "\n"
   65860             :     "Band_GetMaskFlags(Band self) -> int\n"
   65861             :     "\n"
   65862             :     "\n"
   65863             :     "Return the status flags of the mask band.\n"
   65864             :     "See :cpp:func:`GDALRasterBand::GetMaskFlags`.\n"
   65865             :     "\n"
   65866             :     "Returns\n"
   65867             :     "-------\n"
   65868             :     "int\n"
   65869             :     "\n"
   65870             :     "Examples\n"
   65871             :     "--------\n"
   65872             :     ">>> import numpy as np\n"
   65873             :     ">>> ds = gdal.GetDriverByName('MEM').Create('', 10, 10)\n"
   65874             :     ">>> band = ds.GetRasterBand(1)\n"
   65875             :     ">>> band.GetMaskFlags() == gdal.GMF_ALL_VALID\n"
   65876             :     "True\n"
   65877             :     ">>> band.SetNoDataValue(22)\n"
   65878             :     "0\n"
   65879             :     ">>> band.WriteArray(np.array([[22]]))\n"
   65880             :     "0\n"
   65881             :     ">>> band.GetMaskBand().ReadAsArray(win_xsize=2,win_ysize=2)\n"
   65882             :     "array([[  0, 255],\n"
   65883             :     "       [255, 255]], dtype=uint8)\n"
   65884             :     ">>> band.GetMaskFlags() == gdal.GMF_NODATA\n"
   65885             :     "True\n"
   65886             :     "\n"
   65887             :     "\n"
   65888             :     ""},
   65889             :    { "Band_CreateMaskBand", _wrap_Band_CreateMaskBand, METH_VARARGS, "\n"
   65890             :     "Band_CreateMaskBand(Band self, int nFlags) -> CPLErr\n"
   65891             :     "\n"
   65892             :     "\n"
   65893             :     "Add a mask band to the current band.\n"
   65894             :     "See :cpp:func:`GDALRasterBand::CreateMaskBand`.\n"
   65895             :     "\n"
   65896             :     "Parameters\n"
   65897             :     "----------\n"
   65898             :     "nFlags : int\n"
   65899             :     "\n"
   65900             :     "Returns\n"
   65901             :     "-------\n"
   65902             :     "int:\n"
   65903             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   65904             :     "\n"
   65905             :     "\n"
   65906             :     ""},
   65907             :    { "Band_IsMaskBand", _wrap_Band_IsMaskBand, METH_O, "\n"
   65908             :     "Band_IsMaskBand(Band self) -> bool\n"
   65909             :     "\n"
   65910             :     "\n"
   65911             :     "Returns whether the band is a mask band.\n"
   65912             :     "See :cpp:func:`GDALRasterBand::IsMaskBand`.\n"
   65913             :     "\n"
   65914             :     "Returns\n"
   65915             :     "-------\n"
   65916             :     "bool\n"
   65917             :     "\n"
   65918             :     ""},
   65919             :    { "Band_GetHistogram", (PyCFunction)(void(*)(void))_wrap_Band_GetHistogram, METH_VARARGS|METH_KEYWORDS, "\n"
   65920             :     "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"
   65921             :     "\n"
   65922             :     "\n"
   65923             :     "Compute raster histogram.\n"
   65924             :     "See :cpp:func:`GDALRasterBand::GetHistogram`.\n"
   65925             :     "\n"
   65926             :     "Parameters\n"
   65927             :     "----------\n"
   65928             :     "min : float, default=-0.05\n"
   65929             :     "    the lower bound of the histogram\n"
   65930             :     "max : float, default=255.5\n"
   65931             :     "    the upper bound of the histogram\n"
   65932             :     "buckets : int, default=256\n"
   65933             :     "    the number of buckets int he histogram\n"
   65934             :     "include_out_of_range : bool, default=False\n"
   65935             :     "    if ``True``, add out-of-range values into the first and last buckets\n"
   65936             :     "approx_ok : bool, default=True\n"
   65937             :     "    if ``True``, compute an approximate histogram by using subsampling or overviews\n"
   65938             :     "callback : function, optional\n"
   65939             :     "             A progress callback function\n"
   65940             :     "callback_data: optional\n"
   65941             :     "             Optional data to be passed to callback function\n"
   65942             :     "\n"
   65943             :     "Returns\n"
   65944             :     "-------\n"
   65945             :     "list\n"
   65946             :     "    list with length equal to ``buckets``. If ``approx_ok`` is ``False``, each\n"
   65947             :     "    the value of each list item will equal the number of pixels in that bucket.\n"
   65948             :     "\n"
   65949             :     "Examples\n"
   65950             :     "--------\n"
   65951             :     ">>> import numpy as np\n"
   65952             :     ">>> ds = gdal.GetDriverByName('MEM').Create('', 10, 10, eType=gdal.GDT_Float32)\n"
   65953             :     ">>> ds.WriteArray(np.random.normal(size=100).reshape(10, 10))\n"
   65954             :     "0\n"
   65955             :     ">>> ds.GetRasterBand(1).GetHistogram(min=-3.5, max=3.5, buckets=13, approx_ok=False)\n"
   65956             :     "[0, 0, 3, 9, 13, 12, 25, 22, 9, 6, 0, 1, 0]  # random\n"
   65957             :     "\n"
   65958             :     ""},
   65959             :    { "Band_GetDefaultHistogram", (PyCFunction)(void(*)(void))_wrap_Band_GetDefaultHistogram, METH_VARARGS|METH_KEYWORDS, "\n"
   65960             :     "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"
   65961             :     "\n"
   65962             :     "\n"
   65963             :     "Fetch the default histogram for this band.\n"
   65964             :     "See :cpp:func:`GDALRasterBand::GetDefaultHistogram`.\n"
   65965             :     "\n"
   65966             :     "Returns\n"
   65967             :     "-------\n"
   65968             :     "list\n"
   65969             :     "    List with the following four elements:\n"
   65970             :     "    - lower bound of histogram\n"
   65971             :     "    - upper bound of histogram\n"
   65972             :     "    - number of buckets in histogram\n"
   65973             :     "    - tuple with counts for each bucket\n"
   65974             :     "\n"
   65975             :     ""},
   65976             :    { "Band_SetDefaultHistogram", _wrap_Band_SetDefaultHistogram, METH_VARARGS, "\n"
   65977             :     "Band_SetDefaultHistogram(Band self, double min, double max, int buckets_in) -> CPLErr\n"
   65978             :     "\n"
   65979             :     "\n"
   65980             :     "Set default histogram.\n"
   65981             :     "See :cpp:func:`GDALRasterBand::SetDefaultHistogram`.\n"
   65982             :     "\n"
   65983             :     "Parameters\n"
   65984             :     "----------\n"
   65985             :     "min : float\n"
   65986             :     "    minimum value\n"
   65987             :     "max : float\n"
   65988             :     "    maximum value\n"
   65989             :     "buckets_in : list\n"
   65990             :     "    list of pixel counts for each bucket\n"
   65991             :     "\n"
   65992             :     "Returns\n"
   65993             :     "-------\n"
   65994             :     "int:\n"
   65995             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   65996             :     "\n"
   65997             :     "See Also\n"
   65998             :     "--------\n"
   65999             :     ":py:meth:`SetHistogram`\n"
   66000             :     "\n"
   66001             :     ""},
   66002             :    { "Band_HasArbitraryOverviews", _wrap_Band_HasArbitraryOverviews, METH_O, "\n"
   66003             :     "Band_HasArbitraryOverviews(Band self) -> bool\n"
   66004             :     "\n"
   66005             :     "\n"
   66006             :     "Check for arbitrary overviews.\n"
   66007             :     "See :cpp:func:`GDALRasterBand::HasArbitraryOverviews`.\n"
   66008             :     "\n"
   66009             :     "Returns\n"
   66010             :     "-------\n"
   66011             :     "bool\n"
   66012             :     "\n"
   66013             :     ""},
   66014             :    { "Band_GetCategoryNames", _wrap_Band_GetCategoryNames, METH_O, "\n"
   66015             :     "Band_GetCategoryNames(Band self) -> char **\n"
   66016             :     "\n"
   66017             :     "\n"
   66018             :     "Fetch the list of category names for this raster.\n"
   66019             :     "See :cpp:func:`GDALRasterBand::GetCategoryNames`.\n"
   66020             :     "\n"
   66021             :     "Returns\n"
   66022             :     "-------\n"
   66023             :     "list\n"
   66024             :     "    A list of category names, or ``None``\n"
   66025             :     "\n"
   66026             :     ""},
   66027             :    { "Band_SetCategoryNames", _wrap_Band_SetCategoryNames, METH_VARARGS, "\n"
   66028             :     "Band_SetCategoryNames(Band self, char ** papszCategoryNames) -> CPLErr\n"
   66029             :     "\n"
   66030             :     "\n"
   66031             :     "Set the category names for this band.\n"
   66032             :     "See :cpp:func:`GDALRasterBand::SetCategoryNames`.\n"
   66033             :     "\n"
   66034             :     "Parameters\n"
   66035             :     "----------\n"
   66036             :     "papszCategoryNames : list\n"
   66037             :     "\n"
   66038             :     "Returns\n"
   66039             :     "-------\n"
   66040             :     "int:\n"
   66041             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   66042             :     "\n"
   66043             :     ""},
   66044             :    { "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"},
   66045             :    { "Band_GetVirtualMemAuto", (PyCFunction)(void(*)(void))_wrap_Band_GetVirtualMemAuto, METH_VARARGS|METH_KEYWORDS, "Band_GetVirtualMemAuto(Band self, GDALRWFlag eRWFlag, char ** options=None) -> VirtualMem"},
   66046             :    { "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"},
   66047             :    { "Band_GetDataCoverageStatus", _wrap_Band_GetDataCoverageStatus, METH_VARARGS, "\n"
   66048             :     "Band_GetDataCoverageStatus(Band self, int nXOff, int nYOff, int nXSize, int nYSize, int nMaskFlagStop=0) -> int\n"
   66049             :     "\n"
   66050             :     "\n"
   66051             :     "Determine whether a sub-window of the Band contains only data, only empty blocks, or a mix of both.\n"
   66052             :     "See :cpp:func:`GDALRasterBand::GetDataCoverageStatus`.\n"
   66053             :     "\n"
   66054             :     "Parameters\n"
   66055             :     "----------\n"
   66056             :     "nXOff : int\n"
   66057             :     "nYOff : int\n"
   66058             :     "nXSize : int\n"
   66059             :     "nYSize : int\n"
   66060             :     "nMaskFlagStop : int, default=0\n"
   66061             :     "\n"
   66062             :     "Returns\n"
   66063             :     "-------\n"
   66064             :     "list\n"
   66065             :     "    First value represents a bitwise-or value of the following constants\n"
   66066             :     "    - :py:const:`gdalconst.GDAL_DATA_COVERAGE_STATUS_DATA`\n"
   66067             :     "    - :py:const:`gdalconst.GDAL_DATA_COVERAGE_STATUS_EMPTY`\n"
   66068             :     "    - :py:const:`gdalconst.GDAL_DATA_COVERAGE_STATUS_UNIMPLEMENTED`\n"
   66069             :     "    Second value represents the approximate percentage in [0, 100] of pixels in the window that have valid values\n"
   66070             :     "\n"
   66071             :     "Examples\n"
   66072             :     "--------\n"
   66073             :     ">>> import numpy as np\n"
   66074             :     ">>> # Create a raster with four blocks\n"
   66075             :     ">>> ds = gdal.GetDriverByName('GTiff').Create('test.tif', 64, 64, options = {'SPARSE_OK':True, 'TILED':True, 'BLOCKXSIZE':32, 'BLOCKYSIZE':32})\n"
   66076             :     ">>> band = ds.GetRasterBand(1)\n"
   66077             :     ">>> # Write some data to upper-left block\n"
   66078             :     ">>> band.WriteArray(np.array([[1, 2], [3, 4]]))\n"
   66079             :     "0\n"
   66080             :     ">>> # Check status of upper-left block\n"
   66081             :     ">>> flags, pct = band.GetDataCoverageStatus(0, 0, 32, 32)\n"
   66082             :     ">>> flags == gdal.GDAL_DATA_COVERAGE_STATUS_DATA\n"
   66083             :     "True\n"
   66084             :     ">>> pct\n"
   66085             :     "100.0\n"
   66086             :     ">>> # Check status of upper-right block\n"
   66087             :     ">>> flags, pct = band.GetDataCoverageStatus(32, 0, 32, 32)\n"
   66088             :     ">>> flags == gdal.GDAL_DATA_COVERAGE_STATUS_EMPTY\n"
   66089             :     "True\n"
   66090             :     ">>> pct\n"
   66091             :     "0.0\n"
   66092             :     ">>> # Check status of window touching all four blocks\n"
   66093             :     ">>> flags, pct = band.GetDataCoverageStatus(16, 16, 32, 32)\n"
   66094             :     ">>> flags == gdal.GDAL_DATA_COVERAGE_STATUS_DATA | gdal.GDAL_DATA_COVERAGE_STATUS_EMPTY\n"
   66095             :     "True\n"
   66096             :     ">>> pct\n"
   66097             :     "25.0\n"
   66098             :     "\n"
   66099             :     ""},
   66100             :    { "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"},
   66101             :    { "Band_InterpolateAtPoint", _wrap_Band_InterpolateAtPoint, METH_VARARGS, "Band_InterpolateAtPoint(Band self, double pixel, double line, GDALRIOResampleAlg interpolation) -> CPLErr"},
   66102             :    { "Band_InterpolateAtGeolocation", _wrap_Band_InterpolateAtGeolocation, METH_VARARGS, "Band_InterpolateAtGeolocation(Band self, double geolocX, double geolocY, SpatialReference srs, GDALRIOResampleAlg interpolation, char ** transformerOptions=None) -> CPLErr"},
   66103             :    { "Band_ComputeMinMaxLocation", _wrap_Band_ComputeMinMaxLocation, METH_O, "Band_ComputeMinMaxLocation(Band self) -> CPLErr"},
   66104             :    { "Band_AsMDArray", _wrap_Band_AsMDArray, METH_O, "Band_AsMDArray(Band self) -> MDArray"},
   66105             :    { "Band__EnablePixelTypeSignedByteWarning", _wrap_Band__EnablePixelTypeSignedByteWarning, METH_VARARGS, "Band__EnablePixelTypeSignedByteWarning(Band self, bool b)"},
   66106             :    { "Band_UnaryOp", _wrap_Band_UnaryOp, METH_VARARGS, "Band_UnaryOp(Band self, GDALRasterAlgebraUnaryOperation op) -> ComputedBand"},
   66107             :    { "Band_BinaryOpBand", _wrap_Band_BinaryOpBand, METH_VARARGS, "Band_BinaryOpBand(Band self, GDALRasterAlgebraBinaryOperation op, Band other) -> ComputedBand"},
   66108             :    { "Band_BinaryOpDouble", _wrap_Band_BinaryOpDouble, METH_VARARGS, "Band_BinaryOpDouble(Band self, GDALRasterAlgebraBinaryOperation op, double constant) -> ComputedBand"},
   66109             :    { "Band_BinaryOpDoubleToBand", _wrap_Band_BinaryOpDoubleToBand, METH_VARARGS, "Band_BinaryOpDoubleToBand(double constant, GDALRasterAlgebraBinaryOperation op, Band band) -> ComputedBand"},
   66110             :    { "Band_IfThenElse", _wrap_Band_IfThenElse, METH_VARARGS, "Band_IfThenElse(Band condBand, Band thenBand, Band elseBand) -> ComputedBand"},
   66111             :    { "Band_AsType", _wrap_Band_AsType, METH_VARARGS, "Band_AsType(Band self, GDALDataType dt) -> ComputedBand"},
   66112             :    { "Band_MaximumOfNBands", _wrap_Band_MaximumOfNBands, METH_O, "Band_MaximumOfNBands(int band_count) -> ComputedBand"},
   66113             :    { "Band_MaxConstant", _wrap_Band_MaxConstant, METH_VARARGS, "Band_MaxConstant(Band self, double constant) -> ComputedBand"},
   66114             :    { "Band_MinimumOfNBands", _wrap_Band_MinimumOfNBands, METH_O, "Band_MinimumOfNBands(int band_count) -> ComputedBand"},
   66115             :    { "Band_MinConstant", _wrap_Band_MinConstant, METH_VARARGS, "Band_MinConstant(Band self, double constant) -> ComputedBand"},
   66116             :    { "Band_MeanOfNBands", _wrap_Band_MeanOfNBands, METH_O, "Band_MeanOfNBands(int band_count) -> ComputedBand"},
   66117             :    { "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"},
   66118             :    { "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"},
   66119             :    { "Band_swigregister", Band_swigregister, METH_O, NULL},
   66120             :    { "delete_ComputedBand", _wrap_delete_ComputedBand, METH_O, "delete_ComputedBand(ComputedBand self)"},
   66121             :    { "ComputedBand_swigregister", ComputedBand_swigregister, METH_O, NULL},
   66122             :    { "new_ColorTable", (PyCFunction)(void(*)(void))_wrap_new_ColorTable, METH_VARARGS|METH_KEYWORDS, "new_ColorTable(GDALPaletteInterp palette=GPI_RGB) -> ColorTable"},
   66123             :    { "delete_ColorTable", _wrap_delete_ColorTable, METH_O, "delete_ColorTable(ColorTable self)"},
   66124             :    { "ColorTable_Clone", _wrap_ColorTable_Clone, METH_O, "ColorTable_Clone(ColorTable self) -> ColorTable"},
   66125             :    { "ColorTable_GetPaletteInterpretation", _wrap_ColorTable_GetPaletteInterpretation, METH_O, "ColorTable_GetPaletteInterpretation(ColorTable self) -> GDALPaletteInterp"},
   66126             :    { "ColorTable_GetCount", _wrap_ColorTable_GetCount, METH_O, "ColorTable_GetCount(ColorTable self) -> int"},
   66127             :    { "ColorTable_GetColorEntry", _wrap_ColorTable_GetColorEntry, METH_VARARGS, "ColorTable_GetColorEntry(ColorTable self, int entry) -> ColorEntry"},
   66128             :    { "ColorTable_GetColorEntryAsRGB", _wrap_ColorTable_GetColorEntryAsRGB, METH_VARARGS, "ColorTable_GetColorEntryAsRGB(ColorTable self, int entry, ColorEntry centry) -> int"},
   66129             :    { "ColorTable_SetColorEntry", _wrap_ColorTable_SetColorEntry, METH_VARARGS, "ColorTable_SetColorEntry(ColorTable self, int entry, ColorEntry centry)"},
   66130             :    { "ColorTable_CreateColorRamp", _wrap_ColorTable_CreateColorRamp, METH_VARARGS, "ColorTable_CreateColorRamp(ColorTable self, int nStartIndex, ColorEntry startcolor, int nEndIndex, ColorEntry endcolor)"},
   66131             :    { "ColorTable_swigregister", ColorTable_swigregister, METH_O, NULL},
   66132             :    { "ColorTable_swiginit", ColorTable_swiginit, METH_VARARGS, NULL},
   66133             :    { "delete_SubdatasetInfo", _wrap_delete_SubdatasetInfo, METH_O, "delete_SubdatasetInfo(SubdatasetInfo self)"},
   66134             :    { "SubdatasetInfo_GetPathComponent", _wrap_SubdatasetInfo_GetPathComponent, METH_O, "SubdatasetInfo_GetPathComponent(SubdatasetInfo self) -> retStringAndCPLFree *"},
   66135             :    { "SubdatasetInfo_GetSubdatasetComponent", _wrap_SubdatasetInfo_GetSubdatasetComponent, METH_O, "SubdatasetInfo_GetSubdatasetComponent(SubdatasetInfo self) -> retStringAndCPLFree *"},
   66136             :    { "SubdatasetInfo_ModifyPathComponent", _wrap_SubdatasetInfo_ModifyPathComponent, METH_VARARGS, "SubdatasetInfo_ModifyPathComponent(SubdatasetInfo self, char const * pszNewFileName) -> retStringAndCPLFree *"},
   66137             :    { "SubdatasetInfo_swigregister", SubdatasetInfo_swigregister, METH_O, NULL},
   66138             :    { "GetSubdatasetInfo", _wrap_GetSubdatasetInfo, METH_O, "GetSubdatasetInfo(char const * pszFileName) -> GDALSubdatasetInfoShadow *"},
   66139             :    { "new_Relationship", _wrap_new_Relationship, METH_VARARGS, "new_Relationship(char const * name, char const * leftTableName, char const * rightTableName, GDALRelationshipCardinality cardinality) -> Relationship"},
   66140             :    { "delete_Relationship", _wrap_delete_Relationship, METH_O, "delete_Relationship(Relationship self)"},
   66141             :    { "Relationship_GetName", _wrap_Relationship_GetName, METH_O, "Relationship_GetName(Relationship self) -> char const *"},
   66142             :    { "Relationship_GetCardinality", _wrap_Relationship_GetCardinality, METH_O, "Relationship_GetCardinality(Relationship self) -> GDALRelationshipCardinality"},
   66143             :    { "Relationship_GetLeftTableName", _wrap_Relationship_GetLeftTableName, METH_O, "Relationship_GetLeftTableName(Relationship self) -> char const *"},
   66144             :    { "Relationship_GetRightTableName", _wrap_Relationship_GetRightTableName, METH_O, "Relationship_GetRightTableName(Relationship self) -> char const *"},
   66145             :    { "Relationship_GetMappingTableName", _wrap_Relationship_GetMappingTableName, METH_O, "Relationship_GetMappingTableName(Relationship self) -> char const *"},
   66146             :    { "Relationship_SetMappingTableName", _wrap_Relationship_SetMappingTableName, METH_VARARGS, "Relationship_SetMappingTableName(Relationship self, char const * pszName)"},
   66147             :    { "Relationship_GetLeftTableFields", _wrap_Relationship_GetLeftTableFields, METH_O, "Relationship_GetLeftTableFields(Relationship self) -> char **"},
   66148             :    { "Relationship_GetRightTableFields", _wrap_Relationship_GetRightTableFields, METH_O, "Relationship_GetRightTableFields(Relationship self) -> char **"},
   66149             :    { "Relationship_SetLeftTableFields", _wrap_Relationship_SetLeftTableFields, METH_VARARGS, "Relationship_SetLeftTableFields(Relationship self, char ** pFields)"},
   66150             :    { "Relationship_SetRightTableFields", _wrap_Relationship_SetRightTableFields, METH_VARARGS, "Relationship_SetRightTableFields(Relationship self, char ** pFields)"},
   66151             :    { "Relationship_GetLeftMappingTableFields", _wrap_Relationship_GetLeftMappingTableFields, METH_O, "Relationship_GetLeftMappingTableFields(Relationship self) -> char **"},
   66152             :    { "Relationship_GetRightMappingTableFields", _wrap_Relationship_GetRightMappingTableFields, METH_O, "Relationship_GetRightMappingTableFields(Relationship self) -> char **"},
   66153             :    { "Relationship_SetLeftMappingTableFields", _wrap_Relationship_SetLeftMappingTableFields, METH_VARARGS, "Relationship_SetLeftMappingTableFields(Relationship self, char ** pFields)"},
   66154             :    { "Relationship_SetRightMappingTableFields", _wrap_Relationship_SetRightMappingTableFields, METH_VARARGS, "Relationship_SetRightMappingTableFields(Relationship self, char ** pFields)"},
   66155             :    { "Relationship_GetType", _wrap_Relationship_GetType, METH_O, "Relationship_GetType(Relationship self) -> GDALRelationshipType"},
   66156             :    { "Relationship_SetType", _wrap_Relationship_SetType, METH_VARARGS, "Relationship_SetType(Relationship self, GDALRelationshipType type)"},
   66157             :    { "Relationship_GetForwardPathLabel", _wrap_Relationship_GetForwardPathLabel, METH_O, "Relationship_GetForwardPathLabel(Relationship self) -> char const *"},
   66158             :    { "Relationship_SetForwardPathLabel", _wrap_Relationship_SetForwardPathLabel, METH_VARARGS, "Relationship_SetForwardPathLabel(Relationship self, char const * pszLabel)"},
   66159             :    { "Relationship_GetBackwardPathLabel", _wrap_Relationship_GetBackwardPathLabel, METH_O, "Relationship_GetBackwardPathLabel(Relationship self) -> char const *"},
   66160             :    { "Relationship_SetBackwardPathLabel", _wrap_Relationship_SetBackwardPathLabel, METH_VARARGS, "Relationship_SetBackwardPathLabel(Relationship self, char const * pszLabel)"},
   66161             :    { "Relationship_GetRelatedTableType", _wrap_Relationship_GetRelatedTableType, METH_O, "Relationship_GetRelatedTableType(Relationship self) -> char const *"},
   66162             :    { "Relationship_SetRelatedTableType", _wrap_Relationship_SetRelatedTableType, METH_VARARGS, "Relationship_SetRelatedTableType(Relationship self, char const * pszType)"},
   66163             :    { "Relationship_swigregister", Relationship_swigregister, METH_O, NULL},
   66164             :    { "Relationship_swiginit", Relationship_swiginit, METH_VARARGS, NULL},
   66165             :    { "TermProgress_nocb", (PyCFunction)(void(*)(void))_wrap_TermProgress_nocb, METH_VARARGS|METH_KEYWORDS, "TermProgress_nocb(double dfProgress, char const * pszMessage=None, void * pData=None) -> int"},
   66166             :    { "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"},
   66167             :    { "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"},
   66168             :    { "ReprojectImage", (PyCFunction)(void(*)(void))_wrap_ReprojectImage, METH_VARARGS|METH_KEYWORDS, "\n"
   66169             :     "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"
   66170             :     "\n"
   66171             :     "\n"
   66172             :     "Reproject image.\n"
   66173             :     "\n"
   66174             :     "See :cpp:func:`GDALReprojectImage`.\n"
   66175             :     "\n"
   66176             :     "Consider using :py:func:`osgeo.gdal.Warp` and :py:func:`osgeo.gdal.WarpOptions` instead\n"
   66177             :     "\n"
   66178             :     ""},
   66179             :    { "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"},
   66180             :    { "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"},
   66181             :    { "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"},
   66182             :    { "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"},
   66183             :    { "FillNodata", (PyCFunction)(void(*)(void))_wrap_FillNodata, METH_VARARGS|METH_KEYWORDS, "\n"
   66184             :     "FillNodata(Band targetBand, Band maskBand, double maxSearchDist, int smoothingIterations, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> int\n"
   66185             :     "\n"
   66186             :     "\n"
   66187             :     "Fill selected raster regions by interpolation from the edges.\n"
   66188             :     "\n"
   66189             :     "This algorithm will interpolate values for all designated\n"
   66190             :     "nodata pixels (marked by zeros in ``maskBand``). For each pixel\n"
   66191             :     "a four direction conic search is done to find values to interpolate\n"
   66192             :     "from (using inverse distance weighting by default). Once all values are\n"
   66193             :     "interpolated, zero or more smoothing iterations (3x3 average\n"
   66194             :     "filters on interpolated pixels) are applied to smooth out\n"
   66195             :     "artifacts.\n"
   66196             :     "\n"
   66197             :     "This algorithm is generally suitable for interpolating missing\n"
   66198             :     "regions of fairly continuously varying rasters (such as elevation\n"
   66199             :     "models for instance). It is also suitable for filling small holes\n"
   66200             :     "and cracks in more irregularly varying images (like airphotos). It\n"
   66201             :     "is generally not so great for interpolating a raster from sparse\n"
   66202             :     "point data. See :py:func:`Grid` for that case.\n"
   66203             :     "\n"
   66204             :     "See :cpp:func:`GDALFillNodata`.\n"
   66205             :     "\n"
   66206             :     "Parameters\n"
   66207             :     "----------\n"
   66208             :     "targetBand : Band\n"
   66209             :     "    Band containing values to fill. Will be modified in-place.\n"
   66210             :     "maskBand : Band\n"
   66211             :     "    Mask band with a value of 0 indicating values that should be filled.\n"
   66212             :     "    If not specified, the mask band associated with ``targetBand`` will be used.\n"
   66213             :     "maxSearchDist : float\n"
   66214             :     "    the maximum number of pixels to search in all directions to find values to interpolate from.\n"
   66215             :     "smoothingIterations : int\n"
   66216             :     "    the number of 3x3 smoothing filter passes to run (0 or more)\n"
   66217             :     "options : dict/list, optional\n"
   66218             :     "    A dict or list of name=value options. Available options are\n"
   66219             :     "    described in :cpp:func:`GDALFillNodata`.\n"
   66220             :     "callback : function, optional\n"
   66221             :     "   A progress callback function\n"
   66222             :     "callback_data: optional\n"
   66223             :     "   Optional data to be passed to callback function\n"
   66224             :     "\n"
   66225             :     "Returns\n"
   66226             :     "-------\n"
   66227             :     "int\n"
   66228             :     "   :py:const:`CE_None` on success or :py:const:`CE_Failure` on failure.\n"
   66229             :     "\n"
   66230             :     "Examples\n"
   66231             :     "--------\n"
   66232             :     ">>> import numpy as np\n"
   66233             :     ">>> data = np.array([[1, 2], [9, 9], [9, 9], [3, 4]], dtype=np.float32)\n"
   66234             :     ">>> ds = gdal.GetDriverByName('MEM').Create('', 2, 4, eType=gdal.GDT_Float32)\n"
   66235             :     ">>> ds.WriteArray(data)\n"
   66236             :     "0\n"
   66237             :     ">>> mask = data != 9  # replace pixels with value = 9\n"
   66238             :     ">>> mask_ds = gdal.GetDriverByName('MEM').Create('', 2, 4, eType=gdal.GDT_Byte)\n"
   66239             :     ">>> mask_ds.WriteArray(mask)\n"
   66240             :     "0\n"
   66241             :     ">>> gdal.FillNodata(ds.GetRasterBand(1), mask_ds.GetRasterBand(1), 5, 0)\n"
   66242             :     "0\n"
   66243             :     ">>> ds.ReadAsArray()\n"
   66244             :     "array([[1.       , 2.       ],\n"
   66245             :     "       [2.1485982, 2.6666667],\n"
   66246             :     "       [2.721169 , 3.3333333],\n"
   66247             :     "       [3.       , 4.       ]], dtype=float32)\n"
   66248             :     ">>> gdal.FillNodata(ds.GetRasterBand(1), mask_ds.GetRasterBand(1), 5, 0, {'INTERPOLATION':'NEAREST'})\n"
   66249             :     "0\n"
   66250             :     ">>> ds.ReadAsArray()\n"
   66251             :     "array([[1., 2.],\n"
   66252             :     "       [1., 2.],\n"
   66253             :     "       [3., 4.],\n"
   66254             :     "       [3., 4.]], dtype=float32)\n"
   66255             :     "\n"
   66256             :     "\n"
   66257             :     ""},
   66258             :    { "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"},
   66259             :    { "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"},
   66260             :    { "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"},
   66261             :    { "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"},
   66262             :    { "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"},
   66263             :    { "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"},
   66264             :    { "IsLineOfSightVisible", (PyCFunction)(void(*)(void))_wrap_IsLineOfSightVisible, METH_VARARGS|METH_KEYWORDS, "\n"
   66265             :     "IsLineOfSightVisible(Band band, int xA, int yA, double zA, int xB, int yB, double zB, char ** options=None)\n"
   66266             :     "\n"
   66267             :     "\n"
   66268             :     "Check Line of Sight between two points.\n"
   66269             :     "Both input coordinates must be within the raster coordinate bounds.\n"
   66270             :     "\n"
   66271             :     " See :cpp:func:`GDALIsLineOfSightVisible`.\n"
   66272             :     "\n"
   66273             :     ".. versionadded:: 3.9\n"
   66274             :     "\n"
   66275             :     "Parameters\n"
   66276             :     "----------\n"
   66277             :     "band : gdal.RasterBand\n"
   66278             :     "    The band to read the DEM data from. This must NOT be null.\n"
   66279             :     "xA : int\n"
   66280             :     "    The X location (raster column) of the first point to check on the raster.\n"
   66281             :     "yA : int\n"
   66282             :     "    The Y location (raster row) of the first point to check on the raster.\n"
   66283             :     "zA : float\n"
   66284             :     "    The Z location (height) of the first point to check.\n"
   66285             :     "xB : int\n"
   66286             :     "    The X location (raster column) of the second point to check on the raster.\n"
   66287             :     "yB : int\n"
   66288             :     "    The Y location (raster row) of the second point to check on the raster.\n"
   66289             :     "zB : float\n"
   66290             :     "    The Z location (height) of the second point to check.\n"
   66291             :     "options : dict/list, optional\n"
   66292             :     "    A dict or list of name=value of options for the line of sight algorithm (currently ignored).\n"
   66293             :     "\n"
   66294             :     "Returns\n"
   66295             :     "-------\n"
   66296             :     "collections.namedtuple(is_visible: bool, col_intersection: int, row_intersection: int)\n"
   66297             :     "    is_visible is True if the two points are within Line of Sight.\n"
   66298             :     "    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"
   66299             :     "    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"
   66300             :     "\n"
   66301             :     ""},
   66302             :    { "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"},
   66303             :    { "CreatePansharpenedVRT", _wrap_CreatePansharpenedVRT, METH_VARARGS, "CreatePansharpenedVRT(char const * pszXML, Band panchroBand, int nInputSpectralBands) -> Dataset"},
   66304             :    { "GetTranformerOptionList", _wrap_GetTranformerOptionList, METH_NOARGS, "GetTranformerOptionList() -> char const *"},
   66305             :    { "delete_GDALTransformerInfoShadow", _wrap_delete_GDALTransformerInfoShadow, METH_O, "delete_GDALTransformerInfoShadow(GDALTransformerInfoShadow self)"},
   66306             :    { "GDALTransformerInfoShadow_TransformPoint", _wrap_GDALTransformerInfoShadow_TransformPoint, METH_VARARGS, "\n"
   66307             :     "GDALTransformerInfoShadow_TransformPoint(GDALTransformerInfoShadow self, int bDstToSrc, double [3] inout) -> int\n"
   66308             :     "GDALTransformerInfoShadow_TransformPoint(GDALTransformerInfoShadow self, int bDstToSrc, double x, double y, double z=0.0) -> int\n"
   66309             :     ""},
   66310             :    { "GDALTransformerInfoShadow_TransformPoints", _wrap_GDALTransformerInfoShadow_TransformPoints, METH_VARARGS, "GDALTransformerInfoShadow_TransformPoints(GDALTransformerInfoShadow self, int bDstToSrc, int nCount) -> int"},
   66311             :    { "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"},
   66312             :    { "GDALTransformerInfoShadow_swigregister", GDALTransformerInfoShadow_swigregister, METH_O, NULL},
   66313             :    { "Transformer", _wrap_Transformer, METH_VARARGS, "Transformer(Dataset src, Dataset dst, char ** options) -> GDALTransformerInfoShadow"},
   66314             :    { "WarpGetOptionList", _wrap_WarpGetOptionList, METH_NOARGS, "WarpGetOptionList() -> char const *"},
   66315             :    { "SuggestedWarpOutputRes_width_get", _wrap_SuggestedWarpOutputRes_width_get, METH_O, "SuggestedWarpOutputRes_width_get(SuggestedWarpOutputRes self) -> int"},
   66316             :    { "SuggestedWarpOutputRes_height_get", _wrap_SuggestedWarpOutputRes_height_get, METH_O, "SuggestedWarpOutputRes_height_get(SuggestedWarpOutputRes self) -> int"},
   66317             :    { "SuggestedWarpOutputRes_xmin_get", _wrap_SuggestedWarpOutputRes_xmin_get, METH_O, "SuggestedWarpOutputRes_xmin_get(SuggestedWarpOutputRes self) -> double"},
   66318             :    { "SuggestedWarpOutputRes_ymin_get", _wrap_SuggestedWarpOutputRes_ymin_get, METH_O, "SuggestedWarpOutputRes_ymin_get(SuggestedWarpOutputRes self) -> double"},
   66319             :    { "SuggestedWarpOutputRes_xmax_get", _wrap_SuggestedWarpOutputRes_xmax_get, METH_O, "SuggestedWarpOutputRes_xmax_get(SuggestedWarpOutputRes self) -> double"},
   66320             :    { "SuggestedWarpOutputRes_ymax_get", _wrap_SuggestedWarpOutputRes_ymax_get, METH_O, "SuggestedWarpOutputRes_ymax_get(SuggestedWarpOutputRes self) -> double"},
   66321             :    { "delete_SuggestedWarpOutputRes", _wrap_delete_SuggestedWarpOutputRes, METH_O, "delete_SuggestedWarpOutputRes(SuggestedWarpOutputRes self)"},
   66322             :    { "SuggestedWarpOutputRes_GetGeotransform", _wrap_SuggestedWarpOutputRes_GetGeotransform, METH_O, "SuggestedWarpOutputRes_GetGeotransform(SuggestedWarpOutputRes self)"},
   66323             :    { "SuggestedWarpOutputRes_swigregister", SuggestedWarpOutputRes_swigregister, METH_O, NULL},
   66324             :    { "SuggestedWarpOutputFromTransformer", _wrap_SuggestedWarpOutputFromTransformer, METH_VARARGS, "SuggestedWarpOutputFromTransformer(Dataset src, GDALTransformerInfoShadow transformer) -> SuggestedWarpOutputRes"},
   66325             :    { "SuggestedWarpOutputFromOptions", _wrap_SuggestedWarpOutputFromOptions, METH_VARARGS, "SuggestedWarpOutputFromOptions(Dataset src, char ** options) -> SuggestedWarpOutputRes"},
   66326             :    { "_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"},
   66327             :    { "GetGlobalAlgorithmRegistry", _wrap_GetGlobalAlgorithmRegistry, METH_NOARGS, "GetGlobalAlgorithmRegistry() -> AlgorithmRegistry"},
   66328             :    { "AlgorithmArgTypeIsList", _wrap_AlgorithmArgTypeIsList, METH_O, "AlgorithmArgTypeIsList(GDALAlgorithmArgType type) -> bool"},
   66329             :    { "AlgorithmArgTypeName", _wrap_AlgorithmArgTypeName, METH_O, "AlgorithmArgTypeName(GDALAlgorithmArgType type) -> char const *"},
   66330             :    { "delete_AlgorithmArg", _wrap_delete_AlgorithmArg, METH_O, "delete_AlgorithmArg(AlgorithmArg self)"},
   66331             :    { "AlgorithmArg_GetName", _wrap_AlgorithmArg_GetName, METH_O, "AlgorithmArg_GetName(AlgorithmArg self) -> char const *"},
   66332             :    { "AlgorithmArg_GetType", _wrap_AlgorithmArg_GetType, METH_O, "AlgorithmArg_GetType(AlgorithmArg self) -> GDALAlgorithmArgType"},
   66333             :    { "AlgorithmArg_GetDescription", _wrap_AlgorithmArg_GetDescription, METH_O, "AlgorithmArg_GetDescription(AlgorithmArg self) -> char const *"},
   66334             :    { "AlgorithmArg_GetShortName", _wrap_AlgorithmArg_GetShortName, METH_O, "AlgorithmArg_GetShortName(AlgorithmArg self) -> char const *"},
   66335             :    { "AlgorithmArg_GetAliases", _wrap_AlgorithmArg_GetAliases, METH_O, "AlgorithmArg_GetAliases(AlgorithmArg self) -> char **"},
   66336             :    { "AlgorithmArg_GetMetaVar", _wrap_AlgorithmArg_GetMetaVar, METH_O, "AlgorithmArg_GetMetaVar(AlgorithmArg self) -> char const *"},
   66337             :    { "AlgorithmArg_GetCategory", _wrap_AlgorithmArg_GetCategory, METH_O, "AlgorithmArg_GetCategory(AlgorithmArg self) -> char const *"},
   66338             :    { "AlgorithmArg_IsPositional", _wrap_AlgorithmArg_IsPositional, METH_O, "AlgorithmArg_IsPositional(AlgorithmArg self) -> bool"},
   66339             :    { "AlgorithmArg_IsRequired", _wrap_AlgorithmArg_IsRequired, METH_O, "AlgorithmArg_IsRequired(AlgorithmArg self) -> bool"},
   66340             :    { "AlgorithmArg_GetMinCount", _wrap_AlgorithmArg_GetMinCount, METH_O, "AlgorithmArg_GetMinCount(AlgorithmArg self) -> int"},
   66341             :    { "AlgorithmArg_GetMaxCount", _wrap_AlgorithmArg_GetMaxCount, METH_O, "AlgorithmArg_GetMaxCount(AlgorithmArg self) -> int"},
   66342             :    { "AlgorithmArg_GetPackedValuesAllowed", _wrap_AlgorithmArg_GetPackedValuesAllowed, METH_O, "AlgorithmArg_GetPackedValuesAllowed(AlgorithmArg self) -> bool"},
   66343             :    { "AlgorithmArg_GetRepeatedArgAllowed", _wrap_AlgorithmArg_GetRepeatedArgAllowed, METH_O, "AlgorithmArg_GetRepeatedArgAllowed(AlgorithmArg self) -> bool"},
   66344             :    { "AlgorithmArg_GetChoices", _wrap_AlgorithmArg_GetChoices, METH_O, "AlgorithmArg_GetChoices(AlgorithmArg self) -> char **"},
   66345             :    { "AlgorithmArg_GetMetadataItem", _wrap_AlgorithmArg_GetMetadataItem, METH_VARARGS, "AlgorithmArg_GetMetadataItem(AlgorithmArg self, char const * item) -> char **"},
   66346             :    { "AlgorithmArg_IsExplicitlySet", _wrap_AlgorithmArg_IsExplicitlySet, METH_O, "AlgorithmArg_IsExplicitlySet(AlgorithmArg self) -> bool"},
   66347             :    { "AlgorithmArg_HasDefaultValue", _wrap_AlgorithmArg_HasDefaultValue, METH_O, "AlgorithmArg_HasDefaultValue(AlgorithmArg self) -> bool"},
   66348             :    { "AlgorithmArg_IsHiddenForCLI", _wrap_AlgorithmArg_IsHiddenForCLI, METH_O, "AlgorithmArg_IsHiddenForCLI(AlgorithmArg self) -> bool"},
   66349             :    { "AlgorithmArg_IsOnlyForCLI", _wrap_AlgorithmArg_IsOnlyForCLI, METH_O, "AlgorithmArg_IsOnlyForCLI(AlgorithmArg self) -> bool"},
   66350             :    { "AlgorithmArg_IsInput", _wrap_AlgorithmArg_IsInput, METH_O, "AlgorithmArg_IsInput(AlgorithmArg self) -> bool"},
   66351             :    { "AlgorithmArg_IsOutput", _wrap_AlgorithmArg_IsOutput, METH_O, "AlgorithmArg_IsOutput(AlgorithmArg self) -> bool"},
   66352             :    { "AlgorithmArg_GetDatasetType", _wrap_AlgorithmArg_GetDatasetType, METH_O, "AlgorithmArg_GetDatasetType(AlgorithmArg self) -> int"},
   66353             :    { "AlgorithmArg_GetDatasetInputFlags", _wrap_AlgorithmArg_GetDatasetInputFlags, METH_O, "AlgorithmArg_GetDatasetInputFlags(AlgorithmArg self) -> int"},
   66354             :    { "AlgorithmArg_GetDatasetOutputFlags", _wrap_AlgorithmArg_GetDatasetOutputFlags, METH_O, "AlgorithmArg_GetDatasetOutputFlags(AlgorithmArg self) -> int"},
   66355             :    { "AlgorithmArg_GetMutualExclusionGroup", _wrap_AlgorithmArg_GetMutualExclusionGroup, METH_O, "AlgorithmArg_GetMutualExclusionGroup(AlgorithmArg self) -> char const *"},
   66356             :    { "AlgorithmArg_GetAsBoolean", _wrap_AlgorithmArg_GetAsBoolean, METH_O, "AlgorithmArg_GetAsBoolean(AlgorithmArg self) -> bool"},
   66357             :    { "AlgorithmArg_GetAsString", _wrap_AlgorithmArg_GetAsString, METH_O, "AlgorithmArg_GetAsString(AlgorithmArg self) -> char const *"},
   66358             :    { "AlgorithmArg_GetAsInteger", _wrap_AlgorithmArg_GetAsInteger, METH_O, "AlgorithmArg_GetAsInteger(AlgorithmArg self) -> int"},
   66359             :    { "AlgorithmArg_GetAsDouble", _wrap_AlgorithmArg_GetAsDouble, METH_O, "AlgorithmArg_GetAsDouble(AlgorithmArg self) -> double"},
   66360             :    { "AlgorithmArg_GetAsDatasetValue", _wrap_AlgorithmArg_GetAsDatasetValue, METH_O, "AlgorithmArg_GetAsDatasetValue(AlgorithmArg self) -> ArgDatasetValue"},
   66361             :    { "AlgorithmArg_GetAsStringList", _wrap_AlgorithmArg_GetAsStringList, METH_O, "AlgorithmArg_GetAsStringList(AlgorithmArg self) -> char **"},
   66362             :    { "AlgorithmArg_GetAsIntegerList", _wrap_AlgorithmArg_GetAsIntegerList, METH_O, "AlgorithmArg_GetAsIntegerList(AlgorithmArg self)"},
   66363             :    { "AlgorithmArg_GetAsDoubleList", _wrap_AlgorithmArg_GetAsDoubleList, METH_O, "AlgorithmArg_GetAsDoubleList(AlgorithmArg self)"},
   66364             :    { "AlgorithmArg_SetAsBoolean", _wrap_AlgorithmArg_SetAsBoolean, METH_VARARGS, "AlgorithmArg_SetAsBoolean(AlgorithmArg self, bool value) -> bool"},
   66365             :    { "AlgorithmArg_SetAsString", _wrap_AlgorithmArg_SetAsString, METH_VARARGS, "AlgorithmArg_SetAsString(AlgorithmArg self, char const * value) -> bool"},
   66366             :    { "AlgorithmArg_SetAsInteger", _wrap_AlgorithmArg_SetAsInteger, METH_VARARGS, "AlgorithmArg_SetAsInteger(AlgorithmArg self, int value) -> bool"},
   66367             :    { "AlgorithmArg_SetAsDouble", _wrap_AlgorithmArg_SetAsDouble, METH_VARARGS, "AlgorithmArg_SetAsDouble(AlgorithmArg self, double value) -> bool"},
   66368             :    { "AlgorithmArg_SetAsDatasetValue", _wrap_AlgorithmArg_SetAsDatasetValue, METH_VARARGS, "AlgorithmArg_SetAsDatasetValue(AlgorithmArg self, ArgDatasetValue value) -> bool"},
   66369             :    { "AlgorithmArg_SetAsStringList", _wrap_AlgorithmArg_SetAsStringList, METH_VARARGS, "AlgorithmArg_SetAsStringList(AlgorithmArg self, char ** value) -> bool"},
   66370             :    { "AlgorithmArg_SetAsIntegerList", _wrap_AlgorithmArg_SetAsIntegerList, METH_VARARGS, "AlgorithmArg_SetAsIntegerList(AlgorithmArg self, int nList) -> bool"},
   66371             :    { "AlgorithmArg_SetAsDoubleList", _wrap_AlgorithmArg_SetAsDoubleList, METH_VARARGS, "AlgorithmArg_SetAsDoubleList(AlgorithmArg self, int nList) -> bool"},
   66372             :    { "AlgorithmArg_SetDataset", _wrap_AlgorithmArg_SetDataset, METH_VARARGS, "AlgorithmArg_SetDataset(AlgorithmArg self, Dataset ds) -> bool"},
   66373             :    { "AlgorithmArg_SetDatasets", _wrap_AlgorithmArg_SetDatasets, METH_VARARGS, "AlgorithmArg_SetDatasets(AlgorithmArg self, int object_list_count) -> bool"},
   66374             :    { "AlgorithmArg_SetDatasetNames", _wrap_AlgorithmArg_SetDatasetNames, METH_VARARGS, "AlgorithmArg_SetDatasetNames(AlgorithmArg self, char ** names) -> bool"},
   66375             :    { "AlgorithmArg_swigregister", AlgorithmArg_swigregister, METH_O, NULL},
   66376             :    { "delete_Algorithm", _wrap_delete_Algorithm, METH_O, "delete_Algorithm(Algorithm self)"},
   66377             :    { "Algorithm_GetName", _wrap_Algorithm_GetName, METH_O, "Algorithm_GetName(Algorithm self) -> char const *"},
   66378             :    { "Algorithm_GetDescription", _wrap_Algorithm_GetDescription, METH_O, "Algorithm_GetDescription(Algorithm self) -> char const *"},
   66379             :    { "Algorithm_GetLongDescription", _wrap_Algorithm_GetLongDescription, METH_O, "Algorithm_GetLongDescription(Algorithm self) -> char const *"},
   66380             :    { "Algorithm_GetHelpFullURL", _wrap_Algorithm_GetHelpFullURL, METH_O, "Algorithm_GetHelpFullURL(Algorithm self) -> char const *"},
   66381             :    { "Algorithm_HasSubAlgorithms", _wrap_Algorithm_HasSubAlgorithms, METH_O, "Algorithm_HasSubAlgorithms(Algorithm self) -> bool"},
   66382             :    { "Algorithm_GetSubAlgorithmNames", _wrap_Algorithm_GetSubAlgorithmNames, METH_O, "Algorithm_GetSubAlgorithmNames(Algorithm self) -> char **"},
   66383             :    { "Algorithm_InstantiateSubAlgorithm", _wrap_Algorithm_InstantiateSubAlgorithm, METH_VARARGS, "Algorithm_InstantiateSubAlgorithm(Algorithm self, char const * algName) -> Algorithm"},
   66384             :    { "Algorithm_ParseCommandLineArguments", _wrap_Algorithm_ParseCommandLineArguments, METH_VARARGS, "Algorithm_ParseCommandLineArguments(Algorithm self, char ** args) -> bool"},
   66385             :    { "Algorithm_GetActualAlgorithm", _wrap_Algorithm_GetActualAlgorithm, METH_O, "Algorithm_GetActualAlgorithm(Algorithm self) -> Algorithm"},
   66386             :    { "Algorithm_Run", _wrap_Algorithm_Run, METH_VARARGS, "Algorithm_Run(Algorithm self, GDALProgressFunc callback=0, void * callback_data=None) -> bool"},
   66387             :    { "Algorithm_Finalize", _wrap_Algorithm_Finalize, METH_O, "Algorithm_Finalize(Algorithm self) -> bool"},
   66388             :    { "Algorithm_ParseRunAndFinalize", _wrap_Algorithm_ParseRunAndFinalize, METH_VARARGS, "Algorithm_ParseRunAndFinalize(Algorithm self, char ** args, GDALProgressFunc callback=0, void * callback_data=None) -> bool"},
   66389             :    { "Algorithm_GetUsageAsJSON", _wrap_Algorithm_GetUsageAsJSON, METH_O, "Algorithm_GetUsageAsJSON(Algorithm self) -> retStringAndCPLFree *"},
   66390             :    { "Algorithm_GetArgNames", _wrap_Algorithm_GetArgNames, METH_O, "Algorithm_GetArgNames(Algorithm self) -> char **"},
   66391             :    { "Algorithm_GetArg", _wrap_Algorithm_GetArg, METH_VARARGS, "Algorithm_GetArg(Algorithm self, char const * argName) -> AlgorithmArg"},
   66392             :    { "Algorithm_swigregister", Algorithm_swigregister, METH_O, NULL},
   66393             :    { "delete_AlgorithmRegistry", _wrap_delete_AlgorithmRegistry, METH_O, "delete_AlgorithmRegistry(AlgorithmRegistry self)"},
   66394             :    { "AlgorithmRegistry_GetAlgNames", _wrap_AlgorithmRegistry_GetAlgNames, METH_O, "AlgorithmRegistry_GetAlgNames(AlgorithmRegistry self) -> char **"},
   66395             :    { "AlgorithmRegistry_InstantiateAlg", _wrap_AlgorithmRegistry_InstantiateAlg, METH_VARARGS, "AlgorithmRegistry_InstantiateAlg(AlgorithmRegistry self, char const * algName) -> Algorithm"},
   66396             :    { "AlgorithmRegistry_swigregister", AlgorithmRegistry_swigregister, METH_O, NULL},
   66397             :    { "delete_ArgDatasetValue", _wrap_delete_ArgDatasetValue, METH_O, "delete_ArgDatasetValue(ArgDatasetValue self)"},
   66398             :    { "ArgDatasetValue_GetName", _wrap_ArgDatasetValue_GetName, METH_O, "ArgDatasetValue_GetName(ArgDatasetValue self) -> char const *"},
   66399             :    { "ArgDatasetValue_GetDataset", _wrap_ArgDatasetValue_GetDataset, METH_O, "ArgDatasetValue_GetDataset(ArgDatasetValue self) -> Dataset"},
   66400             :    { "ArgDatasetValue_SetName", _wrap_ArgDatasetValue_SetName, METH_VARARGS, "ArgDatasetValue_SetName(ArgDatasetValue self, char const * name)"},
   66401             :    { "ArgDatasetValue_SetDataset", _wrap_ArgDatasetValue_SetDataset, METH_VARARGS, "ArgDatasetValue_SetDataset(ArgDatasetValue self, Dataset ds)"},
   66402             :    { "ArgDatasetValue_swigregister", ArgDatasetValue_swigregister, METH_O, NULL},
   66403             :    { "ApplyGeoTransform", _wrap_ApplyGeoTransform, METH_VARARGS, "\n"
   66404             :     "ApplyGeoTransform(double [6] padfGeoTransform, double dfPixel, double dfLine)\n"
   66405             :     "\n"
   66406             :     "\n"
   66407             :     "Apply a geotransform to convert a (col, row) location\n"
   66408             :     "into a georeferenced (x, y) coordinate. To perform the\n"
   66409             :     "inverse transformation, see :py:func:`InvGeoTransform`.\n"
   66410             :     "\n"
   66411             :     "See :cpp:func:`GDALApplyGeoTransform`.\n"
   66412             :     "\n"
   66413             :     "Parameters\n"
   66414             :     "----------\n"
   66415             :     "gt : tuple\n"
   66416             :     "   Geotransform array, as described in :ref:`geotransforms_tut`.\n"
   66417             :     "dfPixel : float\n"
   66418             :     "   (Fractional) column in image coordinates (0.0 at the left edge of the image)\n"
   66419             :     "dfLine : float\n"
   66420             :     "   (Fractional) row in image coordinates (0.0 at the top of the image)\n"
   66421             :     "\n"
   66422             :     "Returns\n"
   66423             :     "-------\n"
   66424             :     "List\n"
   66425             :     "   x, y values corresponding to the input location\n"
   66426             :     "\n"
   66427             :     "Examples\n"
   66428             :     "--------\n"
   66429             :     ">>> ds = gdal.Open('byte.tif')\n"
   66430             :     ">>> gt = ds.GetGeoTransform()\n"
   66431             :     ">>> gdal.ApplyGeoTransform(gt, 5, 7)\n"
   66432             :     "[441020.0, 3750900.0]\n"
   66433             :     "\n"
   66434             :     "\n"
   66435             :     ""},
   66436             :    { "InvGeoTransform", _wrap_InvGeoTransform, METH_O, "\n"
   66437             :     "InvGeoTransform(double [6] gt_in) -> RETURN_NONE\n"
   66438             :     "\n"
   66439             :     "\n"
   66440             :     "Invert a geotransform array so that it represents a conversion\n"
   66441             :     "from georeferenced (x, y) coordinates to image (col, row) coordinates.\n"
   66442             :     "\n"
   66443             :     "Parameters\n"
   66444             :     "----------\n"
   66445             :     "gt : tuple\n"
   66446             :     "   Geotransform array, as described in :ref:`geotransforms_tut`.\n"
   66447             :     "\n"
   66448             :     "Returns\n"
   66449             :     "-------\n"
   66450             :     "tuple\n"
   66451             :     "   Geotransform array representing the inverse transformation\n"
   66452             :     "\n"
   66453             :     "Examples\n"
   66454             :     "--------\n"
   66455             :     ">>> ds = gdal.Open('byte.tif')\n"
   66456             :     ">>> inv_gt = gdal.InvGeoTransform(ds.GetGeoTransform())\n"
   66457             :     ">>> inv_gt\n"
   66458             :     "(-7345.333333333333, 0.016666666666666666, 0.0, 62522.0, 0.0, -0.016666666666666666)\n"
   66459             :     ">>> gdal.ApplyGeoTransform(inv_gt, 441020, 3750900)\n"
   66460             :     "[5.0, 7.0]\n"
   66461             :     "\n"
   66462             :     "\n"
   66463             :     ""},
   66464             :    { "ApplyHomography", _wrap_ApplyHomography, METH_VARARGS, "ApplyHomography(double [9] padfHomography, double dfPixel, double dfLine) -> int"},
   66465             :    { "InvHomography", _wrap_InvHomography, METH_O, "InvHomography(double [9] h_in) -> RETURN_NONE"},
   66466             :    { "VersionInfo", _wrap_VersionInfo, METH_VARARGS, "VersionInfo(char const * request=\"VERSION_NUM\") -> char const *"},
   66467             :    { "AllRegister", _wrap_AllRegister, METH_NOARGS, "\n"
   66468             :     "AllRegister()\n"
   66469             :     "\n"
   66470             :     "\n"
   66471             :     "Register all known configured GDAL drivers.\n"
   66472             :     "Automatically called when the :py:mod:`gdal` module is loaded.\n"
   66473             :     "Does not need to be called in user code unless a driver was\n"
   66474             :     "deregistered and needs to be re-registered.\n"
   66475             :     "See :cpp:func:`GDALAllRegister`.\n"
   66476             :     "\n"
   66477             :     "See Also\n"
   66478             :     "--------\n"
   66479             :     ":py:func:`Driver.Register`\n"
   66480             :     "\n"
   66481             :     ""},
   66482             :    { "GDALDestroyDriverManager", _wrap_GDALDestroyDriverManager, METH_NOARGS, "GDALDestroyDriverManager()"},
   66483             :    { "GetCacheMax", _wrap_GetCacheMax, METH_NOARGS, "\n"
   66484             :     "GetCacheMax() -> GIntBig\n"
   66485             :     "\n"
   66486             :     "\n"
   66487             :     "Get the maximum size of the block cache.\n"
   66488             :     "See :cpp:func:`GDALGetCacheMax`.\n"
   66489             :     "\n"
   66490             :     "Returns\n"
   66491             :     "-------\n"
   66492             :     "int\n"
   66493             :     "    maximum cache size in bytes\n"
   66494             :     "\n"
   66495             :     ""},
   66496             :    { "GetCacheUsed", _wrap_GetCacheUsed, METH_NOARGS, "\n"
   66497             :     "GetCacheUsed() -> GIntBig\n"
   66498             :     "\n"
   66499             :     "\n"
   66500             :     "Get the number of bytes in used by the block cache.\n"
   66501             :     "See :cpp:func:`GDALGetCacheUsed`.\n"
   66502             :     "\n"
   66503             :     "Returns\n"
   66504             :     "-------\n"
   66505             :     "int\n"
   66506             :     "    cache size in bytes\n"
   66507             :     "\n"
   66508             :     ""},
   66509             :    { "SetCacheMax", _wrap_SetCacheMax, METH_O, "\n"
   66510             :     "SetCacheMax(GIntBig nBytes)\n"
   66511             :     "\n"
   66512             :     "\n"
   66513             :     "Set the maximum size of the block cache.\n"
   66514             :     "See :cpp:func:`GDALSetCacheMax`.\n"
   66515             :     "\n"
   66516             :     "Parameters\n"
   66517             :     "----------\n"
   66518             :     "nBytes: int\n"
   66519             :     "    Cache size in bytes\n"
   66520             :     "\n"
   66521             :     "See Also\n"
   66522             :     "--------\n"
   66523             :     ":config:`GDAL_CACHEMAX`\n"
   66524             :     "\n"
   66525             :     ""},
   66526             :    { "GetDataTypeSize", _wrap_GetDataTypeSize, METH_O, "GetDataTypeSize(GDALDataType eDataType) -> int"},
   66527             :    { "GetDataTypeSizeBits", _wrap_GetDataTypeSizeBits, METH_O, "GetDataTypeSizeBits(GDALDataType eDataType) -> int"},
   66528             :    { "GetDataTypeSizeBytes", _wrap_GetDataTypeSizeBytes, METH_O, "GetDataTypeSizeBytes(GDALDataType eDataType) -> int"},
   66529             :    { "DataTypeIsComplex", _wrap_DataTypeIsComplex, METH_O, "DataTypeIsComplex(GDALDataType eDataType) -> int"},
   66530             :    { "GetDataTypeName", _wrap_GetDataTypeName, METH_O, "\n"
   66531             :     "GetDataTypeName(GDALDataType eDataType) -> char const *\n"
   66532             :     "\n"
   66533             :     "\n"
   66534             :     "Return the name of the data type.\n"
   66535             :     "\n"
   66536             :     "Parameters\n"
   66537             :     "----------\n"
   66538             :     "eDataType : int\n"
   66539             :     "    data type code\n"
   66540             :     "\n"
   66541             :     "Returns\n"
   66542             :     "-------\n"
   66543             :     "str\n"
   66544             :     "\n"
   66545             :     "Examples\n"
   66546             :     "--------\n"
   66547             :     ">>> gdal.GetDataTypeName(gdal.GDT_Int16)\n"
   66548             :     "'Int16'\n"
   66549             :     ">>> gdal.GetDataTypeName(gdal.GDT_Float64)\n"
   66550             :     "'Float64'\n"
   66551             :     "\n"
   66552             :     ""},
   66553             :    { "GetDataTypeByName", _wrap_GetDataTypeByName, METH_O, "\n"
   66554             :     "GetDataTypeByName(char const * pszDataTypeName) -> GDALDataType\n"
   66555             :     "\n"
   66556             :     "\n"
   66557             :     "Return the data type for a given name.\n"
   66558             :     "\n"
   66559             :     "Parameters\n"
   66560             :     "----------\n"
   66561             :     "pszDataTypeName : str\n"
   66562             :     "    data type name\n"
   66563             :     "\n"
   66564             :     "Returns\n"
   66565             :     "-------\n"
   66566             :     "int\n"
   66567             :     "    data type code\n"
   66568             :     "\n"
   66569             :     "Examples\n"
   66570             :     "--------\n"
   66571             :     ">>> gdal.GetDataTypeByName('Int16') == gdal.GDT_Int16\n"
   66572             :     "True\n"
   66573             :     "\n"
   66574             :     "\n"
   66575             :     ""},
   66576             :    { "DataTypeUnion", _wrap_DataTypeUnion, METH_VARARGS, "DataTypeUnion(GDALDataType a, GDALDataType b) -> GDALDataType"},
   66577             :    { "DataTypeUnionWithValue", _wrap_DataTypeUnionWithValue, METH_VARARGS, "DataTypeUnionWithValue(GDALDataType a, double val, bool isComplex) -> GDALDataType"},
   66578             :    { "GetColorInterpretationName", _wrap_GetColorInterpretationName, METH_O, "GetColorInterpretationName(GDALColorInterp eColorInterp) -> char const *"},
   66579             :    { "GetColorInterpretationByName", _wrap_GetColorInterpretationByName, METH_O, "GetColorInterpretationByName(char const * pszColorInterpName) -> GDALColorInterp"},
   66580             :    { "GetPaletteInterpretationName", _wrap_GetPaletteInterpretationName, METH_O, "GetPaletteInterpretationName(GDALPaletteInterp ePaletteInterp) -> char const *"},
   66581             :    { "DecToDMS", _wrap_DecToDMS, METH_VARARGS, "DecToDMS(double arg1, char const * arg2, int arg3=2) -> char const *"},
   66582             :    { "PackedDMSToDec", _wrap_PackedDMSToDec, METH_O, "PackedDMSToDec(double dfPacked) -> double"},
   66583             :    { "DecToPackedDMS", _wrap_DecToPackedDMS, METH_O, "DecToPackedDMS(double dfDec) -> double"},
   66584             :    { "ParseXMLString", _wrap_ParseXMLString, METH_O, "ParseXMLString(char * pszXMLString) -> CPLXMLNode *"},
   66585             :    { "SerializeXMLTree", _wrap_SerializeXMLTree, METH_O, "SerializeXMLTree(CPLXMLNode * xmlnode) -> retStringAndCPLFree *"},
   66586             :    { "GetJPEG2000Structure", _wrap_GetJPEG2000Structure, METH_VARARGS, "GetJPEG2000Structure(char const * pszFilename, char ** options=None) -> CPLXMLNode *"},
   66587             :    { "GetJPEG2000StructureAsString", _wrap_GetJPEG2000StructureAsString, METH_VARARGS, "GetJPEG2000StructureAsString(char const * pszFilename, char ** options=None) -> retStringAndCPLFree *"},
   66588             :    { "HasTriangulation", _wrap_HasTriangulation, METH_NOARGS, "HasTriangulation() -> int"},
   66589             :    { "GetDriverCount", _wrap_GetDriverCount, METH_NOARGS, "\n"
   66590             :     "GetDriverCount() -> int\n"
   66591             :     "\n"
   66592             :     "\n"
   66593             :     "Return the number of registered drivers.\n"
   66594             :     "See :cpp:func:`GDALGetDriverCount`.\n"
   66595             :     "\n"
   66596             :     "Examples\n"
   66597             :     "--------\n"
   66598             :     ">>> gdal.GetDriverCount()\n"
   66599             :     "227\n"
   66600             :     ">>> gdal.GetDriverByName('ESRI Shapefile').Deregister()\n"
   66601             :     ">>> gdal.GetDriverCount()\n"
   66602             :     "226\n"
   66603             :     "\n"
   66604             :     "\n"
   66605             :     ""},
   66606             :    { "GetDriverByName", _wrap_GetDriverByName, METH_O, "GetDriverByName(char const * name) -> Driver"},
   66607             :    { "GetDriver", _wrap_GetDriver, METH_O, "GetDriver(int i) -> Driver"},
   66608             :    { "Open", _wrap_Open, METH_VARARGS, "\n"
   66609             :     "Open(char const * utf8_path, GDALAccess eAccess=GA_ReadOnly) -> Dataset\n"
   66610             :     "\n"
   66611             :     "\n"
   66612             :     "Opens a raster file as a :py:class:`Dataset` using default options.\n"
   66613             :     "See :cpp:func:`GDALOpen`.\n"
   66614             :     "For more control over how the file is opened, use :py:func:`OpenEx`.\n"
   66615             :     "\n"
   66616             :     "Parameters\n"
   66617             :     "----------\n"
   66618             :     "utf8_path : str\n"
   66619             :     "    name of the file to open\n"
   66620             :     "eAccess : int, default = :py:const:`gdal.GA_ReadOnly`\n"
   66621             :     "\n"
   66622             :     "Returns\n"
   66623             :     "-------\n"
   66624             :     "Dataset, or ``None`` on failure\n"
   66625             :     "\n"
   66626             :     "See Also\n"
   66627             :     "--------\n"
   66628             :     ":py:func:`OpenEx`\n"
   66629             :     ":py:func:`OpenShared`\n"
   66630             :     "\n"
   66631             :     "\n"
   66632             :     ""},
   66633             :    { "OpenEx", (PyCFunction)(void(*)(void))_wrap_OpenEx, METH_VARARGS|METH_KEYWORDS, "\n"
   66634             :     "OpenEx(char const * utf8_path, unsigned int nOpenFlags=0, char ** allowed_drivers=None, char ** open_options=None, char ** sibling_files=None) -> Dataset\n"
   66635             :     "\n"
   66636             :     "\n"
   66637             :     "Open a raster or vector file as a :py:class:`Dataset`.\n"
   66638             :     "See :cpp:func:`GDALOpenEx`.\n"
   66639             :     "\n"
   66640             :     "Parameters\n"
   66641             :     "----------\n"
   66642             :     "utf8_path : str\n"
   66643             :     "    name of the file to open\n"
   66644             :     "flags : int\n"
   66645             :     "        Flags controlling how the Dataset is opened. Multiple ``gdal.OF_XXX`` flags\n"
   66646             :     "        may be combined using the ``|`` operator. See :cpp:func:`GDALOpenEx`.\n"
   66647             :     "allowed_drivers : list, optional\n"
   66648             :     "        A list of the names of drivers that may attempt to open the dataset.\n"
   66649             :     "open_options : dict/list, optional\n"
   66650             :     "        A dict or list of name=value driver-specific opening options.\n"
   66651             :     "sibling_files: list, optional\n"
   66652             :     "        A list of filenames that are auxiliary to the main filename\n"
   66653             :     "\n"
   66654             :     "Returns\n"
   66655             :     "-------\n"
   66656             :     "Dataset, or ``None`` on failure.\n"
   66657             :     "\n"
   66658             :     "See Also\n"
   66659             :     "--------\n"
   66660             :     ":py:func:`Open`\n"
   66661             :     ":py:func:`OpenShared`\n"
   66662             :     "\n"
   66663             :     "\n"
   66664             :     ""},
   66665             :    { "OpenShared", _wrap_OpenShared, METH_VARARGS, "\n"
   66666             :     "OpenShared(char const * utf8_path, GDALAccess eAccess=GA_ReadOnly) -> Dataset\n"
   66667             :     "\n"
   66668             :     "\n"
   66669             :     "Open a raster file as a :py:class:`Dataset`. If the file has already been\n"
   66670             :     "opened in the current thread, return a reference to the already-opened\n"
   66671             :     ":py:class:`Dataset`.  See :cpp:func:`GDALOpenShared`.\n"
   66672             :     "\n"
   66673             :     "Parameters\n"
   66674             :     "----------\n"
   66675             :     "utf8_path : str\n"
   66676             :     "    name of the file to open\n"
   66677             :     "eAccess : int, default = :py:const:`gdal.GA_ReadOnly`\n"
   66678             :     "\n"
   66679             :     "Returns\n"
   66680             :     "-------\n"
   66681             :     "Dataset, or ``None`` on failure\n"
   66682             :     "\n"
   66683             :     "See Also\n"
   66684             :     "--------\n"
   66685             :     ":py:func:`Open`\n"
   66686             :     ":py:func:`OpenEx`\n"
   66687             :     "\n"
   66688             :     "\n"
   66689             :     ""},
   66690             :    { "IdentifyDriver", _wrap_IdentifyDriver, METH_VARARGS, "IdentifyDriver(char const * utf8_path, char ** papszSiblings=None) -> Driver"},
   66691             :    { "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"},
   66692             :    { "GeneralCmdLineProcessor", _wrap_GeneralCmdLineProcessor, METH_VARARGS, "GeneralCmdLineProcessor(char ** papszArgv, int nOptions=0) -> char **"},
   66693             :    { "new_GDALInfoOptions", _wrap_new_GDALInfoOptions, METH_O, "new_GDALInfoOptions(char ** options) -> GDALInfoOptions"},
   66694             :    { "delete_GDALInfoOptions", _wrap_delete_GDALInfoOptions, METH_O, "delete_GDALInfoOptions(GDALInfoOptions self)"},
   66695             :    { "GDALInfoOptions_swigregister", GDALInfoOptions_swigregister, METH_O, NULL},
   66696             :    { "GDALInfoOptions_swiginit", GDALInfoOptions_swiginit, METH_VARARGS, NULL},
   66697             :    { "InfoInternal", _wrap_InfoInternal, METH_VARARGS, "InfoInternal(Dataset hDataset, GDALInfoOptions infoOptions) -> retStringAndCPLFree *"},
   66698             :    { "new_GDALVectorInfoOptions", _wrap_new_GDALVectorInfoOptions, METH_O, "new_GDALVectorInfoOptions(char ** options) -> GDALVectorInfoOptions"},
   66699             :    { "delete_GDALVectorInfoOptions", _wrap_delete_GDALVectorInfoOptions, METH_O, "delete_GDALVectorInfoOptions(GDALVectorInfoOptions self)"},
   66700             :    { "GDALVectorInfoOptions_swigregister", GDALVectorInfoOptions_swigregister, METH_O, NULL},
   66701             :    { "GDALVectorInfoOptions_swiginit", GDALVectorInfoOptions_swiginit, METH_VARARGS, NULL},
   66702             :    { "VectorInfoInternal", _wrap_VectorInfoInternal, METH_VARARGS, "VectorInfoInternal(Dataset hDataset, GDALVectorInfoOptions infoOptions) -> retStringAndCPLFree *"},
   66703             :    { "new_GDALMultiDimInfoOptions", _wrap_new_GDALMultiDimInfoOptions, METH_O, "new_GDALMultiDimInfoOptions(char ** options) -> GDALMultiDimInfoOptions"},
   66704             :    { "delete_GDALMultiDimInfoOptions", _wrap_delete_GDALMultiDimInfoOptions, METH_O, "delete_GDALMultiDimInfoOptions(GDALMultiDimInfoOptions self)"},
   66705             :    { "GDALMultiDimInfoOptions_swigregister", GDALMultiDimInfoOptions_swigregister, METH_O, NULL},
   66706             :    { "GDALMultiDimInfoOptions_swiginit", GDALMultiDimInfoOptions_swiginit, METH_VARARGS, NULL},
   66707             :    { "MultiDimInfoInternal", _wrap_MultiDimInfoInternal, METH_VARARGS, "MultiDimInfoInternal(Dataset hDataset, GDALMultiDimInfoOptions infoOptions) -> retStringAndCPLFree *"},
   66708             :    { "new_GDALTranslateOptions", _wrap_new_GDALTranslateOptions, METH_O, "new_GDALTranslateOptions(char ** options) -> GDALTranslateOptions"},
   66709             :    { "delete_GDALTranslateOptions", _wrap_delete_GDALTranslateOptions, METH_O, "delete_GDALTranslateOptions(GDALTranslateOptions self)"},
   66710             :    { "GDALTranslateOptions_swigregister", GDALTranslateOptions_swigregister, METH_O, NULL},
   66711             :    { "GDALTranslateOptions_swiginit", GDALTranslateOptions_swiginit, METH_VARARGS, NULL},
   66712             :    { "TranslateInternal", _wrap_TranslateInternal, METH_VARARGS, "TranslateInternal(char const * dest, Dataset dataset, GDALTranslateOptions translateOptions, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   66713             :    { "new_GDALWarpAppOptions", _wrap_new_GDALWarpAppOptions, METH_O, "new_GDALWarpAppOptions(char ** options) -> GDALWarpAppOptions"},
   66714             :    { "delete_GDALWarpAppOptions", _wrap_delete_GDALWarpAppOptions, METH_O, "delete_GDALWarpAppOptions(GDALWarpAppOptions self)"},
   66715             :    { "GDALWarpAppOptions_swigregister", GDALWarpAppOptions_swigregister, METH_O, NULL},
   66716             :    { "GDALWarpAppOptions_swiginit", GDALWarpAppOptions_swiginit, METH_VARARGS, NULL},
   66717             :    { "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"},
   66718             :    { "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"},
   66719             :    { "new_GDALVectorTranslateOptions", _wrap_new_GDALVectorTranslateOptions, METH_O, "new_GDALVectorTranslateOptions(char ** options) -> GDALVectorTranslateOptions"},
   66720             :    { "delete_GDALVectorTranslateOptions", _wrap_delete_GDALVectorTranslateOptions, METH_O, "delete_GDALVectorTranslateOptions(GDALVectorTranslateOptions self)"},
   66721             :    { "GDALVectorTranslateOptions_swigregister", GDALVectorTranslateOptions_swigregister, METH_O, NULL},
   66722             :    { "GDALVectorTranslateOptions_swiginit", GDALVectorTranslateOptions_swiginit, METH_VARARGS, NULL},
   66723             :    { "wrapper_GDALVectorTranslateDestDS", _wrap_wrapper_GDALVectorTranslateDestDS, METH_VARARGS, "wrapper_GDALVectorTranslateDestDS(Dataset dstDS, Dataset srcDS, GDALVectorTranslateOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   66724             :    { "wrapper_GDALVectorTranslateDestName", _wrap_wrapper_GDALVectorTranslateDestName, METH_VARARGS, "wrapper_GDALVectorTranslateDestName(char const * dest, Dataset srcDS, GDALVectorTranslateOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   66725             :    { "new_GDALDEMProcessingOptions", _wrap_new_GDALDEMProcessingOptions, METH_O, "new_GDALDEMProcessingOptions(char ** options) -> GDALDEMProcessingOptions"},
   66726             :    { "delete_GDALDEMProcessingOptions", _wrap_delete_GDALDEMProcessingOptions, METH_O, "delete_GDALDEMProcessingOptions(GDALDEMProcessingOptions self)"},
   66727             :    { "GDALDEMProcessingOptions_swigregister", GDALDEMProcessingOptions_swigregister, METH_O, NULL},
   66728             :    { "GDALDEMProcessingOptions_swiginit", GDALDEMProcessingOptions_swiginit, METH_VARARGS, NULL},
   66729             :    { "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"},
   66730             :    { "new_GDALNearblackOptions", _wrap_new_GDALNearblackOptions, METH_O, "new_GDALNearblackOptions(char ** options) -> GDALNearblackOptions"},
   66731             :    { "delete_GDALNearblackOptions", _wrap_delete_GDALNearblackOptions, METH_O, "delete_GDALNearblackOptions(GDALNearblackOptions self)"},
   66732             :    { "GDALNearblackOptions_swigregister", GDALNearblackOptions_swigregister, METH_O, NULL},
   66733             :    { "GDALNearblackOptions_swiginit", GDALNearblackOptions_swiginit, METH_VARARGS, NULL},
   66734             :    { "wrapper_GDALNearblackDestDS", _wrap_wrapper_GDALNearblackDestDS, METH_VARARGS, "wrapper_GDALNearblackDestDS(Dataset dstDS, Dataset srcDS, GDALNearblackOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   66735             :    { "wrapper_GDALNearblackDestName", _wrap_wrapper_GDALNearblackDestName, METH_VARARGS, "wrapper_GDALNearblackDestName(char const * dest, Dataset srcDS, GDALNearblackOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   66736             :    { "new_GDALGridOptions", _wrap_new_GDALGridOptions, METH_O, "new_GDALGridOptions(char ** options) -> GDALGridOptions"},
   66737             :    { "delete_GDALGridOptions", _wrap_delete_GDALGridOptions, METH_O, "delete_GDALGridOptions(GDALGridOptions self)"},
   66738             :    { "GDALGridOptions_swigregister", GDALGridOptions_swigregister, METH_O, NULL},
   66739             :    { "GDALGridOptions_swiginit", GDALGridOptions_swiginit, METH_VARARGS, NULL},
   66740             :    { "GridInternal", _wrap_GridInternal, METH_VARARGS, "GridInternal(char const * dest, Dataset dataset, GDALGridOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   66741             :    { "new_GDALContourOptions", _wrap_new_GDALContourOptions, METH_O, "new_GDALContourOptions(char ** options) -> GDALContourOptions"},
   66742             :    { "delete_GDALContourOptions", _wrap_delete_GDALContourOptions, METH_O, "delete_GDALContourOptions(GDALContourOptions self)"},
   66743             :    { "GDALContourOptions_swigregister", GDALContourOptions_swigregister, METH_O, NULL},
   66744             :    { "GDALContourOptions_swiginit", GDALContourOptions_swiginit, METH_VARARGS, NULL},
   66745             :    { "wrapper_GDALContourDestDS", _wrap_wrapper_GDALContourDestDS, METH_VARARGS, "wrapper_GDALContourDestDS(Dataset dstDS, Dataset srcDS, GDALContourOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   66746             :    { "wrapper_GDALContourDestName", _wrap_wrapper_GDALContourDestName, METH_VARARGS, "wrapper_GDALContourDestName(char const * dest, Dataset srcDS, GDALContourOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   66747             :    { "new_GDALRasterizeOptions", _wrap_new_GDALRasterizeOptions, METH_O, "new_GDALRasterizeOptions(char ** options) -> GDALRasterizeOptions"},
   66748             :    { "delete_GDALRasterizeOptions", _wrap_delete_GDALRasterizeOptions, METH_O, "delete_GDALRasterizeOptions(GDALRasterizeOptions self)"},
   66749             :    { "GDALRasterizeOptions_swigregister", GDALRasterizeOptions_swigregister, METH_O, NULL},
   66750             :    { "GDALRasterizeOptions_swiginit", GDALRasterizeOptions_swiginit, METH_VARARGS, NULL},
   66751             :    { "wrapper_GDALRasterizeDestDS", _wrap_wrapper_GDALRasterizeDestDS, METH_VARARGS, "wrapper_GDALRasterizeDestDS(Dataset dstDS, Dataset srcDS, GDALRasterizeOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   66752             :    { "wrapper_GDALRasterizeDestName", _wrap_wrapper_GDALRasterizeDestName, METH_VARARGS, "wrapper_GDALRasterizeDestName(char const * dest, Dataset srcDS, GDALRasterizeOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   66753             :    { "new_GDALFootprintOptions", _wrap_new_GDALFootprintOptions, METH_O, "new_GDALFootprintOptions(char ** options) -> GDALFootprintOptions"},
   66754             :    { "delete_GDALFootprintOptions", _wrap_delete_GDALFootprintOptions, METH_O, "delete_GDALFootprintOptions(GDALFootprintOptions self)"},
   66755             :    { "GDALFootprintOptions_swigregister", GDALFootprintOptions_swigregister, METH_O, NULL},
   66756             :    { "GDALFootprintOptions_swiginit", GDALFootprintOptions_swiginit, METH_VARARGS, NULL},
   66757             :    { "wrapper_GDALFootprintDestDS", _wrap_wrapper_GDALFootprintDestDS, METH_VARARGS, "wrapper_GDALFootprintDestDS(Dataset dstDS, Dataset srcDS, GDALFootprintOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> int"},
   66758             :    { "wrapper_GDALFootprintDestName", _wrap_wrapper_GDALFootprintDestName, METH_VARARGS, "wrapper_GDALFootprintDestName(char const * dest, Dataset srcDS, GDALFootprintOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   66759             :    { "new_GDALBuildVRTOptions", _wrap_new_GDALBuildVRTOptions, METH_O, "new_GDALBuildVRTOptions(char ** options) -> GDALBuildVRTOptions"},
   66760             :    { "delete_GDALBuildVRTOptions", _wrap_delete_GDALBuildVRTOptions, METH_O, "delete_GDALBuildVRTOptions(GDALBuildVRTOptions self)"},
   66761             :    { "GDALBuildVRTOptions_swigregister", GDALBuildVRTOptions_swigregister, METH_O, NULL},
   66762             :    { "GDALBuildVRTOptions_swiginit", GDALBuildVRTOptions_swiginit, METH_VARARGS, NULL},
   66763             :    { "BuildVRTInternalObjects", _wrap_BuildVRTInternalObjects, METH_VARARGS, "BuildVRTInternalObjects(char const * dest, int object_list_count, GDALBuildVRTOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   66764             :    { "BuildVRTInternalNames", _wrap_BuildVRTInternalNames, METH_VARARGS, "BuildVRTInternalNames(char const * dest, char ** source_filenames, GDALBuildVRTOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   66765             :    { "new_GDALTileIndexOptions", _wrap_new_GDALTileIndexOptions, METH_O, "new_GDALTileIndexOptions(char ** options) -> GDALTileIndexOptions"},
   66766             :    { "delete_GDALTileIndexOptions", _wrap_delete_GDALTileIndexOptions, METH_O, "delete_GDALTileIndexOptions(GDALTileIndexOptions self)"},
   66767             :    { "GDALTileIndexOptions_swigregister", GDALTileIndexOptions_swigregister, METH_O, NULL},
   66768             :    { "GDALTileIndexOptions_swiginit", GDALTileIndexOptions_swiginit, METH_VARARGS, NULL},
   66769             :    { "TileIndexInternalNames", _wrap_TileIndexInternalNames, METH_VARARGS, "TileIndexInternalNames(char const * dest, char ** source_filenames, GDALTileIndexOptions options, GDALProgressFunc callback=0, void * callback_data=None) -> Dataset"},
   66770             :    { "new_GDALMultiDimTranslateOptions", _wrap_new_GDALMultiDimTranslateOptions, METH_O, "new_GDALMultiDimTranslateOptions(char ** options) -> GDALMultiDimTranslateOptions"},
   66771             :    { "delete_GDALMultiDimTranslateOptions", _wrap_delete_GDALMultiDimTranslateOptions, METH_O, "delete_GDALMultiDimTranslateOptions(GDALMultiDimTranslateOptions self)"},
   66772             :    { "GDALMultiDimTranslateOptions_swigregister", GDALMultiDimTranslateOptions_swigregister, METH_O, NULL},
   66773             :    { "GDALMultiDimTranslateOptions_swiginit", GDALMultiDimTranslateOptions_swiginit, METH_VARARGS, NULL},
   66774             :    { "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"},
   66775             :    { NULL, NULL, 0, NULL }
   66776             : };
   66777             : 
   66778             : static PyMethodDef SwigMethods_proxydocs[] = {
   66779             :    { NULL, NULL, 0, NULL }
   66780             : };
   66781             : 
   66782             : 
   66783             : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
   66784             : 
   66785           0 : static void *_p_p_GDALComputedRasterBandShadowTo_p_p_GDALRasterBandShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   66786           0 :     return (void *)((GDALRasterBandShadow **)  ((GDALComputedRasterBandShadow **) x));
   66787             : }
   66788         193 : static void *_p_GDALComputedRasterBandShadowTo_p_GDALRasterBandShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   66789         193 :     return (void *)((GDALRasterBandShadow *)  ((GDALComputedRasterBandShadow *) x));
   66790             : }
   66791       54281 : static void *_p_GDALDriverShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   66792       54281 :     return (void *)((GDALMajorObjectShadow *)  ((GDALDriverShadow *) x));
   66793             : }
   66794         967 : static void *_p_OGRLayerShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   66795         967 :     return (void *)((GDALMajorObjectShadow *)  ((OGRLayerShadow *) x));
   66796             : }
   66797        6432 : static void *_p_GDALDatasetShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   66798        6432 :     return (void *)((GDALMajorObjectShadow *)  ((GDALDatasetShadow *) x));
   66799             : }
   66800        6696 : static void *_p_GDALRasterBandShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   66801        6696 :     return (void *)((GDALMajorObjectShadow *)  ((GDALRasterBandShadow *) x));
   66802             : }
   66803           0 : static void *_p_GDALComputedRasterBandShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   66804           0 :     return (void *)((GDALMajorObjectShadow *) (GDALRasterBandShadow *) ((GDALComputedRasterBandShadow *) x));
   66805             : }
   66806             : static swig_type_info _swigt__p_CPLErrorHandler = {"_p_CPLErrorHandler", "CPLErrorHandler *", 0, 0, (void*)0, 0};
   66807             : static swig_type_info _swigt__p_CPLVirtualMemShadow = {"_p_CPLVirtualMemShadow", "CPLVirtualMemShadow *", 0, 0, (void*)0, 0};
   66808             : static swig_type_info _swigt__p_CPLXMLNode = {"_p_CPLXMLNode", "CPLXMLNode *", 0, 0, (void*)0, 0};
   66809             : static swig_type_info _swigt__p_DirEntry = {"_p_DirEntry", "DirEntry *", 0, 0, (void*)0, 0};
   66810             : static swig_type_info _swigt__p_GByte = {"_p_GByte", "GByte *", 0, 0, (void*)0, 0};
   66811             : static swig_type_info _swigt__p_GDALAlgorithmArgHS = {"_p_GDALAlgorithmArgHS", "GDALAlgorithmArgHS *", 0, 0, (void*)0, 0};
   66812             : static swig_type_info _swigt__p_GDALAlgorithmHS = {"_p_GDALAlgorithmHS", "GDALAlgorithmHS *", 0, 0, (void*)0, 0};
   66813             : static swig_type_info _swigt__p_GDALAlgorithmRegistryHS = {"_p_GDALAlgorithmRegistryHS", "GDALAlgorithmRegistryHS *", 0, 0, (void*)0, 0};
   66814             : static swig_type_info _swigt__p_GDALArgDatasetValueHS = {"_p_GDALArgDatasetValueHS", "GDALArgDatasetValueHS *", 0, 0, (void*)0, 0};
   66815             : static swig_type_info _swigt__p_GDALAsyncReaderShadow = {"_p_GDALAsyncReaderShadow", "GDALAsyncReaderShadow *", 0, 0, (void*)0, 0};
   66816             : static swig_type_info _swigt__p_GDALAttributeHS = {"_p_GDALAttributeHS", "GDALAttributeHS *", 0, 0, (void*)0, 0};
   66817             : static swig_type_info _swigt__p_GDALBuildVRTOptions = {"_p_GDALBuildVRTOptions", "GDALBuildVRTOptions *", 0, 0, (void*)0, 0};
   66818             : static swig_type_info _swigt__p_GDALColorEntry = {"_p_GDALColorEntry", "GDALColorEntry *", 0, 0, (void*)0, 0};
   66819             : static swig_type_info _swigt__p_GDALColorTableShadow = {"_p_GDALColorTableShadow", "GDALColorTableShadow *", 0, 0, (void*)0, 0};
   66820             : static swig_type_info _swigt__p_GDALComputedRasterBandShadow = {"_p_GDALComputedRasterBandShadow", "GDALComputedRasterBandShadow *", 0, 0, (void*)0, 0};
   66821             : static swig_type_info _swigt__p_GDALContourOptions = {"_p_GDALContourOptions", "GDALContourOptions *", 0, 0, (void*)0, 0};
   66822             : static swig_type_info _swigt__p_GDALDEMProcessingOptions = {"_p_GDALDEMProcessingOptions", "GDALDEMProcessingOptions *", 0, 0, (void*)0, 0};
   66823             : static swig_type_info _swigt__p_GDALDatasetShadow = {"_p_GDALDatasetShadow", "GDALDatasetShadow *", 0, 0, (void*)0, 0};
   66824             : static swig_type_info _swigt__p_GDALDimensionHS = {"_p_GDALDimensionHS", "GDALDimensionHS *", 0, 0, (void*)0, 0};
   66825             : static swig_type_info _swigt__p_GDALDriverShadow = {"_p_GDALDriverShadow", "GDALDriverShadow *", 0, 0, (void*)0, 0};
   66826             : static swig_type_info _swigt__p_GDALEDTComponentHS = {"_p_GDALEDTComponentHS", "GDALEDTComponentHS *", 0, 0, (void*)0, 0};
   66827             : static swig_type_info _swigt__p_GDALExtendedDataTypeClass = {"_p_GDALExtendedDataTypeClass", "enum GDALExtendedDataTypeClass *|GDALExtendedDataTypeClass *", 0, 0, (void*)0, 0};
   66828             : static swig_type_info _swigt__p_GDALExtendedDataTypeHS = {"_p_GDALExtendedDataTypeHS", "GDALExtendedDataTypeHS *", 0, 0, (void*)0, 0};
   66829             : static swig_type_info _swigt__p_GDALExtendedDataTypeSubType = {"_p_GDALExtendedDataTypeSubType", "enum GDALExtendedDataTypeSubType *|GDALExtendedDataTypeSubType *", 0, 0, (void*)0, 0};
   66830             : static swig_type_info _swigt__p_GDALFootprintOptions = {"_p_GDALFootprintOptions", "GDALFootprintOptions *", 0, 0, (void*)0, 0};
   66831             : static swig_type_info _swigt__p_GDALGridOptions = {"_p_GDALGridOptions", "GDALGridOptions *", 0, 0, (void*)0, 0};
   66832             : static swig_type_info _swigt__p_GDALGroupHS = {"_p_GDALGroupHS", "GDALGroupHS *", 0, 0, (void*)0, 0};
   66833             : static swig_type_info _swigt__p_GDALInfoOptions = {"_p_GDALInfoOptions", "GDALInfoOptions *", 0, 0, (void*)0, 0};
   66834             : static swig_type_info _swigt__p_GDALMDArrayHS = {"_p_GDALMDArrayHS", "GDALMDArrayHS *", 0, 0, (void*)0, 0};
   66835             : static swig_type_info _swigt__p_GDALMajorObjectShadow = {"_p_GDALMajorObjectShadow", "GDALMajorObjectShadow *", 0, 0, (void*)0, 0};
   66836             : static swig_type_info _swigt__p_GDALMultiDimInfoOptions = {"_p_GDALMultiDimInfoOptions", "GDALMultiDimInfoOptions *", 0, 0, (void*)0, 0};
   66837             : static swig_type_info _swigt__p_GDALMultiDimTranslateOptions = {"_p_GDALMultiDimTranslateOptions", "GDALMultiDimTranslateOptions *", 0, 0, (void*)0, 0};
   66838             : static swig_type_info _swigt__p_GDALNearblackOptions = {"_p_GDALNearblackOptions", "GDALNearblackOptions *", 0, 0, (void*)0, 0};
   66839             : static swig_type_info _swigt__p_GDALProgressFunc = {"_p_GDALProgressFunc", "GDALProgressFunc *", 0, 0, (void*)0, 0};
   66840             : static swig_type_info _swigt__p_GDALRasterAlgebraBinaryOperation = {"_p_GDALRasterAlgebraBinaryOperation", "enum GDALRasterAlgebraBinaryOperation *|GDALRasterAlgebraBinaryOperation *", 0, 0, (void*)0, 0};
   66841             : static swig_type_info _swigt__p_GDALRasterAlgebraUnaryOperation = {"_p_GDALRasterAlgebraUnaryOperation", "enum GDALRasterAlgebraUnaryOperation *|GDALRasterAlgebraUnaryOperation *", 0, 0, (void*)0, 0};
   66842             : static swig_type_info _swigt__p_GDALRasterAttributeTableShadow = {"_p_GDALRasterAttributeTableShadow", "GDALRasterAttributeTableShadow *", 0, 0, (void*)0, 0};
   66843             : static swig_type_info _swigt__p_GDALRasterBandShadow = {"_p_GDALRasterBandShadow", "GDALRasterBandShadow *", 0, 0, (void*)0, 0};
   66844             : static swig_type_info _swigt__p_GDALRasterizeOptions = {"_p_GDALRasterizeOptions", "GDALRasterizeOptions *", 0, 0, (void*)0, 0};
   66845             : static swig_type_info _swigt__p_GDALRelationshipShadow = {"_p_GDALRelationshipShadow", "GDALRelationshipShadow *", 0, 0, (void*)0, 0};
   66846             : static swig_type_info _swigt__p_GDALSubdatasetInfo = {"_p_GDALSubdatasetInfo", "GDALSubdatasetInfo *|GDALSubdatasetInfoShadow *", 0, 0, (void*)0, 0};
   66847             : static swig_type_info _swigt__p_GDALTileIndexOptions = {"_p_GDALTileIndexOptions", "GDALTileIndexOptions *", 0, 0, (void*)0, 0};
   66848             : static swig_type_info _swigt__p_GDALTransformerInfoShadow = {"_p_GDALTransformerInfoShadow", "GDALTransformerInfoShadow *", 0, 0, (void*)0, 0};
   66849             : static swig_type_info _swigt__p_GDALTranslateOptions = {"_p_GDALTranslateOptions", "GDALTranslateOptions *", 0, 0, (void*)0, 0};
   66850             : static swig_type_info _swigt__p_GDALVectorInfoOptions = {"_p_GDALVectorInfoOptions", "GDALVectorInfoOptions *", 0, 0, (void*)0, 0};
   66851             : static swig_type_info _swigt__p_GDALVectorTranslateOptions = {"_p_GDALVectorTranslateOptions", "GDALVectorTranslateOptions *", 0, 0, (void*)0, 0};
   66852             : static swig_type_info _swigt__p_GDALViewshedMode = {"_p_GDALViewshedMode", "enum GDALViewshedMode *|GDALViewshedMode *", 0, 0, (void*)0, 0};
   66853             : static swig_type_info _swigt__p_GDALViewshedOutputType = {"_p_GDALViewshedOutputType", "enum GDALViewshedOutputType *|GDALViewshedOutputType *", 0, 0, (void*)0, 0};
   66854             : static swig_type_info _swigt__p_GDALWarpAppOptions = {"_p_GDALWarpAppOptions", "GDALWarpAppOptions *", 0, 0, (void*)0, 0};
   66855             : static swig_type_info _swigt__p_GDAL_GCP = {"_p_GDAL_GCP", "GDAL_GCP *", 0, 0, (void*)0, 0};
   66856             : static swig_type_info _swigt__p_GIntBig = {"_p_GIntBig", "GIntBig *", 0, 0, (void*)0, 0};
   66857             : static swig_type_info _swigt__p_GUIntBig = {"_p_GUIntBig", "GUIntBig *", 0, 0, (void*)0, 0};
   66858             : static swig_type_info _swigt__p_OGRFeatureShadow = {"_p_OGRFeatureShadow", "OGRFeatureShadow *", 0, 0, (void*)0, 0};
   66859             : static swig_type_info _swigt__p_OGRFieldDomainShadow = {"_p_OGRFieldDomainShadow", "OGRFieldDomainShadow *", 0, 0, (void*)0, 0};
   66860             : static swig_type_info _swigt__p_OGRGeomFieldDefnShadow = {"_p_OGRGeomFieldDefnShadow", "OGRGeomFieldDefnShadow *", 0, 0, (void*)0, 0};
   66861             : static swig_type_info _swigt__p_OGRGeometryShadow = {"_p_OGRGeometryShadow", "OGRGeometryShadow *", 0, 0, (void*)0, 0};
   66862             : static swig_type_info _swigt__p_OGRLayerShadow = {"_p_OGRLayerShadow", "OGRLayerShadow *", 0, 0, (void*)0, 0};
   66863             : static swig_type_info _swigt__p_OGRStyleTableShadow = {"_p_OGRStyleTableShadow", "OGRStyleTableShadow *", 0, 0, (void*)0, 0};
   66864             : static swig_type_info _swigt__p_OSRSpatialReferenceShadow = {"_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow *", 0, 0, (void*)0, 0};
   66865             : static swig_type_info _swigt__p_StatBuf = {"_p_StatBuf", "StatBuf *", 0, 0, (void*)0, 0};
   66866             : static swig_type_info _swigt__p_Statistics = {"_p_Statistics", "Statistics *", 0, 0, (void*)0, 0};
   66867             : static swig_type_info _swigt__p_SuggestedWarpOutputRes = {"_p_SuggestedWarpOutputRes", "SuggestedWarpOutputRes *", 0, 0, (void*)0, 0};
   66868             : static swig_type_info _swigt__p_VSIDIR = {"_p_VSIDIR", "VSIDIR *", 0, 0, (void*)0, 0};
   66869             : static swig_type_info _swigt__p_VSILFILE = {"_p_VSILFILE", "VSILFILE *", 0, 0, (void*)0, 0};
   66870             : static swig_type_info _swigt__p_bool = {"_p_bool", "bool *", 0, 0, (void*)0, 0};
   66871             : static swig_type_info _swigt__p_char = {"_p_char", "char *|retStringAndCPLFree *", 0, 0, (void*)0, 0};
   66872             : static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
   66873             : 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};
   66874             : 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};
   66875             : static swig_type_info _swigt__p_long_long = {"_p_long_long", "long long *", 0, 0, (void*)0, 0};
   66876             : static swig_type_info _swigt__p_p_GByte = {"_p_p_GByte", "GByte **", 0, 0, (void*)0, 0};
   66877             : static swig_type_info _swigt__p_p_GDALDatasetShadow = {"_p_p_GDALDatasetShadow", "GDALDatasetShadow **", 0, 0, (void*)0, 0};
   66878             : static swig_type_info _swigt__p_p_GDALDimensionHS = {"_p_p_GDALDimensionHS", "GDALDimensionHS **", 0, 0, (void*)0, 0};
   66879             : static swig_type_info _swigt__p_p_GDALEDTComponentHS = {"_p_p_GDALEDTComponentHS", "GDALEDTComponentHS **", 0, 0, (void*)0, 0};
   66880             : static swig_type_info _swigt__p_p_GDALMDArrayHS = {"_p_p_GDALMDArrayHS", "GDALMDArrayHS **", 0, 0, (void*)0, 0};
   66881             : static swig_type_info _swigt__p_p_GDALRasterBandShadow = {"_p_p_GDALRasterBandShadow", "GDALRasterBandShadow **", 0, 0, (void*)0, 0};
   66882             : static swig_type_info _swigt__p_p_GDALComputedRasterBandShadow = {"_p_p_GDALComputedRasterBandShadow", 0, 0, 0, 0, 0};
   66883             : static swig_type_info _swigt__p_p_GDAL_GCP = {"_p_p_GDAL_GCP", "GDAL_GCP **", 0, 0, (void*)0, 0};
   66884             : static swig_type_info _swigt__p_p_GUIntBig = {"_p_p_GUIntBig", "GUIntBig **", 0, 0, (void*)0, 0};
   66885             : static swig_type_info _swigt__p_p_OGRLayerShadow = {"_p_p_OGRLayerShadow", "OGRLayerShadow **", 0, 0, (void*)0, 0};
   66886             : static swig_type_info _swigt__p_p_OSRSpatialReferenceShadow = {"_p_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow **", 0, 0, (void*)0, 0};
   66887             : static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
   66888             : static swig_type_info _swigt__p_p_double = {"_p_p_double", "double **", 0, 0, (void*)0, 0};
   66889             : static swig_type_info _swigt__p_p_int = {"_p_p_int", "int **", 0, 0, (void*)0, 0};
   66890             : static swig_type_info _swigt__p_p_long_long = {"_p_p_long_long", "long long **", 0, 0, (void*)0, 0};
   66891             : static swig_type_info _swigt__p_p_p_GDALAttributeHS = {"_p_p_p_GDALAttributeHS", "GDALAttributeHS ***", 0, 0, (void*)0, 0};
   66892             : static swig_type_info _swigt__p_p_p_GDALDimensionHS = {"_p_p_p_GDALDimensionHS", "GDALDimensionHS ***", 0, 0, (void*)0, 0};
   66893             : static swig_type_info _swigt__p_p_p_GDALEDTComponentHS = {"_p_p_p_GDALEDTComponentHS", "GDALEDTComponentHS ***", 0, 0, (void*)0, 0};
   66894             : static swig_type_info _swigt__p_p_p_GDALMDArrayHS = {"_p_p_p_GDALMDArrayHS", "GDALMDArrayHS ***", 0, 0, (void*)0, 0};
   66895             : static swig_type_info _swigt__p_p_void = {"_p_p_void", "void **", 0, 0, (void*)0, 0};
   66896             : static swig_type_info _swigt__p_size_t = {"_p_size_t", "size_t *", 0, 0, (void*)0, 0};
   66897             : static swig_type_info _swigt__p_vsi_l_offset = {"_p_vsi_l_offset", "vsi_l_offset *", 0, 0, (void*)0, 0};
   66898             : 
   66899             : static swig_type_info *swig_type_initial[] = {
   66900             :   &_swigt__p_CPLErrorHandler,
   66901             :   &_swigt__p_CPLVirtualMemShadow,
   66902             :   &_swigt__p_CPLXMLNode,
   66903             :   &_swigt__p_DirEntry,
   66904             :   &_swigt__p_GByte,
   66905             :   &_swigt__p_GDALAlgorithmArgHS,
   66906             :   &_swigt__p_GDALAlgorithmHS,
   66907             :   &_swigt__p_GDALAlgorithmRegistryHS,
   66908             :   &_swigt__p_GDALArgDatasetValueHS,
   66909             :   &_swigt__p_GDALAsyncReaderShadow,
   66910             :   &_swigt__p_GDALAttributeHS,
   66911             :   &_swigt__p_GDALBuildVRTOptions,
   66912             :   &_swigt__p_GDALColorEntry,
   66913             :   &_swigt__p_GDALColorTableShadow,
   66914             :   &_swigt__p_GDALComputedRasterBandShadow,
   66915             :   &_swigt__p_GDALContourOptions,
   66916             :   &_swigt__p_GDALDEMProcessingOptions,
   66917             :   &_swigt__p_GDALDatasetShadow,
   66918             :   &_swigt__p_GDALDimensionHS,
   66919             :   &_swigt__p_GDALDriverShadow,
   66920             :   &_swigt__p_GDALEDTComponentHS,
   66921             :   &_swigt__p_GDALExtendedDataTypeClass,
   66922             :   &_swigt__p_GDALExtendedDataTypeHS,
   66923             :   &_swigt__p_GDALExtendedDataTypeSubType,
   66924             :   &_swigt__p_GDALFootprintOptions,
   66925             :   &_swigt__p_GDALGridOptions,
   66926             :   &_swigt__p_GDALGroupHS,
   66927             :   &_swigt__p_GDALInfoOptions,
   66928             :   &_swigt__p_GDALMDArrayHS,
   66929             :   &_swigt__p_GDALMajorObjectShadow,
   66930             :   &_swigt__p_GDALMultiDimInfoOptions,
   66931             :   &_swigt__p_GDALMultiDimTranslateOptions,
   66932             :   &_swigt__p_GDALNearblackOptions,
   66933             :   &_swigt__p_GDALProgressFunc,
   66934             :   &_swigt__p_GDALRasterAlgebraBinaryOperation,
   66935             :   &_swigt__p_GDALRasterAlgebraUnaryOperation,
   66936             :   &_swigt__p_GDALRasterAttributeTableShadow,
   66937             :   &_swigt__p_GDALRasterBandShadow,
   66938             :   &_swigt__p_GDALRasterizeOptions,
   66939             :   &_swigt__p_GDALRelationshipShadow,
   66940             :   &_swigt__p_GDALSubdatasetInfo,
   66941             :   &_swigt__p_GDALTileIndexOptions,
   66942             :   &_swigt__p_GDALTransformerInfoShadow,
   66943             :   &_swigt__p_GDALTranslateOptions,
   66944             :   &_swigt__p_GDALVectorInfoOptions,
   66945             :   &_swigt__p_GDALVectorTranslateOptions,
   66946             :   &_swigt__p_GDALViewshedMode,
   66947             :   &_swigt__p_GDALViewshedOutputType,
   66948             :   &_swigt__p_GDALWarpAppOptions,
   66949             :   &_swigt__p_GDAL_GCP,
   66950             :   &_swigt__p_GIntBig,
   66951             :   &_swigt__p_GUIntBig,
   66952             :   &_swigt__p_OGRFeatureShadow,
   66953             :   &_swigt__p_OGRFieldDomainShadow,
   66954             :   &_swigt__p_OGRGeomFieldDefnShadow,
   66955             :   &_swigt__p_OGRGeometryShadow,
   66956             :   &_swigt__p_OGRLayerShadow,
   66957             :   &_swigt__p_OGRStyleTableShadow,
   66958             :   &_swigt__p_OSRSpatialReferenceShadow,
   66959             :   &_swigt__p_StatBuf,
   66960             :   &_swigt__p_Statistics,
   66961             :   &_swigt__p_SuggestedWarpOutputRes,
   66962             :   &_swigt__p_VSIDIR,
   66963             :   &_swigt__p_VSILFILE,
   66964             :   &_swigt__p_bool,
   66965             :   &_swigt__p_char,
   66966             :   &_swigt__p_double,
   66967             :   &_swigt__p_f_double_p_q_const__char_p_void__int,
   66968             :   &_swigt__p_int,
   66969             :   &_swigt__p_long_long,
   66970             :   &_swigt__p_p_GByte,
   66971             :   &_swigt__p_p_GDALComputedRasterBandShadow,
   66972             :   &_swigt__p_p_GDALDatasetShadow,
   66973             :   &_swigt__p_p_GDALDimensionHS,
   66974             :   &_swigt__p_p_GDALEDTComponentHS,
   66975             :   &_swigt__p_p_GDALMDArrayHS,
   66976             :   &_swigt__p_p_GDALRasterBandShadow,
   66977             :   &_swigt__p_p_GDAL_GCP,
   66978             :   &_swigt__p_p_GUIntBig,
   66979             :   &_swigt__p_p_OGRLayerShadow,
   66980             :   &_swigt__p_p_OSRSpatialReferenceShadow,
   66981             :   &_swigt__p_p_char,
   66982             :   &_swigt__p_p_double,
   66983             :   &_swigt__p_p_int,
   66984             :   &_swigt__p_p_long_long,
   66985             :   &_swigt__p_p_p_GDALAttributeHS,
   66986             :   &_swigt__p_p_p_GDALDimensionHS,
   66987             :   &_swigt__p_p_p_GDALEDTComponentHS,
   66988             :   &_swigt__p_p_p_GDALMDArrayHS,
   66989             :   &_swigt__p_p_void,
   66990             :   &_swigt__p_size_t,
   66991             :   &_swigt__p_vsi_l_offset,
   66992             : };
   66993             : 
   66994             : static swig_cast_info _swigc__p_CPLErrorHandler[] = {  {&_swigt__p_CPLErrorHandler, 0, 0, 0},{0, 0, 0, 0}};
   66995             : static swig_cast_info _swigc__p_CPLVirtualMemShadow[] = {  {&_swigt__p_CPLVirtualMemShadow, 0, 0, 0},{0, 0, 0, 0}};
   66996             : static swig_cast_info _swigc__p_CPLXMLNode[] = {  {&_swigt__p_CPLXMLNode, 0, 0, 0},{0, 0, 0, 0}};
   66997             : static swig_cast_info _swigc__p_DirEntry[] = {  {&_swigt__p_DirEntry, 0, 0, 0},{0, 0, 0, 0}};
   66998             : static swig_cast_info _swigc__p_GByte[] = {  {&_swigt__p_GByte, 0, 0, 0},{0, 0, 0, 0}};
   66999             : static swig_cast_info _swigc__p_GDALAlgorithmArgHS[] = {  {&_swigt__p_GDALAlgorithmArgHS, 0, 0, 0},{0, 0, 0, 0}};
   67000             : static swig_cast_info _swigc__p_GDALAlgorithmHS[] = {  {&_swigt__p_GDALAlgorithmHS, 0, 0, 0},{0, 0, 0, 0}};
   67001             : static swig_cast_info _swigc__p_GDALAlgorithmRegistryHS[] = {  {&_swigt__p_GDALAlgorithmRegistryHS, 0, 0, 0},{0, 0, 0, 0}};
   67002             : static swig_cast_info _swigc__p_GDALArgDatasetValueHS[] = {  {&_swigt__p_GDALArgDatasetValueHS, 0, 0, 0},{0, 0, 0, 0}};
   67003             : static swig_cast_info _swigc__p_GDALAsyncReaderShadow[] = {  {&_swigt__p_GDALAsyncReaderShadow, 0, 0, 0},{0, 0, 0, 0}};
   67004             : static swig_cast_info _swigc__p_GDALAttributeHS[] = {  {&_swigt__p_GDALAttributeHS, 0, 0, 0},{0, 0, 0, 0}};
   67005             : static swig_cast_info _swigc__p_GDALBuildVRTOptions[] = {  {&_swigt__p_GDALBuildVRTOptions, 0, 0, 0},{0, 0, 0, 0}};
   67006             : static swig_cast_info _swigc__p_GDALColorEntry[] = {  {&_swigt__p_GDALColorEntry, 0, 0, 0},{0, 0, 0, 0}};
   67007             : static swig_cast_info _swigc__p_GDALColorTableShadow[] = {  {&_swigt__p_GDALColorTableShadow, 0, 0, 0},{0, 0, 0, 0}};
   67008             : static swig_cast_info _swigc__p_GDALComputedRasterBandShadow[] = {  {&_swigt__p_GDALComputedRasterBandShadow, 0, 0, 0},{0, 0, 0, 0}};
   67009             : static swig_cast_info _swigc__p_GDALContourOptions[] = {  {&_swigt__p_GDALContourOptions, 0, 0, 0},{0, 0, 0, 0}};
   67010             : static swig_cast_info _swigc__p_GDALDEMProcessingOptions[] = {  {&_swigt__p_GDALDEMProcessingOptions, 0, 0, 0},{0, 0, 0, 0}};
   67011             : static swig_cast_info _swigc__p_GDALDatasetShadow[] = {  {&_swigt__p_GDALDatasetShadow, 0, 0, 0},{0, 0, 0, 0}};
   67012             : static swig_cast_info _swigc__p_GDALDimensionHS[] = {  {&_swigt__p_GDALDimensionHS, 0, 0, 0},{0, 0, 0, 0}};
   67013             : static swig_cast_info _swigc__p_GDALDriverShadow[] = {  {&_swigt__p_GDALDriverShadow, 0, 0, 0},{0, 0, 0, 0}};
   67014             : static swig_cast_info _swigc__p_GDALEDTComponentHS[] = {  {&_swigt__p_GDALEDTComponentHS, 0, 0, 0},{0, 0, 0, 0}};
   67015             : static swig_cast_info _swigc__p_GDALExtendedDataTypeClass[] = {  {&_swigt__p_GDALExtendedDataTypeClass, 0, 0, 0},{0, 0, 0, 0}};
   67016             : static swig_cast_info _swigc__p_GDALExtendedDataTypeHS[] = {  {&_swigt__p_GDALExtendedDataTypeHS, 0, 0, 0},{0, 0, 0, 0}};
   67017             : static swig_cast_info _swigc__p_GDALExtendedDataTypeSubType[] = {  {&_swigt__p_GDALExtendedDataTypeSubType, 0, 0, 0},{0, 0, 0, 0}};
   67018             : static swig_cast_info _swigc__p_GDALFootprintOptions[] = {  {&_swigt__p_GDALFootprintOptions, 0, 0, 0},{0, 0, 0, 0}};
   67019             : static swig_cast_info _swigc__p_GDALGridOptions[] = {  {&_swigt__p_GDALGridOptions, 0, 0, 0},{0, 0, 0, 0}};
   67020             : static swig_cast_info _swigc__p_GDALGroupHS[] = {  {&_swigt__p_GDALGroupHS, 0, 0, 0},{0, 0, 0, 0}};
   67021             : static swig_cast_info _swigc__p_GDALInfoOptions[] = {  {&_swigt__p_GDALInfoOptions, 0, 0, 0},{0, 0, 0, 0}};
   67022             : static swig_cast_info _swigc__p_GDALMDArrayHS[] = {  {&_swigt__p_GDALMDArrayHS, 0, 0, 0},{0, 0, 0, 0}};
   67023             : 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}};
   67024             : static swig_cast_info _swigc__p_GDALMultiDimInfoOptions[] = {  {&_swigt__p_GDALMultiDimInfoOptions, 0, 0, 0},{0, 0, 0, 0}};
   67025             : static swig_cast_info _swigc__p_GDALMultiDimTranslateOptions[] = {  {&_swigt__p_GDALMultiDimTranslateOptions, 0, 0, 0},{0, 0, 0, 0}};
   67026             : static swig_cast_info _swigc__p_GDALNearblackOptions[] = {  {&_swigt__p_GDALNearblackOptions, 0, 0, 0},{0, 0, 0, 0}};
   67027             : static swig_cast_info _swigc__p_GDALProgressFunc[] = {  {&_swigt__p_GDALProgressFunc, 0, 0, 0},{0, 0, 0, 0}};
   67028             : static swig_cast_info _swigc__p_GDALRasterAlgebraBinaryOperation[] = {  {&_swigt__p_GDALRasterAlgebraBinaryOperation, 0, 0, 0},{0, 0, 0, 0}};
   67029             : static swig_cast_info _swigc__p_GDALRasterAlgebraUnaryOperation[] = {  {&_swigt__p_GDALRasterAlgebraUnaryOperation, 0, 0, 0},{0, 0, 0, 0}};
   67030             : static swig_cast_info _swigc__p_GDALRasterAttributeTableShadow[] = {  {&_swigt__p_GDALRasterAttributeTableShadow, 0, 0, 0},{0, 0, 0, 0}};
   67031             : 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}};
   67032             : static swig_cast_info _swigc__p_GDALRasterizeOptions[] = {  {&_swigt__p_GDALRasterizeOptions, 0, 0, 0},{0, 0, 0, 0}};
   67033             : static swig_cast_info _swigc__p_GDALRelationshipShadow[] = {  {&_swigt__p_GDALRelationshipShadow, 0, 0, 0},{0, 0, 0, 0}};
   67034             : static swig_cast_info _swigc__p_GDALSubdatasetInfo[] = {  {&_swigt__p_GDALSubdatasetInfo, 0, 0, 0},{0, 0, 0, 0}};
   67035             : static swig_cast_info _swigc__p_GDALTileIndexOptions[] = {  {&_swigt__p_GDALTileIndexOptions, 0, 0, 0},{0, 0, 0, 0}};
   67036             : static swig_cast_info _swigc__p_GDALTransformerInfoShadow[] = {  {&_swigt__p_GDALTransformerInfoShadow, 0, 0, 0},{0, 0, 0, 0}};
   67037             : static swig_cast_info _swigc__p_GDALTranslateOptions[] = {  {&_swigt__p_GDALTranslateOptions, 0, 0, 0},{0, 0, 0, 0}};
   67038             : static swig_cast_info _swigc__p_GDALVectorInfoOptions[] = {  {&_swigt__p_GDALVectorInfoOptions, 0, 0, 0},{0, 0, 0, 0}};
   67039             : static swig_cast_info _swigc__p_GDALVectorTranslateOptions[] = {  {&_swigt__p_GDALVectorTranslateOptions, 0, 0, 0},{0, 0, 0, 0}};
   67040             : static swig_cast_info _swigc__p_GDALViewshedMode[] = {  {&_swigt__p_GDALViewshedMode, 0, 0, 0},{0, 0, 0, 0}};
   67041             : static swig_cast_info _swigc__p_GDALViewshedOutputType[] = {  {&_swigt__p_GDALViewshedOutputType, 0, 0, 0},{0, 0, 0, 0}};
   67042             : static swig_cast_info _swigc__p_GDALWarpAppOptions[] = {  {&_swigt__p_GDALWarpAppOptions, 0, 0, 0},{0, 0, 0, 0}};
   67043             : static swig_cast_info _swigc__p_GDAL_GCP[] = {  {&_swigt__p_GDAL_GCP, 0, 0, 0},{0, 0, 0, 0}};
   67044             : static swig_cast_info _swigc__p_GIntBig[] = {  {&_swigt__p_GIntBig, 0, 0, 0},{0, 0, 0, 0}};
   67045             : static swig_cast_info _swigc__p_GUIntBig[] = {  {&_swigt__p_GUIntBig, 0, 0, 0},{0, 0, 0, 0}};
   67046             : static swig_cast_info _swigc__p_OGRFeatureShadow[] = {  {&_swigt__p_OGRFeatureShadow, 0, 0, 0},{0, 0, 0, 0}};
   67047             : static swig_cast_info _swigc__p_OGRFieldDomainShadow[] = {  {&_swigt__p_OGRFieldDomainShadow, 0, 0, 0},{0, 0, 0, 0}};
   67048             : static swig_cast_info _swigc__p_OGRGeomFieldDefnShadow[] = {  {&_swigt__p_OGRGeomFieldDefnShadow, 0, 0, 0},{0, 0, 0, 0}};
   67049             : static swig_cast_info _swigc__p_OGRGeometryShadow[] = {  {&_swigt__p_OGRGeometryShadow, 0, 0, 0},{0, 0, 0, 0}};
   67050             : static swig_cast_info _swigc__p_OGRLayerShadow[] = {  {&_swigt__p_OGRLayerShadow, 0, 0, 0},{0, 0, 0, 0}};
   67051             : static swig_cast_info _swigc__p_OGRStyleTableShadow[] = {  {&_swigt__p_OGRStyleTableShadow, 0, 0, 0},{0, 0, 0, 0}};
   67052             : static swig_cast_info _swigc__p_OSRSpatialReferenceShadow[] = {  {&_swigt__p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}};
   67053             : static swig_cast_info _swigc__p_StatBuf[] = {  {&_swigt__p_StatBuf, 0, 0, 0},{0, 0, 0, 0}};
   67054             : static swig_cast_info _swigc__p_Statistics[] = {  {&_swigt__p_Statistics, 0, 0, 0},{0, 0, 0, 0}};
   67055             : static swig_cast_info _swigc__p_SuggestedWarpOutputRes[] = {  {&_swigt__p_SuggestedWarpOutputRes, 0, 0, 0},{0, 0, 0, 0}};
   67056             : static swig_cast_info _swigc__p_VSIDIR[] = {  {&_swigt__p_VSIDIR, 0, 0, 0},{0, 0, 0, 0}};
   67057             : static swig_cast_info _swigc__p_VSILFILE[] = {  {&_swigt__p_VSILFILE, 0, 0, 0},{0, 0, 0, 0}};
   67058             : static swig_cast_info _swigc__p_bool[] = {  {&_swigt__p_bool, 0, 0, 0},{0, 0, 0, 0}};
   67059             : static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
   67060             : static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
   67061             : 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}};
   67062             : static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
   67063             : static swig_cast_info _swigc__p_long_long[] = {  {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}};
   67064             : static swig_cast_info _swigc__p_p_GByte[] = {  {&_swigt__p_p_GByte, 0, 0, 0},{0, 0, 0, 0}};
   67065             : static swig_cast_info _swigc__p_p_GDALDatasetShadow[] = {  {&_swigt__p_p_GDALDatasetShadow, 0, 0, 0},{0, 0, 0, 0}};
   67066             : static swig_cast_info _swigc__p_p_GDALDimensionHS[] = {  {&_swigt__p_p_GDALDimensionHS, 0, 0, 0},{0, 0, 0, 0}};
   67067             : static swig_cast_info _swigc__p_p_GDALEDTComponentHS[] = {  {&_swigt__p_p_GDALEDTComponentHS, 0, 0, 0},{0, 0, 0, 0}};
   67068             : static swig_cast_info _swigc__p_p_GDALMDArrayHS[] = {  {&_swigt__p_p_GDALMDArrayHS, 0, 0, 0},{0, 0, 0, 0}};
   67069             : static swig_cast_info _swigc__p_p_GDALComputedRasterBandShadow[] = {{&_swigt__p_p_GDALComputedRasterBandShadow, 0, 0, 0},{0, 0, 0, 0}};
   67070             : 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}};
   67071             : static swig_cast_info _swigc__p_p_GDAL_GCP[] = {  {&_swigt__p_p_GDAL_GCP, 0, 0, 0},{0, 0, 0, 0}};
   67072             : static swig_cast_info _swigc__p_p_GUIntBig[] = {  {&_swigt__p_p_GUIntBig, 0, 0, 0},{0, 0, 0, 0}};
   67073             : static swig_cast_info _swigc__p_p_OGRLayerShadow[] = {  {&_swigt__p_p_OGRLayerShadow, 0, 0, 0},{0, 0, 0, 0}};
   67074             : static swig_cast_info _swigc__p_p_OSRSpatialReferenceShadow[] = {  {&_swigt__p_p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}};
   67075             : static swig_cast_info _swigc__p_p_char[] = {  {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
   67076             : static swig_cast_info _swigc__p_p_double[] = {  {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}};
   67077             : static swig_cast_info _swigc__p_p_int[] = {  {&_swigt__p_p_int, 0, 0, 0},{0, 0, 0, 0}};
   67078             : static swig_cast_info _swigc__p_p_long_long[] = {  {&_swigt__p_p_long_long, 0, 0, 0},{0, 0, 0, 0}};
   67079             : static swig_cast_info _swigc__p_p_p_GDALAttributeHS[] = {  {&_swigt__p_p_p_GDALAttributeHS, 0, 0, 0},{0, 0, 0, 0}};
   67080             : static swig_cast_info _swigc__p_p_p_GDALDimensionHS[] = {  {&_swigt__p_p_p_GDALDimensionHS, 0, 0, 0},{0, 0, 0, 0}};
   67081             : static swig_cast_info _swigc__p_p_p_GDALEDTComponentHS[] = {  {&_swigt__p_p_p_GDALEDTComponentHS, 0, 0, 0},{0, 0, 0, 0}};
   67082             : static swig_cast_info _swigc__p_p_p_GDALMDArrayHS[] = {  {&_swigt__p_p_p_GDALMDArrayHS, 0, 0, 0},{0, 0, 0, 0}};
   67083             : static swig_cast_info _swigc__p_p_void[] = {  {&_swigt__p_p_void, 0, 0, 0},{0, 0, 0, 0}};
   67084             : static swig_cast_info _swigc__p_size_t[] = {  {&_swigt__p_size_t, 0, 0, 0},{0, 0, 0, 0}};
   67085             : static swig_cast_info _swigc__p_vsi_l_offset[] = {  {&_swigt__p_vsi_l_offset, 0, 0, 0},{0, 0, 0, 0}};
   67086             : 
   67087             : static swig_cast_info *swig_cast_initial[] = {
   67088             :   _swigc__p_CPLErrorHandler,
   67089             :   _swigc__p_CPLVirtualMemShadow,
   67090             :   _swigc__p_CPLXMLNode,
   67091             :   _swigc__p_DirEntry,
   67092             :   _swigc__p_GByte,
   67093             :   _swigc__p_GDALAlgorithmArgHS,
   67094             :   _swigc__p_GDALAlgorithmHS,
   67095             :   _swigc__p_GDALAlgorithmRegistryHS,
   67096             :   _swigc__p_GDALArgDatasetValueHS,
   67097             :   _swigc__p_GDALAsyncReaderShadow,
   67098             :   _swigc__p_GDALAttributeHS,
   67099             :   _swigc__p_GDALBuildVRTOptions,
   67100             :   _swigc__p_GDALColorEntry,
   67101             :   _swigc__p_GDALColorTableShadow,
   67102             :   _swigc__p_GDALComputedRasterBandShadow,
   67103             :   _swigc__p_GDALContourOptions,
   67104             :   _swigc__p_GDALDEMProcessingOptions,
   67105             :   _swigc__p_GDALDatasetShadow,
   67106             :   _swigc__p_GDALDimensionHS,
   67107             :   _swigc__p_GDALDriverShadow,
   67108             :   _swigc__p_GDALEDTComponentHS,
   67109             :   _swigc__p_GDALExtendedDataTypeClass,
   67110             :   _swigc__p_GDALExtendedDataTypeHS,
   67111             :   _swigc__p_GDALExtendedDataTypeSubType,
   67112             :   _swigc__p_GDALFootprintOptions,
   67113             :   _swigc__p_GDALGridOptions,
   67114             :   _swigc__p_GDALGroupHS,
   67115             :   _swigc__p_GDALInfoOptions,
   67116             :   _swigc__p_GDALMDArrayHS,
   67117             :   _swigc__p_GDALMajorObjectShadow,
   67118             :   _swigc__p_GDALMultiDimInfoOptions,
   67119             :   _swigc__p_GDALMultiDimTranslateOptions,
   67120             :   _swigc__p_GDALNearblackOptions,
   67121             :   _swigc__p_GDALProgressFunc,
   67122             :   _swigc__p_GDALRasterAlgebraBinaryOperation,
   67123             :   _swigc__p_GDALRasterAlgebraUnaryOperation,
   67124             :   _swigc__p_GDALRasterAttributeTableShadow,
   67125             :   _swigc__p_GDALRasterBandShadow,
   67126             :   _swigc__p_GDALRasterizeOptions,
   67127             :   _swigc__p_GDALRelationshipShadow,
   67128             :   _swigc__p_GDALSubdatasetInfo,
   67129             :   _swigc__p_GDALTileIndexOptions,
   67130             :   _swigc__p_GDALTransformerInfoShadow,
   67131             :   _swigc__p_GDALTranslateOptions,
   67132             :   _swigc__p_GDALVectorInfoOptions,
   67133             :   _swigc__p_GDALVectorTranslateOptions,
   67134             :   _swigc__p_GDALViewshedMode,
   67135             :   _swigc__p_GDALViewshedOutputType,
   67136             :   _swigc__p_GDALWarpAppOptions,
   67137             :   _swigc__p_GDAL_GCP,
   67138             :   _swigc__p_GIntBig,
   67139             :   _swigc__p_GUIntBig,
   67140             :   _swigc__p_OGRFeatureShadow,
   67141             :   _swigc__p_OGRFieldDomainShadow,
   67142             :   _swigc__p_OGRGeomFieldDefnShadow,
   67143             :   _swigc__p_OGRGeometryShadow,
   67144             :   _swigc__p_OGRLayerShadow,
   67145             :   _swigc__p_OGRStyleTableShadow,
   67146             :   _swigc__p_OSRSpatialReferenceShadow,
   67147             :   _swigc__p_StatBuf,
   67148             :   _swigc__p_Statistics,
   67149             :   _swigc__p_SuggestedWarpOutputRes,
   67150             :   _swigc__p_VSIDIR,
   67151             :   _swigc__p_VSILFILE,
   67152             :   _swigc__p_bool,
   67153             :   _swigc__p_char,
   67154             :   _swigc__p_double,
   67155             :   _swigc__p_f_double_p_q_const__char_p_void__int,
   67156             :   _swigc__p_int,
   67157             :   _swigc__p_long_long,
   67158             :   _swigc__p_p_GByte,
   67159             :   _swigc__p_p_GDALComputedRasterBandShadow,
   67160             :   _swigc__p_p_GDALDatasetShadow,
   67161             :   _swigc__p_p_GDALDimensionHS,
   67162             :   _swigc__p_p_GDALEDTComponentHS,
   67163             :   _swigc__p_p_GDALMDArrayHS,
   67164             :   _swigc__p_p_GDALRasterBandShadow,
   67165             :   _swigc__p_p_GDAL_GCP,
   67166             :   _swigc__p_p_GUIntBig,
   67167             :   _swigc__p_p_OGRLayerShadow,
   67168             :   _swigc__p_p_OSRSpatialReferenceShadow,
   67169             :   _swigc__p_p_char,
   67170             :   _swigc__p_p_double,
   67171             :   _swigc__p_p_int,
   67172             :   _swigc__p_p_long_long,
   67173             :   _swigc__p_p_p_GDALAttributeHS,
   67174             :   _swigc__p_p_p_GDALDimensionHS,
   67175             :   _swigc__p_p_p_GDALEDTComponentHS,
   67176             :   _swigc__p_p_p_GDALMDArrayHS,
   67177             :   _swigc__p_p_void,
   67178             :   _swigc__p_size_t,
   67179             :   _swigc__p_vsi_l_offset,
   67180             : };
   67181             : 
   67182             : 
   67183             : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
   67184             : 
   67185             : static swig_const_info swig_const_table[] = {
   67186             : { SWIG_PY_POINTER, "TermProgress", 0, 0, (void *)((int (*)(double,char const *,void *))(GDALTermProgress)), &SWIGTYPE_p_f_double_p_q_const__char_p_void__int },
   67187             : {0, 0, 0, 0.0, 0, 0}};
   67188             : 
   67189             : #ifdef __cplusplus
   67190             : }
   67191             : #endif
   67192             : /* -----------------------------------------------------------------------------
   67193             :  * Type initialization:
   67194             :  * This problem is tough by the requirement that no dynamic
   67195             :  * memory is used. Also, since swig_type_info structures store pointers to
   67196             :  * swig_cast_info structures and swig_cast_info structures store pointers back
   67197             :  * to swig_type_info structures, we need some lookup code at initialization.
   67198             :  * The idea is that swig generates all the structures that are needed.
   67199             :  * The runtime then collects these partially filled structures.
   67200             :  * The SWIG_InitializeModule function takes these initial arrays out of
   67201             :  * swig_module, and does all the lookup, filling in the swig_module.types
   67202             :  * array with the correct data and linking the correct swig_cast_info
   67203             :  * structures together.
   67204             :  *
   67205             :  * The generated swig_type_info structures are assigned statically to an initial
   67206             :  * array. We just loop through that array, and handle each type individually.
   67207             :  * First we lookup if this type has been already loaded, and if so, use the
   67208             :  * loaded structure instead of the generated one. Then we have to fill in the
   67209             :  * cast linked list. The cast data is initially stored in something like a
   67210             :  * two-dimensional array. Each row corresponds to a type (there are the same
   67211             :  * number of rows as there are in the swig_type_initial array). Each entry in
   67212             :  * a column is one of the swig_cast_info structures for that type.
   67213             :  * The cast_initial array is actually an array of arrays, because each row has
   67214             :  * a variable number of columns. So to actually build the cast linked list,
   67215             :  * we find the array of casts associated with the type, and loop through it
   67216             :  * adding the casts to the list. The one last trick we need to do is making
   67217             :  * sure the type pointer in the swig_cast_info struct is correct.
   67218             :  *
   67219             :  * First off, we lookup the cast->type name to see if it is already loaded.
   67220             :  * There are three cases to handle:
   67221             :  *  1) If the cast->type has already been loaded AND the type we are adding
   67222             :  *     casting info to has not been loaded (it is in this module), THEN we
   67223             :  *     replace the cast->type pointer with the type pointer that has already
   67224             :  *     been loaded.
   67225             :  *  2) If BOTH types (the one we are adding casting info to, and the
   67226             :  *     cast->type) are loaded, THEN the cast info has already been loaded by
   67227             :  *     the previous module so we just ignore it.
   67228             :  *  3) Finally, if cast->type has not already been loaded, then we add that
   67229             :  *     swig_cast_info to the linked list (because the cast->type) pointer will
   67230             :  *     be correct.
   67231             :  * ----------------------------------------------------------------------------- */
   67232             : 
   67233             : #ifdef __cplusplus
   67234             : extern "C" {
   67235             : #if 0
   67236             : } /* c-mode */
   67237             : #endif
   67238             : #endif
   67239             : 
   67240             : #if 0
   67241             : #define SWIGRUNTIME_DEBUG
   67242             : #endif
   67243             : 
   67244             : 
   67245             : SWIGRUNTIME void
   67246             : SWIG_InitializeModule(void *clientdata) {
   67247             :   size_t i;
   67248             :   swig_module_info *module_head, *iter;
   67249             :   int init;
   67250             :   
   67251             :   /* check to see if the circular list has been setup, if not, set it up */
   67252             :   if (swig_module.next==0) {
   67253             :     /* Initialize the swig_module */
   67254             :     swig_module.type_initial = swig_type_initial;
   67255             :     swig_module.cast_initial = swig_cast_initial;
   67256             :     swig_module.next = &swig_module;
   67257             :     init = 1;
   67258             :   } else {
   67259             :     init = 0;
   67260             :   }
   67261             :   
   67262             :   /* Try and load any already created modules */
   67263             :   module_head = SWIG_GetModule(clientdata);
   67264             :   if (!module_head) {
   67265             :     /* This is the first module loaded for this interpreter */
   67266             :     /* so set the swig module into the interpreter */
   67267             :     SWIG_SetModule(clientdata, &swig_module);
   67268             :   } else {
   67269             :     /* the interpreter has loaded a SWIG module, but has it loaded this one? */
   67270             :     iter=module_head;
   67271             :     do {
   67272             :       if (iter==&swig_module) {
   67273             :         /* Our module is already in the list, so there's nothing more to do. */
   67274             :         return;
   67275             :       }
   67276             :       iter=iter->next;
   67277             :     } while (iter!= module_head);
   67278             :     
   67279             :     /* otherwise we must add our module into the list */
   67280             :     swig_module.next = module_head->next;
   67281             :     module_head->next = &swig_module;
   67282             :   }
   67283             :   
   67284             :   /* When multiple interpreters are used, a module could have already been initialized in
   67285             :        a different interpreter, but not yet have a pointer in this interpreter.
   67286             :        In this case, we do not want to continue adding types... everything should be
   67287             :        set up already */
   67288             :   if (init == 0) return;
   67289             :   
   67290             :   /* Now work on filling in swig_module.types */
   67291             : #ifdef SWIGRUNTIME_DEBUG
   67292             :   printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
   67293             : #endif
   67294             :   for (i = 0; i < swig_module.size; ++i) {
   67295             :     swig_type_info *type = 0;
   67296             :     swig_type_info *ret;
   67297             :     swig_cast_info *cast;
   67298             :     
   67299             : #ifdef SWIGRUNTIME_DEBUG
   67300             :     printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
   67301             : #endif
   67302             :     
   67303             :     /* if there is another module already loaded */
   67304             :     if (swig_module.next != &swig_module) {
   67305             :       type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
   67306             :     }
   67307             :     if (type) {
   67308             :       /* Overwrite clientdata field */
   67309             : #ifdef SWIGRUNTIME_DEBUG
   67310             :       printf("SWIG_InitializeModule: found type %s\n", type->name);
   67311             : #endif
   67312             :       if (swig_module.type_initial[i]->clientdata) {
   67313             :         type->clientdata = swig_module.type_initial[i]->clientdata;
   67314             : #ifdef SWIGRUNTIME_DEBUG
   67315             :         printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
   67316             : #endif
   67317             :       }
   67318             :     } else {
   67319             :       type = swig_module.type_initial[i];
   67320             :     }
   67321             :     
   67322             :     /* Insert casting types */
   67323             :     cast = swig_module.cast_initial[i];
   67324             :     while (cast->type) {
   67325             :       /* Don't need to add information already in the list */
   67326             :       ret = 0;
   67327             : #ifdef SWIGRUNTIME_DEBUG
   67328             :       printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
   67329             : #endif
   67330             :       if (swig_module.next != &swig_module) {
   67331             :         ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
   67332             : #ifdef SWIGRUNTIME_DEBUG
   67333             :         if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
   67334             : #endif
   67335             :       }
   67336             :       if (ret) {
   67337             :         if (type == swig_module.type_initial[i]) {
   67338             : #ifdef SWIGRUNTIME_DEBUG
   67339             :           printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
   67340             : #endif
   67341             :           cast->type = ret;
   67342             :           ret = 0;
   67343             :         } else {
   67344             :           /* Check for casting already in the list */
   67345             :           swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
   67346             : #ifdef SWIGRUNTIME_DEBUG
   67347             :           if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
   67348             : #endif
   67349             :           if (!ocast) ret = 0;
   67350             :         }
   67351             :       }
   67352             :       
   67353             :       if (!ret) {
   67354             : #ifdef SWIGRUNTIME_DEBUG
   67355             :         printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
   67356             : #endif
   67357             :         if (type->cast) {
   67358             :           type->cast->prev = cast;
   67359             :           cast->next = type->cast;
   67360             :         }
   67361             :         type->cast = cast;
   67362             :       }
   67363             :       cast++;
   67364             :     }
   67365             :     /* Set entry in modules->types array equal to the type */
   67366             :     swig_module.types[i] = type;
   67367             :   }
   67368             :   swig_module.types[i] = 0;
   67369             :   
   67370             : #ifdef SWIGRUNTIME_DEBUG
   67371             :   printf("**** SWIG_InitializeModule: Cast List ******\n");
   67372             :   for (i = 0; i < swig_module.size; ++i) {
   67373             :     int j = 0;
   67374             :     swig_cast_info *cast = swig_module.cast_initial[i];
   67375             :     printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
   67376             :     while (cast->type) {
   67377             :       printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
   67378             :       cast++;
   67379             :       ++j;
   67380             :     }
   67381             :     printf("---- Total casts: %d\n",j);
   67382             :   }
   67383             :   printf("**** SWIG_InitializeModule: Cast List ******\n");
   67384             : #endif
   67385             : }
   67386             : 
   67387             : /* This function will propagate the clientdata field of type to
   67388             : * any new swig_type_info structures that have been added into the list
   67389             : * of equivalent types.  It is like calling
   67390             : * SWIG_TypeClientData(type, clientdata) a second time.
   67391             : */
   67392             : SWIGRUNTIME void
   67393             : SWIG_PropagateClientData(void) {
   67394             :   size_t i;
   67395             :   swig_cast_info *equiv;
   67396             :   static int init_run = 0;
   67397             :   
   67398             :   if (init_run) return;
   67399             :   init_run = 1;
   67400             :   
   67401             :   for (i = 0; i < swig_module.size; i++) {
   67402             :     if (swig_module.types[i]->clientdata) {
   67403             :       equiv = swig_module.types[i]->cast;
   67404             :       while (equiv) {
   67405             :         if (!equiv->converter) {
   67406             :           if (equiv->type && !equiv->type->clientdata)
   67407             :           SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
   67408             :         }
   67409             :         equiv = equiv->next;
   67410             :       }
   67411             :     }
   67412             :   }
   67413             : }
   67414             : 
   67415             : #ifdef __cplusplus
   67416             : #if 0
   67417             : {
   67418             :   /* c-mode */
   67419             : #endif
   67420             : }
   67421             : #endif
   67422             : 
   67423             : 
   67424             : 
   67425             : #ifdef __cplusplus
   67426             : extern "C" {
   67427             : #endif
   67428             :   
   67429             :   /* Python-specific SWIG API */
   67430             : #define SWIG_newvarlink()                             SWIG_Python_newvarlink()
   67431             : #define SWIG_addvarlink(p, name, get_attr, set_attr)  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
   67432             : #define SWIG_InstallConstants(d, constants)           SWIG_Python_InstallConstants(d, constants)
   67433             :   
   67434             :   /* -----------------------------------------------------------------------------
   67435             :    * global variable support code.
   67436             :    * ----------------------------------------------------------------------------- */
   67437             :   
   67438             :   typedef struct swig_globalvar {
   67439             :     char       *name;                  /* Name of global variable */
   67440             :     PyObject *(*get_attr)(void);       /* Return the current value */
   67441             :     int       (*set_attr)(PyObject *); /* Set the value */
   67442             :     struct swig_globalvar *next;
   67443             :   } swig_globalvar;
   67444             :   
   67445             :   typedef struct swig_varlinkobject {
   67446             :     PyObject_HEAD
   67447             :     swig_globalvar *vars;
   67448             :   } swig_varlinkobject;
   67449             :   
   67450             :   SWIGINTERN PyObject *
   67451             :   swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
   67452             : #if PY_VERSION_HEX >= 0x03000000
   67453             :     return PyUnicode_InternFromString("<Swig global variables>");
   67454             : #else
   67455             :     return PyString_FromString("<Swig global variables>");
   67456             : #endif
   67457             :   }
   67458             :   
   67459             :   SWIGINTERN PyObject *
   67460             :   swig_varlink_str(swig_varlinkobject *v) {
   67461             : #if PY_VERSION_HEX >= 0x03000000
   67462             :     PyObject *str = PyUnicode_InternFromString("(");
   67463             :     PyObject *tail;
   67464             :     PyObject *joined;
   67465             :     swig_globalvar *var;
   67466             :     for (var = v->vars; var; var=var->next) {
   67467             :       tail = PyUnicode_FromString(var->name);
   67468             :       joined = PyUnicode_Concat(str, tail);
   67469             :       Py_DecRef(str);
   67470             :       Py_DecRef(tail);
   67471             :       str = joined;
   67472             :       if (var->next) {
   67473             :         tail = PyUnicode_InternFromString(", ");
   67474             :         joined = PyUnicode_Concat(str, tail);
   67475             :         Py_DecRef(str);
   67476             :         Py_DecRef(tail);
   67477             :         str = joined;
   67478             :       }
   67479             :     }
   67480             :     tail = PyUnicode_InternFromString(")");
   67481             :     joined = PyUnicode_Concat(str, tail);
   67482             :     Py_DecRef(str);
   67483             :     Py_DecRef(tail);
   67484             :     str = joined;
   67485             : #else
   67486             :     PyObject *str = PyString_FromString("(");
   67487             :     swig_globalvar *var;
   67488             :     for (var = v->vars; var; var=var->next) {
   67489             :       PyString_ConcatAndDel(&str,PyString_FromString(var->name));
   67490             :       if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
   67491             :     }
   67492             :     PyString_ConcatAndDel(&str,PyString_FromString(")"));
   67493             : #endif
   67494             :     return str;
   67495             :   }
   67496             :   
   67497             :   SWIGINTERN void
   67498             :   swig_varlink_dealloc(swig_varlinkobject *v) {
   67499             :     swig_globalvar *var = v->vars;
   67500             :     while (var) {
   67501             :       swig_globalvar *n = var->next;
   67502             :       free(var->name);
   67503             :       free(var);
   67504             :       var = n;
   67505             :     }
   67506             :   }
   67507             :   
   67508             :   SWIGINTERN PyObject *
   67509             :   swig_varlink_getattr(swig_varlinkobject *v, char *n) {
   67510             :     PyObject *res = NULL;
   67511             :     swig_globalvar *var = v->vars;
   67512             :     while (var) {
   67513             :       if (strcmp(var->name,n) == 0) {
   67514             :         res = (*var->get_attr)();
   67515             :         break;
   67516             :       }
   67517             :       var = var->next;
   67518             :     }
   67519             :     if (res == NULL && !PyErr_Occurred()) {
   67520             :       PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
   67521             :     }
   67522             :     return res;
   67523             :   }
   67524             :   
   67525             :   SWIGINTERN int
   67526             :   swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
   67527             :     int res = 1;
   67528             :     swig_globalvar *var = v->vars;
   67529             :     while (var) {
   67530             :       if (strcmp(var->name,n) == 0) {
   67531             :         res = (*var->set_attr)(p);
   67532             :         break;
   67533             :       }
   67534             :       var = var->next;
   67535             :     }
   67536             :     if (res == 1 && !PyErr_Occurred()) {
   67537             :       PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
   67538             :     }
   67539             :     return res;
   67540             :   }
   67541             :   
   67542             :   SWIGINTERN PyTypeObject*
   67543             :   swig_varlink_type(void) {
   67544             :     static char varlink__doc__[] = "Swig var link object";
   67545             :     static PyTypeObject varlink_type;
   67546             :     static int type_init = 0;
   67547             :     if (!type_init) {
   67548             :       const PyTypeObject tmp = {
   67549             : #if PY_VERSION_HEX >= 0x03000000
   67550             :         PyVarObject_HEAD_INIT(NULL, 0)
   67551             : #else
   67552             :         PyObject_HEAD_INIT(NULL)
   67553             :         0,                                  /* ob_size */
   67554             : #endif
   67555             :         "swigvarlink",                      /* tp_name */
   67556             :         sizeof(swig_varlinkobject),         /* tp_basicsize */
   67557             :         0,                                  /* tp_itemsize */
   67558             :         (destructor) swig_varlink_dealloc,  /* tp_dealloc */
   67559             :         0,                                  /* tp_print */
   67560             :         (getattrfunc) swig_varlink_getattr, /* tp_getattr */
   67561             :         (setattrfunc) swig_varlink_setattr, /* tp_setattr */
   67562             :         0,                                  /* tp_compare */
   67563             :         (reprfunc) swig_varlink_repr,       /* tp_repr */
   67564             :         0,                                  /* tp_as_number */
   67565             :         0,                                  /* tp_as_sequence */
   67566             :         0,                                  /* tp_as_mapping */
   67567             :         0,                                  /* tp_hash */
   67568             :         0,                                  /* tp_call */
   67569             :         (reprfunc) swig_varlink_str,        /* tp_str */
   67570             :         0,                                  /* tp_getattro */
   67571             :         0,                                  /* tp_setattro */
   67572             :         0,                                  /* tp_as_buffer */
   67573             :         0,                                  /* tp_flags */
   67574             :         varlink__doc__,                     /* tp_doc */
   67575             :         0,                                  /* tp_traverse */
   67576             :         0,                                  /* tp_clear */
   67577             :         0,                                  /* tp_richcompare */
   67578             :         0,                                  /* tp_weaklistoffset */
   67579             :         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
   67580             :         0,                                  /* tp_del */
   67581             :         0,                                  /* tp_version_tag */
   67582             : #if PY_VERSION_HEX >= 0x03040000
   67583             :         0,                                  /* tp_finalize */
   67584             : #endif
   67585             : #ifdef COUNT_ALLOCS
   67586             :         0,                                  /* tp_allocs */
   67587             :         0,                                  /* tp_frees */
   67588             :         0,                                  /* tp_maxalloc */
   67589             :         0,                                  /* tp_prev */
   67590             :         0                                   /* tp_next */
   67591             : #endif
   67592             :       };
   67593             :       varlink_type = tmp;
   67594             :       type_init = 1;
   67595             :       if (PyType_Ready(&varlink_type) < 0)
   67596             :       return NULL;
   67597             :     }
   67598             :     return &varlink_type;
   67599             :   }
   67600             :   
   67601             :   /* Create a variable linking object for use later */
   67602             :   SWIGINTERN PyObject *
   67603             :   SWIG_Python_newvarlink(void) {
   67604             :     swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
   67605             :     if (result) {
   67606             :       result->vars = 0;
   67607             :     }
   67608             :     return ((PyObject*) result);
   67609             :   }
   67610             :   
   67611             :   SWIGINTERN void 
   67612             :   SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
   67613             :     swig_varlinkobject *v = (swig_varlinkobject *) p;
   67614             :     swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
   67615             :     if (gv) {
   67616             :       size_t size = strlen(name)+1;
   67617             :       gv->name = (char *)malloc(size);
   67618             :       if (gv->name) {
   67619             :         memcpy(gv->name, name, size);
   67620             :         gv->get_attr = get_attr;
   67621             :         gv->set_attr = set_attr;
   67622             :         gv->next = v->vars;
   67623             :       }
   67624             :     }
   67625             :     v->vars = gv;
   67626             :   }
   67627             :   
   67628             :   SWIGINTERN PyObject *
   67629             :   SWIG_globals(void) {
   67630             :     static PyObject *globals = 0;
   67631             :     if (!globals) {
   67632             :       globals = SWIG_newvarlink();
   67633             :     }
   67634             :     return globals;
   67635             :   }
   67636             :   
   67637             :   /* -----------------------------------------------------------------------------
   67638             :    * constants/methods manipulation
   67639             :    * ----------------------------------------------------------------------------- */
   67640             :   
   67641             :   /* Install Constants */
   67642             :   SWIGINTERN void
   67643         277 :   SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
   67644         277 :     PyObject *obj = 0;
   67645         277 :     size_t i;
   67646         554 :     for (i = 0; constants[i].type; ++i) {
   67647         277 :       switch(constants[i].type) {
   67648         277 :       case SWIG_PY_POINTER:
   67649         277 :         obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
   67650         277 :         break;
   67651           0 :       case SWIG_PY_BINARY:
   67652           0 :         obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
   67653             :         break;
   67654             :       default:
   67655             :         obj = 0;
   67656             :         break;
   67657             :       }
   67658         277 :       if (obj) {
   67659         277 :         PyDict_SetItemString(d, constants[i].name, obj);
   67660         277 :         Py_DECREF(obj);
   67661             :       }
   67662             :     }
   67663         277 :   }
   67664             :   
   67665             :   /* -----------------------------------------------------------------------------*/
   67666             :   /* Fix SwigMethods to carry the callback ptrs when needed */
   67667             :   /* -----------------------------------------------------------------------------*/
   67668             :   
   67669             :   SWIGINTERN void
   67670         277 :   SWIG_Python_FixMethods(PyMethodDef *methods,
   67671             :     swig_const_info *const_table,
   67672             :     swig_type_info **types,
   67673             :     swig_type_info **types_initial) {
   67674         277 :     size_t i;
   67675      224647 :     for (i = 0; methods[i].ml_name; ++i) {
   67676      224370 :       const char *c = methods[i].ml_doc;
   67677      224370 :       if (!c) continue;
   67678      205811 :       c = strstr(c, "swig_ptr: ");
   67679      205811 :       if (c) {
   67680           0 :         int j;
   67681           0 :         swig_const_info *ci = 0;
   67682           0 :         const char *name = c + 10;
   67683           0 :         for (j = 0; const_table[j].type; ++j) {
   67684           0 :           if (strncmp(const_table[j].name, name, 
   67685             :               strlen(const_table[j].name)) == 0) {
   67686             :             ci = &(const_table[j]);
   67687             :             break;
   67688             :           }
   67689             :         }
   67690           0 :         if (ci) {
   67691      224370 :           void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
   67692           0 :           if (ptr) {
   67693           0 :             size_t shift = (ci->ptype) - types;
   67694           0 :             swig_type_info *ty = types_initial[shift];
   67695           0 :             size_t ldoc = (c - methods[i].ml_doc);
   67696           0 :             size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
   67697           0 :             char *ndoc = (char*)malloc(ldoc + lptr + 10);
   67698           0 :             if (ndoc) {
   67699           0 :               char *buff = ndoc;
   67700           0 :               memcpy(buff, methods[i].ml_doc, ldoc);
   67701           0 :               buff += ldoc;
   67702           0 :               memcpy(buff, "swig_ptr: ", 10);
   67703           0 :               buff += 10;
   67704           0 :               SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
   67705           0 :               methods[i].ml_doc = ndoc;
   67706             :             }
   67707             :           }
   67708             :         }
   67709             :       }
   67710             :     }
   67711         277 :   } 
   67712             :   
   67713             :   /* -----------------------------------------------------------------------------
   67714             :    * Method creation and docstring support functions
   67715             :    * ----------------------------------------------------------------------------- */
   67716             :   
   67717             :   /* -----------------------------------------------------------------------------
   67718             :    * Function to find the method definition with the correct docstring for the
   67719             :    * proxy module as opposed to the low-level API
   67720             :    * ----------------------------------------------------------------------------- */
   67721             :   
   67722           0 :   SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name) {
   67723             :     /* Find the function in the modified method table */
   67724           0 :     size_t offset = 0;
   67725           0 :     int found = 0;
   67726           0 :     while (SwigMethods_proxydocs[offset].ml_meth != NULL) {
   67727           0 :       if (strcmp(SwigMethods_proxydocs[offset].ml_name, name) == 0) {
   67728             :         found = 1;
   67729             :         break;
   67730             :       }
   67731           0 :       offset++;
   67732             :     }
   67733             :     /* Use the copy with the modified docstring if available */
   67734           0 :     return found ? &SwigMethods_proxydocs[offset] : NULL;
   67735             :   }
   67736             :   
   67737             :   /* -----------------------------------------------------------------------------
   67738             :    * Wrapper of PyInstanceMethod_New() used in Python 3
   67739             :    * It is exported to the generated module, used for -fastproxy
   67740             :    * ----------------------------------------------------------------------------- */
   67741             :   
   67742           0 :   SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
   67743           0 :     if (PyCFunction_Check(func)) {
   67744           0 :       PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
   67745           0 :       PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
   67746           0 :       if (ml)
   67747           0 :       func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
   67748             :     }
   67749             : #if PY_VERSION_HEX >= 0x03000000
   67750           0 :     return PyInstanceMethod_New(func);
   67751             : #else
   67752             :     return PyMethod_New(func, NULL, NULL);
   67753             : #endif
   67754             :   }
   67755             :   
   67756             :   /* -----------------------------------------------------------------------------
   67757             :    * Wrapper of PyStaticMethod_New()
   67758             :    * It is exported to the generated module, used for -fastproxy
   67759             :    * ----------------------------------------------------------------------------- */
   67760             :   
   67761             :   SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
   67762             :     if (PyCFunction_Check(func)) {
   67763             :       PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
   67764             :       PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
   67765             :       if (ml)
   67766             :       func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
   67767             :     }
   67768             :     return PyStaticMethod_New(func);
   67769             :   }
   67770             :   
   67771             : #ifdef __cplusplus
   67772             : }
   67773             : #endif
   67774             : 
   67775             : /* -----------------------------------------------------------------------------*
   67776             :  *  Partial Init method
   67777             :  * -----------------------------------------------------------------------------*/
   67778             : 
   67779             : #ifdef __cplusplus
   67780             : extern "C"
   67781             : #endif
   67782             : 
   67783             : SWIGEXPORT 
   67784             : #if PY_VERSION_HEX >= 0x03000000
   67785             : PyObject*
   67786             : #else
   67787             : void
   67788             : #endif
   67789         277 : SWIG_init(void) {
   67790         277 :   PyObject *m, *d, *md, *globals;
   67791             :   
   67792             : #if PY_VERSION_HEX >= 0x03000000
   67793         277 :   static struct PyModuleDef SWIG_module = {
   67794             :     PyModuleDef_HEAD_INIT,
   67795             :     SWIG_name,
   67796             :     NULL,
   67797             :     -1,
   67798             :     SwigMethods,
   67799             :     NULL,
   67800             :     NULL,
   67801             :     NULL,
   67802             :     NULL
   67803             :   };
   67804             : #endif
   67805             :   
   67806             : #if defined(SWIGPYTHON_BUILTIN)
   67807             :   static SwigPyClientData SwigPyObject_clientdata = {
   67808             :     0, 0, 0, 0, 0, 0, 0
   67809             :   };
   67810             :   static PyGetSetDef this_getset_def = {
   67811             :     (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
   67812             :   };
   67813             :   static SwigPyGetSet thisown_getset_closure = {
   67814             :     SwigPyObject_own,
   67815             :     SwigPyObject_own
   67816             :   };
   67817             :   static PyGetSetDef thisown_getset_def = {
   67818             :     (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
   67819             :   };
   67820             :   PyTypeObject *builtin_pytype;
   67821             :   int builtin_base_count;
   67822             :   swig_type_info *builtin_basetype;
   67823             :   PyObject *tuple;
   67824             :   PyGetSetDescrObject *static_getset;
   67825             :   PyTypeObject *metatype;
   67826             :   PyTypeObject *swigpyobject;
   67827             :   SwigPyClientData *cd;
   67828             :   PyObject *public_interface, *public_symbol;
   67829             :   PyObject *this_descr;
   67830             :   PyObject *thisown_descr;
   67831             :   PyObject *self = 0;
   67832             :   int i;
   67833             :   
   67834             :   (void)builtin_pytype;
   67835             :   (void)builtin_base_count;
   67836             :   (void)builtin_basetype;
   67837             :   (void)tuple;
   67838             :   (void)static_getset;
   67839             :   (void)self;
   67840             :   
   67841             :   /* Metaclass is used to implement static member variables */
   67842             :   metatype = SwigPyObjectType();
   67843             :   assert(metatype);
   67844             : #endif
   67845             :   
   67846         277 :   (void)globals;
   67847             :   
   67848             :   /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */
   67849         277 :   SWIG_This();
   67850         277 :   SWIG_Python_TypeCache();
   67851         277 :   SwigPyPacked_type();
   67852             : #ifndef SWIGPYTHON_BUILTIN
   67853         277 :   SwigPyObject_type();
   67854             : #endif
   67855             :   
   67856             :   /* Fix SwigMethods to carry the callback ptrs when needed */
   67857         277 :   SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
   67858             :   
   67859             : #if PY_VERSION_HEX >= 0x03000000
   67860         277 :   m = PyModule_Create(&SWIG_module);
   67861             : #else
   67862             :   m = Py_InitModule(SWIG_name, SwigMethods);
   67863             : #endif
   67864             :   
   67865         277 :   md = d = PyModule_GetDict(m);
   67866         277 :   (void)md;
   67867             :   
   67868         277 :   SWIG_InitializeModule(0);
   67869             :   
   67870             : #ifdef SWIGPYTHON_BUILTIN
   67871             :   swigpyobject = SwigPyObject_TypeOnce();
   67872             :   
   67873             :   SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
   67874             :   assert(SwigPyObject_stype);
   67875             :   cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
   67876             :   if (!cd) {
   67877             :     SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
   67878             :     SwigPyObject_clientdata.pytype = swigpyobject;
   67879             :   } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
   67880             :     PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
   67881             : # if PY_VERSION_HEX >= 0x03000000
   67882             :     return NULL;
   67883             : # else
   67884             :     return;
   67885             : # endif
   67886             :   }
   67887             :   
   67888             :   /* All objects have a 'this' attribute */
   67889             :   this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
   67890             :   (void)this_descr;
   67891             :   
   67892             :   /* All objects have a 'thisown' attribute */
   67893             :   thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
   67894             :   (void)thisown_descr;
   67895             :   
   67896             :   public_interface = PyList_New(0);
   67897             :   public_symbol = 0;
   67898             :   (void)public_symbol;
   67899             :   
   67900             :   PyDict_SetItemString(md, "__all__", public_interface);
   67901             :   Py_DECREF(public_interface);
   67902             :   for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
   67903             :   SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
   67904             :   for (i = 0; swig_const_table[i].name != 0; ++i)
   67905             :   SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
   67906             : #endif
   67907             :   
   67908         277 :   SWIG_InstallConstants(d,swig_const_table);
   67909             :   
   67910         277 :   SWIG_Python_SetConstant(d, "GRAUO_LOGICAL_NOT",SWIG_From_int(static_cast< int >(GRAUO_LOGICAL_NOT)));
   67911         277 :   SWIG_Python_SetConstant(d, "GRAUO_ABS",SWIG_From_int(static_cast< int >(GRAUO_ABS)));
   67912         277 :   SWIG_Python_SetConstant(d, "GRAUO_SQRT",SWIG_From_int(static_cast< int >(GRAUO_SQRT)));
   67913         277 :   SWIG_Python_SetConstant(d, "GRAUO_LOG",SWIG_From_int(static_cast< int >(GRAUO_LOG)));
   67914         277 :   SWIG_Python_SetConstant(d, "GRAUO_LOG10",SWIG_From_int(static_cast< int >(GRAUO_LOG10)));
   67915         277 :   SWIG_Python_SetConstant(d, "GRABO_ADD",SWIG_From_int(static_cast< int >(GRABO_ADD)));
   67916         277 :   SWIG_Python_SetConstant(d, "GRABO_SUB",SWIG_From_int(static_cast< int >(GRABO_SUB)));
   67917         277 :   SWIG_Python_SetConstant(d, "GRABO_MUL",SWIG_From_int(static_cast< int >(GRABO_MUL)));
   67918         277 :   SWIG_Python_SetConstant(d, "GRABO_DIV",SWIG_From_int(static_cast< int >(GRABO_DIV)));
   67919         277 :   SWIG_Python_SetConstant(d, "GRABO_POW",SWIG_From_int(static_cast< int >(GRABO_POW)));
   67920         277 :   SWIG_Python_SetConstant(d, "GRABO_GT",SWIG_From_int(static_cast< int >(GRABO_GT)));
   67921         277 :   SWIG_Python_SetConstant(d, "GRABO_GE",SWIG_From_int(static_cast< int >(GRABO_GE)));
   67922         277 :   SWIG_Python_SetConstant(d, "GRABO_LT",SWIG_From_int(static_cast< int >(GRABO_LT)));
   67923         277 :   SWIG_Python_SetConstant(d, "GRABO_LE",SWIG_From_int(static_cast< int >(GRABO_LE)));
   67924         277 :   SWIG_Python_SetConstant(d, "GRABO_EQ",SWIG_From_int(static_cast< int >(GRABO_EQ)));
   67925         277 :   SWIG_Python_SetConstant(d, "GRABO_NE",SWIG_From_int(static_cast< int >(GRABO_NE)));
   67926         277 :   SWIG_Python_SetConstant(d, "GRABO_LOGICAL_AND",SWIG_From_int(static_cast< int >(GRABO_LOGICAL_AND)));
   67927         277 :   SWIG_Python_SetConstant(d, "GRABO_LOGICAL_OR",SWIG_From_int(static_cast< int >(GRABO_LOGICAL_OR)));
   67928             :   
   67929             :   /* gdal_python.i %init code */
   67930         277 :   if ( GDALGetDriverCount() == 0 ) {
   67931         277 :     GDALAllRegister();
   67932             :   }
   67933             :   // Will be turned on for GDAL 4.0
   67934             :   // UseExceptions();
   67935             :   
   67936             :   
   67937         277 :   SWIG_Python_SetConstant(d, "VSI_STAT_EXISTS_FLAG",SWIG_From_int(static_cast< int >(0x1)));
   67938         277 :   SWIG_Python_SetConstant(d, "VSI_STAT_NATURE_FLAG",SWIG_From_int(static_cast< int >(0x2)));
   67939         277 :   SWIG_Python_SetConstant(d, "VSI_STAT_SIZE_FLAG",SWIG_From_int(static_cast< int >(0x4)));
   67940         277 :   SWIG_Python_SetConstant(d, "VSI_STAT_SET_ERROR_FLAG",SWIG_From_int(static_cast< int >(0x8)));
   67941         277 :   SWIG_Python_SetConstant(d, "VSI_STAT_CACHE_ONLY",SWIG_From_int(static_cast< int >(0x10)));
   67942         277 :   SWIG_Python_SetConstant(d, "VSI_RANGE_STATUS_UNKNOWN",SWIG_From_int(static_cast< int >(0)));
   67943         277 :   SWIG_Python_SetConstant(d, "VSI_RANGE_STATUS_DATA",SWIG_From_int(static_cast< int >(1)));
   67944         277 :   SWIG_Python_SetConstant(d, "VSI_RANGE_STATUS_HOLE",SWIG_From_int(static_cast< int >(2)));
   67945         277 :   SWIG_Python_SetConstant(d, "GEDTST_NONE",SWIG_From_int(static_cast< int >(GEDTST_NONE)));
   67946         277 :   SWIG_Python_SetConstant(d, "GEDTST_JSON",SWIG_From_int(static_cast< int >(GEDTST_JSON)));
   67947         277 :   SWIG_Python_SetConstant(d, "GEDTC_NUMERIC",SWIG_From_int(static_cast< int >(GEDTC_NUMERIC)));
   67948         277 :   SWIG_Python_SetConstant(d, "GEDTC_STRING",SWIG_From_int(static_cast< int >(GEDTC_STRING)));
   67949         277 :   SWIG_Python_SetConstant(d, "GEDTC_COMPOUND",SWIG_From_int(static_cast< int >(GEDTC_COMPOUND)));
   67950             :   
   67951         277 :   SWIG_Python_SetConstant(d, "GVM_Diagonal",SWIG_From_int(static_cast< int >(GVM_Diagonal)));
   67952         277 :   SWIG_Python_SetConstant(d, "GVM_Edge",SWIG_From_int(static_cast< int >(GVM_Edge)));
   67953         277 :   SWIG_Python_SetConstant(d, "GVM_Max",SWIG_From_int(static_cast< int >(GVM_Max)));
   67954         277 :   SWIG_Python_SetConstant(d, "GVM_Min",SWIG_From_int(static_cast< int >(GVM_Min)));
   67955         277 :   SWIG_Python_SetConstant(d, "GVOT_NORMAL",SWIG_From_int(static_cast< int >(GVOT_NORMAL)));
   67956         277 :   SWIG_Python_SetConstant(d, "GVOT_MIN_TARGET_HEIGHT_FROM_DEM",SWIG_From_int(static_cast< int >(GVOT_MIN_TARGET_HEIGHT_FROM_DEM)));
   67957         277 :   SWIG_Python_SetConstant(d, "GVOT_MIN_TARGET_HEIGHT_FROM_GROUND",SWIG_From_int(static_cast< int >(GVOT_MIN_TARGET_HEIGHT_FROM_GROUND)));
   67958             :   
   67959             :   /* Initialize threading */
   67960         277 :   SWIG_PYTHON_INITIALIZE_THREADS;
   67961             : #if PY_VERSION_HEX >= 0x03000000
   67962         277 :   return m;
   67963             : #else
   67964             :   return;
   67965             : #endif
   67966             : }
   67967             : 

Generated by: LCOV version 1.14