LCOV - code coverage report
Current view: directory - swig/python/extensions - gdal_wrap.cpp (source / functions) Found Hit Coverage
Test: gdal_filtered.info Lines: 10719 6142 57.3 %
Date: 2012-04-28 Functions: 429 311 72.5 %

       1                 : /* ----------------------------------------------------------------------------
       2                 :  * This file was automatically generated by SWIG (http://www.swig.org).
       3                 :  * Version 1.3.40
       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                 : #define SWIGPYTHON
      12                 : #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
      13                 : 
      14                 : 
      15                 : #ifdef __cplusplus
      16                 : /* SwigValueWrapper is described in swig.swg */
      17                 : template<typename T> class SwigValueWrapper {
      18                 :   struct SwigMovePointer {
      19                 :     T *ptr;
      20                 :     SwigMovePointer(T *p) : ptr(p) { }
      21                 :     ~SwigMovePointer() { delete ptr; }
      22                 :     SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
      23                 :   } pointer;
      24                 :   SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
      25                 :   SwigValueWrapper(const SwigValueWrapper<T>& rhs);
      26                 : public:
      27                 :   SwigValueWrapper() : pointer(0) { }
      28                 :   SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
      29                 :   operator T&() const { return *pointer.ptr; }
      30                 :   T *operator&() { return pointer.ptr; }
      31                 : };
      32                 : 
      33                 : template <typename T> T SwigValueInit() {
      34                 :   return T();
      35                 : }
      36                 : #endif
      37                 : 
      38                 : /* -----------------------------------------------------------------------------
      39                 :  *  This section contains generic SWIG labels for method/variable
      40                 :  *  declarations/attributes, and other compiler dependent labels.
      41                 :  * ----------------------------------------------------------------------------- */
      42                 : 
      43                 : /* template workaround for compilers that cannot correctly implement the C++ standard */
      44                 : #ifndef SWIGTEMPLATEDISAMBIGUATOR
      45                 : # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
      46                 : #  define SWIGTEMPLATEDISAMBIGUATOR template
      47                 : # elif defined(__HP_aCC)
      48                 : /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
      49                 : /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
      50                 : #  define SWIGTEMPLATEDISAMBIGUATOR template
      51                 : # else
      52                 : #  define SWIGTEMPLATEDISAMBIGUATOR
      53                 : # endif
      54                 : #endif
      55                 : 
      56                 : /* inline attribute */
      57                 : #ifndef SWIGINLINE
      58                 : # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
      59                 : #   define SWIGINLINE inline
      60                 : # else
      61                 : #   define SWIGINLINE
      62                 : # endif
      63                 : #endif
      64                 : 
      65                 : /* attribute recognised by some compilers to avoid 'unused' warnings */
      66                 : #ifndef SWIGUNUSED
      67                 : # if defined(__GNUC__)
      68                 : #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
      69                 : #     define SWIGUNUSED __attribute__ ((__unused__)) 
      70                 : #   else
      71                 : #     define SWIGUNUSED
      72                 : #   endif
      73                 : # elif defined(__ICC)
      74                 : #   define SWIGUNUSED __attribute__ ((__unused__)) 
      75                 : # else
      76                 : #   define SWIGUNUSED 
      77                 : # endif
      78                 : #endif
      79                 : 
      80                 : #ifndef SWIG_MSC_UNSUPPRESS_4505
      81                 : # if defined(_MSC_VER)
      82                 : #   pragma warning(disable : 4505) /* unreferenced local function has been removed */
      83                 : # endif 
      84                 : #endif
      85                 : 
      86                 : #ifndef SWIGUNUSEDPARM
      87                 : # ifdef __cplusplus
      88                 : #   define SWIGUNUSEDPARM(p)
      89                 : # else
      90                 : #   define SWIGUNUSEDPARM(p) p SWIGUNUSED 
      91                 : # endif
      92                 : #endif
      93                 : 
      94                 : /* internal SWIG method */
      95                 : #ifndef SWIGINTERN
      96                 : # define SWIGINTERN static SWIGUNUSED
      97                 : #endif
      98                 : 
      99                 : /* internal inline SWIG method */
     100                 : #ifndef SWIGINTERNINLINE
     101                 : # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
     102                 : #endif
     103                 : 
     104                 : /* exporting methods */
     105                 : #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
     106                 : #  ifndef GCC_HASCLASSVISIBILITY
     107                 : #    define GCC_HASCLASSVISIBILITY
     108                 : #  endif
     109                 : #endif
     110                 : 
     111                 : #ifndef SWIGEXPORT
     112                 : # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
     113                 : #   if defined(STATIC_LINKED)
     114                 : #     define SWIGEXPORT
     115                 : #   else
     116                 : #     define SWIGEXPORT __declspec(dllexport)
     117                 : #   endif
     118                 : # else
     119                 : #   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
     120                 : #     define SWIGEXPORT __attribute__ ((visibility("default")))
     121                 : #   else
     122                 : #     define SWIGEXPORT
     123                 : #   endif
     124                 : # endif
     125                 : #endif
     126                 : 
     127                 : /* calling conventions for Windows */
     128                 : #ifndef SWIGSTDCALL
     129                 : # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
     130                 : #   define SWIGSTDCALL __stdcall
     131                 : # else
     132                 : #   define SWIGSTDCALL
     133                 : # endif 
     134                 : #endif
     135                 : 
     136                 : /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
     137                 : #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
     138                 : # define _CRT_SECURE_NO_DEPRECATE
     139                 : #endif
     140                 : 
     141                 : /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
     142                 : #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
     143                 : # define _SCL_SECURE_NO_DEPRECATE
     144                 : #endif
     145                 : 
     146                 : 
     147                 : 
     148                 : /* Python.h has to appear first */
     149                 : #include <Python.h>
     150                 : 
     151                 : /* -----------------------------------------------------------------------------
     152                 :  * swigrun.swg
     153                 :  *
     154                 :  * This file contains generic C API SWIG runtime support for pointer
     155                 :  * type checking.
     156                 :  * ----------------------------------------------------------------------------- */
     157                 : 
     158                 : /* This should only be incremented when either the layout of swig_type_info changes,
     159                 :    or for whatever reason, the runtime changes incompatibly */
     160                 : #define SWIG_RUNTIME_VERSION "4"
     161                 : 
     162                 : /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
     163                 : #ifdef SWIG_TYPE_TABLE
     164                 : # define SWIG_QUOTE_STRING(x) #x
     165                 : # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
     166                 : # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
     167                 : #else
     168                 : # define SWIG_TYPE_TABLE_NAME
     169                 : #endif
     170                 : 
     171                 : /*
     172                 :   You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
     173                 :   creating a static or dynamic library from the SWIG runtime code.
     174                 :   In 99.9% of the cases, SWIG just needs to declare them as 'static'.
     175                 :   
     176                 :   But only do this if strictly necessary, ie, if you have problems
     177                 :   with your compiler or suchlike.
     178                 : */
     179                 : 
     180                 : #ifndef SWIGRUNTIME
     181                 : # define SWIGRUNTIME SWIGINTERN
     182                 : #endif
     183                 : 
     184                 : #ifndef SWIGRUNTIMEINLINE
     185                 : # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
     186                 : #endif
     187                 : 
     188                 : /*  Generic buffer size */
     189                 : #ifndef SWIG_BUFFER_SIZE
     190                 : # define SWIG_BUFFER_SIZE 1024
     191                 : #endif
     192                 : 
     193                 : /* Flags for pointer conversions */
     194                 : #define SWIG_POINTER_DISOWN        0x1
     195                 : #define SWIG_CAST_NEW_MEMORY       0x2
     196                 : 
     197                 : /* Flags for new pointer objects */
     198                 : #define SWIG_POINTER_OWN           0x1
     199                 : 
     200                 : 
     201                 : /* 
     202                 :    Flags/methods for returning states.
     203                 :    
     204                 :    The SWIG conversion methods, as ConvertPtr, return and integer 
     205                 :    that tells if the conversion was successful or not. And if not,
     206                 :    an error code can be returned (see swigerrors.swg for the codes).
     207                 :    
     208                 :    Use the following macros/flags to set or process the returning
     209                 :    states.
     210                 :    
     211                 :    In old versions of SWIG, code such as the following was usually written:
     212                 : 
     213                 :      if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
     214                 :        // success code
     215                 :      } else {
     216                 :        //fail code
     217                 :      }
     218                 : 
     219                 :    Now you can be more explicit:
     220                 : 
     221                 :     int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
     222                 :     if (SWIG_IsOK(res)) {
     223                 :       // success code
     224                 :     } else {
     225                 :       // fail code
     226                 :     }
     227                 : 
     228                 :    which is the same really, but now you can also do
     229                 : 
     230                 :     Type *ptr;
     231                 :     int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
     232                 :     if (SWIG_IsOK(res)) {
     233                 :       // success code
     234                 :       if (SWIG_IsNewObj(res) {
     235                 :         ...
     236                 :   delete *ptr;
     237                 :       } else {
     238                 :         ...
     239                 :       }
     240                 :     } else {
     241                 :       // fail code
     242                 :     }
     243                 :     
     244                 :    I.e., now SWIG_ConvertPtr can return new objects and you can
     245                 :    identify the case and take care of the deallocation. Of course that
     246                 :    also requires SWIG_ConvertPtr to return new result values, such as
     247                 : 
     248                 :       int SWIG_ConvertPtr(obj, ptr,...) {         
     249                 :         if (<obj is ok>) {             
     250                 :           if (<need new object>) {           
     251                 :             *ptr = <ptr to new allocated object>; 
     252                 :             return SWIG_NEWOBJ;          
     253                 :           } else {               
     254                 :             *ptr = <ptr to old object>;        
     255                 :             return SWIG_OLDOBJ;          
     256                 :           }                
     257                 :         } else {               
     258                 :           return SWIG_BADOBJ;          
     259                 :         }                
     260                 :       }
     261                 : 
     262                 :    Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
     263                 :    more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
     264                 :    SWIG errors code.
     265                 : 
     266                 :    Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
     267                 :    allows to return the 'cast rank', for example, if you have this
     268                 : 
     269                 :        int food(double)
     270                 :        int fooi(int);
     271                 : 
     272                 :    and you call
     273                 :  
     274                 :       food(1)   // cast rank '1'  (1 -> 1.0)
     275                 :       fooi(1)   // cast rank '0'
     276                 : 
     277                 :    just use the SWIG_AddCast()/SWIG_CheckState()
     278                 : */
     279                 : 
     280                 : #define SWIG_OK                    (0) 
     281                 : #define SWIG_ERROR                 (-1)
     282                 : #define SWIG_IsOK(r)               (r >= 0)
     283                 : #define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)  
     284                 : 
     285                 : /* The CastRankLimit says how many bits are used for the cast rank */
     286                 : #define SWIG_CASTRANKLIMIT         (1 << 8)
     287                 : /* The NewMask denotes the object was created (using new/malloc) */
     288                 : #define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
     289                 : /* The TmpMask is for in/out typemaps that use temporal objects */
     290                 : #define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
     291                 : /* Simple returning values */
     292                 : #define SWIG_BADOBJ                (SWIG_ERROR)
     293                 : #define SWIG_OLDOBJ                (SWIG_OK)
     294                 : #define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
     295                 : #define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
     296                 : /* Check, add and del mask methods */
     297                 : #define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
     298                 : #define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
     299                 : #define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
     300                 : #define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
     301                 : #define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
     302                 : #define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
     303                 : 
     304                 : /* Cast-Rank Mode */
     305                 : #if defined(SWIG_CASTRANK_MODE)
     306                 : #  ifndef SWIG_TypeRank
     307                 : #    define SWIG_TypeRank             unsigned long
     308                 : #  endif
     309                 : #  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
     310                 : #    define SWIG_MAXCASTRANK          (2)
     311                 : #  endif
     312                 : #  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
     313                 : #  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
     314                 : SWIGINTERNINLINE int SWIG_AddCast(int r) { 
     315                 :   return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
     316                 : }
     317                 : SWIGINTERNINLINE int SWIG_CheckState(int r) { 
     318                 :   return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; 
     319                 : }
     320                 : #else /* no cast-rank mode */
     321                 : #  define SWIG_AddCast
     322                 : #  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
     323                 : #endif
     324                 : 
     325                 : 
     326                 : #include <string.h>
     327                 : 
     328                 : #ifdef __cplusplus
     329                 : extern "C" {
     330                 : #endif
     331                 : 
     332                 : typedef void *(*swig_converter_func)(void *, int *);
     333                 : typedef struct swig_type_info *(*swig_dycast_func)(void **);
     334                 : 
     335                 : /* Structure to store information on one type */
     336                 : typedef struct swig_type_info {
     337                 :   const char             *name;     /* mangled name of this type */
     338                 :   const char             *str;      /* human readable name of this type */
     339                 :   swig_dycast_func        dcast;    /* dynamic cast function down a hierarchy */
     340                 :   struct swig_cast_info  *cast;     /* linked list of types that can cast into this type */
     341                 :   void                   *clientdata;   /* language specific type data */
     342                 :   int                    owndata;   /* flag if the structure owns the clientdata */
     343                 : } swig_type_info;
     344                 : 
     345                 : /* Structure to store a type and conversion function used for casting */
     346                 : typedef struct swig_cast_info {
     347                 :   swig_type_info         *type;     /* pointer to type that is equivalent to this type */
     348                 :   swig_converter_func     converter;    /* function to cast the void pointers */
     349                 :   struct swig_cast_info  *next;     /* pointer to next cast in linked list */
     350                 :   struct swig_cast_info  *prev;     /* pointer to the previous cast */
     351                 : } swig_cast_info;
     352                 : 
     353                 : /* Structure used to store module information
     354                 :  * Each module generates one structure like this, and the runtime collects
     355                 :  * all of these structures and stores them in a circularly linked list.*/
     356                 : typedef struct swig_module_info {
     357                 :   swig_type_info         **types;   /* Array of pointers to swig_type_info structures that are in this module */
     358                 :   size_t                 size;            /* Number of types in this module */
     359                 :   struct swig_module_info *next;    /* Pointer to next element in circularly linked list */
     360                 :   swig_type_info         **type_initial;  /* Array of initially generated type structures */
     361                 :   swig_cast_info         **cast_initial;  /* Array of initially generated casting structures */
     362                 :   void                    *clientdata;    /* Language specific module data */
     363                 : } swig_module_info;
     364                 : 
     365                 : /* 
     366                 :   Compare two type names skipping the space characters, therefore
     367                 :   "char*" == "char *" and "Class<int>" == "Class<int >", etc.
     368                 : 
     369                 :   Return 0 when the two name types are equivalent, as in
     370                 :   strncmp, but skipping ' '.
     371                 : */
     372                 : SWIGRUNTIME int
     373                 : SWIG_TypeNameComp(const char *f1, const char *l1,
     374                 :       const char *f2, const char *l2) {
     375               0 :   for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
     376               0 :     while ((*f1 == ' ') && (f1 != l1)) ++f1;
     377               0 :     while ((*f2 == ' ') && (f2 != l2)) ++f2;
     378               0 :     if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
     379                 :   }
     380               0 :   return (int)((l1 - f1) - (l2 - f2));
     381                 : }
     382                 : 
     383                 : /*
     384                 :   Check type equivalence in a name list like <name1>|<name2>|...
     385                 :   Return 0 if not equal, 1 if equal
     386                 : */
     387                 : SWIGRUNTIME int
     388                 : SWIG_TypeEquiv(const char *nb, const char *tb) {
     389               0 :   int equiv = 0;
     390               0 :   const char* te = tb + strlen(tb);
     391               0 :   const char* ne = nb;
     392               0 :   while (!equiv && *ne) {
     393               0 :     for (nb = ne; *ne; ++ne) {
     394               0 :       if (*ne == '|') break;
     395                 :     }
     396               0 :     equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
     397               0 :     if (*ne) ++ne;
     398                 :   }
     399               0 :   return equiv;
     400                 : }
     401                 : 
     402                 : /*
     403                 :   Check type equivalence in a name list like <name1>|<name2>|...
     404                 :   Return 0 if equal, -1 if nb < tb, 1 if nb > tb
     405                 : */
     406                 : SWIGRUNTIME int
     407                 : SWIG_TypeCompare(const char *nb, const char *tb) {
     408                 :   int equiv = 0;
     409                 :   const char* te = tb + strlen(tb);
     410                 :   const char* ne = nb;
     411                 :   while (!equiv && *ne) {
     412                 :     for (nb = ne; *ne; ++ne) {
     413                 :       if (*ne == '|') break;
     414                 :     }
     415                 :     equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
     416                 :     if (*ne) ++ne;
     417                 :   }
     418                 :   return equiv;
     419                 : }
     420                 : 
     421                 : 
     422                 : /*
     423                 :   Check the typename
     424                 : */
     425                 : SWIGRUNTIME swig_cast_info *
     426            3153 : SWIG_TypeCheck(const char *c, swig_type_info *ty) {
     427            3153 :   if (ty) {
     428            3153 :     swig_cast_info *iter = ty->cast;
     429            6588 :     while (iter) {
     430            3435 :       if (strcmp(iter->type->name, c) == 0) {
     431            3153 :         if (iter == ty->cast)
     432            2926 :           return iter;
     433                 :         /* Move iter to the top of the linked list */
     434             227 :         iter->prev->next = iter->next;
     435             227 :         if (iter->next)
     436             227 :           iter->next->prev = iter->prev;
     437             227 :         iter->next = ty->cast;
     438             227 :         iter->prev = 0;
     439             227 :         if (ty->cast) ty->cast->prev = iter;
     440             227 :         ty->cast = iter;
     441             227 :         return iter;
     442                 :       }
     443             282 :       iter = iter->next;
     444                 :     }
     445                 :   }
     446               0 :   return 0;
     447                 : }
     448                 : 
     449                 : /* 
     450                 :   Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
     451                 : */
     452                 : SWIGRUNTIME swig_cast_info *
     453                 : SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
     454                 :   if (ty) {
     455                 :     swig_cast_info *iter = ty->cast;
     456                 :     while (iter) {
     457                 :       if (iter->type == from) {
     458                 :         if (iter == ty->cast)
     459                 :           return iter;
     460                 :         /* Move iter to the top of the linked list */
     461                 :         iter->prev->next = iter->next;
     462                 :         if (iter->next)
     463                 :           iter->next->prev = iter->prev;
     464                 :         iter->next = ty->cast;
     465                 :         iter->prev = 0;
     466                 :         if (ty->cast) ty->cast->prev = iter;
     467                 :         ty->cast = iter;
     468                 :         return iter;
     469                 :       }
     470                 :       iter = iter->next;
     471                 :     }
     472                 :   }
     473                 :   return 0;
     474                 : }
     475                 : 
     476                 : /*
     477                 :   Cast a pointer up an inheritance hierarchy
     478                 : */
     479                 : SWIGRUNTIMEINLINE void *
     480                 : SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
     481            3153 :   return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
     482                 : }
     483                 : 
     484                 : /* 
     485                 :    Dynamic pointer casting. Down an inheritance hierarchy
     486                 : */
     487                 : SWIGRUNTIME swig_type_info *
     488                 : SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
     489                 :   swig_type_info *lastty = ty;
     490                 :   if (!ty || !ty->dcast) return ty;
     491                 :   while (ty && (ty->dcast)) {
     492                 :     ty = (*ty->dcast)(ptr);
     493                 :     if (ty) lastty = ty;
     494                 :   }
     495                 :   return lastty;
     496                 : }
     497                 : 
     498                 : /*
     499                 :   Return the name associated with this type
     500                 : */
     501                 : SWIGRUNTIMEINLINE const char *
     502                 : SWIG_TypeName(const swig_type_info *ty) {
     503                 :   return ty->name;
     504                 : }
     505                 : 
     506                 : /*
     507                 :   Return the pretty name associated with this type,
     508                 :   that is an unmangled type name in a form presentable to the user.
     509                 : */
     510                 : SWIGRUNTIME const char *
     511                 : SWIG_TypePrettyName(const swig_type_info *type) {
     512                 :   /* The "str" field contains the equivalent pretty names of the
     513                 :      type, separated by vertical-bar characters.  We choose
     514                 :      to print the last name, as it is often (?) the most
     515                 :      specific. */
     516               0 :   if (!type) return NULL;
     517               0 :   if (type->str != NULL) {
     518               0 :     const char *last_name = type->str;
     519                 :     const char *s;
     520               0 :     for (s = type->str; *s; s++)
     521               0 :       if (*s == '|') last_name = s+1;
     522               0 :     return last_name;
     523                 :   }
     524                 :   else
     525               0 :     return type->name;
     526                 : }
     527                 : 
     528                 : /* 
     529                 :    Set the clientdata field for a type
     530                 : */
     531                 : SWIGRUNTIME void
     532              66 : SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
     533              66 :   swig_cast_info *cast = ti->cast;
     534                 :   /* if (ti->clientdata == clientdata) return; */
     535              66 :   ti->clientdata = clientdata;
     536                 :   
     537             216 :   while (cast) {
     538              84 :     if (!cast->converter) {
     539              66 :       swig_type_info *tc = cast->type;
     540              66 :       if (!tc->clientdata) {
     541               0 :   SWIG_TypeClientData(tc, clientdata);
     542                 :       }
     543                 :     }    
     544              84 :     cast = cast->next;
     545                 :   }
     546              66 : }
     547                 : SWIGRUNTIME void
     548                 : SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
     549              66 :   SWIG_TypeClientData(ti, clientdata);
     550              66 :   ti->owndata = 1;
     551                 : }
     552                 :   
     553                 : /*
     554                 :   Search for a swig_type_info structure only by mangled name
     555                 :   Search is a O(log #types)
     556                 :   
     557                 :   We start searching at module start, and finish searching when start == end.  
     558                 :   Note: if start == end at the beginning of the function, we go all the way around
     559                 :   the circular list.
     560                 : */
     561                 : SWIGRUNTIME swig_type_info *
     562               2 : SWIG_MangledTypeQueryModule(swig_module_info *start, 
     563                 :                             swig_module_info *end, 
     564                 :                 const char *name) {
     565               2 :   swig_module_info *iter = start;
     566               0 :   do {
     567               2 :     if (iter->size) {
     568               2 :       register size_t l = 0;
     569               2 :       register size_t r = iter->size - 1;
     570               8 :       do {
     571                 :   /* since l+r >= 0, we can (>> 1) instead (/ 2) */
     572              10 :   register size_t i = (l + r) >> 1; 
     573              10 :   const char *iname = iter->types[i]->name;
     574              10 :   if (iname) {
     575              10 :     register int compare = strcmp(name, iname);
     576              10 :     if (compare == 0) {     
     577               2 :       return iter->types[i];
     578               8 :     } else if (compare < 0) {
     579               4 :       if (i) {
     580               4 :         r = i - 1;
     581                 :       } else {
     582                 :         break;
     583                 :       }
     584               4 :     } else if (compare > 0) {
     585               4 :       l = i + 1;
     586                 :     }
     587                 :   } else {
     588                 :     break; /* should never happen */
     589                 :   }
     590                 :       } while (l <= r);
     591                 :     }
     592               0 :     iter = iter->next;
     593                 :   } while (iter != end);
     594               0 :   return 0;
     595                 : }
     596                 : 
     597                 : /*
     598                 :   Search for a swig_type_info structure for either a mangled name or a human readable name.
     599                 :   It first searches the mangled names of the types, which is a O(log #types)
     600                 :   If a type is not found it then searches the human readable names, which is O(#types).
     601                 :   
     602                 :   We start searching at module start, and finish searching when start == end.  
     603                 :   Note: if start == end at the beginning of the function, we go all the way around
     604                 :   the circular list.
     605                 : */
     606                 : SWIGRUNTIME swig_type_info *
     607               2 : SWIG_TypeQueryModule(swig_module_info *start, 
     608                 :                      swig_module_info *end, 
     609                 :          const char *name) {
     610                 :   /* STEP 1: Search the name field using binary search */
     611               2 :   swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
     612               2 :   if (ret) {
     613               2 :     return ret;
     614                 :   } else {
     615                 :     /* STEP 2: If the type hasn't been found, do a complete search
     616                 :        of the str field (the human readable name) */
     617               0 :     swig_module_info *iter = start;
     618               0 :     do {
     619               0 :       register size_t i = 0;
     620               0 :       for (; i < iter->size; ++i) {
     621               0 :   if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
     622               0 :     return iter->types[i];
     623                 :       }
     624               0 :       iter = iter->next;
     625                 :     } while (iter != end);
     626                 :   }
     627                 :   
     628                 :   /* neither found a match */
     629               0 :   return 0;
     630                 : }
     631                 : 
     632                 : /* 
     633                 :    Pack binary data into a string
     634                 : */
     635                 : SWIGRUNTIME char *
     636                 : SWIG_PackData(char *c, void *ptr, size_t sz) {
     637                 :   static const char hex[17] = "0123456789abcdef";
     638               0 :   register const unsigned char *u = (unsigned char *) ptr;
     639               0 :   register const unsigned char *eu =  u + sz;
     640               0 :   for (; u != eu; ++u) {
     641               0 :     register unsigned char uu = *u;
     642               0 :     *(c++) = hex[(uu & 0xf0) >> 4];
     643               0 :     *(c++) = hex[uu & 0xf];
     644                 :   }
     645               0 :   return c;
     646                 : }
     647                 : 
     648                 : /* 
     649                 :    Unpack binary data from a string
     650                 : */
     651                 : SWIGRUNTIME const char *
     652                 : SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
     653                 :   register unsigned char *u = (unsigned char *) ptr;
     654                 :   register const unsigned char *eu = u + sz;
     655                 :   for (; u != eu; ++u) {
     656                 :     register char d = *(c++);
     657                 :     register unsigned char uu;
     658                 :     if ((d >= '0') && (d <= '9'))
     659                 :       uu = ((d - '0') << 4);
     660                 :     else if ((d >= 'a') && (d <= 'f'))
     661                 :       uu = ((d - ('a'-10)) << 4);
     662                 :     else 
     663                 :       return (char *) 0;
     664                 :     d = *(c++);
     665                 :     if ((d >= '0') && (d <= '9'))
     666                 :       uu |= (d - '0');
     667                 :     else if ((d >= 'a') && (d <= 'f'))
     668                 :       uu |= (d - ('a'-10));
     669                 :     else 
     670                 :       return (char *) 0;
     671                 :     *u = uu;
     672                 :   }
     673                 :   return c;
     674                 : }
     675                 : 
     676                 : /* 
     677                 :    Pack 'void *' into a string buffer.
     678                 : */
     679                 : SWIGRUNTIME char *
     680               0 : SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
     681               0 :   char *r = buff;
     682               0 :   if ((2*sizeof(void *) + 2) > bsz) return 0;
     683               0 :   *(r++) = '_';
     684               0 :   r = SWIG_PackData(r,&ptr,sizeof(void *));
     685               0 :   if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
     686                 :   strcpy(r,name);
     687               0 :   return buff;
     688                 : }
     689                 : 
     690                 : SWIGRUNTIME const char *
     691                 : SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
     692                 :   if (*c != '_') {
     693                 :     if (strcmp(c,"NULL") == 0) {
     694                 :       *ptr = (void *) 0;
     695                 :       return name;
     696                 :     } else {
     697                 :       return 0;
     698                 :     }
     699                 :   }
     700                 :   return SWIG_UnpackData(++c,ptr,sizeof(void *));
     701                 : }
     702                 : 
     703                 : SWIGRUNTIME char *
     704               0 : SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
     705               0 :   char *r = buff;
     706               0 :   size_t lname = (name ? strlen(name) : 0);
     707               0 :   if ((2*sz + 2 + lname) > bsz) return 0;
     708               0 :   *(r++) = '_';
     709               0 :   r = SWIG_PackData(r,ptr,sz);
     710               0 :   if (lname) {
     711               0 :     strncpy(r,name,lname+1);
     712                 :   } else {
     713               0 :     *r = 0;
     714                 :   }
     715               0 :   return buff;
     716                 : }
     717                 : 
     718                 : SWIGRUNTIME const char *
     719                 : SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
     720                 :   if (*c != '_') {
     721                 :     if (strcmp(c,"NULL") == 0) {
     722                 :       memset(ptr,0,sz);
     723                 :       return name;
     724                 :     } else {
     725                 :       return 0;
     726                 :     }
     727                 :   }
     728                 :   return SWIG_UnpackData(++c,ptr,sz);
     729                 : }
     730                 : 
     731                 : #ifdef __cplusplus
     732                 : }
     733                 : #endif
     734                 : 
     735                 : /*  Errors in SWIG */
     736                 : #define  SWIG_UnknownError         -1 
     737                 : #define  SWIG_IOError            -2 
     738                 : #define  SWIG_RuntimeError       -3 
     739                 : #define  SWIG_IndexError         -4 
     740                 : #define  SWIG_TypeError          -5 
     741                 : #define  SWIG_DivisionByZero     -6 
     742                 : #define  SWIG_OverflowError      -7 
     743                 : #define  SWIG_SyntaxError        -8 
     744                 : #define  SWIG_ValueError         -9 
     745                 : #define  SWIG_SystemError        -10
     746                 : #define  SWIG_AttributeError     -11
     747                 : #define  SWIG_MemoryError        -12 
     748                 : #define  SWIG_NullReferenceError   -13
     749                 : 
     750                 : 
     751                 : 
     752                 : /* Compatibility macros for Python 3 */
     753                 : #if PY_VERSION_HEX >= 0x03000000
     754                 : 
     755                 : #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
     756                 : #define PyInt_Check(x) PyLong_Check(x)
     757                 : #define PyInt_AsLong(x) PyLong_AsLong(x)
     758                 : #define PyInt_FromLong(x) PyLong_FromLong(x)
     759                 : #define PyString_Format(fmt, args)  PyUnicode_Format(fmt, args)
     760                 : 
     761                 : #endif
     762                 : 
     763                 : #ifndef Py_TYPE
     764                 : #  define Py_TYPE(op) ((op)->ob_type)
     765                 : #endif
     766                 : 
     767                 : /* SWIG APIs for compatibility of both Python 2 & 3 */
     768                 : 
     769                 : #if PY_VERSION_HEX >= 0x03000000
     770                 : #  define SWIG_Python_str_FromFormat PyUnicode_FromFormat
     771                 : #else
     772                 : #  define SWIG_Python_str_FromFormat PyString_FromFormat
     773                 : #endif
     774                 : 
     775                 : 
     776                 : /* Warning: This function will allocate a new string in Python 3,
     777                 :  * so please call SWIG_Python_str_DelForPy3(x) to free the space.
     778                 :  */
     779                 : SWIGINTERN char*
     780                 : SWIG_Python_str_AsChar(PyObject *str)
     781                 : {
     782                 : #if PY_VERSION_HEX >= 0x03000000
     783                 :   char *cstr;
     784                 :   char *newstr;
     785                 :   Py_ssize_t len;
     786                 :   str = PyUnicode_AsUTF8String(str);
     787                 :   PyBytes_AsStringAndSize(str, &cstr, &len);
     788                 :   newstr = (char *) malloc(len+1);
     789                 :   memcpy(newstr, cstr, len+1);
     790                 :   Py_XDECREF(str);
     791                 :   return newstr;
     792                 : #else
     793               0 :   return PyString_AsString(str);
     794                 : #endif
     795                 : }
     796                 : 
     797                 : #if PY_VERSION_HEX >= 0x03000000
     798                 : #  define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
     799                 : #else
     800                 : #  define SWIG_Python_str_DelForPy3(x) 
     801                 : #endif
     802                 : 
     803                 : 
     804                 : SWIGINTERN PyObject*
     805                 : SWIG_Python_str_FromChar(const char *c)
     806                 : {
     807                 : #if PY_VERSION_HEX >= 0x03000000
     808                 :   return PyUnicode_FromString(c); 
     809                 : #else
     810               6 :   return PyString_FromString(c);
     811                 : #endif
     812                 : }
     813                 : 
     814                 : /* Add PyOS_snprintf for old Pythons */
     815                 : #if PY_VERSION_HEX < 0x02020000
     816                 : # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
     817                 : #  define PyOS_snprintf _snprintf
     818                 : # else
     819                 : #  define PyOS_snprintf snprintf
     820                 : # endif
     821                 : #endif
     822                 : 
     823                 : /* A crude PyString_FromFormat implementation for old Pythons */
     824                 : #if PY_VERSION_HEX < 0x02020000
     825                 : 
     826                 : #ifndef SWIG_PYBUFFER_SIZE
     827                 : # define SWIG_PYBUFFER_SIZE 1024
     828                 : #endif
     829                 : 
     830                 : static PyObject *
     831                 : PyString_FromFormat(const char *fmt, ...) {
     832                 :   va_list ap;
     833                 :   char buf[SWIG_PYBUFFER_SIZE * 2];
     834                 :   int res;
     835                 :   va_start(ap, fmt);
     836                 :   res = vsnprintf(buf, sizeof(buf), fmt, ap);
     837                 :   va_end(ap);
     838                 :   return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
     839                 : }
     840                 : #endif
     841                 : 
     842                 : /* Add PyObject_Del for old Pythons */
     843                 : #if PY_VERSION_HEX < 0x01060000
     844                 : # define PyObject_Del(op) PyMem_DEL((op))
     845                 : #endif
     846                 : #ifndef PyObject_DEL
     847                 : # define PyObject_DEL PyObject_Del
     848                 : #endif
     849                 : 
     850                 : /* A crude PyExc_StopIteration exception for old Pythons */
     851                 : #if PY_VERSION_HEX < 0x02020000
     852                 : # ifndef PyExc_StopIteration
     853                 : #  define PyExc_StopIteration PyExc_RuntimeError
     854                 : # endif
     855                 : # ifndef PyObject_GenericGetAttr
     856                 : #  define PyObject_GenericGetAttr 0
     857                 : # endif
     858                 : #endif
     859                 : 
     860                 : /* Py_NotImplemented is defined in 2.1 and up. */
     861                 : #if PY_VERSION_HEX < 0x02010000
     862                 : # ifndef Py_NotImplemented
     863                 : #  define Py_NotImplemented PyExc_RuntimeError
     864                 : # endif
     865                 : #endif
     866                 : 
     867                 : /* A crude PyString_AsStringAndSize implementation for old Pythons */
     868                 : #if PY_VERSION_HEX < 0x02010000
     869                 : # ifndef PyString_AsStringAndSize
     870                 : #  define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
     871                 : # endif
     872                 : #endif
     873                 : 
     874                 : /* PySequence_Size for old Pythons */
     875                 : #if PY_VERSION_HEX < 0x02000000
     876                 : # ifndef PySequence_Size
     877                 : #  define PySequence_Size PySequence_Length
     878                 : # endif
     879                 : #endif
     880                 : 
     881                 : /* PyBool_FromLong for old Pythons */
     882                 : #if PY_VERSION_HEX < 0x02030000
     883                 : static
     884                 : PyObject *PyBool_FromLong(long ok)
     885                 : {
     886                 :   PyObject *result = ok ? Py_True : Py_False;
     887                 :   Py_INCREF(result);
     888                 :   return result;
     889                 : }
     890                 : #endif
     891                 : 
     892                 : /* Py_ssize_t for old Pythons */
     893                 : /* This code is as recommended by: */
     894                 : /* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
     895                 : #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
     896                 : typedef int Py_ssize_t;
     897                 : # define PY_SSIZE_T_MAX INT_MAX
     898                 : # define PY_SSIZE_T_MIN INT_MIN
     899                 : #endif
     900                 : 
     901                 : /* -----------------------------------------------------------------------------
     902                 :  * error manipulation
     903                 :  * ----------------------------------------------------------------------------- */
     904                 : 
     905                 : SWIGRUNTIME PyObject*
     906               1 : SWIG_Python_ErrorType(int code) {
     907               1 :   PyObject* type = 0;
     908               1 :   switch(code) {
     909                 :   case SWIG_MemoryError:
     910               0 :     type = PyExc_MemoryError;
     911               0 :     break;
     912                 :   case SWIG_IOError:
     913               0 :     type = PyExc_IOError;
     914               0 :     break;
     915                 :   case SWIG_RuntimeError:
     916               1 :     type = PyExc_RuntimeError;
     917               1 :     break;
     918                 :   case SWIG_IndexError:
     919               0 :     type = PyExc_IndexError;
     920               0 :     break;
     921                 :   case SWIG_TypeError:
     922               0 :     type = PyExc_TypeError;
     923               0 :     break;
     924                 :   case SWIG_DivisionByZero:
     925               0 :     type = PyExc_ZeroDivisionError;
     926               0 :     break;
     927                 :   case SWIG_OverflowError:
     928               0 :     type = PyExc_OverflowError;
     929               0 :     break;
     930                 :   case SWIG_SyntaxError:
     931               0 :     type = PyExc_SyntaxError;
     932               0 :     break;
     933                 :   case SWIG_ValueError:
     934               0 :     type = PyExc_ValueError;
     935               0 :     break;
     936                 :   case SWIG_SystemError:
     937               0 :     type = PyExc_SystemError;
     938               0 :     break;
     939                 :   case SWIG_AttributeError:
     940               0 :     type = PyExc_AttributeError;
     941               0 :     break;
     942                 :   default:
     943               0 :     type = PyExc_RuntimeError;
     944                 :   }
     945               1 :   return type;
     946                 : }
     947                 : 
     948                 : 
     949                 : SWIGRUNTIME void
     950                 : SWIG_Python_AddErrorMsg(const char* mesg)
     951                 : {
     952                 :   PyObject *type = 0;
     953                 :   PyObject *value = 0;
     954                 :   PyObject *traceback = 0;
     955                 : 
     956                 :   if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
     957                 :   if (value) {
     958                 :     char *tmp;
     959                 :     PyObject *old_str = PyObject_Str(value);
     960                 :     PyErr_Clear();
     961                 :     Py_XINCREF(type);
     962                 : 
     963                 :     PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
     964                 :     SWIG_Python_str_DelForPy3(tmp);
     965                 :     Py_DECREF(old_str);
     966                 :     Py_DECREF(value);
     967                 :   } else {
     968                 :     PyErr_SetString(PyExc_RuntimeError, mesg);
     969                 :   }
     970                 : }
     971                 : 
     972                 : #if defined(SWIG_PYTHON_NO_THREADS)
     973                 : #  if defined(SWIG_PYTHON_THREADS)
     974                 : #    undef SWIG_PYTHON_THREADS
     975                 : #  endif
     976                 : #endif
     977                 : #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
     978                 : #  if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
     979                 : #    if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
     980                 : #      define SWIG_PYTHON_USE_GIL
     981                 : #    endif
     982                 : #  endif
     983                 : #  if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
     984                 : #    ifndef SWIG_PYTHON_INITIALIZE_THREADS
     985                 : #     define SWIG_PYTHON_INITIALIZE_THREADS  PyEval_InitThreads() 
     986                 : #    endif
     987                 : #    ifdef __cplusplus /* C++ code */
     988                 :        class SWIG_Python_Thread_Block {
     989                 :          bool status;
     990                 :          PyGILState_STATE state;
     991                 :        public:
     992                 :          void end() { if (status) { PyGILState_Release(state); status = false;} }
     993                 :          SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
     994                 :          ~SWIG_Python_Thread_Block() { end(); }
     995                 :        };
     996                 :        class SWIG_Python_Thread_Allow {
     997                 :          bool status;
     998                 :          PyThreadState *save;
     999                 :        public:
    1000                 :          void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
    1001                 :          SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
    1002                 :          ~SWIG_Python_Thread_Allow() { end(); }
    1003                 :        };
    1004                 : #      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   SWIG_Python_Thread_Block _swig_thread_block
    1005                 : #      define SWIG_PYTHON_THREAD_END_BLOCK     _swig_thread_block.end()
    1006                 : #      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   SWIG_Python_Thread_Allow _swig_thread_allow
    1007                 : #      define SWIG_PYTHON_THREAD_END_ALLOW     _swig_thread_allow.end()
    1008                 : #    else /* C code */
    1009                 : #      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
    1010                 : #      define SWIG_PYTHON_THREAD_END_BLOCK     PyGILState_Release(_swig_thread_block)
    1011                 : #      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   PyThreadState *_swig_thread_allow = PyEval_SaveThread()
    1012                 : #      define SWIG_PYTHON_THREAD_END_ALLOW     PyEval_RestoreThread(_swig_thread_allow)
    1013                 : #    endif
    1014                 : #  else /* Old thread way, not implemented, user must provide it */
    1015                 : #    if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
    1016                 : #      define SWIG_PYTHON_INITIALIZE_THREADS
    1017                 : #    endif
    1018                 : #    if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
    1019                 : #      define SWIG_PYTHON_THREAD_BEGIN_BLOCK
    1020                 : #    endif
    1021                 : #    if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
    1022                 : #      define SWIG_PYTHON_THREAD_END_BLOCK
    1023                 : #    endif
    1024                 : #    if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
    1025                 : #      define SWIG_PYTHON_THREAD_BEGIN_ALLOW
    1026                 : #    endif
    1027                 : #    if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
    1028                 : #      define SWIG_PYTHON_THREAD_END_ALLOW
    1029                 : #    endif
    1030                 : #  endif
    1031                 : #else /* No thread support */
    1032                 : #  define SWIG_PYTHON_INITIALIZE_THREADS
    1033                 : #  define SWIG_PYTHON_THREAD_BEGIN_BLOCK
    1034                 : #  define SWIG_PYTHON_THREAD_END_BLOCK
    1035                 : #  define SWIG_PYTHON_THREAD_BEGIN_ALLOW
    1036                 : #  define SWIG_PYTHON_THREAD_END_ALLOW
    1037                 : #endif
    1038                 : 
    1039                 : /* -----------------------------------------------------------------------------
    1040                 :  * Python API portion that goes into the runtime
    1041                 :  * ----------------------------------------------------------------------------- */
    1042                 : 
    1043                 : #ifdef __cplusplus
    1044                 : extern "C" {
    1045                 : #if 0
    1046                 : } /* cc-mode */
    1047                 : #endif
    1048                 : #endif
    1049                 : 
    1050                 : /* -----------------------------------------------------------------------------
    1051                 :  * Constant declarations
    1052                 :  * ----------------------------------------------------------------------------- */
    1053                 : 
    1054                 : /* Constant Types */
    1055                 : #define SWIG_PY_POINTER 4
    1056                 : #define SWIG_PY_BINARY  5
    1057                 : 
    1058                 : /* Constant information structure */
    1059                 : typedef struct swig_const_info {
    1060                 :   int type;
    1061                 :   char *name;
    1062                 :   long lvalue;
    1063                 :   double dvalue;
    1064                 :   void   *pvalue;
    1065                 :   swig_type_info **ptype;
    1066                 : } swig_const_info;
    1067                 : 
    1068                 : 
    1069                 : /* -----------------------------------------------------------------------------
    1070                 :  * Wrapper of PyInstanceMethod_New() used in Python 3
    1071                 :  * It is exported to the generated module, used for -fastproxy
    1072                 :  * ----------------------------------------------------------------------------- */
    1073               0 : SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func)
    1074                 : {
    1075                 : #if PY_VERSION_HEX >= 0x03000000
    1076                 :   return PyInstanceMethod_New(func);
    1077                 : #else
    1078               0 :   return NULL;
    1079                 : #endif
    1080                 : }
    1081                 : 
    1082                 : #ifdef __cplusplus
    1083                 : #if 0
    1084                 : { /* cc-mode */
    1085                 : #endif
    1086                 : }
    1087                 : #endif
    1088                 : 
    1089                 : 
    1090                 : /* -----------------------------------------------------------------------------
    1091                 :  * See the LICENSE file for information on copyright, usage and redistribution
    1092                 :  * of SWIG, and the README file for authors - http://www.swig.org/release.html.
    1093                 :  *
    1094                 :  * pyrun.swg
    1095                 :  *
    1096                 :  * This file contains the runtime support for Python modules
    1097                 :  * and includes code for managing global variables and pointer
    1098                 :  * type checking.
    1099                 :  *
    1100                 :  * ----------------------------------------------------------------------------- */
    1101                 : 
    1102                 : /* Common SWIG API */
    1103                 : 
    1104                 : /* for raw pointers */
    1105                 : #define SWIG_Python_ConvertPtr(obj, pptr, type, flags)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
    1106                 : #define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Python_ConvertPtr(obj, pptr, type, flags)
    1107                 : #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
    1108                 : #define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(ptr, type, flags)
    1109                 : #define SWIG_CheckImplicit(ty)                          SWIG_Python_CheckImplicit(ty) 
    1110                 : #define SWIG_AcquirePtr(ptr, src)                       SWIG_Python_AcquirePtr(ptr, src)
    1111                 : #define swig_owntype                                    int
    1112                 : 
    1113                 : /* for raw packed data */
    1114                 : #define SWIG_ConvertPacked(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
    1115                 : #define SWIG_NewPackedObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)
    1116                 : 
    1117                 : /* for class or struct pointers */
    1118                 : #define SWIG_ConvertInstance(obj, pptr, type, flags)    SWIG_ConvertPtr(obj, pptr, type, flags)
    1119                 : #define SWIG_NewInstanceObj(ptr, type, flags)           SWIG_NewPointerObj(ptr, type, flags)
    1120                 : 
    1121                 : /* for C or C++ function pointers */
    1122                 : #define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
    1123                 : #define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_Python_NewPointerObj(ptr, type, 0)
    1124                 : 
    1125                 : /* for C++ member pointers, ie, member methods */
    1126                 : #define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
    1127                 : #define SWIG_NewMemberObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)
    1128                 : 
    1129                 : 
    1130                 : /* Runtime API */
    1131                 : 
    1132                 : #if PY_VERSION_HEX >= 0x03020000
    1133                 : #define SWIG_PYTHON_USE_CAPSULE
    1134                 : #endif
    1135                 : 
    1136                 : #define SWIG_GetModule(clientdata)                      SWIG_Python_GetModule()
    1137                 : #define SWIG_SetModule(clientdata, pointer)             SWIG_Python_SetModule(pointer)
    1138                 : #define SWIG_NewClientData(obj)                         SwigPyClientData_New(obj)
    1139                 : 
    1140                 : #define SWIG_SetErrorObj                                SWIG_Python_SetErrorObj                            
    1141                 : #define SWIG_SetErrorMsg                          SWIG_Python_SetErrorMsg          
    1142                 : #define SWIG_ErrorType(code)                      SWIG_Python_ErrorType(code)                        
    1143                 : #define SWIG_Error(code, msg)               SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) 
    1144                 : #define SWIG_fail                           goto fail            
    1145                 : 
    1146                 : 
    1147                 : /* Runtime API implementation */
    1148                 : 
    1149                 : /* Error manipulation */
    1150                 : 
    1151                 : SWIGINTERN void 
    1152                 : SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
    1153                 :   SWIG_PYTHON_THREAD_BEGIN_BLOCK; 
    1154                 :   PyErr_SetObject(errtype, obj);
    1155                 :   Py_DECREF(obj);
    1156                 :   SWIG_PYTHON_THREAD_END_BLOCK;
    1157                 : }
    1158                 : 
    1159                 : SWIGINTERN void 
    1160                 : SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
    1161                 :   SWIG_PYTHON_THREAD_BEGIN_BLOCK;
    1162               1 :   PyErr_SetString(errtype, (char *) msg);
    1163                 :   SWIG_PYTHON_THREAD_END_BLOCK;
    1164                 : }
    1165                 : 
    1166                 : #define SWIG_Python_Raise(obj, type, desc)  SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
    1167                 : 
    1168                 : /* Set a constant value */
    1169                 : 
    1170                 : SWIGINTERN void
    1171              18 : SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {   
    1172              18 :   PyDict_SetItemString(d, (char*) name, obj);
    1173              18 :   Py_DECREF(obj);                            
    1174              18 : }
    1175                 : 
    1176                 : /* Append a value to the result obj */
    1177                 : 
    1178                 : SWIGINTERN PyObject*
    1179            2507 : SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
    1180                 : #if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
    1181            2507 :   if (!result) {
    1182              65 :     result = obj;
    1183            2442 :   } else if (result == Py_None) {
    1184            2194 :     Py_DECREF(result);
    1185            2194 :     result = obj;
    1186                 :   } else {
    1187             248 :     if (!PyList_Check(result)) {
    1188             115 :       PyObject *o2 = result;
    1189             115 :       result = PyList_New(1);
    1190             115 :       PyList_SetItem(result, 0, o2);
    1191                 :     }
    1192             248 :     PyList_Append(result,obj);
    1193             248 :     Py_DECREF(obj);
    1194                 :   }
    1195            2507 :   return result;
    1196                 : #else
    1197                 :   PyObject*   o2;
    1198                 :   PyObject*   o3;
    1199                 :   if (!result) {
    1200                 :     result = obj;
    1201                 :   } else if (result == Py_None) {
    1202                 :     Py_DECREF(result);
    1203                 :     result = obj;
    1204                 :   } else {
    1205                 :     if (!PyTuple_Check(result)) {
    1206                 :       o2 = result;
    1207                 :       result = PyTuple_New(1);
    1208                 :       PyTuple_SET_ITEM(result, 0, o2);
    1209                 :     }
    1210                 :     o3 = PyTuple_New(1);
    1211                 :     PyTuple_SET_ITEM(o3, 0, obj);
    1212                 :     o2 = result;
    1213                 :     result = PySequence_Concat(o2, o3);
    1214                 :     Py_DECREF(o2);
    1215                 :     Py_DECREF(o3);
    1216                 :   }
    1217                 :   return result;
    1218                 : #endif
    1219                 : }
    1220                 : 
    1221                 : /* Unpack the argument tuple */
    1222                 : 
    1223                 : SWIGINTERN int
    1224                 : SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
    1225                 : {
    1226                 :   if (!args) {
    1227                 :     if (!min && !max) {
    1228                 :       return 1;
    1229                 :     } else {
    1230                 :       PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", 
    1231                 :        name, (min == max ? "" : "at least "), (int)min);
    1232                 :       return 0;
    1233                 :     }
    1234                 :   }  
    1235                 :   if (!PyTuple_Check(args)) {
    1236                 :     PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
    1237                 :     return 0;
    1238                 :   } else {
    1239                 :     register Py_ssize_t l = PyTuple_GET_SIZE(args);
    1240                 :     if (l < min) {
    1241                 :       PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
    1242                 :        name, (min == max ? "" : "at least "), (int)min, (int)l);
    1243                 :       return 0;
    1244                 :     } else if (l > max) {
    1245                 :       PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
    1246                 :        name, (min == max ? "" : "at most "), (int)max, (int)l);
    1247                 :       return 0;
    1248                 :     } else {
    1249                 :       register int i;
    1250                 :       for (i = 0; i < l; ++i) {
    1251                 :   objs[i] = PyTuple_GET_ITEM(args, i);
    1252                 :       }
    1253                 :       for (; l < max; ++l) {
    1254                 :   objs[l] = 0;
    1255                 :       }
    1256                 :       return i + 1;
    1257                 :     }    
    1258                 :   }
    1259                 : }
    1260                 : 
    1261                 : /* A functor is a function object with one single object argument */
    1262                 : #if PY_VERSION_HEX >= 0x02020000
    1263                 : #define SWIG_Python_CallFunctor(functor, obj)         PyObject_CallFunctionObjArgs(functor, obj, NULL);
    1264                 : #else
    1265                 : #define SWIG_Python_CallFunctor(functor, obj)         PyObject_CallFunction(functor, "O", obj);
    1266                 : #endif
    1267                 : 
    1268                 : /*
    1269                 :   Helper for static pointer initialization for both C and C++ code, for example
    1270                 :   static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
    1271                 : */
    1272                 : #ifdef __cplusplus
    1273                 : #define SWIG_STATIC_POINTER(var)  var
    1274                 : #else
    1275                 : #define SWIG_STATIC_POINTER(var)  var = 0; if (!var) var
    1276                 : #endif
    1277                 : 
    1278                 : /* -----------------------------------------------------------------------------
    1279                 :  * Pointer declarations
    1280                 :  * ----------------------------------------------------------------------------- */
    1281                 : 
    1282                 : /* Flags for new pointer objects */
    1283                 : #define SWIG_POINTER_NOSHADOW       (SWIG_POINTER_OWN      << 1)
    1284                 : #define SWIG_POINTER_NEW            (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
    1285                 : 
    1286                 : #define SWIG_POINTER_IMPLICIT_CONV  (SWIG_POINTER_DISOWN   << 1)
    1287                 : 
    1288                 : #ifdef __cplusplus
    1289                 : extern "C" {
    1290                 : #if 0
    1291                 : } /* cc-mode */
    1292                 : #endif
    1293                 : #endif
    1294                 : 
    1295                 : /*  How to access Py_None */
    1296                 : #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
    1297                 : #  ifndef SWIG_PYTHON_NO_BUILD_NONE
    1298                 : #    ifndef SWIG_PYTHON_BUILD_NONE
    1299                 : #      define SWIG_PYTHON_BUILD_NONE
    1300                 : #    endif
    1301                 : #  endif
    1302                 : #endif
    1303                 : 
    1304                 : #ifdef SWIG_PYTHON_BUILD_NONE
    1305                 : #  ifdef Py_None
    1306                 : #   undef Py_None
    1307                 : #   define Py_None SWIG_Py_None()
    1308                 : #  endif
    1309                 : SWIGRUNTIMEINLINE PyObject * 
    1310                 : _SWIG_Py_None(void)
    1311                 : {
    1312                 :   PyObject *none = Py_BuildValue((char*)"");
    1313                 :   Py_DECREF(none);
    1314                 :   return none;
    1315                 : }
    1316                 : SWIGRUNTIME PyObject * 
    1317                 : SWIG_Py_None(void)
    1318                 : {
    1319                 :   static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
    1320                 :   return none;
    1321                 : }
    1322                 : #endif
    1323                 : 
    1324                 : /* The python void return value */
    1325                 : 
    1326                 : SWIGRUNTIMEINLINE PyObject * 
    1327                 : SWIG_Py_Void(void)
    1328                 : {
    1329           31003 :   PyObject *none = Py_None;
    1330           31003 :   Py_INCREF(none);
    1331           31003 :   return none;
    1332                 : }
    1333                 : 
    1334                 : /* SwigPyClientData */
    1335                 : 
    1336                 : typedef struct {
    1337                 :   PyObject *klass;
    1338                 :   PyObject *newraw;
    1339                 :   PyObject *newargs;
    1340                 :   PyObject *destroy;
    1341                 :   int delargs;
    1342                 :   int implicitconv;
    1343                 : } SwigPyClientData;
    1344                 : 
    1345                 : SWIGRUNTIMEINLINE int 
    1346                 : SWIG_Python_CheckImplicit(swig_type_info *ty)
    1347                 : {
    1348                 :   SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
    1349                 :   return data ? data->implicitconv : 0;
    1350                 : }
    1351                 : 
    1352                 : SWIGRUNTIMEINLINE PyObject *
    1353                 : SWIG_Python_ExceptionType(swig_type_info *desc) {
    1354                 :   SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
    1355                 :   PyObject *klass = data ? data->klass : 0;
    1356                 :   return (klass ? klass : PyExc_RuntimeError);
    1357                 : }
    1358                 : 
    1359                 : 
    1360                 : SWIGRUNTIME SwigPyClientData * 
    1361              66 : SwigPyClientData_New(PyObject* obj)
    1362                 : {
    1363              66 :   if (!obj) {
    1364               0 :     return 0;
    1365                 :   } else {
    1366              66 :     SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
    1367                 :     /* the klass element */
    1368              66 :     data->klass = obj;
    1369              66 :     Py_INCREF(data->klass);
    1370                 :     /* the newraw method and newargs arguments used to create a new raw instance */
    1371              66 :     if (PyClass_Check(obj)) {
    1372               0 :       data->newraw = 0;
    1373               0 :       data->newargs = obj;
    1374               0 :       Py_INCREF(obj);
    1375                 :     } else {
    1376                 : #if (PY_VERSION_HEX < 0x02020000)
    1377                 :       data->newraw = 0;
    1378                 : #else
    1379              66 :       data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
    1380                 : #endif
    1381              66 :       if (data->newraw) {
    1382              66 :   Py_INCREF(data->newraw);
    1383              66 :   data->newargs = PyTuple_New(1);
    1384              66 :   PyTuple_SetItem(data->newargs, 0, obj);
    1385                 :       } else {
    1386               0 :   data->newargs = obj;
    1387                 :       }
    1388              66 :       Py_INCREF(data->newargs);
    1389                 :     }
    1390                 :     /* the destroy method, aka as the C++ delete method */
    1391              66 :     data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
    1392              66 :     if (PyErr_Occurred()) {
    1393              18 :       PyErr_Clear();
    1394              18 :       data->destroy = 0;
    1395                 :     }
    1396              66 :     if (data->destroy) {
    1397                 :       int flags;
    1398              48 :       Py_INCREF(data->destroy);
    1399              48 :       flags = PyCFunction_GET_FLAGS(data->destroy);
    1400                 : #ifdef METH_O
    1401              48 :       data->delargs = !(flags & (METH_O));
    1402                 : #else
    1403                 :       data->delargs = 0;
    1404                 : #endif
    1405                 :     } else {
    1406              18 :       data->delargs = 0;
    1407                 :     }
    1408              66 :     data->implicitconv = 0;
    1409              66 :     return data;
    1410                 :   }
    1411                 : }
    1412                 : 
    1413                 : SWIGRUNTIME void 
    1414                 : SwigPyClientData_Del(SwigPyClientData* data)
    1415                 : {
    1416              68 :   Py_XDECREF(data->newraw);
    1417              68 :   Py_XDECREF(data->newargs);
    1418              68 :   Py_XDECREF(data->destroy);
    1419                 : }
    1420                 : 
    1421                 : /* =============== SwigPyObject =====================*/
    1422                 : 
    1423                 : typedef struct {
    1424                 :   PyObject_HEAD
    1425                 :   void *ptr;
    1426                 :   swig_type_info *ty;
    1427                 :   int own;
    1428                 :   PyObject *next;
    1429                 : } SwigPyObject;
    1430                 : 
    1431                 : SWIGRUNTIME PyObject *
    1432               0 : SwigPyObject_long(SwigPyObject *v)
    1433                 : {
    1434               0 :   return PyLong_FromVoidPtr(v->ptr);
    1435                 : }
    1436                 : 
    1437                 : SWIGRUNTIME PyObject *
    1438               0 : SwigPyObject_format(const char* fmt, SwigPyObject *v)
    1439                 : {
    1440               0 :   PyObject *res = NULL;
    1441               0 :   PyObject *args = PyTuple_New(1);
    1442               0 :   if (args) {
    1443               0 :     if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
    1444               0 :       PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
    1445               0 :       if (ofmt) {
    1446                 : #if PY_VERSION_HEX >= 0x03000000
    1447                 :   res = PyUnicode_Format(ofmt,args);
    1448                 : #else
    1449               0 :   res = PyString_Format(ofmt,args);
    1450                 : #endif
    1451               0 :   Py_DECREF(ofmt);
    1452                 :       }
    1453               0 :       Py_DECREF(args);
    1454                 :     }
    1455                 :   }
    1456               0 :   return res;
    1457                 : }
    1458                 : 
    1459                 : SWIGRUNTIME PyObject *
    1460               0 : SwigPyObject_oct(SwigPyObject *v)
    1461                 : {
    1462               0 :   return SwigPyObject_format("%o",v);
    1463                 : }
    1464                 : 
    1465                 : SWIGRUNTIME PyObject *
    1466               0 : SwigPyObject_hex(SwigPyObject *v)
    1467                 : {
    1468               0 :   return SwigPyObject_format("%x",v);
    1469                 : }
    1470                 : 
    1471                 : SWIGRUNTIME PyObject *
    1472                 : #ifdef METH_NOARGS
    1473               0 : SwigPyObject_repr(SwigPyObject *v)
    1474                 : #else
    1475                 : SwigPyObject_repr(SwigPyObject *v, PyObject *args)
    1476                 : #endif
    1477                 : {
    1478               0 :   const char *name = SWIG_TypePrettyName(v->ty);
    1479               0 :   PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", name, v);
    1480               0 :   if (v->next) {
    1481                 : #ifdef METH_NOARGS
    1482               0 :     PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
    1483                 : #else
    1484                 :     PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
    1485                 : #endif
    1486                 : #if PY_VERSION_HEX >= 0x03000000
    1487                 :     PyObject *joined = PyUnicode_Concat(repr, nrep);
    1488                 :     Py_DecRef(repr);
    1489                 :     Py_DecRef(nrep);
    1490                 :     repr = joined;
    1491                 : #else
    1492               0 :     PyString_ConcatAndDel(&repr,nrep);
    1493                 : #endif
    1494                 :   }
    1495               0 :   return repr;  
    1496                 : }
    1497                 : 
    1498                 : SWIGRUNTIME int
    1499               0 : SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
    1500                 : {
    1501                 :   char *str;
    1502                 : #ifdef METH_NOARGS
    1503               0 :   PyObject *repr = SwigPyObject_repr(v);
    1504                 : #else
    1505                 :   PyObject *repr = SwigPyObject_repr(v, NULL);
    1506                 : #endif
    1507               0 :   if (repr) {
    1508               0 :     str = SWIG_Python_str_AsChar(repr); 
    1509               0 :     fputs(str, fp);
    1510                 :     SWIG_Python_str_DelForPy3(str);
    1511               0 :     Py_DECREF(repr);
    1512               0 :     return 0; 
    1513                 :   } else {
    1514               0 :     return 1; 
    1515                 :   }
    1516                 : }
    1517                 : 
    1518                 : SWIGRUNTIME PyObject *
    1519               0 : SwigPyObject_str(SwigPyObject *v)
    1520                 : {
    1521                 :   char result[SWIG_BUFFER_SIZE];
    1522                 :   return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
    1523               0 :     SWIG_Python_str_FromChar(result) : 0;
    1524                 : }
    1525                 : 
    1526                 : SWIGRUNTIME int
    1527               0 : SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
    1528                 : {
    1529               0 :   void *i = v->ptr;
    1530               0 :   void *j = w->ptr;
    1531               0 :   return (i < j) ? -1 : ((i > j) ? 1 : 0);
    1532                 : }
    1533                 : 
    1534                 : /* Added for Python 3.x, would it also be useful for Python 2.x? */
    1535                 : SWIGRUNTIME PyObject*
    1536               0 : SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
    1537                 : {
    1538                 :   PyObject* res;
    1539               0 :   if( op != Py_EQ && op != Py_NE ) {
    1540               0 :     Py_INCREF(Py_NotImplemented);
    1541               0 :     return Py_NotImplemented;
    1542                 :   }
    1543               0 :   if( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) )
    1544               0 :     res = Py_True;
    1545                 :   else
    1546               0 :     res = Py_False;
    1547               0 :   Py_INCREF(res);
    1548               0 :   return res;  
    1549                 : }
    1550                 : 
    1551                 : 
    1552                 : SWIGRUNTIME PyTypeObject* _PySwigObject_type(void);
    1553                 : 
    1554                 : SWIGRUNTIME PyTypeObject*
    1555         2663113 : SwigPyObject_type(void) {
    1556         2663113 :   static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type();
    1557         2663113 :   return type;
    1558                 : }
    1559                 : 
    1560                 : SWIGRUNTIMEINLINE int
    1561         2210275 : SwigPyObject_Check(PyObject *op) {
    1562                 :   return (Py_TYPE(op) == SwigPyObject_type())
    1563         2210275 :     || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
    1564                 : }
    1565                 : 
    1566                 : SWIGRUNTIME PyObject *
    1567                 : SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
    1568                 : 
    1569                 : SWIGRUNTIME void
    1570          226419 : SwigPyObject_dealloc(PyObject *v)
    1571                 : {
    1572          226419 :   SwigPyObject *sobj = (SwigPyObject *) v;
    1573          226419 :   PyObject *next = sobj->next;
    1574          226419 :   if (sobj->own == SWIG_POINTER_OWN) {
    1575           23554 :     swig_type_info *ty = sobj->ty;
    1576           23554 :     SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
    1577           23554 :     PyObject *destroy = data ? data->destroy : 0;
    1578           23554 :     if (destroy) {
    1579                 :       /* destroy is always a VARARGS method */
    1580                 :       PyObject *res;
    1581           23554 :       if (data->delargs) {
    1582                 :   /* we need to create a temporary object to carry the destroy operation */
    1583           23554 :   PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
    1584           23554 :   res = SWIG_Python_CallFunctor(destroy, tmp);
    1585           23554 :   Py_DECREF(tmp);
    1586                 :       } else {
    1587               0 :   PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
    1588               0 :   PyObject *mself = PyCFunction_GET_SELF(destroy);
    1589               0 :   res = ((*meth)(mself, v));
    1590                 :       }
    1591           23554 :       Py_XDECREF(res);
    1592                 :     } 
    1593                 : #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
    1594                 :     else {
    1595               0 :       const char *name = SWIG_TypePrettyName(ty);
    1596               0 :       printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
    1597                 :     }
    1598                 : #endif
    1599                 :   } 
    1600          226419 :   Py_XDECREF(next);
    1601          226419 :   PyObject_DEL(v);
    1602          226419 : }
    1603                 : 
    1604                 : SWIGRUNTIME PyObject* 
    1605               0 : SwigPyObject_append(PyObject* v, PyObject* next)
    1606                 : {
    1607               0 :   SwigPyObject *sobj = (SwigPyObject *) v;
    1608                 : #ifndef METH_O
    1609                 :   PyObject *tmp = 0;
    1610                 :   if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
    1611                 :   next = tmp;
    1612                 : #endif
    1613               0 :   if (!SwigPyObject_Check(next)) {
    1614               0 :     return NULL;
    1615                 :   }
    1616               0 :   sobj->next = next;
    1617               0 :   Py_INCREF(next);
    1618               0 :   return SWIG_Py_Void();
    1619                 : }
    1620                 : 
    1621                 : SWIGRUNTIME PyObject* 
    1622                 : #ifdef METH_NOARGS
    1623               0 : SwigPyObject_next(PyObject* v)
    1624                 : #else
    1625                 : SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
    1626                 : #endif
    1627                 : {
    1628               0 :   SwigPyObject *sobj = (SwigPyObject *) v;
    1629               0 :   if (sobj->next) {    
    1630               0 :     Py_INCREF(sobj->next);
    1631               0 :     return sobj->next;
    1632                 :   } else {
    1633               0 :     return SWIG_Py_Void();
    1634                 :   }
    1635                 : }
    1636                 : 
    1637                 : SWIGINTERN PyObject*
    1638                 : #ifdef METH_NOARGS
    1639               0 : SwigPyObject_disown(PyObject *v)
    1640                 : #else
    1641                 : SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
    1642                 : #endif
    1643                 : {
    1644               0 :   SwigPyObject *sobj = (SwigPyObject *)v;
    1645               0 :   sobj->own = 0;
    1646               0 :   return SWIG_Py_Void();
    1647                 : }
    1648                 : 
    1649                 : SWIGINTERN PyObject*
    1650                 : #ifdef METH_NOARGS
    1651               0 : SwigPyObject_acquire(PyObject *v)
    1652                 : #else
    1653                 : SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
    1654                 : #endif
    1655                 : {
    1656               0 :   SwigPyObject *sobj = (SwigPyObject *)v;
    1657               0 :   sobj->own = SWIG_POINTER_OWN;
    1658               0 :   return SWIG_Py_Void();
    1659                 : }
    1660                 : 
    1661                 : SWIGINTERN PyObject*
    1662               0 : SwigPyObject_own(PyObject *v, PyObject *args)
    1663                 : {
    1664               0 :   PyObject *val = 0;
    1665                 : #if (PY_VERSION_HEX < 0x02020000)
    1666                 :   if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
    1667                 : #else
    1668               0 :   if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) 
    1669                 : #endif
    1670                 :     {
    1671               0 :       return NULL;
    1672                 :     } 
    1673                 :   else
    1674                 :     {
    1675               0 :       SwigPyObject *sobj = (SwigPyObject *)v;
    1676               0 :       PyObject *obj = PyBool_FromLong(sobj->own);
    1677               0 :       if (val) {
    1678                 : #ifdef METH_NOARGS
    1679               0 :   if (PyObject_IsTrue(val)) {
    1680                 :     SwigPyObject_acquire(v);
    1681                 :   } else {
    1682                 :     SwigPyObject_disown(v);
    1683                 :   }
    1684                 : #else
    1685                 :   if (PyObject_IsTrue(val)) {
    1686                 :     SwigPyObject_acquire(v,args);
    1687                 :   } else {
    1688                 :     SwigPyObject_disown(v,args);
    1689                 :   }
    1690                 : #endif
    1691                 :       } 
    1692               0 :       return obj;
    1693                 :     }
    1694                 : }
    1695                 : 
    1696                 : #ifdef METH_O
    1697                 : static PyMethodDef
    1698                 : swigobject_methods[] = {
    1699                 :   {(char *)"disown",  (PyCFunction)SwigPyObject_disown,  METH_NOARGS,  (char *)"releases ownership of the pointer"},
    1700                 :   {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS,  (char *)"aquires ownership of the pointer"},
    1701                 :   {(char *)"own",     (PyCFunction)SwigPyObject_own,     METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
    1702                 :   {(char *)"append",  (PyCFunction)SwigPyObject_append,  METH_O,       (char *)"appends another 'this' object"},
    1703                 :   {(char *)"next",    (PyCFunction)SwigPyObject_next,    METH_NOARGS,  (char *)"returns the next 'this' object"},
    1704                 :   {(char *)"__repr__",(PyCFunction)SwigPyObject_repr,    METH_NOARGS,  (char *)"returns object representation"},
    1705                 :   {0, 0, 0, 0}  
    1706                 : };
    1707                 : #else
    1708                 : static PyMethodDef
    1709                 : swigobject_methods[] = {
    1710                 :   {(char *)"disown",  (PyCFunction)SwigPyObject_disown,  METH_VARARGS,  (char *)"releases ownership of the pointer"},
    1711                 :   {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS,  (char *)"aquires ownership of the pointer"},
    1712                 :   {(char *)"own",     (PyCFunction)SwigPyObject_own,     METH_VARARGS,  (char *)"returns/sets ownership of the pointer"},
    1713                 :   {(char *)"append",  (PyCFunction)SwigPyObject_append,  METH_VARARGS,  (char *)"appends another 'this' object"},
    1714                 :   {(char *)"next",    (PyCFunction)SwigPyObject_next,    METH_VARARGS,  (char *)"returns the next 'this' object"},
    1715                 :   {(char *)"__repr__",(PyCFunction)SwigPyObject_repr,   METH_VARARGS,  (char *)"returns object representation"},
    1716                 :   {0, 0, 0, 0}  
    1717                 : };
    1718                 : #endif
    1719                 : 
    1720                 : #if PY_VERSION_HEX < 0x02020000
    1721                 : SWIGINTERN PyObject *
    1722                 : SwigPyObject_getattr(SwigPyObject *sobj,char *name)
    1723                 : {
    1724                 :   return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
    1725                 : }
    1726                 : #endif
    1727                 : 
    1728                 : SWIGRUNTIME PyTypeObject*
    1729               6 : _PySwigObject_type(void) {
    1730                 :   static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
    1731                 :   
    1732                 :   static PyNumberMethods SwigPyObject_as_number = {
    1733                 :     (binaryfunc)0, /*nb_add*/
    1734                 :     (binaryfunc)0, /*nb_subtract*/
    1735                 :     (binaryfunc)0, /*nb_multiply*/
    1736                 :     /* nb_divide removed in Python 3 */
    1737                 : #if PY_VERSION_HEX < 0x03000000
    1738                 :     (binaryfunc)0, /*nb_divide*/
    1739                 : #endif
    1740                 :     (binaryfunc)0, /*nb_remainder*/
    1741                 :     (binaryfunc)0, /*nb_divmod*/
    1742                 :     (ternaryfunc)0,/*nb_power*/
    1743                 :     (unaryfunc)0,  /*nb_negative*/
    1744                 :     (unaryfunc)0,  /*nb_positive*/
    1745                 :     (unaryfunc)0,  /*nb_absolute*/
    1746                 :     (inquiry)0,    /*nb_nonzero*/
    1747                 :     0,       /*nb_invert*/
    1748                 :     0,       /*nb_lshift*/
    1749                 :     0,       /*nb_rshift*/
    1750                 :     0,       /*nb_and*/
    1751                 :     0,       /*nb_xor*/
    1752                 :     0,       /*nb_or*/
    1753                 : #if PY_VERSION_HEX < 0x03000000
    1754                 :     0,   /*nb_coerce*/
    1755                 : #endif
    1756                 :     (unaryfunc)SwigPyObject_long, /*nb_int*/
    1757                 : #if PY_VERSION_HEX < 0x03000000
    1758                 :     (unaryfunc)SwigPyObject_long, /*nb_long*/
    1759                 : #else
    1760                 :     0, /*nb_reserved*/
    1761                 : #endif
    1762                 :     (unaryfunc)0,                 /*nb_float*/
    1763                 : #if PY_VERSION_HEX < 0x03000000
    1764                 :     (unaryfunc)SwigPyObject_oct,  /*nb_oct*/
    1765                 :     (unaryfunc)SwigPyObject_hex,  /*nb_hex*/
    1766                 : #endif
    1767                 : #if PY_VERSION_HEX >= 0x03000000 /* 3.0 */
    1768                 :     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
    1769                 : #elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
    1770                 :     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
    1771                 : #elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
    1772                 :     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
    1773                 : #elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
    1774                 :     0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
    1775                 : #endif
    1776                 :   };
    1777                 : 
    1778                 :   static PyTypeObject swigpyobject_type;  
    1779                 :   static int type_init = 0;
    1780               6 :   if (!type_init) {
    1781                 :     const PyTypeObject tmp
    1782                 :       = {
    1783                 :   /* PyObject header changed in Python 3 */
    1784                 : #if PY_VERSION_HEX >= 0x03000000
    1785                 :   PyVarObject_HEAD_INIT(&PyType_Type, 0)
    1786                 : #else    
    1787                 :   PyObject_HEAD_INIT(NULL)
    1788                 :   0,            /* ob_size */
    1789                 : #endif
    1790                 :   (char *)"SwigPyObject",       /* tp_name */
    1791                 :   sizeof(SwigPyObject),       /* tp_basicsize */
    1792                 :   0,                  /* tp_itemsize */
    1793                 :   (destructor)SwigPyObject_dealloc,   /* tp_dealloc */
    1794                 :   (printfunc)SwigPyObject_print,      /* tp_print */
    1795                 : #if PY_VERSION_HEX < 0x02020000
    1796                 :   (getattrfunc)SwigPyObject_getattr,  /* tp_getattr */ 
    1797                 : #else
    1798                 :   (getattrfunc)0,         /* tp_getattr */ 
    1799                 : #endif
    1800                 :   (setattrfunc)0,         /* tp_setattr */ 
    1801                 : #if PY_VERSION_HEX >= 0x03000000
    1802                 :     0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
    1803                 : #else
    1804                 :   (cmpfunc)SwigPyObject_compare,      /* tp_compare */
    1805                 : #endif
    1806                 :   (reprfunc)SwigPyObject_repr,      /* tp_repr */    
    1807                 :   &SwigPyObject_as_number,      /* tp_as_number */
    1808                 :   0,            /* tp_as_sequence */
    1809                 :   0,            /* tp_as_mapping */
    1810                 :   (hashfunc)0,          /* tp_hash */
    1811                 :   (ternaryfunc)0,         /* tp_call */
    1812                 :   (reprfunc)SwigPyObject_str,     /* tp_str */
    1813                 :   PyObject_GenericGetAttr,            /* tp_getattro */
    1814                 :   0,            /* tp_setattro */
    1815                 :   0,                        /* tp_as_buffer */
    1816                 :   Py_TPFLAGS_DEFAULT,             /* tp_flags */
    1817                 :   swigobject_doc,               /* tp_doc */        
    1818                 :   0,                                  /* tp_traverse */
    1819                 :   0,                                  /* tp_clear */
    1820                 :   (richcmpfunc)SwigPyObject_richcompare,           /* tp_richcompare */
    1821                 :   0,                                  /* tp_weaklistoffset */
    1822                 : #if PY_VERSION_HEX >= 0x02020000
    1823                 :   0,                                  /* tp_iter */
    1824                 :   0,                                  /* tp_iternext */
    1825                 :   swigobject_methods,       /* tp_methods */ 
    1826                 :   0,                  /* tp_members */
    1827                 :   0,            /* tp_getset */       
    1828                 :   0,                  /* tp_base */         
    1829                 :   0,            /* tp_dict */       
    1830                 :   0,            /* tp_descr_get */    
    1831                 :   0,            /* tp_descr_set */    
    1832                 :   0,            /* tp_dictoffset */   
    1833                 :   0,            /* tp_init */       
    1834                 :   0,            /* tp_alloc */        
    1835                 :   0,                  /* tp_new */        
    1836                 :   0,                              /* tp_free */    
    1837                 :   0,                                  /* tp_is_gc */  
    1838                 :   0,            /* tp_bases */   
    1839                 :   0,            /* tp_mro */
    1840                 :   0,            /* tp_cache */   
    1841                 :   0,            /* tp_subclasses */
    1842                 :   0,            /* tp_weaklist */
    1843                 : #endif
    1844                 : #if PY_VERSION_HEX >= 0x02030000
    1845                 :   0,                                  /* tp_del */
    1846                 : #endif
    1847                 : #ifdef COUNT_ALLOCS
    1848                 :   0,0,0,0                             /* tp_alloc -> tp_next */
    1849                 : #endif
    1850               6 :       };
    1851               6 :     swigpyobject_type = tmp;
    1852                 :     /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
    1853                 : #if PY_VERSION_HEX < 0x03000000
    1854               6 :     swigpyobject_type.ob_type = &PyType_Type;
    1855                 : #endif
    1856               6 :     type_init = 1;
    1857                 :   }
    1858               6 :   return &swigpyobject_type;
    1859                 : }
    1860                 : 
    1861                 : SWIGRUNTIME PyObject *
    1862          226419 : SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
    1863                 : {
    1864          226419 :   SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
    1865          226419 :   if (sobj) {
    1866          226419 :     sobj->ptr  = ptr;
    1867          226419 :     sobj->ty   = ty;
    1868          226419 :     sobj->own  = own;
    1869          226419 :     sobj->next = 0;
    1870                 :   }
    1871          226419 :   return (PyObject *)sobj;
    1872                 : }
    1873                 : 
    1874                 : /* -----------------------------------------------------------------------------
    1875                 :  * Implements a simple Swig Packed type, and use it instead of string
    1876                 :  * ----------------------------------------------------------------------------- */
    1877                 : 
    1878                 : typedef struct {
    1879                 :   PyObject_HEAD
    1880                 :   void *pack;
    1881                 :   swig_type_info *ty;
    1882                 :   size_t size;
    1883                 : } SwigPyPacked;
    1884                 : 
    1885                 : SWIGRUNTIME int
    1886               0 : SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
    1887                 : {
    1888                 :   char result[SWIG_BUFFER_SIZE];
    1889               0 :   fputs("<Swig Packed ", fp); 
    1890               0 :   if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
    1891               0 :     fputs("at ", fp); 
    1892               0 :     fputs(result, fp); 
    1893                 :   }
    1894               0 :   fputs(v->ty->name,fp); 
    1895               0 :   fputs(">", fp);
    1896               0 :   return 0; 
    1897                 : }
    1898                 :   
    1899                 : SWIGRUNTIME PyObject *
    1900               0 : SwigPyPacked_repr(SwigPyPacked *v)
    1901                 : {
    1902                 :   char result[SWIG_BUFFER_SIZE];
    1903               0 :   if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
    1904               0 :     return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
    1905                 :   } else {
    1906               0 :     return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
    1907                 :   }  
    1908                 : }
    1909                 : 
    1910                 : SWIGRUNTIME PyObject *
    1911               0 : SwigPyPacked_str(SwigPyPacked *v)
    1912                 : {
    1913                 :   char result[SWIG_BUFFER_SIZE];
    1914               0 :   if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
    1915               0 :     return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
    1916                 :   } else {
    1917               0 :     return SWIG_Python_str_FromChar(v->ty->name);
    1918                 :   }  
    1919                 : }
    1920                 : 
    1921                 : SWIGRUNTIME int
    1922               0 : SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
    1923                 : {
    1924               0 :   size_t i = v->size;
    1925               0 :   size_t j = w->size;
    1926               0 :   int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
    1927               0 :   return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
    1928                 : }
    1929                 : 
    1930                 : SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void);
    1931                 : 
    1932                 : SWIGRUNTIME PyTypeObject*
    1933               0 : SwigPyPacked_type(void) {
    1934               0 :   static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type();
    1935               0 :   return type;
    1936                 : }
    1937                 : 
    1938                 : SWIGRUNTIMEINLINE int
    1939                 : SwigPyPacked_Check(PyObject *op) {
    1940                 :   return ((op)->ob_type == _PySwigPacked_type()) 
    1941               0 :     || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
    1942                 : }
    1943                 : 
    1944                 : SWIGRUNTIME void
    1945               0 : SwigPyPacked_dealloc(PyObject *v)
    1946                 : {
    1947               0 :   if (SwigPyPacked_Check(v)) {
    1948               0 :     SwigPyPacked *sobj = (SwigPyPacked *) v;
    1949               0 :     free(sobj->pack);
    1950                 :   }
    1951               0 :   PyObject_DEL(v);
    1952               0 : }
    1953                 : 
    1954                 : SWIGRUNTIME PyTypeObject*
    1955               0 : _PySwigPacked_type(void) {
    1956                 :   static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
    1957                 :   static PyTypeObject swigpypacked_type;
    1958                 :   static int type_init = 0;  
    1959               0 :   if (!type_init) {
    1960                 :     const PyTypeObject tmp
    1961                 :       = {
    1962                 :     /* PyObject header changed in Python 3 */
    1963                 : #if PY_VERSION_HEX>=0x03000000
    1964                 :     PyVarObject_HEAD_INIT(&PyType_Type, 0)
    1965                 : #else
    1966                 :   PyObject_HEAD_INIT(NULL)
    1967                 :     0,            /* ob_size */ 
    1968                 : #endif
    1969                 :   (char *)"SwigPyPacked",       /* tp_name */ 
    1970                 :   sizeof(SwigPyPacked),       /* tp_basicsize */  
    1971                 :   0,            /* tp_itemsize */ 
    1972                 :   (destructor)SwigPyPacked_dealloc,   /* tp_dealloc */  
    1973                 :   (printfunc)SwigPyPacked_print,      /* tp_print */    
    1974                 :   (getattrfunc)0,         /* tp_getattr */  
    1975                 :   (setattrfunc)0,         /* tp_setattr */  
    1976                 : #if PY_VERSION_HEX>=0x03000000
    1977                 :     0, /* tp_reserved in 3.0.1 */
    1978                 : #else
    1979                 :     (cmpfunc)SwigPyPacked_compare,      /* tp_compare */
    1980                 : #endif
    1981                 :   (reprfunc)SwigPyPacked_repr,      /* tp_repr */
    1982                 :   0,                              /* tp_as_number */
    1983                 :   0,            /* tp_as_sequence */
    1984                 :   0,            /* tp_as_mapping */
    1985                 :   (hashfunc)0,          /* tp_hash */
    1986                 :   (ternaryfunc)0,         /* tp_call */
    1987                 :   (reprfunc)SwigPyPacked_str,     /* tp_str */
    1988                 :   PyObject_GenericGetAttr,            /* tp_getattro */
    1989                 :   0,            /* tp_setattro */
    1990                 :   0,                        /* tp_as_buffer */
    1991                 :   Py_TPFLAGS_DEFAULT,             /* tp_flags */
    1992                 :   swigpacked_doc,               /* tp_doc */
    1993                 :   0,                                  /* tp_traverse */
    1994                 :   0,                                  /* tp_clear */
    1995                 :   0,                                  /* tp_richcompare */
    1996                 :   0,                                  /* tp_weaklistoffset */
    1997                 : #if PY_VERSION_HEX >= 0x02020000
    1998                 :   0,                                  /* tp_iter */
    1999                 :   0,                                  /* tp_iternext */
    2000                 :   0,                        /* tp_methods */ 
    2001                 :   0,                  /* tp_members */
    2002                 :   0,            /* tp_getset */       
    2003                 :   0,                  /* tp_base */         
    2004                 :   0,            /* tp_dict */       
    2005                 :   0,            /* tp_descr_get */    
    2006                 :   0,            /* tp_descr_set */    
    2007                 :   0,            /* tp_dictoffset */   
    2008                 :   0,            /* tp_init */       
    2009                 :   0,            /* tp_alloc */        
    2010                 :   0,                  /* tp_new */        
    2011                 :   0,                              /* tp_free */    
    2012                 :         0,                                  /* tp_is_gc */  
    2013                 :   0,            /* tp_bases */   
    2014                 :   0,            /* tp_mro */
    2015                 :   0,            /* tp_cache */   
    2016                 :   0,            /* tp_subclasses */
    2017                 :   0,            /* tp_weaklist */
    2018                 : #endif
    2019                 : #if PY_VERSION_HEX >= 0x02030000
    2020                 :   0,                                  /* tp_del */
    2021                 : #endif
    2022                 : #ifdef COUNT_ALLOCS
    2023                 :   0,0,0,0                             /* tp_alloc -> tp_next */
    2024                 : #endif
    2025               0 :       };
    2026               0 :     swigpypacked_type = tmp;
    2027                 :     /* for Python 3 the ob_type already assigned in PyVarObject_HEAD_INIT() */
    2028                 : #if PY_VERSION_HEX < 0x03000000
    2029               0 :     swigpypacked_type.ob_type = &PyType_Type;
    2030                 : #endif
    2031               0 :     type_init = 1;
    2032                 :   }
    2033               0 :   return &swigpypacked_type;
    2034                 : }
    2035                 : 
    2036                 : SWIGRUNTIME PyObject *
    2037               0 : SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
    2038                 : {
    2039               0 :   SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
    2040               0 :   if (sobj) {
    2041               0 :     void *pack = malloc(size);
    2042               0 :     if (pack) {
    2043                 :       memcpy(pack, ptr, size);
    2044               0 :       sobj->pack = pack;
    2045               0 :       sobj->ty   = ty;
    2046               0 :       sobj->size = size;
    2047                 :     } else {
    2048               0 :       PyObject_DEL((PyObject *) sobj);
    2049               0 :       sobj = 0;
    2050                 :     }
    2051                 :   }
    2052               0 :   return (PyObject *) sobj;
    2053                 : }
    2054                 : 
    2055                 : SWIGRUNTIME swig_type_info *
    2056                 : SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
    2057                 : {
    2058                 :   if (SwigPyPacked_Check(obj)) {
    2059                 :     SwigPyPacked *sobj = (SwigPyPacked *)obj;
    2060                 :     if (sobj->size != size) return 0;
    2061                 :     memcpy(ptr, sobj->pack, size);
    2062                 :     return sobj->ty;
    2063                 :   } else {
    2064                 :     return 0;
    2065                 :   }
    2066                 : }
    2067                 : 
    2068                 : /* -----------------------------------------------------------------------------
    2069                 :  * pointers/data manipulation
    2070                 :  * ----------------------------------------------------------------------------- */
    2071                 : 
    2072                 : SWIGRUNTIMEINLINE PyObject *
    2073                 : _SWIG_This(void)
    2074                 : {
    2075               6 :     return SWIG_Python_str_FromChar("this");
    2076                 : }
    2077                 : 
    2078                 : SWIGRUNTIME PyObject *
    2079         1296037 : SWIG_This(void)
    2080                 : {
    2081         1296043 :   static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This();
    2082         1296037 :   return swig_this;
    2083                 : }
    2084                 : 
    2085                 : /* #define SWIG_PYTHON_SLOW_GETSET_THIS */
    2086                 : 
    2087                 : /* TODO: I don't know how to implement the fast getset in Python 3 right now */
    2088                 : #if PY_VERSION_HEX>=0x03000000
    2089                 : #define SWIG_PYTHON_SLOW_GETSET_THIS 
    2090                 : #endif
    2091                 : 
    2092                 : SWIGRUNTIME SwigPyObject *
    2093         1117001 : SWIG_Python_GetSwigThis(PyObject *pyobj) 
    2094                 : {
    2095         1117001 :   if (SwigPyObject_Check(pyobj)) {
    2096           23726 :     return (SwigPyObject *) pyobj;
    2097                 :   } else {
    2098         1093275 :     PyObject *obj = 0;
    2099                 : #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
    2100         1093275 :     if (PyInstance_Check(pyobj)) {
    2101               0 :       obj = _PyInstance_Lookup(pyobj, SWIG_This());      
    2102                 :     } else {
    2103         1093275 :       PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
    2104         1093275 :       if (dictptr != NULL) {
    2105         1093275 :   PyObject *dict = *dictptr;
    2106         1093275 :   obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
    2107                 :       } else {
    2108                 : #ifdef PyWeakref_CheckProxy
    2109               0 :   if (PyWeakref_CheckProxy(pyobj)) {
    2110               0 :     PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
    2111               0 :     return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
    2112                 :   }
    2113                 : #endif
    2114               0 :   obj = PyObject_GetAttr(pyobj,SWIG_This());
    2115               0 :   if (obj) {
    2116               0 :     Py_DECREF(obj);
    2117                 :   } else {
    2118               0 :     if (PyErr_Occurred()) PyErr_Clear();
    2119               0 :     return 0;
    2120                 :   }
    2121                 :       }
    2122                 :     }
    2123                 : #else
    2124                 :     obj = PyObject_GetAttr(pyobj,SWIG_This());
    2125                 :     if (obj) {
    2126                 :       Py_DECREF(obj);
    2127                 :     } else {
    2128                 :       if (PyErr_Occurred()) PyErr_Clear();
    2129                 :       return 0;
    2130                 :     }
    2131                 : #endif
    2132         1093275 :     if (obj && !SwigPyObject_Check(obj)) {
    2133                 :       /* a PyObject is called 'this', try to get the 'real this'
    2134                 :    SwigPyObject from it */ 
    2135               0 :       return SWIG_Python_GetSwigThis(obj);
    2136                 :     }
    2137         1093275 :     return (SwigPyObject *)obj;
    2138                 :   }
    2139                 : }
    2140                 : 
    2141                 : /* Acquire a pointer value */
    2142                 : 
    2143                 : SWIGRUNTIME int
    2144                 : SWIG_Python_AcquirePtr(PyObject *obj, int own) {
    2145                 :   if (own == SWIG_POINTER_OWN) {
    2146                 :     SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
    2147                 :     if (sobj) {
    2148                 :       int oldown = sobj->own;
    2149                 :       sobj->own = own;
    2150                 :       return oldown;
    2151                 :     }
    2152                 :   }
    2153                 :   return 0;
    2154                 : }
    2155                 : 
    2156                 : /* Convert a pointer value */
    2157                 : 
    2158                 : SWIGRUNTIME int
    2159         1117184 : SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
    2160         1117184 :   if (!obj) return SWIG_ERROR;
    2161         1117184 :   if (obj == Py_None) {
    2162             187 :     if (ptr) *ptr = 0;
    2163             187 :     return SWIG_OK;
    2164                 :   } else {
    2165         1116997 :     SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
    2166         1116997 :     if (own)
    2167               0 :       *own = 0;
    2168         1116997 :     while (sobj) {
    2169         1116996 :       void *vptr = sobj->ptr;
    2170         1116996 :       if (ty) {
    2171         1116834 :   swig_type_info *to = sobj->ty;
    2172         1116834 :   if (to == ty) {
    2173                 :     /* no type cast needed */
    2174         1113681 :     if (ptr) *ptr = vptr;
    2175                 :     break;
    2176                 :   } else {
    2177            3153 :     swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
    2178            3153 :     if (!tc) {
    2179               0 :       sobj = (SwigPyObject *)sobj->next;
    2180                 :     } else {
    2181            3153 :       if (ptr) {
    2182            3153 :               int newmemory = 0;
    2183            3153 :               *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
    2184            3153 :               if (newmemory == SWIG_CAST_NEW_MEMORY) {
    2185                 :                 assert(own);
    2186               0 :                 if (own)
    2187               0 :                   *own = *own | SWIG_CAST_NEW_MEMORY;
    2188                 :               }
    2189                 :             }
    2190                 :       break;
    2191                 :     }
    2192                 :   }
    2193                 :       } else {
    2194             162 :   if (ptr) *ptr = vptr;
    2195                 :   break;
    2196                 :       }
    2197                 :     }
    2198         1116997 :     if (sobj) {
    2199         1116996 :       if (own)
    2200               0 :         *own = *own | sobj->own;
    2201         1116996 :       if (flags & SWIG_POINTER_DISOWN) {
    2202           23554 :   sobj->own = 0;
    2203                 :       }
    2204         1116996 :       return SWIG_OK;
    2205                 :     } else {
    2206               1 :       int res = SWIG_ERROR;
    2207               1 :       if (flags & SWIG_POINTER_IMPLICIT_CONV) {
    2208               0 :   SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
    2209               0 :   if (data && !data->implicitconv) {
    2210               0 :     PyObject *klass = data->klass;
    2211               0 :     if (klass) {
    2212                 :       PyObject *impconv;
    2213               0 :       data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
    2214               0 :       impconv = SWIG_Python_CallFunctor(klass, obj);
    2215               0 :       data->implicitconv = 0;
    2216               0 :       if (PyErr_Occurred()) {
    2217               0 :         PyErr_Clear();
    2218               0 :         impconv = 0;
    2219                 :       }
    2220               0 :       if (impconv) {
    2221               0 :         SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
    2222               0 :         if (iobj) {
    2223                 :     void *vptr;
    2224               0 :     res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
    2225               0 :     if (SWIG_IsOK(res)) {
    2226               0 :       if (ptr) {
    2227               0 :         *ptr = vptr;
    2228                 :         /* transfer the ownership to 'ptr' */
    2229               0 :         iobj->own = 0;
    2230               0 :         res = SWIG_AddCast(res);
    2231               0 :         res = SWIG_AddNewMask(res);
    2232                 :       } else {
    2233               0 :         res = SWIG_AddCast(res);        
    2234                 :       }
    2235                 :     }
    2236                 :         }
    2237               0 :         Py_DECREF(impconv);
    2238                 :       }
    2239                 :     }
    2240                 :   }
    2241                 :       }
    2242               1 :       return res;
    2243                 :     }
    2244                 :   }
    2245                 : }
    2246                 : 
    2247                 : /* Convert a function ptr value */
    2248                 : 
    2249                 : SWIGRUNTIME int
    2250                 : SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
    2251                 :   if (!PyCFunction_Check(obj)) {
    2252                 :     return SWIG_ConvertPtr(obj, ptr, ty, 0);
    2253                 :   } else {
    2254                 :     void *vptr = 0;
    2255                 :     
    2256                 :     /* here we get the method pointer for callbacks */
    2257                 :     const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
    2258                 :     const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
    2259                 :     if (desc)
    2260                 :       desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
    2261                 :     if (!desc) 
    2262                 :       return SWIG_ERROR;
    2263                 :     if (ty) {
    2264                 :       swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
    2265                 :       if (tc) {
    2266                 :         int newmemory = 0;
    2267                 :         *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
    2268                 :         assert(!newmemory); /* newmemory handling not yet implemented */
    2269                 :       } else {
    2270                 :         return SWIG_ERROR;
    2271                 :       }
    2272                 :     } else {
    2273                 :       *ptr = vptr;
    2274                 :     }
    2275                 :     return SWIG_OK;
    2276                 :   }
    2277                 : }
    2278                 : 
    2279                 : /* Convert a packed value value */
    2280                 : 
    2281                 : SWIGRUNTIME int
    2282                 : SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
    2283                 :   swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
    2284                 :   if (!to) return SWIG_ERROR;
    2285                 :   if (ty) {
    2286                 :     if (to != ty) {
    2287                 :       /* check type cast? */
    2288                 :       swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
    2289                 :       if (!tc) return SWIG_ERROR;
    2290                 :     }
    2291                 :   }
    2292                 :   return SWIG_OK;
    2293                 : }  
    2294                 : 
    2295                 : /* -----------------------------------------------------------------------------
    2296                 :  * Create a new pointer object
    2297                 :  * ----------------------------------------------------------------------------- */
    2298                 : 
    2299                 : /*
    2300                 :   Create a new instance object, without calling __init__, and set the
    2301                 :   'this' attribute.
    2302                 : */
    2303                 : 
    2304                 : SWIGRUNTIME PyObject* 
    2305          202747 : SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
    2306                 : {
    2307                 : #if (PY_VERSION_HEX >= 0x02020000)
    2308          202747 :   PyObject *inst = 0;
    2309          202747 :   PyObject *newraw = data->newraw;
    2310          202747 :   if (newraw) {
    2311          202747 :     inst = PyObject_Call(newraw, data->newargs, NULL);
    2312          202747 :     if (inst) {
    2313                 : #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
    2314          202747 :       PyObject **dictptr = _PyObject_GetDictPtr(inst);
    2315          202747 :       if (dictptr != NULL) {
    2316          202747 :   PyObject *dict = *dictptr;
    2317          202747 :   if (dict == NULL) {
    2318          202747 :     dict = PyDict_New();
    2319          202747 :     *dictptr = dict;
    2320          202747 :     PyDict_SetItem(dict, SWIG_This(), swig_this);
    2321                 :   }
    2322                 :       }
    2323                 : #else
    2324                 :       PyObject *key = SWIG_This();
    2325                 :       PyObject_SetAttr(inst, key, swig_this);
    2326                 : #endif
    2327                 :     }
    2328                 :   } else {
    2329                 : #if PY_VERSION_HEX >= 0x03000000
    2330                 :     inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
    2331                 :     PyObject_SetAttr(inst, SWIG_This(), swig_this);
    2332                 :     Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
    2333                 : #else
    2334               0 :     PyObject *dict = PyDict_New();
    2335               0 :     PyDict_SetItem(dict, SWIG_This(), swig_this);
    2336               0 :     inst = PyInstance_NewRaw(data->newargs, dict);
    2337               0 :     Py_DECREF(dict);
    2338                 : #endif
    2339                 :   }
    2340          202747 :   return inst;
    2341                 : #else
    2342                 : #if (PY_VERSION_HEX >= 0x02010000)
    2343                 :   PyObject *inst;
    2344                 :   PyObject *dict = PyDict_New();
    2345                 :   PyDict_SetItem(dict, SWIG_This(), swig_this);
    2346                 :   inst = PyInstance_NewRaw(data->newargs, dict);
    2347                 :   Py_DECREF(dict);
    2348                 :   return (PyObject *) inst;
    2349                 : #else
    2350                 :   PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
    2351                 :   if (inst == NULL) {
    2352                 :     return NULL;
    2353                 :   }
    2354                 :   inst->in_class = (PyClassObject *)data->newargs;
    2355                 :   Py_INCREF(inst->in_class);
    2356                 :   inst->in_dict = PyDict_New();
    2357                 :   if (inst->in_dict == NULL) {
    2358                 :     Py_DECREF(inst);
    2359                 :     return NULL;
    2360                 :   }
    2361                 : #ifdef Py_TPFLAGS_HAVE_WEAKREFS
    2362                 :   inst->in_weakreflist = NULL;
    2363                 : #endif
    2364                 : #ifdef Py_TPFLAGS_GC
    2365                 :   PyObject_GC_Init(inst);
    2366                 : #endif
    2367                 :   PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
    2368                 :   return (PyObject *) inst;
    2369                 : #endif
    2370                 : #endif
    2371                 : }
    2372                 : 
    2373                 : SWIGRUNTIME void
    2374                 : SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
    2375                 : {
    2376                 :  PyObject *dict;
    2377                 : #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
    2378                 :  PyObject **dictptr = _PyObject_GetDictPtr(inst);
    2379                 :  if (dictptr != NULL) {
    2380                 :    dict = *dictptr;
    2381                 :    if (dict == NULL) {
    2382                 :      dict = PyDict_New();
    2383                 :      *dictptr = dict;
    2384                 :    }
    2385                 :    PyDict_SetItem(dict, SWIG_This(), swig_this);
    2386                 :    return;
    2387                 :  }
    2388                 : #endif
    2389                 :  dict = PyObject_GetAttrString(inst, (char*)"__dict__");
    2390                 :  PyDict_SetItem(dict, SWIG_This(), swig_this);
    2391                 :  Py_DECREF(dict);
    2392                 : } 
    2393                 : 
    2394                 : 
    2395                 : SWIGINTERN PyObject *
    2396                 : SWIG_Python_InitShadowInstance(PyObject *args) {
    2397                 :   PyObject *obj[2];
    2398                 :   if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) {
    2399                 :     return NULL;
    2400                 :   } else {
    2401                 :     SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
    2402                 :     if (sthis) {
    2403                 :       SwigPyObject_append((PyObject*) sthis, obj[1]);
    2404                 :     } else {
    2405                 :       SWIG_Python_SetSwigThis(obj[0], obj[1]);
    2406                 :     }
    2407                 :     return SWIG_Py_Void();
    2408                 :   }
    2409                 : }
    2410                 : 
    2411                 : /* Create a new pointer object */
    2412                 : 
    2413                 : SWIGRUNTIME PyObject *
    2414          204784 : SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
    2415          204784 :   if (!ptr) {
    2416            1919 :     return SWIG_Py_Void();
    2417                 :   } else {
    2418          202865 :     int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
    2419          202865 :     PyObject *robj = SwigPyObject_New(ptr, type, own);
    2420          202865 :     SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
    2421          202865 :     if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
    2422          202747 :       PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
    2423          202747 :       if (inst) {
    2424          202747 :   Py_DECREF(robj);
    2425          202747 :   robj = inst;
    2426                 :       }
    2427                 :     }
    2428          202865 :     return robj;
    2429                 :   }
    2430                 : }
    2431                 : 
    2432                 : /* Create a new packed object */
    2433                 : 
    2434                 : SWIGRUNTIMEINLINE PyObject *
    2435                 : SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
    2436               0 :   return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
    2437                 : }
    2438                 : 
    2439                 : /* -----------------------------------------------------------------------------*
    2440                 :  *  Get type list 
    2441                 :  * -----------------------------------------------------------------------------*/
    2442                 : 
    2443                 : #ifdef SWIG_LINK_RUNTIME
    2444                 : void *SWIG_ReturnGlobalTypeList(void *);
    2445                 : #endif
    2446                 : 
    2447                 : SWIGRUNTIME swig_module_info *
    2448                 : SWIG_Python_GetModule(void) {
    2449                 :   static void *type_pointer = (void *)0;
    2450                 :   /* first check if module already created */
    2451               6 :   if (!type_pointer) {
    2452                 : #ifdef SWIG_LINK_RUNTIME
    2453                 :     type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
    2454                 : #else
    2455                 : #ifdef SWIG_PYTHON_USE_CAPSULE
    2456                 :     type_pointer = PyCapsule_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer" SWIG_TYPE_TABLE_NAME, 0);
    2457                 : #else
    2458                 :     type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
    2459               6 :             (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
    2460                 : #endif
    2461               6 :     if (PyErr_Occurred()) {
    2462               6 :       PyErr_Clear();
    2463               6 :       type_pointer = (void *)0;
    2464                 :     }
    2465                 : #endif
    2466                 :   }
    2467               6 :   return (swig_module_info *) type_pointer;
    2468                 : }
    2469                 : 
    2470                 : #if PY_MAJOR_VERSION < 2
    2471                 : /* PyModule_AddObject function was introduced in Python 2.0.  The following function
    2472                 :    is copied out of Python/modsupport.c in python version 2.3.4 */
    2473                 : SWIGINTERN int
    2474                 : PyModule_AddObject(PyObject *m, char *name, PyObject *o)
    2475                 : {
    2476                 :   PyObject *dict;
    2477                 :   if (!PyModule_Check(m)) {
    2478                 :     PyErr_SetString(PyExc_TypeError,
    2479                 :         "PyModule_AddObject() needs module as first arg");
    2480                 :     return SWIG_ERROR;
    2481                 :   }
    2482                 :   if (!o) {
    2483                 :     PyErr_SetString(PyExc_TypeError,
    2484                 :         "PyModule_AddObject() needs non-NULL value");
    2485                 :     return SWIG_ERROR;
    2486                 :   }
    2487                 :   
    2488                 :   dict = PyModule_GetDict(m);
    2489                 :   if (dict == NULL) {
    2490                 :     /* Internal error -- modules must have a dict! */
    2491                 :     PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
    2492                 :      PyModule_GetName(m));
    2493                 :     return SWIG_ERROR;
    2494                 :   }
    2495                 :   if (PyDict_SetItemString(dict, name, o))
    2496                 :     return SWIG_ERROR;
    2497                 :   Py_DECREF(o);
    2498                 :   return SWIG_OK;
    2499                 : }
    2500                 : #endif
    2501                 : 
    2502                 : SWIGRUNTIME void
    2503                 : #ifdef SWIG_PYTHON_USE_CAPSULE
    2504                 : SWIG_Python_DestroyModule(PyObject *capsule)
    2505                 : {
    2506                 :   swig_module_info *swig_module;
    2507                 :   swig_type_info **types;
    2508                 :   size_t i;
    2509                 :   swig_module = (swig_module_info *)PyCapsule_GetPointer(capsule, (char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
    2510                 :   if (swig_module == NULL)
    2511                 :   {
    2512                 :     PyErr_Clear();
    2513                 :     return;
    2514                 :   }
    2515                 :   types = swig_module->types;
    2516                 : #else
    2517               6 : SWIG_Python_DestroyModule(void *vptr)
    2518                 : {
    2519               6 :   swig_module_info *swig_module = (swig_module_info *) vptr;
    2520               6 :   swig_type_info **types = swig_module->types;
    2521                 :   size_t i;
    2522                 : #endif
    2523             168 :   for (i =0; i < swig_module->size; ++i) {
    2524             162 :     swig_type_info *ty = types[i];
    2525             162 :     if (ty->owndata) {
    2526              68 :       SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
    2527              68 :       if (data) SwigPyClientData_Del(data);
    2528                 :     }
    2529                 :   }
    2530               6 :   Py_DECREF(SWIG_This());
    2531               6 : }
    2532                 : 
    2533                 : SWIGRUNTIME void
    2534                 : SWIG_Python_SetModule(swig_module_info *swig_module) {
    2535                 :   static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */
    2536                 : 
    2537                 : #if PY_VERSION_HEX >= 0x03000000
    2538                 :  /* Add a dummy module object into sys.modules */
    2539                 :   PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
    2540                 : #else
    2541               6 :   PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
    2542                 :            swig_empty_runtime_method_table);
    2543                 : #endif
    2544                 : #ifdef SWIG_PYTHON_USE_CAPSULE
    2545                 :   PyObject *pointer = PyCapsule_New((void *) swig_module,
    2546                 :                                     (char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer" SWIG_TYPE_TABLE_NAME,
    2547                 :                                     SWIG_Python_DestroyModule);
    2548                 : #else
    2549               6 :   PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
    2550                 : #endif
    2551               6 :   if (pointer && module) {
    2552               6 :     PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
    2553                 :   } else {
    2554               0 :     Py_XDECREF(pointer);
    2555                 :   }
    2556                 : }
    2557                 : 
    2558                 : /* The python cached type query */
    2559                 : SWIGRUNTIME PyObject *
    2560                 : SWIG_Python_TypeCache(void) {
    2561                 :   static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
    2562                 :   return cache;
    2563                 : }
    2564                 : 
    2565                 : SWIGRUNTIME swig_type_info *
    2566                 : SWIG_Python_TypeQuery(const char *type)
    2567                 : {
    2568                 :   PyObject *cache = SWIG_Python_TypeCache();
    2569                 :   PyObject *key = SWIG_Python_str_FromChar(type); 
    2570                 :   PyObject *obj = PyDict_GetItem(cache, key);
    2571                 :   swig_type_info *descriptor;
    2572                 :   if (obj) {
    2573                 : #ifdef SWIG_PYTHON_USE_CAPSULE
    2574                 :     descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, (char*)"swig_type_info");
    2575                 : #else
    2576                 :     descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
    2577                 : #endif
    2578                 :   } else {
    2579                 :     swig_module_info *swig_module = SWIG_Python_GetModule();
    2580                 :     descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
    2581                 :     if (descriptor) {
    2582                 : #ifdef SWIG_PYTHON_USE_CAPSULE
    2583                 :       obj = PyCapsule_New(descriptor, (char*)"swig_type_info", NULL);
    2584                 : #else
    2585                 :       obj = PyCObject_FromVoidPtr(descriptor, NULL);
    2586                 : #endif
    2587                 :       PyDict_SetItem(cache, key, obj);
    2588                 :       Py_DECREF(obj);
    2589                 :     }
    2590                 :   }
    2591                 :   Py_DECREF(key);
    2592                 :   return descriptor;
    2593                 : }
    2594                 : 
    2595                 : /* 
    2596                 :    For backward compatibility only
    2597                 : */
    2598                 : #define SWIG_POINTER_EXCEPTION  0
    2599                 : #define SWIG_arg_fail(arg)      SWIG_Python_ArgFail(arg)
    2600                 : #define SWIG_MustGetPtr(p, type, argnum, flags)  SWIG_Python_MustGetPtr(p, type, argnum, flags)
    2601                 : 
    2602                 : SWIGRUNTIME int
    2603                 : SWIG_Python_AddErrMesg(const char* mesg, int infront)
    2604                 : {  
    2605                 :   if (PyErr_Occurred()) {
    2606                 :     PyObject *type = 0;
    2607                 :     PyObject *value = 0;
    2608                 :     PyObject *traceback = 0;
    2609                 :     PyErr_Fetch(&type, &value, &traceback);
    2610                 :     if (value) {
    2611                 :       char *tmp;
    2612                 :       PyObject *old_str = PyObject_Str(value);
    2613                 :       Py_XINCREF(type);
    2614                 :       PyErr_Clear();
    2615                 :       if (infront) {
    2616                 :   PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str));
    2617                 :       } else {
    2618                 :   PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
    2619                 :       }
    2620                 :       SWIG_Python_str_DelForPy3(tmp);
    2621                 :       Py_DECREF(old_str);
    2622                 :     }
    2623                 :     return 1;
    2624                 :   } else {
    2625                 :     return 0;
    2626                 :   }
    2627                 : }
    2628                 :   
    2629                 : SWIGRUNTIME int
    2630                 : SWIG_Python_ArgFail(int argnum)
    2631                 : {
    2632                 :   if (PyErr_Occurred()) {
    2633                 :     /* add information about failing argument */
    2634                 :     char mesg[256];
    2635                 :     PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
    2636                 :     return SWIG_Python_AddErrMesg(mesg, 1);
    2637                 :   } else {
    2638                 :     return 0;
    2639                 :   }
    2640                 : }
    2641                 : 
    2642                 : SWIGRUNTIMEINLINE const char *
    2643                 : SwigPyObject_GetDesc(PyObject *self)
    2644                 : {
    2645                 :   SwigPyObject *v = (SwigPyObject *)self;
    2646                 :   swig_type_info *ty = v ? v->ty : 0;
    2647                 :   return ty ? ty->str : (char*)"";
    2648                 : }
    2649                 : 
    2650                 : SWIGRUNTIME void
    2651                 : SWIG_Python_TypeError(const char *type, PyObject *obj)
    2652                 : {
    2653                 :   if (type) {
    2654                 : #if defined(SWIG_COBJECT_TYPES)
    2655                 :     if (obj && SwigPyObject_Check(obj)) {
    2656                 :       const char *otype = (const char *) SwigPyObject_GetDesc(obj);
    2657                 :       if (otype) {
    2658                 :   PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
    2659                 :          type, otype);
    2660                 :   return;
    2661                 :       }
    2662                 :     } else 
    2663                 : #endif      
    2664                 :     {
    2665                 :       const char *otype = (obj ? obj->ob_type->tp_name : 0); 
    2666                 :       if (otype) {
    2667                 :   PyObject *str = PyObject_Str(obj);
    2668                 :   const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
    2669                 :   if (cstr) {
    2670                 :     PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
    2671                 :            type, otype, cstr);
    2672                 :           SWIG_Python_str_DelForPy3(cstr);
    2673                 :   } else {
    2674                 :     PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
    2675                 :            type, otype);
    2676                 :   }
    2677                 :   Py_XDECREF(str);
    2678                 :   return;
    2679                 :       }
    2680                 :     }   
    2681                 :     PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
    2682                 :   } else {
    2683                 :     PyErr_Format(PyExc_TypeError, "unexpected type is received");
    2684                 :   }
    2685                 : }
    2686                 : 
    2687                 : 
    2688                 : /* Convert a pointer value, signal an exception on a type mismatch */
    2689                 : SWIGRUNTIME void *
    2690                 : SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {
    2691                 :   void *result;
    2692                 :   if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
    2693                 :     PyErr_Clear();
    2694                 : #if SWIG_POINTER_EXCEPTION
    2695                 :     if (flags) {
    2696                 :       SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
    2697                 :       SWIG_Python_ArgFail(argnum);
    2698                 :     }
    2699                 : #endif
    2700                 :   }
    2701                 :   return result;
    2702                 : }
    2703                 : 
    2704                 : 
    2705                 : #ifdef __cplusplus
    2706                 : #if 0
    2707                 : { /* cc-mode */
    2708                 : #endif
    2709                 : }
    2710                 : #endif
    2711                 : 
    2712                 : 
    2713                 : 
    2714                 : #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) 
    2715                 : 
    2716                 : #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else 
    2717                 : 
    2718                 : 
    2719                 : 
    2720                 :   #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0) 
    2721                 : 
    2722                 : 
    2723                 : /* -------- TYPES TABLE (BEGIN) -------- */
    2724                 : 
    2725                 : #define SWIGTYPE_p_CPLErrorHandler swig_types[0]
    2726                 : #define SWIGTYPE_p_CPLXMLNode swig_types[1]
    2727                 : #define SWIGTYPE_p_GByte swig_types[2]
    2728                 : #define SWIGTYPE_p_GDALAsyncReaderShadow swig_types[3]
    2729                 : #define SWIGTYPE_p_GDALColorEntry swig_types[4]
    2730                 : #define SWIGTYPE_p_GDALColorTableShadow swig_types[5]
    2731                 : #define SWIGTYPE_p_GDALDatasetShadow swig_types[6]
    2732                 : #define SWIGTYPE_p_GDALDriverShadow swig_types[7]
    2733                 : #define SWIGTYPE_p_GDALMajorObjectShadow swig_types[8]
    2734                 : #define SWIGTYPE_p_GDALProgressFunc swig_types[9]
    2735                 : #define SWIGTYPE_p_GDALRasterAttributeTableShadow swig_types[10]
    2736                 : #define SWIGTYPE_p_GDALRasterBandShadow swig_types[11]
    2737                 : #define SWIGTYPE_p_GDALTransformerInfoShadow swig_types[12]
    2738                 : #define SWIGTYPE_p_GDAL_GCP swig_types[13]
    2739                 : #define SWIGTYPE_p_GIntBig swig_types[14]
    2740                 : #define SWIGTYPE_p_OGRLayerShadow swig_types[15]
    2741                 : #define SWIGTYPE_p_StatBuf swig_types[16]
    2742                 : #define SWIGTYPE_p_char swig_types[17]
    2743                 : #define SWIGTYPE_p_double swig_types[18]
    2744                 : #define SWIGTYPE_p_f_double_p_q_const__char_p_void__int swig_types[19]
    2745                 : #define SWIGTYPE_p_int swig_types[20]
    2746                 : #define SWIGTYPE_p_p_GDALRasterBandShadow swig_types[21]
    2747                 : #define SWIGTYPE_p_p_GDAL_GCP swig_types[22]
    2748                 : #define SWIGTYPE_p_p_char swig_types[23]
    2749                 : #define SWIGTYPE_p_p_int swig_types[24]
    2750                 : #define SWIGTYPE_p_p_void swig_types[25]
    2751                 : #define SWIGTYPE_p_void swig_types[26]
    2752                 : static swig_type_info *swig_types[28];
    2753                 : static swig_module_info swig_module = {swig_types, 27, 0, 0, 0, 0};
    2754                 : #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
    2755                 : #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
    2756                 : 
    2757                 : /* -------- TYPES TABLE (END) -------- */
    2758                 : 
    2759                 : #if (PY_VERSION_HEX <= 0x02000000)
    2760                 : # if !defined(SWIG_PYTHON_CLASSIC)
    2761                 : #  error "This python version requires swig to be run with the '-classic' option"
    2762                 : # endif
    2763                 : #endif
    2764                 : 
    2765                 : /*-----------------------------------------------
    2766                 :               @(target):= _gdal.so
    2767                 :   ------------------------------------------------*/
    2768                 : #if PY_VERSION_HEX >= 0x03000000
    2769                 : #  define SWIG_init    PyInit__gdal
    2770                 : 
    2771                 : #else
    2772                 : #  define SWIG_init    init_gdal
    2773                 : 
    2774                 : #endif
    2775                 : #define SWIG_name    "_gdal"
    2776                 : 
    2777                 : #define SWIGVERSION 0x010340 
    2778                 : #define SWIG_VERSION SWIGVERSION
    2779                 : 
    2780                 : 
    2781                 : #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) 
    2782                 : #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) 
    2783                 : 
    2784                 : 
    2785                 : #include <stdexcept>
    2786                 : 
    2787                 : 
    2788                 : namespace swig {
    2789                 :   class SwigPtr_PyObject {
    2790                 :   protected:
    2791                 :     PyObject *_obj;
    2792                 : 
    2793                 :   public:
    2794                 :     SwigPtr_PyObject() :_obj(0)
    2795                 :     {
    2796                 :     }
    2797                 : 
    2798                 :     SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
    2799                 :     {
    2800                 :       Py_XINCREF(_obj);      
    2801                 :     }
    2802                 :     
    2803                 :     SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
    2804                 :     {
    2805                 :       if (initial_ref) {
    2806                 :         Py_XINCREF(_obj);
    2807                 :       }
    2808                 :     }
    2809                 :     
    2810                 :     SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) 
    2811                 :     {
    2812                 :       Py_XINCREF(item._obj);
    2813                 :       Py_XDECREF(_obj);
    2814                 :       _obj = item._obj;
    2815                 :       return *this;      
    2816                 :     }
    2817                 :     
    2818                 :     ~SwigPtr_PyObject() 
    2819                 :     {
    2820                 :       Py_XDECREF(_obj);
    2821                 :     }
    2822                 :     
    2823                 :     operator PyObject *() const
    2824                 :     {
    2825                 :       return _obj;
    2826                 :     }
    2827                 : 
    2828                 :     PyObject *operator->() const
    2829                 :     {
    2830                 :       return _obj;
    2831                 :     }
    2832                 :   };
    2833                 : }
    2834                 : 
    2835                 : 
    2836                 : namespace swig {
    2837                 :   struct SwigVar_PyObject : SwigPtr_PyObject {
    2838                 :     SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
    2839                 :     
    2840                 :     SwigVar_PyObject & operator = (PyObject* obj)
    2841                 :     {
    2842                 :       Py_XDECREF(_obj);
    2843                 :       _obj = obj;
    2844                 :       return *this;      
    2845                 :     }
    2846                 :   };
    2847                 : }
    2848                 : 
    2849                 : 
    2850                 : #include <iostream>
    2851                 : using namespace std;
    2852                 : 
    2853                 : #include "cpl_port.h"
    2854                 : #include "cpl_string.h"
    2855                 : #include "cpl_multiproc.h"
    2856                 : 
    2857                 : #include "gdal.h"
    2858                 : #include "gdal_priv.h"
    2859                 : #include "gdal_alg.h"
    2860                 : #include "gdalwarper.h"
    2861                 : 
    2862                 : typedef void GDALMajorObjectShadow;
    2863                 : typedef void GDALDriverShadow;
    2864                 : typedef void GDALDatasetShadow;
    2865                 : typedef void GDALRasterBandShadow;
    2866                 : typedef void GDALColorTableShadow;
    2867                 : typedef void GDALRasterAttributeTableShadow;
    2868                 : typedef void GDALTransformerInfoShadow;
    2869                 : typedef void GDALAsyncReaderShadow;
    2870                 : 
    2871                 : /* use this to not return the int returned by GDAL */
    2872                 : typedef int RETURN_NONE;
    2873                 : 
    2874                 : 
    2875                 : 
    2876                 : int bUseExceptions=0;
    2877                 : CPLErrorHandler pfnPreviousHandler = CPLDefaultErrorHandler;
    2878                 : 
    2879                 : void CPL_STDCALL 
    2880               1 : PythonBindingErrorHandler(CPLErr eclass, int code, const char *msg ) 
    2881                 : {
    2882                 :   /* 
    2883                 :   ** Generally we want to supress error reporting if we have exceptions
    2884                 :   ** enabled as the error message will be in the exception thrown in 
    2885                 :   ** Python.  
    2886                 :   */
    2887                 : 
    2888                 :   /* If the error class is CE_Fatal, we want to have a message issued
    2889                 :      because the CPL support code does an abort() before any exception
    2890                 :      can be generated */
    2891               1 :   if (eclass == CE_Fatal ) {
    2892               0 :     pfnPreviousHandler(eclass, code, msg );
    2893                 :   }
    2894                 : 
    2895                 :   /*
    2896                 :   ** We do not want to interfere with warnings or debug messages since
    2897                 :   ** they won't be translated into exceptions.
    2898                 :   */
    2899               1 :   if (eclass == CE_Warning || eclass == CE_Debug ) {
    2900               0 :     pfnPreviousHandler(eclass, code, msg );
    2901                 :   }
    2902               1 : }
    2903                 : 
    2904                 : 
    2905                 : 
    2906               1 : int GetUseExceptions() {
    2907               1 :   return bUseExceptions;
    2908                 : }
    2909                 : 
    2910               1 : void UseExceptions() {
    2911               1 :   bUseExceptions = 1;
    2912                 :   pfnPreviousHandler = 
    2913               1 :     CPLSetErrorHandler( (CPLErrorHandler) PythonBindingErrorHandler );
    2914               1 : }
    2915                 : 
    2916               1 : void DontUseExceptions() {
    2917               1 :   bUseExceptions = 0;
    2918               1 :   CPLSetErrorHandler( pfnPreviousHandler );
    2919               1 : }
    2920                 : 
    2921                 : 
    2922                 :   #define SWIG_From_long   PyInt_FromLong 
    2923                 : 
    2924                 : 
    2925                 : SWIGINTERNINLINE PyObject *
    2926                 : SWIG_From_int  (int value)
    2927                 : {    
    2928          868244 :   return SWIG_From_long  (value);
    2929                 : }
    2930                 : 
    2931                 : 
    2932                 : 
    2933                 : /* Return a PyObject* from a NULL terminated C String */
    2934           31433 : static PyObject* GDALPythonObjectFromCStr(const char *pszStr)
    2935                 : {
    2936           31433 :   const unsigned char* pszIter = (const unsigned char*) pszStr;
    2937         1452386 :   while(*pszIter != 0)
    2938                 :   {
    2939         1389544 :     if (*pszIter > 127)
    2940                 :     {
    2941              24 :         PyObject* pyObj = PyUnicode_DecodeUTF8(pszStr, strlen(pszStr), "ignore");
    2942              24 :         if (pyObj != NULL)
    2943              24 :             return pyObj;
    2944                 : #if PY_VERSION_HEX >= 0x03000000
    2945                 :         return PyBytes_FromString(pszStr);
    2946                 : #else
    2947               0 :         return PyString_FromString(pszStr);
    2948                 : #endif
    2949                 :     }
    2950         1389520 :     pszIter ++;
    2951                 :   }
    2952                 : #if PY_VERSION_HEX >= 0x03000000
    2953                 :   return PyUnicode_FromString(pszStr); 
    2954                 : #else
    2955           31409 :   return PyString_FromString(pszStr);
    2956                 : #endif
    2957                 : }
    2958                 : 
    2959                 : /* Return a NULL terminated c String from a PyObject */
    2960                 : /* Result must be freed with GDALPythonFreeCStr */
    2961           23208 : static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree)
    2962                 : {
    2963           23208 :   *pbToFree = 0;
    2964           23208 :   if (PyUnicode_Check(pyObject))
    2965                 :   {
    2966                 :       char *pszStr;
    2967                 :       char *pszNewStr;
    2968                 :       Py_ssize_t nLen;
    2969               3 :       PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObject);
    2970                 : #if PY_VERSION_HEX >= 0x03000000
    2971                 :       PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    2972                 : #else
    2973               3 :       PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    2974                 : #endif
    2975               3 :       pszNewStr = (char *) malloc(nLen+1);
    2976               3 :       memcpy(pszNewStr, pszStr, nLen+1);
    2977               3 :       Py_XDECREF(pyUTF8Str);
    2978               3 :       *pbToFree = 1;
    2979               3 :       return pszNewStr;
    2980                 :   }
    2981                 :   else 
    2982                 :   {
    2983                 : #if PY_VERSION_HEX >= 0x03000000
    2984                 :       return PyBytes_AsString(pyObject);
    2985                 : #else
    2986           23205 :       return PyString_AsString(pyObject);
    2987                 : #endif
    2988                 :   }
    2989                 : }
    2990                 : 
    2991           23208 : static void GDALPythonFreeCStr(void* ptr, int bToFree)
    2992                 : {
    2993           23208 :    if (bToFree)
    2994               3 :        free(ptr);
    2995           23208 : }
    2996                 : 
    2997                 : 
    2998                 : 
    2999              17 : int wrapper_VSIFReadL( void **buf, int nMembSize, int nMembCount, VSILFILE *fp)
    3000                 : {
    3001              17 :     GIntBig buf_size = nMembSize * nMembCount;
    3002                 : 
    3003              17 :     if (buf_size == 0)
    3004                 :     {
    3005               0 :         *buf = NULL;
    3006               0 :         return 0;
    3007                 :     }
    3008                 : #if PY_VERSION_HEX >= 0x03000000 
    3009                 :     *buf = (void *)PyBytes_FromStringAndSize( NULL, buf_size ); 
    3010                 :     if (*buf == NULL)
    3011                 :     {
    3012                 :         *buf = Py_None;
    3013                 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    3014                 :         return 0;
    3015                 :     }
    3016                 :     PyObject* o = (PyObject*) *buf;
    3017                 :     char *data = PyBytes_AsString(o); 
    3018                 :     GIntBig nRet = (GIntBig)VSIFReadL( data, nMembSize, nMembCount, fp );
    3019                 :     if (nRet * nMembSize < buf_size)
    3020                 :     {
    3021                 :         _PyBytes_Resize(&o, nRet * nMembSize);
    3022                 :         *buf = o;
    3023                 :     }
    3024                 :     return nRet;
    3025                 : #else 
    3026              17 :     *buf = (void *)PyString_FromStringAndSize( NULL, buf_size ); 
    3027              17 :     if (*buf == NULL)
    3028                 :     {
    3029               0 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    3030               0 :         return 0;
    3031                 :     }
    3032              17 :     PyObject* o = (PyObject*) *buf;
    3033              17 :     char *data = PyString_AsString(o); 
    3034              17 :     GIntBig nRet = (GIntBig)VSIFReadL( data, nMembSize, nMembCount, fp );
    3035              17 :     if (nRet * nMembSize < buf_size)
    3036                 :     {
    3037               6 :         _PyString_Resize(&o, nRet * nMembSize);
    3038               6 :         *buf = o;
    3039                 :     }
    3040              17 :     return nRet;
    3041                 : #endif
    3042                 : }
    3043                 : 
    3044                 : 
    3045                 : #include <limits.h>
    3046                 : #if !defined(SWIG_NO_LLONG_MAX)
    3047                 : # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
    3048                 : #   define LLONG_MAX __LONG_LONG_MAX__
    3049                 : #   define LLONG_MIN (-LLONG_MAX - 1LL)
    3050                 : #   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
    3051                 : # endif
    3052                 : #endif
    3053                 : 
    3054                 : 
    3055                 : SWIGINTERN int
    3056          168659 : SWIG_AsVal_double (PyObject *obj, double *val)
    3057                 : {
    3058          168659 :   int res = SWIG_TypeError;
    3059          168659 :   if (PyFloat_Check(obj)) {
    3060             754 :     if (val) *val = PyFloat_AsDouble(obj);
    3061             754 :     return SWIG_OK;
    3062          167905 :   } else if (PyInt_Check(obj)) {
    3063          167905 :     if (val) *val = PyInt_AsLong(obj);
    3064          167905 :     return SWIG_OK;
    3065               0 :   } else if (PyLong_Check(obj)) {
    3066               0 :     double v = PyLong_AsDouble(obj);
    3067               0 :     if (!PyErr_Occurred()) {
    3068               0 :       if (val) *val = v;
    3069               0 :       return SWIG_OK;
    3070                 :     } else {
    3071               0 :       PyErr_Clear();
    3072                 :     }
    3073                 :   }
    3074                 : #ifdef SWIG_PYTHON_CAST_MODE
    3075                 :   {
    3076                 :     int dispatch = 0;
    3077                 :     double d = PyFloat_AsDouble(obj);
    3078                 :     if (!PyErr_Occurred()) {
    3079                 :       if (val) *val = d;
    3080                 :       return SWIG_AddCast(SWIG_OK);
    3081                 :     } else {
    3082                 :       PyErr_Clear();
    3083                 :     }
    3084                 :     if (!dispatch) {
    3085                 :       long v = PyLong_AsLong(obj);
    3086                 :       if (!PyErr_Occurred()) {
    3087                 :   if (val) *val = v;
    3088                 :   return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
    3089                 :       } else {
    3090                 :   PyErr_Clear();
    3091                 :       }
    3092                 :     }
    3093                 :   }
    3094                 : #endif
    3095               0 :   return res;
    3096                 : }
    3097                 : 
    3098                 : 
    3099                 : #include <float.h>
    3100                 : 
    3101                 : 
    3102                 : #include <math.h>
    3103                 : 
    3104                 : 
    3105                 : SWIGINTERNINLINE int
    3106                 : SWIG_CanCastAsInteger(double *d, double min, double max) {
    3107                 :   double x = *d;
    3108                 :   if ((min <= x && x <= max)) {
    3109                 :    double fx = floor(x);
    3110                 :    double cx = ceil(x);
    3111                 :    double rd =  ((x - fx) < 0.5) ? fx : cx; /* simple rint */
    3112                 :    if ((errno == EDOM) || (errno == ERANGE)) {
    3113                 :      errno = 0;
    3114                 :    } else {
    3115                 :      double summ, reps, diff;
    3116                 :      if (rd < x) {
    3117                 :        diff = x - rd;
    3118                 :      } else if (rd > x) {
    3119                 :        diff = rd - x;
    3120                 :      } else {
    3121                 :        return 1;
    3122                 :      }
    3123                 :      summ = rd + x;
    3124                 :      reps = diff/summ;
    3125                 :      if (reps < 8*DBL_EPSILON) {
    3126                 :        *d = rd;
    3127                 :        return 1;
    3128                 :      }
    3129                 :    }
    3130                 :   }
    3131                 :   return 0;
    3132                 : }
    3133                 : 
    3134                 : 
    3135                 : SWIGINTERN int
    3136         1561930 : SWIG_AsVal_long (PyObject *obj, long* val)
    3137                 : {
    3138         1561930 :   if (PyInt_Check(obj)) {
    3139         1561930 :     if (val) *val = PyInt_AsLong(obj);
    3140         1561930 :     return SWIG_OK;
    3141               0 :   } else if (PyLong_Check(obj)) {
    3142               0 :     long v = PyLong_AsLong(obj);
    3143               0 :     if (!PyErr_Occurred()) {
    3144               0 :       if (val) *val = v;
    3145               0 :       return SWIG_OK;
    3146                 :     } else {
    3147               0 :       PyErr_Clear();
    3148                 :     }
    3149                 :   }
    3150                 : #ifdef SWIG_PYTHON_CAST_MODE
    3151                 :   {
    3152                 :     int dispatch = 0;
    3153                 :     long v = PyInt_AsLong(obj);
    3154                 :     if (!PyErr_Occurred()) {
    3155                 :       if (val) *val = v;
    3156                 :       return SWIG_AddCast(SWIG_OK);
    3157                 :     } else {
    3158                 :       PyErr_Clear();
    3159                 :     }
    3160                 :     if (!dispatch) {
    3161                 :       double d;
    3162                 :       int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
    3163                 :       if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
    3164                 :   if (val) *val = (long)(d);
    3165                 :   return res;
    3166                 :       }
    3167                 :     }
    3168                 :   }
    3169                 : #endif
    3170               0 :   return SWIG_TypeError;
    3171                 : }
    3172                 : 
    3173                 : 
    3174                 : SWIGINTERN int
    3175         1561930 : SWIG_AsVal_int (PyObject * obj, int *val)
    3176                 : {
    3177                 :   long v;
    3178         1561930 :   int res = SWIG_AsVal_long (obj, &v);
    3179         1561930 :   if (SWIG_IsOK(res)) {
    3180         1561930 :     if ((v < INT_MIN || v > INT_MAX)) {
    3181               0 :       return SWIG_OverflowError;
    3182                 :     } else {
    3183         1561930 :       if (val) *val = static_cast< int >(v);
    3184                 :     }
    3185                 :   }  
    3186         1561930 :   return res;
    3187                 : }
    3188                 : 
    3189                 : 
    3190                 : 
    3191                 : typedef struct {
    3192                 :     PyObject *psPyCallback;
    3193                 :     PyObject *psPyCallbackData;
    3194                 :     int nLastReported;
    3195                 : } PyProgressData;
    3196                 : 
    3197                 : /************************************************************************/
    3198                 : /*                          PyProgressProxy()                           */
    3199                 : /************************************************************************/
    3200                 : 
    3201                 : int CPL_STDCALL
    3202              20 : PyProgressProxy( double dfComplete, const char *pszMessage, void *pData )
    3203                 : 
    3204                 : {
    3205              20 :     PyProgressData *psInfo = (PyProgressData *) pData;
    3206                 :     PyObject *psArgs, *psResult;
    3207              20 :     int      bContinue = TRUE;
    3208                 : 
    3209              20 :     if( psInfo->nLastReported == (int) (100.0 * dfComplete) )
    3210               1 :         return TRUE;
    3211                 : 
    3212              19 :     if( psInfo->psPyCallback == NULL || psInfo->psPyCallback == Py_None )
    3213               0 :         return TRUE;
    3214                 : 
    3215              19 :     psInfo->nLastReported = (int) (100.0 * dfComplete);
    3216                 :     
    3217              19 :     if( pszMessage == NULL )
    3218               0 :         pszMessage = "";
    3219                 : 
    3220              19 :     if( psInfo->psPyCallbackData == NULL )
    3221               0 :         psArgs = Py_BuildValue("(dsO)", dfComplete, pszMessage, Py_None );
    3222                 :     else
    3223                 :         psArgs = Py_BuildValue("(dsO)", dfComplete, pszMessage, 
    3224              19 :                          psInfo->psPyCallbackData );
    3225                 : 
    3226              19 :     psResult = PyEval_CallObject( psInfo->psPyCallback, psArgs);
    3227              19 :     Py_XDECREF(psArgs);
    3228                 : 
    3229              19 :     if( psResult == NULL )
    3230                 :     {
    3231               0 :         return TRUE;
    3232                 :     }
    3233                 : 
    3234              19 :     if( psResult == Py_None )
    3235                 :     {
    3236               0 :   Py_XDECREF(Py_None);
    3237               0 :         return TRUE;
    3238                 :     }
    3239                 : 
    3240              19 :     if( !PyArg_Parse( psResult, "i", &bContinue ) )
    3241                 :     {
    3242               0 :         PyErr_SetString(PyExc_ValueError, "bad progress return value");
    3243               0 :   return FALSE;
    3244                 :     }
    3245                 : 
    3246              19 :     Py_XDECREF(psResult);
    3247                 : 
    3248              19 :     return bContinue;    
    3249                 : }
    3250                 : 
    3251                 : 
    3252                 : typedef char retStringAndCPLFree;
    3253                 : 
    3254                 : 
    3255             291 :   void Debug( const char *msg_class, const char *message ) {
    3256             291 :     CPLDebug( msg_class, "%s", message );
    3257             291 :   }
    3258                 : 
    3259            1094 :   CPLErr PushErrorHandler( char const * pszCallbackName = NULL ) {
    3260            1094 :     CPLErrorHandler pfnHandler = NULL;
    3261            2186 :     if( pszCallbackName == NULL || EQUAL(pszCallbackName,"CPLQuietErrorHandler") )
    3262            1092 :       pfnHandler = CPLQuietErrorHandler;
    3263               2 :     else if( EQUAL(pszCallbackName,"CPLDefaultErrorHandler") )
    3264               0 :       pfnHandler = CPLDefaultErrorHandler;
    3265               2 :     else if( EQUAL(pszCallbackName,"CPLLoggingErrorHandler") )
    3266               0 :       pfnHandler = CPLLoggingErrorHandler;
    3267                 : 
    3268            1094 :     if ( pfnHandler == NULL )
    3269               2 :       return CE_Fatal;
    3270                 : 
    3271            1092 :     CPLPushErrorHandler( pfnHandler );
    3272                 : 
    3273            1092 :     return CE_None;
    3274                 :   }
    3275                 : 
    3276                 : 
    3277                 : 
    3278                 : SWIGINTERN swig_type_info*
    3279                 : SWIG_pchar_descriptor(void)
    3280                 : {
    3281                 :   static int init = 0;
    3282                 :   static swig_type_info* info = 0;
    3283             167 :   if (!init) {
    3284               2 :     info = SWIG_TypeQuery("_p_char");
    3285               2 :     init = 1;
    3286                 :   }
    3287             167 :   return info;
    3288                 : }
    3289                 : 
    3290                 : 
    3291                 : SWIGINTERN int
    3292           13097 : SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
    3293                 : {
    3294                 : #if PY_VERSION_HEX>=0x03000000
    3295                 :   if (PyUnicode_Check(obj))
    3296                 : #else  
    3297           13097 :   if (PyString_Check(obj))
    3298                 : #endif
    3299                 :   {
    3300                 :     char *cstr; Py_ssize_t len;
    3301                 : #if PY_VERSION_HEX>=0x03000000
    3302                 :     if (!alloc && cptr) {
    3303                 :         /* We can't allow converting without allocation, since the internal
    3304                 :            representation of string in Python 3 is UCS-2/UCS-4 but we require
    3305                 :            a UTF-8 representation.
    3306                 :            TODO(bhy) More detailed explanation */
    3307                 :         return SWIG_RuntimeError;
    3308                 :     }
    3309                 :     obj = PyUnicode_AsUTF8String(obj);
    3310                 :     PyBytes_AsStringAndSize(obj, &cstr, &len);
    3311                 :     if(alloc) *alloc = SWIG_NEWOBJ;
    3312                 : #else
    3313           12930 :     PyString_AsStringAndSize(obj, &cstr, &len);
    3314                 : #endif
    3315           12930 :     if (cptr) {
    3316           11823 :       if (alloc) {
    3317                 :   /* 
    3318                 :      In python the user should not be able to modify the inner
    3319                 :      string representation. To warranty that, if you define
    3320                 :      SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
    3321                 :      buffer is always returned.
    3322                 : 
    3323                 :      The default behavior is just to return the pointer value,
    3324                 :      so, be careful.
    3325                 :   */ 
    3326                 : #if defined(SWIG_PYTHON_SAFE_CSTRINGS)
    3327                 :   if (*alloc != SWIG_OLDOBJ) 
    3328                 : #else
    3329           11823 :   if (*alloc == SWIG_NEWOBJ) 
    3330                 : #endif
    3331                 :     {
    3332               0 :       *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
    3333               0 :       *alloc = SWIG_NEWOBJ;
    3334                 :     }
    3335                 :   else {
    3336           11823 :     *cptr = cstr;
    3337           11823 :     *alloc = SWIG_OLDOBJ;
    3338                 :   }
    3339                 :       } else {
    3340                 :         #if PY_VERSION_HEX>=0x03000000
    3341                 :         assert(0); /* Should never reach here in Python 3 */
    3342                 :         #endif
    3343               0 :   *cptr = SWIG_Python_str_AsChar(obj);
    3344                 :       }
    3345                 :     }
    3346           12930 :     if (psize) *psize = len + 1;
    3347                 : #if PY_VERSION_HEX>=0x03000000
    3348                 :     Py_XDECREF(obj);
    3349                 : #endif
    3350           12930 :     return SWIG_OK;
    3351                 :   } else {
    3352             167 :     swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
    3353             167 :     if (pchar_descriptor) {
    3354             167 :       void* vptr = 0;
    3355             167 :       if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
    3356             167 :   if (cptr) *cptr = (char *) vptr;
    3357             167 :   if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
    3358             167 :   if (alloc) *alloc = SWIG_OLDOBJ;
    3359             167 :   return SWIG_OK;
    3360                 :       }
    3361                 :     }
    3362                 :   }
    3363               0 :   return SWIG_TypeError;
    3364                 : }
    3365                 : 
    3366                 : 
    3367                 : 
    3368                 : 
    3369                 : 
    3370               0 :   void Error( CPLErr msg_class = CE_Failure, int err_code = 0, const char* msg = "error" ) {
    3371               0 :     CPLError( msg_class, err_code, "%s", msg );
    3372               0 :   }
    3373                 : 
    3374                 : 
    3375               0 : retStringAndCPLFree* EscapeString(int len, char *bin_string , int scheme=CPLES_SQL) {
    3376               0 :     return CPLEscapeString(bin_string, len, scheme);
    3377                 : } 
    3378                 : 
    3379                 : 
    3380                 : SWIGINTERNINLINE PyObject *
    3381                 : SWIG_FromCharPtrAndSize(const char* carray, size_t size)
    3382                 : {
    3383           30297 :   if (carray) {
    3384           30203 :     if (size > INT_MAX) {
    3385               0 :       swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
    3386                 :       return pchar_descriptor ? 
    3387               0 :   SWIG_NewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
    3388                 :     } else {
    3389                 : #if PY_VERSION_HEX >= 0x03000000
    3390                 :       return PyUnicode_FromStringAndSize(carray, static_cast< int >(size));
    3391                 : #else
    3392           30203 :       return PyString_FromStringAndSize(carray, static_cast< int >(size));
    3393                 : #endif
    3394                 :     }
    3395                 :   } else {
    3396              94 :     return SWIG_Py_Void();
    3397                 :   }
    3398                 : }
    3399                 : 
    3400                 : 
    3401                 : SWIGINTERNINLINE PyObject * 
    3402           30297 : SWIG_FromCharPtr(const char *cptr)
    3403                 : { 
    3404           60594 :   return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
    3405                 : }
    3406                 : 
    3407                 : 
    3408             559 : const char *wrapper_CPLGetConfigOption( const char * pszKey, const char * pszDefault = NULL )
    3409                 : {
    3410             559 :     return CPLGetConfigOption( pszKey, pszDefault );
    3411                 : }
    3412                 : 
    3413                 : 
    3414               9 : void wrapper_VSIFileFromMemBuffer( const char* utf8_path, int nBytes, const GByte *pabyData)
    3415                 : {
    3416               9 :     GByte* pabyDataDup = (GByte*)VSIMalloc(nBytes);
    3417               9 :     if (pabyDataDup == NULL)
    3418                 :             return;
    3419               9 :     memcpy(pabyDataDup, pabyData, nBytes);
    3420               9 :     VSIFCloseL(VSIFileFromMemBuffer(utf8_path, (GByte*) pabyDataDup, nBytes, TRUE));
    3421                 : }
    3422                 : 
    3423                 : 
    3424                 : 
    3425               0 : int wrapper_HasThreadSupport()
    3426                 : {
    3427               0 :     return strcmp(CPLGetThreadingModel(), "stub") != 0;
    3428                 : }
    3429                 : 
    3430                 : 
    3431                 : typedef struct
    3432                 : {
    3433                 :   int     mode;
    3434                 :   GIntBig size;
    3435                 :   GIntBig mtime;
    3436                 : } StatBuf;
    3437                 : 
    3438                 : SWIGINTERN StatBuf *new_StatBuf(StatBuf *psStatBuf){
    3439            1910 :     StatBuf *self = (StatBuf*) CPLMalloc( sizeof( StatBuf ) );
    3440            1910 :     self->mode = psStatBuf->mode;
    3441            1910 :     self->size = psStatBuf->size;
    3442            1910 :     self->mtime = psStatBuf->mtime;
    3443            1910 :     return self;
    3444                 :   }
    3445                 : SWIGINTERN void delete_StatBuf(StatBuf *self){
    3446            1910 :     CPLFree(self);
    3447                 :   }
    3448                 : SWIGINTERN int StatBuf_IsDirectory(StatBuf *self){
    3449            2165 :      return (self->mode & S_IFDIR) != 0;
    3450                 :   }
    3451                 : 
    3452            1912 : int wrapper_VSIStatL( const char * utf8_path, StatBuf *psStatBufOut, int nFlags = 0 )
    3453                 : {
    3454                 :     VSIStatBufL sStat;
    3455                 :     memset(&sStat, 0, sizeof(sStat));
    3456                 :     memset(psStatBufOut, 0, sizeof(StatBuf));
    3457            1912 :     int nRet = VSIStatExL(utf8_path, &sStat, nFlags);
    3458            1912 :     psStatBufOut->mode = sStat.st_mode;
    3459            1912 :     psStatBufOut->size = (GIntBig)sStat.st_size;
    3460            1912 :     psStatBufOut->mtime = (GIntBig)sStat.st_mtime;
    3461            1912 :     return nRet;
    3462                 : }
    3463                 : 
    3464                 : 
    3465              55 : int wrapper_VSIFWriteL( int nLen, char *pBuf, int size, int memb, VSILFILE * f)
    3466                 : {
    3467              55 :     if (nLen < size * memb)
    3468                 :     {
    3469               0 :         CPLError(CE_Failure, CPLE_AppDefined, "Inconsistant buffer size with 'size' and 'memb' values");
    3470               0 :         return 0;
    3471                 :     }
    3472              55 :     return VSIFWriteL(pBuf, size, memb, f);
    3473                 : }
    3474                 : 
    3475                 : SWIGINTERN char const *GDALMajorObjectShadow_GetDescription(GDALMajorObjectShadow *self){
    3476              68 :     return GDALGetDescription( self );
    3477                 :   }
    3478                 : SWIGINTERN void GDALMajorObjectShadow_SetDescription(GDALMajorObjectShadow *self,char const *pszNewDesc){
    3479              23 :     GDALSetDescription( self, pszNewDesc );
    3480                 :   }
    3481                 : SWIGINTERN char **GDALMajorObjectShadow_GetMetadata_Dict(GDALMajorObjectShadow *self,char const *pszDomain=""){
    3482            2591 :     return GDALGetMetadata( self, pszDomain );
    3483                 :   }
    3484                 : SWIGINTERN char **GDALMajorObjectShadow_GetMetadata_List(GDALMajorObjectShadow *self,char const *pszDomain=""){
    3485             148 :     return GDALGetMetadata( self, pszDomain );
    3486                 :   }
    3487                 : SWIGINTERN CPLErr GDALMajorObjectShadow_SetMetadata__SWIG_0(GDALMajorObjectShadow *self,char **papszMetadata,char const *pszDomain=""){
    3488              69 :     return GDALSetMetadata( self, papszMetadata, pszDomain );
    3489                 :   }
    3490                 : SWIGINTERN CPLErr GDALMajorObjectShadow_SetMetadata__SWIG_1(GDALMajorObjectShadow *self,char *pszMetadataString,char const *pszDomain=""){
    3491                 :     char *tmpList[2];
    3492               2 :     tmpList[0] = pszMetadataString;
    3493               2 :     tmpList[1] = 0;
    3494               2 :     return GDALSetMetadata( self, tmpList, pszDomain );
    3495                 :   }
    3496                 : SWIGINTERN char const *GDALMajorObjectShadow_GetMetadataItem(GDALMajorObjectShadow *self,char const *pszName,char const *pszDomain=""){
    3497             146 :     return GDALGetMetadataItem( self, pszName, pszDomain);
    3498                 :   }
    3499                 : SWIGINTERN CPLErr GDALMajorObjectShadow_SetMetadataItem(GDALMajorObjectShadow *self,char const *pszName,char const *pszValue,char const *pszDomain=""){
    3500              33 :     return GDALSetMetadataItem( self, pszName, pszValue, pszDomain);
    3501                 :   }
    3502                 : SWIGINTERN GDALDatasetShadow *GDALDriverShadow_Create(GDALDriverShadow *self,char const *utf8_path,int xsize,int ysize,int bands=1,GDALDataType eType=GDT_Byte,char **options=0){
    3503                 : 
    3504                 :     GDALDatasetShadow* ds = (GDALDatasetShadow*) GDALCreate(    self, 
    3505                 :                                                                 utf8_path, 
    3506                 :                                                                 xsize, 
    3507                 :                                                                 ysize, 
    3508                 :                                                                 bands, 
    3509                 :                                                                 eType, 
    3510            6948 :                                                                 options );
    3511            6948 :     return ds;
    3512                 :   }
    3513                 : 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){
    3514                 : 
    3515                 :     GDALDatasetShadow *ds = (GDALDatasetShadow*) GDALCreateCopy(    self, 
    3516                 :                                                                     utf8_path, 
    3517                 :                                                                     src, 
    3518                 :                                                                     strict, 
    3519                 :                                                                     options, 
    3520                 :                                                                     callback, 
    3521            1620 :                                                                     callback_data );
    3522            1620 :     return ds;
    3523                 :   }
    3524                 : SWIGINTERN int GDALDriverShadow_Delete(GDALDriverShadow *self,char const *utf8_path){
    3525            1299 :     return GDALDeleteDataset( self, utf8_path );
    3526                 :   }
    3527                 : SWIGINTERN int GDALDriverShadow_Rename(GDALDriverShadow *self,char const *newName,char const *oldName){
    3528               1 :     return GDALRenameDataset( self, newName, oldName );
    3529                 :   }
    3530                 : SWIGINTERN int GDALDriverShadow_CopyFiles(GDALDriverShadow *self,char const *newName,char const *oldName){
    3531               1 :     return GDALCopyDatasetFiles( self, newName, oldName );
    3532                 :   }
    3533                 : SWIGINTERN int GDALDriverShadow_Register(GDALDriverShadow *self){
    3534              75 :     return GDALRegisterDriver( self );
    3535                 :   }
    3536                 : SWIGINTERN void GDALDriverShadow_Deregister(GDALDriverShadow *self){
    3537              72 :     GDALDeregisterDriver( self );
    3538                 :   }
    3539                 : 
    3540           22051 : char const *GDALDriverShadow_ShortName_get( GDALDriverShadow *h ) {
    3541           22051 :   return GDALGetDriverShortName( h );
    3542                 : }
    3543              17 : char const *GDALDriverShadow_LongName_get( GDALDriverShadow *h ) {
    3544              17 :   return GDALGetDriverLongName( h );
    3545                 : }
    3546               0 : char const *GDALDriverShadow_HelpTopic_get( GDALDriverShadow *h ) {
    3547               0 :   return GDALGetDriverHelpTopic( h );
    3548                 : }
    3549                 : 
    3550                 : 
    3551                 : SWIGINTERN int
    3552               0 : SWIG_AsVal_short (PyObject * obj, short *val)
    3553                 : {
    3554                 :   long v;
    3555               0 :   int res = SWIG_AsVal_long (obj, &v);
    3556               0 :   if (SWIG_IsOK(res)) {
    3557               0 :     if ((v < SHRT_MIN || v > SHRT_MAX)) {
    3558               0 :       return SWIG_OverflowError;
    3559                 :     } else {
    3560               0 :       if (val) *val = static_cast< short >(v);
    3561                 :     }
    3562                 :   }  
    3563               0 :   return res;
    3564                 : }
    3565                 : 
    3566                 : 
    3567                 : SWIGINTERNINLINE PyObject *
    3568                 : SWIG_From_short  (short value)
    3569                 : {    
    3570               0 :   return SWIG_From_long  (value);
    3571                 : }
    3572                 : 
    3573                 : 
    3574                 :   #define SWIG_From_double   PyFloat_FromDouble 
    3575                 : 
    3576            5553 : 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=""){
    3577                 : 
    3578            5553 :     GDAL_GCP *self = (GDAL_GCP*) CPLMalloc( sizeof( GDAL_GCP ) );
    3579            5553 :     self->dfGCPX = x;
    3580            5553 :     self->dfGCPY = y;
    3581            5553 :     self->dfGCPZ = z;
    3582            5553 :     self->dfGCPPixel = pixel;
    3583            5553 :     self->dfGCPLine = line;
    3584            5553 :     self->pszInfo =  CPLStrdup( (info == 0) ? "" : info );
    3585            5553 :     self->pszId = CPLStrdup( (id==0)? "" : id );
    3586            5553 :     return self;
    3587                 :   }
    3588                 : SWIGINTERN void delete_GDAL_GCP(GDAL_GCP *self){
    3589            5553 :     if ( self->pszInfo )
    3590            5553 :       CPLFree( self->pszInfo );
    3591            5553 :     if ( self->pszId )
    3592            5553 :       CPLFree( self->pszId );
    3593            5553 :     CPLFree( self );
    3594                 :   }
    3595                 : 
    3596                 : 
    3597            2773 : double GDAL_GCP_GCPX_get( GDAL_GCP *gcp ) {
    3598            2773 :   return gcp->dfGCPX;
    3599                 : }
    3600               8 : void GDAL_GCP_GCPX_set( GDAL_GCP *gcp, double dfGCPX ) {
    3601               8 :   gcp->dfGCPX = dfGCPX;
    3602               8 : }
    3603            2773 : double GDAL_GCP_GCPY_get( GDAL_GCP *gcp ) {
    3604            2773 :   return gcp->dfGCPY;
    3605                 : }
    3606               8 : void GDAL_GCP_GCPY_set( GDAL_GCP *gcp, double dfGCPY ) {
    3607               8 :   gcp->dfGCPY = dfGCPY;
    3608               8 : }
    3609            2748 : double GDAL_GCP_GCPZ_get( GDAL_GCP *gcp ) {
    3610            2748 :   return gcp->dfGCPZ;
    3611                 : }
    3612               0 : void GDAL_GCP_GCPZ_set( GDAL_GCP *gcp, double dfGCPZ ) {
    3613               0 :   gcp->dfGCPZ = dfGCPZ;
    3614               0 : }
    3615            2781 : double GDAL_GCP_GCPPixel_get( GDAL_GCP *gcp ) {
    3616            2781 :   return gcp->dfGCPPixel;
    3617                 : }
    3618              16 : void GDAL_GCP_GCPPixel_set( GDAL_GCP *gcp, double dfGCPPixel ) {
    3619              16 :   gcp->dfGCPPixel = dfGCPPixel;
    3620              16 : }
    3621            2781 : double GDAL_GCP_GCPLine_get( GDAL_GCP *gcp ) {
    3622            2781 :   return gcp->dfGCPLine;
    3623                 : }
    3624              16 : void GDAL_GCP_GCPLine_set( GDAL_GCP *gcp, double dfGCPLine ) {
    3625              16 :   gcp->dfGCPLine = dfGCPLine;
    3626              16 : }
    3627               4 : const char * GDAL_GCP_Info_get( GDAL_GCP *gcp ) {
    3628               4 :   return gcp->pszInfo;
    3629                 : }
    3630               0 : void GDAL_GCP_Info_set( GDAL_GCP *gcp, const char * pszInfo ) {
    3631               0 :   if ( gcp->pszInfo ) 
    3632               0 :     CPLFree( gcp->pszInfo );
    3633               0 :   gcp->pszInfo = CPLStrdup(pszInfo);
    3634               0 : }
    3635               4 : const char * GDAL_GCP_Id_get( GDAL_GCP *gcp ) {
    3636               4 :   return gcp->pszId;
    3637                 : }
    3638               0 : void GDAL_GCP_Id_set( GDAL_GCP *gcp, const char * pszId ) {
    3639               0 :   if ( gcp->pszId ) 
    3640               0 :     CPLFree( gcp->pszId );
    3641               0 :   gcp->pszId = CPLStrdup(pszId);
    3642               0 : }
    3643                 : 
    3644                 : 
    3645                 : 
    3646                 : /* Duplicate, but transposed names for C# because 
    3647                 : *  the C# module outputs backwards names
    3648                 : */
    3649               0 : double GDAL_GCP_get_GCPX( GDAL_GCP *gcp ) {
    3650               0 :   return gcp->dfGCPX;
    3651                 : }
    3652               0 : void GDAL_GCP_set_GCPX( GDAL_GCP *gcp, double dfGCPX ) {
    3653               0 :   gcp->dfGCPX = dfGCPX;
    3654               0 : }
    3655               0 : double GDAL_GCP_get_GCPY( GDAL_GCP *gcp ) {
    3656               0 :   return gcp->dfGCPY;
    3657                 : }
    3658               0 : void GDAL_GCP_set_GCPY( GDAL_GCP *gcp, double dfGCPY ) {
    3659               0 :   gcp->dfGCPY = dfGCPY;
    3660               0 : }
    3661               0 : double GDAL_GCP_get_GCPZ( GDAL_GCP *gcp ) {
    3662               0 :   return gcp->dfGCPZ;
    3663                 : }
    3664               0 : void GDAL_GCP_set_GCPZ( GDAL_GCP *gcp, double dfGCPZ ) {
    3665               0 :   gcp->dfGCPZ = dfGCPZ;
    3666               0 : }
    3667               0 : double GDAL_GCP_get_GCPPixel( GDAL_GCP *gcp ) {
    3668               0 :   return gcp->dfGCPPixel;
    3669                 : }
    3670               0 : void GDAL_GCP_set_GCPPixel( GDAL_GCP *gcp, double dfGCPPixel ) {
    3671               0 :   gcp->dfGCPPixel = dfGCPPixel;
    3672               0 : }
    3673               0 : double GDAL_GCP_get_GCPLine( GDAL_GCP *gcp ) {
    3674               0 :   return gcp->dfGCPLine;
    3675                 : }
    3676               0 : void GDAL_GCP_set_GCPLine( GDAL_GCP *gcp, double dfGCPLine ) {
    3677               0 :   gcp->dfGCPLine = dfGCPLine;
    3678               0 : }
    3679               0 : const char * GDAL_GCP_get_Info( GDAL_GCP *gcp ) {
    3680               0 :   return gcp->pszInfo;
    3681                 : }
    3682               0 : void GDAL_GCP_set_Info( GDAL_GCP *gcp, const char * pszInfo ) {
    3683               0 :   if ( gcp->pszInfo ) 
    3684               0 :     CPLFree( gcp->pszInfo );
    3685               0 :   gcp->pszInfo = CPLStrdup(pszInfo);
    3686               0 : }
    3687               0 : const char * GDAL_GCP_get_Id( GDAL_GCP *gcp ) {
    3688               0 :   return gcp->pszId;
    3689                 : }
    3690               0 : void GDAL_GCP_set_Id( GDAL_GCP *gcp, const char * pszId ) {
    3691               0 :   if ( gcp->pszId ) 
    3692               0 :     CPLFree( gcp->pszId );
    3693               0 :   gcp->pszId = CPLStrdup(pszId);
    3694               0 : }
    3695                 : 
    3696                 : 
    3697                 : 
    3698                 : #define t_output_helper SWIG_Python_AppendOutput
    3699                 : 
    3700                 : 
    3701                 : static PyObject *
    3702            1917 : CreateTupleFromDoubleArray( double *first, unsigned int size ) {
    3703            1917 :   PyObject *out = PyTuple_New( size );
    3704            9955 :   for( unsigned int i=0; i<size; i++ ) {
    3705            8038 :     PyObject *val = PyFloat_FromDouble( *first );
    3706            8038 :     ++first;
    3707            8038 :     PyTuple_SetItem( out, i, val );
    3708                 :   }
    3709            1917 :   return out;
    3710                 : }
    3711                 : 
    3712                 : 
    3713                 : /* Returned size is in bytes or 0 if an error occured */
    3714                 : static
    3715          336711 : GIntBig ComputeDatasetRasterIOSize (int buf_xsize, int buf_ysize, int nPixelSize,
    3716                 :                                 int nBands, int* bandMap, int nBandMapArrayLength,
    3717                 :                                 int nPixelSpace, int nLineSpace, int nBandSpace,
    3718                 :                                 int bSpacingShouldBeMultipleOfPixelSize )
    3719                 : {
    3720                 : #if SIZEOF_VOIDP == 8
    3721          336711 :     const GIntBig MAX_INT = (((GIntBig)0x7fffffff) << 32) | 0xffffffff;
    3722                 : #else
    3723                 :     const GIntBig MAX_INT = 0x7fffffff;
    3724                 : #endif
    3725          336711 :     const GIntBig MAX_INT32 = 0x7fffffff;
    3726          336711 :     if (buf_xsize <= 0 || buf_ysize <= 0)
    3727                 :     {
    3728               2 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal values for buffer size");
    3729               2 :         return 0;
    3730                 :     }
    3731                 : 
    3732          336709 :     if (nPixelSpace < 0 || nLineSpace < 0 || nBandSpace < 0)
    3733                 :     {
    3734               0 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal values for space arguments");
    3735               0 :         return 0;
    3736                 :     }
    3737                 : 
    3738          336709 :     if (nPixelSize == 0)
    3739                 :     {
    3740               0 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal value for data type");
    3741               0 :         return 0;
    3742                 :     }
    3743                 : 
    3744          336709 :     if( nPixelSpace == 0 )
    3745          336709 :         nPixelSpace = nPixelSize;
    3746               0 :     else if ( bSpacingShouldBeMultipleOfPixelSize && (nPixelSpace % nPixelSize) != 0 )
    3747                 :     {
    3748               0 :         CPLError(CE_Failure, CPLE_IllegalArg, "nPixelSpace should be a multiple of nPixelSize");
    3749               0 :         return 0;
    3750                 :     }
    3751                 : 
    3752          336709 :     if( nLineSpace == 0 )
    3753                 :     {
    3754          336709 :         if (nPixelSpace > MAX_INT32 / buf_xsize)
    3755                 :         {
    3756               0 :             CPLError(CE_Failure, CPLE_IllegalArg, "Integer overflow for nLineSpace");
    3757               0 :             return 0;
    3758                 :         }
    3759          336709 :         nLineSpace = nPixelSpace * buf_xsize;
    3760                 :     }
    3761               0 :     else if ( bSpacingShouldBeMultipleOfPixelSize && (nLineSpace % nPixelSize) != 0 )
    3762                 :     {
    3763               0 :         CPLError(CE_Failure, CPLE_IllegalArg, "nLineSpace should be a multiple of nPixelSize");
    3764               0 :         return 0;
    3765                 :     }
    3766                 : 
    3767          336709 :     if( nBandSpace == 0 )
    3768                 :     {
    3769          336709 :         if (nLineSpace > MAX_INT32 / buf_ysize)
    3770                 :         {
    3771               0 :             CPLError(CE_Failure, CPLE_IllegalArg, "Integer overflow for nBandSpace");
    3772               0 :             return 0;
    3773                 :         }
    3774          336709 :         nBandSpace = nLineSpace * buf_ysize;
    3775                 :     }
    3776               0 :     else if ( bSpacingShouldBeMultipleOfPixelSize && (nBandSpace % nPixelSize) != 0 )
    3777                 :     {
    3778               0 :         CPLError(CE_Failure, CPLE_IllegalArg, "nLineSpace should be a multiple of nPixelSize");
    3779               0 :         return 0;
    3780                 :     }
    3781                 : 
    3782          336709 :     if (nBands <= 0 || (bandMap != NULL && nBands > nBandMapArrayLength))
    3783                 :     {
    3784               0 :         CPLError(CE_Failure, CPLE_IllegalArg, "Invalid band count");
    3785               0 :         return 0;
    3786                 :     }
    3787                 : 
    3788          336709 :     GIntBig nRet = (GIntBig)(buf_ysize - 1) * nLineSpace + (GIntBig)(buf_xsize - 1) * nPixelSpace + (GIntBig)(nBands - 1) * nBandSpace + nPixelSize;
    3789                 :     if (nRet > MAX_INT)
    3790                 :     {
    3791                 :         CPLError(CE_Failure, CPLE_IllegalArg, "Integer overflow");
    3792                 :         return 0;
    3793                 :     }
    3794                 : 
    3795          336709 :     return nRet;
    3796                 : }
    3797                 : 
    3798                 : 
    3799                 : typedef struct
    3800                 : {
    3801                 :     GDALAsyncReaderH  hAsyncReader;
    3802                 :     void             *pyObject;
    3803                 : } GDALAsyncReaderWrapper;
    3804                 : 
    3805                 : typedef void* GDALAsyncReaderWrapperH;
    3806                 : 
    3807               3 : static GDALAsyncReaderH AsyncReaderWrapperGetReader(GDALAsyncReaderWrapperH hWrapper)
    3808                 : {
    3809               3 :     GDALAsyncReaderWrapper* psWrapper = (GDALAsyncReaderWrapper*)hWrapper;
    3810               3 :     if (psWrapper->hAsyncReader == NULL)
    3811                 :     {
    3812               0 :         CPLError(CE_Failure, CPLE_AppDefined, "AsyncReader object is defunct");
    3813                 :     }
    3814               3 :     return psWrapper->hAsyncReader;
    3815                 : }
    3816                 : 
    3817                 : static void* AsyncReaderWrapperGetPyObject(GDALAsyncReaderWrapperH hWrapper)
    3818                 : {
    3819               1 :     GDALAsyncReaderWrapper* psWrapper = (GDALAsyncReaderWrapper*)hWrapper;
    3820               1 :     return psWrapper->pyObject;
    3821                 : }
    3822                 : 
    3823                 : static void DeleteAsyncReaderWrapper(GDALAsyncReaderWrapperH hWrapper)
    3824                 : {
    3825               1 :     GDALAsyncReaderWrapper* psWrapper = (GDALAsyncReaderWrapper*)hWrapper;
    3826               1 :     if (psWrapper->hAsyncReader != NULL)
    3827                 :     {
    3828                 :         CPLError(CE_Failure, CPLE_AppDefined,
    3829               0 :                  "Native AsyncReader object will leak. EndAsyncReader() should have been called before");
    3830                 :     }
    3831               1 :     CPLFree(psWrapper);
    3832                 : }
    3833                 : 
    3834                 : 
    3835                 : 
    3836                 : static GDALAsyncReaderWrapper* CreateAsyncReaderWrapper(GDALAsyncReaderH  hAsyncReader,
    3837                 :                                                         void             *pyObject)
    3838                 : {
    3839               1 :     GDALAsyncReaderWrapper* psWrapper = (GDALAsyncReaderWrapper* )CPLMalloc(sizeof(GDALAsyncReaderWrapper));
    3840               1 :     psWrapper->hAsyncReader = hAsyncReader;
    3841               1 :     psWrapper->pyObject = pyObject;
    3842               1 :     Py_INCREF((PyObject*) psWrapper->pyObject);
    3843               1 :     return psWrapper;
    3844                 : }
    3845                 : 
    3846                 : static void DisableAsyncReaderWrapper(GDALAsyncReaderWrapperH hWrapper)
    3847                 : {
    3848               1 :     GDALAsyncReaderWrapper* psWrapper = (GDALAsyncReaderWrapper*)hWrapper;
    3849               1 :     if (psWrapper->pyObject)
    3850                 :     {
    3851               1 :         Py_XDECREF((PyObject*) psWrapper->pyObject);
    3852                 :     }
    3853               1 :     psWrapper->pyObject = NULL;
    3854               1 :     psWrapper->hAsyncReader = NULL;
    3855                 : }
    3856                 : 
    3857                 : 
    3858                 : SWIGINTERN void delete_GDALAsyncReaderShadow(GDALAsyncReaderShadow *self){
    3859                 :         DeleteAsyncReaderWrapper(self);
    3860                 :     }
    3861                 : SWIGINTERN GDALAsyncStatusType GDALAsyncReaderShadow_GetNextUpdatedRegion(GDALAsyncReaderShadow *self,double timeout,int *xoff,int *yoff,int *buf_xsize,int *buf_ysize){
    3862               1 :         GDALAsyncReaderH hReader = AsyncReaderWrapperGetReader(self);
    3863               1 :         if (hReader == NULL)
    3864                 :         {
    3865               0 :             *xoff = 0;
    3866               0 :             *yoff = 0;
    3867               0 :             *buf_xsize = 0;
    3868               0 :             *buf_ysize = 0;
    3869               0 :             return GARIO_ERROR;
    3870                 :         }
    3871               1 :         return GDALARGetNextUpdatedRegion(hReader, timeout, xoff, yoff, buf_xsize, buf_ysize );
    3872                 :     }
    3873                 : SWIGINTERN void GDALAsyncReaderShadow_GetBuffer(GDALAsyncReaderShadow *self,void **ppRetPyObject){
    3874               1 :         GDALAsyncReaderH hReader = AsyncReaderWrapperGetReader(self);
    3875               1 :         if (hReader == NULL)
    3876                 :         {
    3877               0 :             *ppRetPyObject = NULL;
    3878                 :             return;
    3879                 :         }
    3880               1 :         *ppRetPyObject = AsyncReaderWrapperGetPyObject(self);
    3881               1 :         Py_INCREF((PyObject*)*ppRetPyObject);
    3882                 :     }
    3883                 : SWIGINTERN int GDALAsyncReaderShadow_LockBuffer(GDALAsyncReaderShadow *self,double timeout){
    3884               0 :         GDALAsyncReaderH hReader = AsyncReaderWrapperGetReader(self);
    3885               0 :         if (hReader == NULL)
    3886                 :         {
    3887               0 :             return 0;
    3888                 :         }
    3889               0 :         return GDALARLockBuffer(hReader,timeout);
    3890                 :     }
    3891                 : SWIGINTERN void GDALAsyncReaderShadow_UnlockBuffer(GDALAsyncReaderShadow *self){
    3892               0 :         GDALAsyncReaderH hReader = AsyncReaderWrapperGetReader(self);
    3893               0 :         if (hReader == NULL)
    3894                 :         {
    3895                 :             return;
    3896                 :         }
    3897               0 :         GDALARUnlockBuffer(hReader);
    3898                 :     }
    3899                 : SWIGINTERN void delete_GDALDatasetShadow(GDALDatasetShadow *self){
    3900           16057 :     if ( GDALDereferenceDataset( self ) <= 0 ) {
    3901           11053 :       GDALClose(self);
    3902                 :     }
    3903                 :   }
    3904                 : SWIGINTERN GDALDriverShadow *GDALDatasetShadow_GetDriver(GDALDatasetShadow *self){
    3905             532 :     return (GDALDriverShadow*) GDALGetDatasetDriver( self );
    3906                 :   }
    3907                 : SWIGINTERN GDALRasterBandShadow *GDALDatasetShadow_GetRasterBand(GDALDatasetShadow *self,int nBand){
    3908          173954 :     return (GDALRasterBandShadow*) GDALGetRasterBand( self, nBand );
    3909                 :   }
    3910                 : SWIGINTERN char const *GDALDatasetShadow_GetProjection(GDALDatasetShadow *self){
    3911             374 :     return GDALGetProjectionRef( self );
    3912                 :   }
    3913                 : SWIGINTERN char const *GDALDatasetShadow_GetProjectionRef(GDALDatasetShadow *self){
    3914             178 :     return GDALGetProjectionRef( self );
    3915                 :   }
    3916                 : SWIGINTERN CPLErr GDALDatasetShadow_SetProjection(GDALDatasetShadow *self,char const *prj){
    3917             906 :     return GDALSetProjection( self, prj );
    3918                 :   }
    3919                 : SWIGINTERN void GDALDatasetShadow_GetGeoTransform(GDALDatasetShadow *self,double argout[6],int *isvalid,int *can_return_null=0){
    3920            1070 :     if (can_return_null && *can_return_null)
    3921                 :     {
    3922             102 :         *isvalid = (GDALGetGeoTransform( self, argout ) == CE_None );
    3923                 :     }
    3924                 :     else
    3925                 :     {
    3926             968 :         *isvalid = TRUE;
    3927             968 :         if ( GDALGetGeoTransform( self, argout ) != CE_None ) {
    3928              18 :             argout[0] = 0.0;
    3929              18 :             argout[1] = 1.0;
    3930              18 :             argout[2] = 0.0;
    3931              18 :             argout[3] = 0.0;
    3932              18 :             argout[4] = 0.0;
    3933              18 :             argout[5] = 1.0;
    3934                 :         }
    3935                 :     }
    3936                 :   }
    3937                 : SWIGINTERN CPLErr GDALDatasetShadow_SetGeoTransform(GDALDatasetShadow *self,double argin[6]){
    3938             891 :     return GDALSetGeoTransform( self, argin );
    3939                 :   }
    3940                 : SWIGINTERN int GDALDatasetShadow_BuildOverviews(GDALDatasetShadow *self,char const *resampling="NEAREST",int overviewlist=0,int *pOverviews=0,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    3941                 : 
    3942                 :     return GDALBuildOverviews(  self, 
    3943                 :                                 resampling ? resampling : "NEAREST", 
    3944                 :                                 overviewlist, 
    3945                 :                                 pOverviews, 
    3946                 :                                 0, 
    3947                 :                                 0, 
    3948                 :                                 callback, 
    3949             167 :                                 callback_data);
    3950                 :   }
    3951                 : SWIGINTERN int GDALDatasetShadow_GetGCPCount(GDALDatasetShadow *self){
    3952              27 :     return GDALGetGCPCount( self );
    3953                 :   }
    3954                 : SWIGINTERN char const *GDALDatasetShadow_GetGCPProjection(GDALDatasetShadow *self){
    3955              21 :     return GDALGetGCPProjection( self );
    3956                 :   }
    3957                 : SWIGINTERN void GDALDatasetShadow_GetGCPs(GDALDatasetShadow *self,int *nGCPs,GDAL_GCP const **pGCPs){
    3958              42 :     *nGCPs = GDALGetGCPCount( self );
    3959              42 :     *pGCPs = GDALGetGCPs( self );
    3960                 :   }
    3961                 : SWIGINTERN CPLErr GDALDatasetShadow_SetGCPs(GDALDatasetShadow *self,int nGCPs,GDAL_GCP const *pGCPs,char const *pszGCPProjection){
    3962               6 :     return GDALSetGCPs( self, nGCPs, pGCPs, pszGCPProjection );
    3963                 :   }
    3964                 : SWIGINTERN void GDALDatasetShadow_FlushCache(GDALDatasetShadow *self){
    3965              14 :     GDALFlushCache( self );
    3966                 :   }
    3967                 : SWIGINTERN CPLErr GDALDatasetShadow_AddBand(GDALDatasetShadow *self,GDALDataType datatype=GDT_Byte,char **options=0){
    3968               6 :     return GDALAddBand( self, datatype, options );
    3969                 :   }
    3970                 : SWIGINTERN CPLErr GDALDatasetShadow_CreateMaskBand(GDALDatasetShadow *self,int nFlags){
    3971              17 :       return GDALCreateDatasetMaskBand( self, nFlags );
    3972                 :   }
    3973                 : SWIGINTERN char **GDALDatasetShadow_GetFileList(GDALDatasetShadow *self){
    3974              35 :     return GDALGetFileList( self );
    3975                 :   }
    3976          169074 : 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,int *buf_pixel_space=0,int *buf_line_space=0,int *buf_band_space=0){
    3977                 :     CPLErr eErr;
    3978          169074 :     int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    3979          169074 :     int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    3980                 :     GDALDataType ntype;
    3981          169074 :     if ( buf_type != 0 ) {
    3982          169074 :       ntype = (GDALDataType) *buf_type;
    3983                 :     } else {
    3984               0 :       int lastband = GDALGetRasterCount( self ) - 1;
    3985               0 :       if (lastband < 0)
    3986               0 :         return CE_Failure;
    3987               0 :       ntype = GDALGetRasterDataType( GDALGetRasterBand( self, lastband ) );
    3988                 :     }
    3989                 : 
    3990          169074 :     int pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    3991          169074 :     int line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    3992          169074 :     int band_space = (buf_band_space == 0) ? 0 : *buf_band_space;
    3993                 : 
    3994                 :     GIntBig min_buffer_size =
    3995                 :       ComputeDatasetRasterIOSize (nxsize, nysize, GDALGetDataTypeSize( ntype ) / 8,
    3996                 :                                   band_list ? band_list : GDALGetRasterCount(self), pband_list, band_list,
    3997          169074 :                                   pixel_space, line_space, band_space, FALSE);
    3998          169074 :     if (min_buffer_size == 0)
    3999               1 :         return CE_Failure;
    4000                 : 
    4001          169073 :     if ( buf_len < min_buffer_size )
    4002                 :     {
    4003               1 :         CPLError(CE_Failure, CPLE_AppDefined, "Buffer too small");
    4004               1 :         return CE_Failure;
    4005                 :     }
    4006                 : 
    4007                 :     eErr = GDALDatasetRasterIO( self, GF_Write, xoff, yoff, xsize, ysize,
    4008                 :                                 (void*) buf_string, nxsize, nysize, ntype,
    4009          169072 :                                 band_list, pband_list, pixel_space, line_space, band_space );
    4010                 : 
    4011          169072 :     return eErr;
    4012                 :   }
    4013               1 : SWIGINTERN GDALAsyncReaderShadow *GDALDatasetShadow_BeginAsyncReader(GDALDatasetShadow *self,int xOff,int yOff,int xSize,int ySize,int 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){
    4014                 : 
    4015               1 :     if ((options != NULL) && (buf_xsize ==0) && (buf_ysize == 0))
    4016                 :     {
    4017                 :         // calculate an appropriate buffer size
    4018               0 :         const char* pszLevel = CSLFetchNameValue(options, "LEVEL");
    4019               0 :         if (pszLevel)
    4020                 :         {
    4021                 :             // round up
    4022                 :             int nLevel = atoi(pszLevel);
    4023               0 :             int nRes = 2 << (nLevel - 1);
    4024               0 :             buf_xsize = ceil(xSize / (1.0 * nRes));
    4025               0 :             buf_ysize = ceil(ySize / (1.0 * nRes));
    4026                 :         }
    4027                 :     }
    4028                 :     
    4029               1 :     int nxsize = (buf_xsize == 0) ? xSize : buf_xsize;
    4030               1 :     int nysize = (buf_ysize == 0) ? ySize : buf_ysize;
    4031                 :     
    4032                 :     GDALDataType ntype;
    4033               1 :     if (bufType != 0) {
    4034               1 :         ntype = (GDALDataType) bufType;
    4035                 :     } 
    4036                 :     else {
    4037               0 :         ntype = GDT_Byte;
    4038                 :     }
    4039                 :     
    4040               1 :     int nBCount = (band_list) != 0 ? band_list : GDALGetRasterCount(self);
    4041               1 :     int nMinSize = nxsize * nysize * nBCount * (GDALGetDataTypeSize(ntype) / 8);
    4042               1 :     if (buf_string == NULL || buf_len < nMinSize)
    4043                 :     {
    4044               0 :         CPLError(CE_Failure, CPLE_AppDefined, "Buffer is too small");
    4045               0 :         return NULL;
    4046                 :     }
    4047                 :     
    4048               1 :     bool myBandList = false;
    4049                 :     int* pBandList;
    4050                 :     
    4051               1 :     if (band_list != 0){
    4052               1 :         myBandList = false;
    4053               1 :         pBandList = pband_list;
    4054                 :     }        
    4055                 :     else
    4056                 :     {
    4057               0 :         myBandList = true;
    4058               0 :         pBandList = (int*)CPLMalloc(sizeof(int) * nBCount);
    4059               0 :         for (int i = 0; i < nBCount; ++i) {
    4060               0 :             pBandList[i] = i + 1;
    4061                 :         }
    4062                 :     }
    4063                 : 
    4064                 :     GDALAsyncReaderH hAsyncReader =
    4065                 :             GDALBeginAsyncReader(self, xOff, yOff, xSize, ySize, (void*) buf_string, nxsize, nysize, ntype, nBCount, pBandList, nPixelSpace, nLineSpace,
    4066               1 :     nBandSpace, options);
    4067               1 :     if (hAsyncReader)
    4068                 :     {
    4069               1 :         return (GDALAsyncReader*) CreateAsyncReaderWrapper(hAsyncReader, pyObject);
    4070                 :     }
    4071                 :     else
    4072                 :     {
    4073               0 :         return NULL;
    4074                 :     }
    4075                 :     
    4076                 :     if ( myBandList ) {
    4077                 :        CPLFree( pBandList );
    4078                 :     }
    4079                 : 
    4080                 :   }
    4081                 : SWIGINTERN void GDALDatasetShadow_EndAsyncReader(GDALDatasetShadow *self,GDALAsyncReaderShadow *ario){
    4082               1 :     GDALAsyncReaderH hReader = AsyncReaderWrapperGetReader(ario);
    4083               1 :     if (hReader == NULL)
    4084                 :     {
    4085                 :         return;
    4086                 :     }
    4087               1 :     GDALEndAsyncReader(self, hReader);
    4088                 :     DisableAsyncReaderWrapper(ario);
    4089                 :   }
    4090          167637 : SWIGINTERN CPLErr GDALDatasetShadow_ReadRaster1(GDALDatasetShadow *self,int xoff,int yoff,int xsize,int ysize,void **buf,int *buf_xsize=0,int *buf_ysize=0,GDALDataType *buf_type=0,int band_list=0,int *pband_list=0,int *buf_pixel_space=0,int *buf_line_space=0,int *buf_band_space=0){
    4091          167637 :     int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    4092          167637 :     int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    4093                 :     GDALDataType ntype;
    4094          167637 :     if ( buf_type != 0 ) {
    4095          167637 :       ntype = (GDALDataType) *buf_type;
    4096                 :     } else {
    4097               0 :       int lastband = GDALGetRasterCount( self ) - 1;
    4098               0 :       if (lastband < 0)
    4099                 :       {
    4100               0 :           *buf = NULL;
    4101               0 :           return CE_Failure;
    4102                 :       }
    4103               0 :       ntype = GDALGetRasterDataType( GDALGetRasterBand( self, lastband ) );
    4104                 :     }
    4105                 : 
    4106          167637 :     int pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    4107          167637 :     int line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    4108          167637 :     int band_space = (buf_band_space == 0) ? 0 : *buf_band_space;
    4109                 : 
    4110                 :     GIntBig buf_size = ComputeDatasetRasterIOSize (nxsize, nysize, GDALGetDataTypeSize( ntype ) / 8,
    4111                 :                                                band_list ? band_list : GDALGetRasterCount(self), pband_list, band_list,
    4112          167637 :                                                pixel_space, line_space, band_space, FALSE);
    4113          167637 :     if (buf_size == 0)
    4114                 :     {
    4115               1 :         *buf = NULL;
    4116               1 :         return CE_Failure;
    4117                 :     }
    4118                 : 
    4119                 : #if PY_VERSION_HEX >= 0x03000000 
    4120                 :     *buf = (void *)PyBytes_FromStringAndSize( NULL, buf_size ); 
    4121                 :     if (*buf == NULL)
    4122                 :     {
    4123                 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    4124                 :         return CE_Failure;
    4125                 :     }
    4126                 :     char *data = PyBytes_AsString( (PyObject *)*buf ); 
    4127                 : #else 
    4128          167636 :     *buf = (void *)PyString_FromStringAndSize( NULL, buf_size ); 
    4129          167636 :     if (*buf == NULL)
    4130                 :     {
    4131               0 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    4132               0 :         return CE_Failure;
    4133                 :     }
    4134          167636 :     char *data = PyString_AsString( (PyObject *)*buf ); 
    4135                 : #endif
    4136                 : 
    4137                 :     CPLErr eErr = GDALDatasetRasterIO(self, GF_Read, xoff, yoff, xsize, ysize,
    4138                 :                                (void*) data, nxsize, nysize, ntype,
    4139          167636 :                                band_list, pband_list, pixel_space, line_space, band_space );
    4140          167636 :     if (eErr == CE_Failure)
    4141                 :     {
    4142               2 :         Py_DECREF((PyObject*)*buf);
    4143               2 :         *buf = NULL;
    4144                 :     }
    4145          167636 :     return eErr;
    4146                 : }
    4147                 : 
    4148            2139 : int GDALDatasetShadow_RasterXSize_get( GDALDatasetShadow *h ) {
    4149            2139 :   return GDALGetRasterXSize( h );
    4150                 : }
    4151           10516 : int GDALDatasetShadow_RasterYSize_get( GDALDatasetShadow *h ) {
    4152           10516 :   return GDALGetRasterYSize( h );
    4153                 : }
    4154          335614 : int GDALDatasetShadow_RasterCount_get( GDALDatasetShadow *h ) {
    4155          335614 :   return GDALGetRasterCount( h );
    4156                 : }
    4157                 : 
    4158                 : 
    4159                 : /* Returned size is in bytes or 0 if an error occured */
    4160                 : static
    4161            1721 : GIntBig ComputeBandRasterIOSize (int buf_xsize, int buf_ysize, int nPixelSize,
    4162                 :                              int nPixelSpace, int nLineSpace,
    4163                 :                              int bSpacingShouldBeMultipleOfPixelSize )
    4164                 : {
    4165                 : #if SIZEOF_VOIDP == 8
    4166            1721 :     const GIntBig MAX_INT = (((GIntBig)0x7fffffff) << 32) | 0xffffffff;
    4167                 : #else
    4168                 :     const GIntBig MAX_INT = 0x7fffffff;
    4169                 : #endif
    4170            1721 :     const GIntBig MAX_INT32 = 0x7fffffff;
    4171            1721 :     if (buf_xsize <= 0 || buf_ysize <= 0)
    4172                 :     {
    4173               2 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal values for buffer size");
    4174               2 :         return 0;
    4175                 :     }
    4176                 : 
    4177            1719 :     if (nPixelSpace < 0 || nLineSpace < 0)
    4178                 :     {
    4179               0 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal values for space arguments");
    4180               0 :         return 0;
    4181                 :     }
    4182                 : 
    4183            1719 :     if (nPixelSize == 0)
    4184                 :     {
    4185               0 :         CPLError(CE_Failure, CPLE_IllegalArg, "Illegal value for data type");
    4186               0 :         return 0;
    4187                 :     }
    4188                 : 
    4189            1719 :     if( nPixelSpace == 0 )
    4190            1719 :         nPixelSpace = nPixelSize;
    4191               0 :     else if ( bSpacingShouldBeMultipleOfPixelSize && (nPixelSpace % nPixelSize) != 0 )
    4192                 :     {
    4193               0 :         CPLError(CE_Failure, CPLE_IllegalArg, "nPixelSpace should be a multiple of nPixelSize");
    4194               0 :         return 0;
    4195                 :     }
    4196                 : 
    4197            1719 :     if( nLineSpace == 0 )
    4198                 :     {
    4199            1719 :         if (nPixelSpace > MAX_INT32 / buf_xsize)
    4200                 :         {
    4201               0 :             CPLError(CE_Failure, CPLE_IllegalArg, "Integer overflow for nLineSpace");
    4202               0 :             return 0;
    4203                 :         }
    4204            1719 :         nLineSpace = nPixelSpace * buf_xsize;
    4205                 :     }
    4206               0 :     else if ( bSpacingShouldBeMultipleOfPixelSize && (nLineSpace % nPixelSize) != 0 )
    4207                 :     {
    4208               0 :         CPLError(CE_Failure, CPLE_IllegalArg, "nLineSpace should be a multiple of nPixelSize");
    4209               0 :         return 0;
    4210                 :     }
    4211                 : 
    4212            1719 :     GIntBig nRet = (GIntBig)(buf_ysize - 1) * nLineSpace + (GIntBig)(buf_xsize - 1) * nPixelSpace + nPixelSize;
    4213                 :     if (nRet > MAX_INT)
    4214                 :     {
    4215                 :         CPLError(CE_Failure, CPLE_IllegalArg, "Integer overflow");
    4216                 :         return 0;
    4217                 :     }
    4218                 : 
    4219            1719 :     return nRet;
    4220                 : }
    4221                 : 
    4222                 : 
    4223                 : static
    4224                 : CPLErr WriteRaster_internal( GDALRasterBandShadow *obj,
    4225                 :                              int xoff, int yoff, int xsize, int ysize,
    4226                 :                              int buf_xsize, int buf_ysize,
    4227                 :                              GDALDataType buf_type,
    4228                 :                              GIntBig buf_size, char *buffer,
    4229                 :                              int pixel_space, int line_space)
    4230                 : {
    4231                 :     GIntBig min_buffer_size = ComputeBandRasterIOSize (buf_xsize, buf_ysize, GDALGetDataTypeSize( buf_type ) / 8,
    4232            1374 :                                                    pixel_space, line_space, FALSE );
    4233            1374 :     if ( min_buffer_size == 0 )
    4234               1 :       return CE_Failure;
    4235                 :       
    4236            1373 :     if ( buf_size < min_buffer_size ) {
    4237               1 :       CPLError(CE_Failure, CPLE_AppDefined, "Buffer too small");
    4238               1 :       return CE_Failure;
    4239                 :     }
    4240                 : 
    4241                 :     return GDALRasterIO( obj, GF_Write, xoff, yoff, xsize, ysize, 
    4242            1372 :             (void *) buffer, buf_xsize, buf_ysize, buf_type, pixel_space, line_space );
    4243                 : }
    4244                 : 
    4245                 : SWIGINTERN int GDALRasterBandShadow_GetBand(GDALRasterBandShadow *self){
    4246               0 :     return GDALGetBandNumber(self);
    4247                 :   }
    4248                 : SWIGINTERN void GDALRasterBandShadow_GetBlockSize(GDALRasterBandShadow *self,int *pnBlockXSize,int *pnBlockYSize){
    4249              31 :       GDALGetBlockSize(self, pnBlockXSize, pnBlockYSize);
    4250                 :   }
    4251                 : SWIGINTERN GDALColorInterp GDALRasterBandShadow_GetColorInterpretation(GDALRasterBandShadow *self){
    4252              21 :     return GDALGetRasterColorInterpretation( self );
    4253                 :   }
    4254                 : SWIGINTERN GDALColorInterp GDALRasterBandShadow_GetRasterColorInterpretation(GDALRasterBandShadow *self){
    4255             154 :     return GDALGetRasterColorInterpretation( self );
    4256                 :   }
    4257                 : SWIGINTERN CPLErr GDALRasterBandShadow_SetColorInterpretation(GDALRasterBandShadow *self,GDALColorInterp val){
    4258              16 :     return GDALSetRasterColorInterpretation( self, val );
    4259                 :   }
    4260                 : SWIGINTERN CPLErr GDALRasterBandShadow_SetRasterColorInterpretation(GDALRasterBandShadow *self,GDALColorInterp val){
    4261              57 :     return GDALSetRasterColorInterpretation( self, val );
    4262                 :   }
    4263                 : SWIGINTERN void GDALRasterBandShadow_GetNoDataValue(GDALRasterBandShadow *self,double *val,int *hasval){
    4264             115 :     *val = GDALGetRasterNoDataValue( self, hasval );
    4265                 :   }
    4266                 : SWIGINTERN CPLErr GDALRasterBandShadow_SetNoDataValue(GDALRasterBandShadow *self,double d){
    4267              54 :     return GDALSetRasterNoDataValue( self, d );
    4268                 :   }
    4269                 : SWIGINTERN char const *GDALRasterBandShadow_GetUnitType(GDALRasterBandShadow *self){
    4270              27 :       return GDALGetRasterUnitType( self );
    4271                 :   }
    4272                 : SWIGINTERN CPLErr GDALRasterBandShadow_SetUnitType(GDALRasterBandShadow *self,char const *val){
    4273               5 :     return GDALSetRasterUnitType( self, val );
    4274                 :   }
    4275                 : SWIGINTERN char **GDALRasterBandShadow_GetRasterCategoryNames(GDALRasterBandShadow *self){
    4276              18 :     return GDALGetRasterCategoryNames( self );
    4277                 :   }
    4278                 : SWIGINTERN CPLErr GDALRasterBandShadow_SetRasterCategoryNames(GDALRasterBandShadow *self,char **names){
    4279               0 :     return GDALSetRasterCategoryNames( self, names );
    4280                 :   }
    4281                 : SWIGINTERN void GDALRasterBandShadow_GetMinimum(GDALRasterBandShadow *self,double *val,int *hasval){
    4282              31 :     *val = GDALGetRasterMinimum( self, hasval );
    4283                 :   }
    4284                 : SWIGINTERN void GDALRasterBandShadow_GetMaximum(GDALRasterBandShadow *self,double *val,int *hasval){
    4285              28 :     *val = GDALGetRasterMaximum( self, hasval );
    4286                 :   }
    4287                 : SWIGINTERN void GDALRasterBandShadow_GetOffset(GDALRasterBandShadow *self,double *val,int *hasval){
    4288              32 :     *val = GDALGetRasterOffset( self, hasval );
    4289                 :   }
    4290                 : SWIGINTERN void GDALRasterBandShadow_GetScale(GDALRasterBandShadow *self,double *val,int *hasval){
    4291              32 :     *val = GDALGetRasterScale( self, hasval );
    4292                 :   }
    4293                 : SWIGINTERN CPLErr GDALRasterBandShadow_SetOffset(GDALRasterBandShadow *self,double val){
    4294               5 :     return GDALSetRasterOffset( self, val );
    4295                 :   }
    4296                 : SWIGINTERN CPLErr GDALRasterBandShadow_SetScale(GDALRasterBandShadow *self,double val){
    4297               5 :     return GDALSetRasterScale( self, val );
    4298                 :   }
    4299                 : SWIGINTERN CPLErr GDALRasterBandShadow_GetStatistics(GDALRasterBandShadow *self,int approx_ok,int force,double *min,double *max,double *mean,double *stddev){
    4300              60 :     if (min) *min = 0;
    4301              60 :     if (max) *max = 0;
    4302              60 :     if (mean) *mean = 0;
    4303              60 :     if (stddev) *stddev = -1; /* This is the only way to recognize from Python if GetRasterStatistics() has updated the values */
    4304                 :     return GDALGetRasterStatistics( self, approx_ok, force, 
    4305              60 :             min, max, mean, stddev );
    4306                 :   }
    4307                 : 
    4308                 : SWIGINTERN int
    4309                 : SWIG_AsVal_bool (PyObject *obj, bool *val)
    4310                 : {
    4311               5 :   int r = PyObject_IsTrue(obj);
    4312               5 :   if (r == -1)
    4313               0 :     return SWIG_ERROR;
    4314               5 :   if (val) *val = r ? true : false;
    4315               5 :   return SWIG_OK;
    4316                 : }
    4317                 : 
    4318                 : SWIGINTERN CPLErr GDALRasterBandShadow_ComputeStatistics(GDALRasterBandShadow *self,bool approx_ok,double *min=NULL,double *max=NULL,double *mean=NULL,double *stddev=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    4319               5 :     return GDALComputeRasterStatistics( self, approx_ok, min, max, mean, stddev, callback, callback_data );
    4320                 :   }
    4321                 : SWIGINTERN CPLErr GDALRasterBandShadow_SetStatistics(GDALRasterBandShadow *self,double min,double max,double mean,double stddev){
    4322               0 :     return GDALSetRasterStatistics( self, min, max, mean, stddev );
    4323                 :   }
    4324                 : SWIGINTERN int GDALRasterBandShadow_GetOverviewCount(GDALRasterBandShadow *self){
    4325              86 :     return GDALGetOverviewCount( self );
    4326                 :   }
    4327                 : SWIGINTERN GDALRasterBandShadow *GDALRasterBandShadow_GetOverview(GDALRasterBandShadow *self,int i){
    4328             259 :     return (GDALRasterBandShadow*) GDALGetOverview( self, i );
    4329                 :   }
    4330                 : SWIGINTERN int GDALRasterBandShadow_Checksum(GDALRasterBandShadow *self,int xoff=0,int yoff=0,int *xsize=0,int *ysize=0){
    4331            2306 :     int nxsize = (xsize!=0) ? *xsize : GDALGetRasterBandXSize( self );
    4332            2306 :     int nysize = (ysize!=0) ? *ysize : GDALGetRasterBandYSize( self );
    4333            2306 :     return GDALChecksumImage( self, xoff, yoff, nxsize, nysize );
    4334                 :   }
    4335                 : SWIGINTERN void GDALRasterBandShadow_ComputeRasterMinMax(GDALRasterBandShadow *self,double argout[2],int approx_ok=0){
    4336             842 :     GDALComputeRasterMinMax( self, approx_ok, argout );
    4337                 :   }
    4338                 : SWIGINTERN void GDALRasterBandShadow_ComputeBandStats(GDALRasterBandShadow *self,double argout[2],int samplestep=1){
    4339                 :     GDALComputeBandStats( self, samplestep, argout+0, argout+1, 
    4340              12 :                           NULL, NULL );
    4341                 :   }
    4342                 : SWIGINTERN CPLErr GDALRasterBandShadow_Fill(GDALRasterBandShadow *self,double real_fill,double imag_fill=0.0){
    4343          168012 :     return GDALFillRaster( self, real_fill, imag_fill );
    4344                 :   }
    4345            1374 : 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,int *buf_type=0,int *buf_pixel_space=0,int *buf_line_space=0){
    4346            1374 :     int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    4347            1374 :     int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    4348                 :     GDALDataType ntype  = (buf_type==0) ? GDALGetRasterDataType(self)
    4349            1374 :                                         : (GDALDataType)*buf_type;
    4350            1374 :     int pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    4351            1374 :     int line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    4352                 :     return WriteRaster_internal( self, xoff, yoff, xsize, ysize,
    4353            1374 :                                  nxsize, nysize, ntype, buf_len, buf_string, pixel_space, line_space );
    4354                 :   }
    4355                 : SWIGINTERN void GDALRasterBandShadow_FlushCache(GDALRasterBandShadow *self){
    4356               8 :     GDALFlushRasterCache( self );
    4357                 :   }
    4358                 : SWIGINTERN GDALColorTableShadow *GDALRasterBandShadow_GetRasterColorTable(GDALRasterBandShadow *self){
    4359              62 :     return (GDALColorTableShadow*) GDALGetRasterColorTable( self );
    4360                 :   }
    4361                 : SWIGINTERN GDALColorTableShadow *GDALRasterBandShadow_GetColorTable(GDALRasterBandShadow *self){
    4362              10 :     return (GDALColorTableShadow*) GDALGetRasterColorTable( self );
    4363                 :   }
    4364                 : SWIGINTERN int GDALRasterBandShadow_SetRasterColorTable(GDALRasterBandShadow *self,GDALColorTableShadow *arg){
    4365              17 :     return GDALSetRasterColorTable( self, arg );
    4366                 :   }
    4367                 : SWIGINTERN int GDALRasterBandShadow_SetColorTable(GDALRasterBandShadow *self,GDALColorTableShadow *arg){
    4368               4 :     return GDALSetRasterColorTable( self, arg );
    4369                 :   }
    4370                 : SWIGINTERN GDALRasterAttributeTableShadow *GDALRasterBandShadow_GetDefaultRAT(GDALRasterBandShadow *self){ 
    4371              22 :       return (GDALRasterAttributeTableShadow*) GDALGetDefaultRAT(self);
    4372                 :   }
    4373                 : SWIGINTERN int GDALRasterBandShadow_SetDefaultRAT(GDALRasterBandShadow *self,GDALRasterAttributeTableShadow *table){
    4374               2 :       return GDALSetDefaultRAT(self, table);
    4375                 :   }
    4376                 : SWIGINTERN GDALRasterBandShadow *GDALRasterBandShadow_GetMaskBand(GDALRasterBandShadow *self){
    4377             126 :       return (GDALRasterBandShadow *) GDALGetMaskBand( self );
    4378                 :   }
    4379                 : SWIGINTERN int GDALRasterBandShadow_GetMaskFlags(GDALRasterBandShadow *self){
    4380              84 :       return GDALGetMaskFlags( self );
    4381                 :   }
    4382                 : SWIGINTERN CPLErr GDALRasterBandShadow_CreateMaskBand(GDALRasterBandShadow *self,int nFlags){
    4383              12 :       return GDALCreateMaskBand( self, nFlags );
    4384                 :   }
    4385                 : SWIGINTERN CPLErr GDALRasterBandShadow_GetHistogram(GDALRasterBandShadow *self,double min=-0.5,double max=255.5,int buckets=256,int *panHistogram=NULL,int include_out_of_range=0,int approx_ok=1,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    4386               4 :     CPLErrorReset(); 
    4387                 :     CPLErr err = GDALGetRasterHistogram( self, min, max, buckets, panHistogram,
    4388                 :                                          include_out_of_range, approx_ok,
    4389               4 :                                          callback, callback_data );
    4390               4 :     return err;
    4391                 :   }
    4392                 : SWIGINTERN CPLErr GDALRasterBandShadow_GetDefaultHistogram(GDALRasterBandShadow *self,double *min_ret=NULL,double *max_ret=NULL,int *buckets_ret=NULL,int **ppanHistogram=NULL,int force=1,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    4393                 :     return GDALGetDefaultHistogram( self, min_ret, max_ret, buckets_ret,
    4394                 :                                     ppanHistogram, force, 
    4395               3 :                                     callback, callback_data );
    4396                 : }
    4397                 : SWIGINTERN CPLErr GDALRasterBandShadow_SetDefaultHistogram(GDALRasterBandShadow *self,double min,double max,int buckets_in,int *panHistogram_in){
    4398                 :     return GDALSetDefaultHistogram( self, min, max, 
    4399               0 :                   buckets_in, panHistogram_in );
    4400                 : }
    4401                 : SWIGINTERN bool GDALRasterBandShadow_HasArbitraryOverviews(GDALRasterBandShadow *self){
    4402              17 :       return (GDALHasArbitraryOverviews( self ) != 0) ? true : false;
    4403                 :   }
    4404                 : 
    4405                 : SWIGINTERNINLINE PyObject*
    4406                 :   SWIG_From_bool  (bool value)
    4407                 : {
    4408              17 :   return PyBool_FromLong(value ? 1 : 0);
    4409                 : }
    4410                 : 
    4411                 : SWIGINTERN char **GDALRasterBandShadow_GetCategoryNames(GDALRasterBandShadow *self){
    4412               6 :     return GDALGetRasterCategoryNames( self );
    4413                 :   }
    4414                 : SWIGINTERN CPLErr GDALRasterBandShadow_SetCategoryNames(GDALRasterBandShadow *self,char **papszCategoryNames){
    4415               1 :     return GDALSetRasterCategoryNames( self, papszCategoryNames );
    4416                 :   }
    4417             347 : SWIGINTERN CPLErr GDALRasterBandShadow_ReadRaster1(GDALRasterBandShadow *self,int xoff,int yoff,int xsize,int ysize,void **buf,int *buf_xsize=0,int *buf_ysize=0,int *buf_type=0,int *buf_pixel_space=0,int *buf_line_space=0){
    4418             347 :     int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    4419             347 :     int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    4420                 :     GDALDataType ntype  = (buf_type==0) ? GDALGetRasterDataType(self)
    4421             347 :                                         : (GDALDataType)*buf_type;
    4422             347 :     int pixel_space = (buf_pixel_space == 0) ? 0 : *buf_pixel_space;
    4423             347 :     int line_space = (buf_line_space == 0) ? 0 : *buf_line_space;
    4424                 : 
    4425                 :     GIntBig buf_size = ComputeBandRasterIOSize( nxsize, nysize, GDALGetDataTypeSize( ntype ) / 8,
    4426             347 :                                             pixel_space, line_space, FALSE ); 
    4427             347 :     if (buf_size == 0)
    4428                 :     {
    4429               1 :         *buf = NULL;
    4430               1 :         return CE_Failure;
    4431                 :     }
    4432                 : #if PY_VERSION_HEX >= 0x03000000 
    4433                 :     *buf = (void *)PyBytes_FromStringAndSize( NULL, buf_size ); 
    4434                 :     if (*buf == NULL)
    4435                 :     {
    4436                 :         *buf = Py_None;
    4437                 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    4438                 :         return CE_Failure;
    4439                 :     }
    4440                 :     char *data = PyBytes_AsString( (PyObject *)*buf ); 
    4441                 : #else 
    4442             346 :     *buf = (void *)PyString_FromStringAndSize( NULL, buf_size ); 
    4443             346 :     if (*buf == NULL)
    4444                 :     {
    4445               0 :         CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate result buffer");
    4446               0 :         return CE_Failure;
    4447                 :     }
    4448             346 :     char *data = PyString_AsString( (PyObject *)*buf ); 
    4449                 : #endif
    4450                 :     CPLErr eErr = GDALRasterIO( self, GF_Read, xoff, yoff, xsize, ysize, 
    4451                 :                          (void *) data, nxsize, nysize, ntype, 
    4452             346 :                          pixel_space, line_space ); 
    4453             346 :     if (eErr == CE_Failure)
    4454                 :     {
    4455               1 :         Py_DECREF((PyObject*)*buf);
    4456               1 :         *buf = NULL;
    4457                 :     }
    4458             346 :     return eErr;
    4459                 :   }
    4460                 : 
    4461             576 : GDALDataType GDALRasterBandShadow_DataType_get( GDALRasterBandShadow *h ) {
    4462             576 :   return GDALGetRasterDataType( h );
    4463                 : }
    4464             304 : int GDALRasterBandShadow_XSize_get( GDALRasterBandShadow *h ) {
    4465             304 :   return GDALGetRasterBandXSize( h );
    4466                 : }
    4467             265 : int GDALRasterBandShadow_YSize_get( GDALRasterBandShadow *h ) {
    4468             265 :   return GDALGetRasterBandYSize( h );
    4469                 : }
    4470                 : 
    4471                 : SWIGINTERN GDALColorTableShadow *new_GDALColorTableShadow(GDALPaletteInterp palette=GPI_RGB){
    4472              21 :         return (GDALColorTableShadow*) GDALCreateColorTable(palette);
    4473                 :     }
    4474                 : SWIGINTERN void delete_GDALColorTableShadow(GDALColorTableShadow *self){
    4475              22 :         GDALDestroyColorTable(self);
    4476                 :     }
    4477                 : SWIGINTERN GDALColorTableShadow *GDALColorTableShadow_Clone(GDALColorTableShadow *self){
    4478               1 :         return (GDALColorTableShadow*) GDALCloneColorTable (self);
    4479                 :     }
    4480                 : SWIGINTERN GDALPaletteInterp GDALColorTableShadow_GetPaletteInterpretation(GDALColorTableShadow *self){
    4481               2 :         return GDALGetPaletteInterpretation(self);
    4482                 :     }
    4483                 : SWIGINTERN int GDALColorTableShadow_GetColorEntryCount(GDALColorTableShadow *self){
    4484              19 :         return GDALGetColorEntryCount(self);
    4485                 :     }
    4486                 : SWIGINTERN GDALColorEntry *GDALColorTableShadow_GetColorEntry(GDALColorTableShadow *self,int entry){
    4487             812 :         return (GDALColorEntry*) GDALGetColorEntry(self, entry);
    4488                 :     }
    4489                 : SWIGINTERN int GDALColorTableShadow_GetColorEntryAsRGB(GDALColorTableShadow *self,int entry,GDALColorEntry *centry){
    4490               0 :         return GDALGetColorEntryAsRGB(self, entry, centry);
    4491                 :     }
    4492                 : SWIGINTERN void GDALColorTableShadow_SetColorEntry(GDALColorTableShadow *self,int entry,GDALColorEntry const *centry){
    4493              53 :         GDALSetColorEntry(self, entry, centry);
    4494                 :     }
    4495                 : SWIGINTERN void GDALColorTableShadow_CreateColorRamp(GDALColorTableShadow *self,int nStartIndex,GDALColorEntry const *startcolor,int nEndIndex,GDALColorEntry const *endcolor){
    4496               1 :         GDALCreateColorRamp(self, nStartIndex, startcolor, nEndIndex, endcolor);
    4497                 :     }
    4498                 : SWIGINTERN GDALRasterAttributeTableShadow *new_GDALRasterAttributeTableShadow(){
    4499                 :         return (GDALRasterAttributeTableShadow*) 
    4500               2 :     GDALCreateRasterAttributeTable();
    4501                 :     }
    4502                 : SWIGINTERN void delete_GDALRasterAttributeTableShadow(GDALRasterAttributeTableShadow *self){
    4503               3 :         GDALDestroyRasterAttributeTable(self);
    4504                 :     }
    4505                 : SWIGINTERN GDALRasterAttributeTableShadow *GDALRasterAttributeTableShadow_Clone(GDALRasterAttributeTableShadow *self){
    4506               1 :         return (GDALRasterAttributeTableShadow*) GDALRATClone(self);
    4507                 :     }
    4508                 : SWIGINTERN int GDALRasterAttributeTableShadow_GetColumnCount(GDALRasterAttributeTableShadow *self){ 
    4509               5 :         return GDALRATGetColumnCount( self );
    4510                 :     }
    4511                 : SWIGINTERN char const *GDALRasterAttributeTableShadow_GetNameOfCol(GDALRasterAttributeTableShadow *self,int iCol){ 
    4512               4 :         return GDALRATGetNameOfCol( self, iCol );
    4513                 :     }
    4514                 : SWIGINTERN GDALRATFieldUsage GDALRasterAttributeTableShadow_GetUsageOfCol(GDALRasterAttributeTableShadow *self,int iCol){
    4515               6 :         return GDALRATGetUsageOfCol( self, iCol );
    4516                 :     }
    4517                 : SWIGINTERN GDALRATFieldType GDALRasterAttributeTableShadow_GetTypeOfCol(GDALRasterAttributeTableShadow *self,int iCol){
    4518               6 :         return GDALRATGetTypeOfCol( self, iCol );
    4519                 :     }
    4520                 : SWIGINTERN int GDALRasterAttributeTableShadow_GetColOfUsage(GDALRasterAttributeTableShadow *self,GDALRATFieldUsage eUsage){
    4521               0 :         return GDALRATGetColOfUsage( self, eUsage );
    4522                 :     }
    4523                 : SWIGINTERN int GDALRasterAttributeTableShadow_GetRowCount(GDALRasterAttributeTableShadow *self){ 
    4524               3 :         return GDALRATGetRowCount( self );
    4525                 :     }
    4526                 : SWIGINTERN char const *GDALRasterAttributeTableShadow_GetValueAsString(GDALRasterAttributeTableShadow *self,int iRow,int iCol){ 
    4527               0 :         return GDALRATGetValueAsString( self, iRow, iCol );
    4528                 :     }
    4529                 : SWIGINTERN int GDALRasterAttributeTableShadow_GetValueAsInt(GDALRasterAttributeTableShadow *self,int iRow,int iCol){ 
    4530               6 :         return GDALRATGetValueAsInt( self, iRow, iCol );
    4531                 :     }
    4532                 : SWIGINTERN double GDALRasterAttributeTableShadow_GetValueAsDouble(GDALRasterAttributeTableShadow *self,int iRow,int iCol){ 
    4533               0 :         return GDALRATGetValueAsDouble( self, iRow, iCol );
    4534                 :     }
    4535                 : SWIGINTERN void GDALRasterAttributeTableShadow_SetValueAsString(GDALRasterAttributeTableShadow *self,int iRow,int iCol,char const *pszValue){ 
    4536               0 :         GDALRATSetValueAsString( self, iRow, iCol, pszValue );
    4537                 :     }
    4538                 : SWIGINTERN void GDALRasterAttributeTableShadow_SetValueAsInt(GDALRasterAttributeTableShadow *self,int iRow,int iCol,int nValue){ 
    4539               6 :         GDALRATSetValueAsInt( self, iRow, iCol, nValue );
    4540                 :     }
    4541                 : SWIGINTERN void GDALRasterAttributeTableShadow_SetValueAsDouble(GDALRasterAttributeTableShadow *self,int iRow,int iCol,double dfValue){ 
    4542               0 :         GDALRATSetValueAsDouble( self, iRow, iCol, dfValue );
    4543                 :     }
    4544                 : SWIGINTERN void GDALRasterAttributeTableShadow_SetRowCount(GDALRasterAttributeTableShadow *self,int nCount){
    4545               1 :         GDALRATSetRowCount( self, nCount );
    4546                 :     }
    4547                 : SWIGINTERN int GDALRasterAttributeTableShadow_CreateColumn(GDALRasterAttributeTableShadow *self,char const *pszName,GDALRATFieldType eType,GDALRATFieldUsage eUsage){
    4548               2 :         return GDALRATCreateColumn( self, pszName, eType, eUsage );
    4549                 :     }
    4550                 : SWIGINTERN bool GDALRasterAttributeTableShadow_GetLinearBinning(GDALRasterAttributeTableShadow *self,double *pdfRow0Min,double *pdfBinSize){
    4551               0 :         return (GDALRATGetLinearBinning(self, pdfRow0Min, pdfBinSize) != 0) ? true : false;
    4552                 :     }
    4553                 : SWIGINTERN int GDALRasterAttributeTableShadow_SetLinearBinning(GDALRasterAttributeTableShadow *self,double dfRow0Min,double dfBinSize){
    4554               0 :         return GDALRATSetLinearBinning(self, dfRow0Min, dfBinSize);
    4555                 :     }
    4556                 : SWIGINTERN int GDALRasterAttributeTableShadow_GetRowOfValue(GDALRasterAttributeTableShadow *self,double dfValue){
    4557               2 :         return GDALRATGetRowOfValue( self, dfValue );
    4558                 :     }
    4559                 : 
    4560                 : #include "gdalgrid.h"
    4561                 : 
    4562                 : #ifdef DEBUG 
    4563                 : typedef struct OGRLayerHS OGRLayerShadow;
    4564                 : typedef struct OGRGeometryHS OGRGeometryShadow;
    4565                 : #else
    4566                 : typedef void OGRLayerShadow;
    4567                 : typedef void OGRGeometryShadow;
    4568                 : #endif
    4569                 : 
    4570                 : 
    4571              61 : int GDALTermProgress_nocb( double dfProgress, const char * pszMessage=NULL, void *pData=NULL ) {
    4572              61 :   return GDALTermProgress( dfProgress, pszMessage, pData);
    4573                 : }
    4574                 : 
    4575                 : 
    4576               3 : int  ComputeMedianCutPCT ( GDALRasterBandShadow *red,
    4577                 :                               GDALRasterBandShadow *green,
    4578                 :                               GDALRasterBandShadow *blue,
    4579                 :                               int num_colors,
    4580                 :                               GDALColorTableShadow* colors,
    4581                 :                               GDALProgressFunc callback = NULL,
    4582                 :                               void* callback_data=NULL) {
    4583                 : 
    4584               3 :     CPLErrorReset();
    4585                 : 
    4586                 :     int err = GDALComputeMedianCutPCT( red,
    4587                 :                                           green,
    4588                 :                                           blue,
    4589                 :                                           NULL,
    4590                 :                                           num_colors,
    4591                 :                                           colors,
    4592                 :                                           callback,
    4593               3 :                                           callback_data);
    4594                 :     
    4595               3 :     return err;
    4596                 : }
    4597                 : 
    4598                 : 
    4599               4 : int  DitherRGB2PCT ( GDALRasterBandShadow *red,
    4600                 :                      GDALRasterBandShadow *green,
    4601                 :                      GDALRasterBandShadow *blue,
    4602                 :                      GDALRasterBandShadow *target,
    4603                 :                      GDALColorTableShadow *colors,
    4604                 :                      GDALProgressFunc callback = NULL,
    4605                 :                      void* callback_data=NULL) {
    4606                 : 
    4607               4 :     CPLErrorReset();
    4608                 :     int err;
    4609                 :     err = GDALDitherRGB2PCT(  red,
    4610                 :                                   green,
    4611                 :                                   blue,
    4612                 :                                   target,
    4613                 :                                   colors,
    4614                 :                                   callback,
    4615               4 :                                   callback_data);
    4616                 :     
    4617               4 :     return err;
    4618                 : }
    4619                 : 
    4620                 : 
    4621               7 : CPLErr  ReprojectImage ( GDALDatasetShadow *src_ds,
    4622                 :                          GDALDatasetShadow *dst_ds,
    4623                 :                          const char *src_wkt=NULL,
    4624                 :                          const char *dst_wkt=NULL,
    4625                 :                          GDALResampleAlg eResampleAlg=GRA_NearestNeighbour,
    4626                 :                          double WarpMemoryLimit=0.0,
    4627                 :                          double maxerror = 0.0,
    4628                 :        GDALProgressFunc callback = NULL,
    4629                 :                        void* callback_data=NULL) {
    4630                 : 
    4631               7 :     CPLErrorReset();
    4632                 : 
    4633                 :     CPLErr err = GDALReprojectImage( src_ds,
    4634                 :                                      src_wkt,
    4635                 :                                      dst_ds,
    4636                 :                                      dst_wkt,
    4637                 :                                      eResampleAlg,
    4638                 :                                      WarpMemoryLimit,
    4639                 :                                      maxerror,
    4640                 :                                      callback,
    4641                 :                                      callback_data,
    4642               7 :                                      NULL);
    4643                 :     
    4644               7 :     return err;
    4645                 : }
    4646                 : 
    4647                 : 
    4648               4 : int  ComputeProximity( GDALRasterBandShadow *srcBand,
    4649                 :                        GDALRasterBandShadow *proximityBand,
    4650                 :                        char **options = NULL,
    4651                 :                        GDALProgressFunc callback=NULL,
    4652                 :                        void* callback_data=NULL) {
    4653                 : 
    4654               4 :     CPLErrorReset();
    4655                 : 
    4656                 :     return GDALComputeProximity( srcBand, proximityBand, options,
    4657               4 :                                  callback, callback_data );
    4658                 : }
    4659                 : 
    4660                 : 
    4661               4 : int  RasterizeLayer( GDALDatasetShadow *dataset,
    4662                 :                  int bands, int *band_list,
    4663                 :                  OGRLayerShadow *layer,
    4664                 :                  void *pfnTransformer = NULL,
    4665                 :                  void *pTransformArg = NULL, 
    4666                 :      int burn_values = 0, double *burn_values_list = NULL, 
    4667                 :                  char **options = NULL,
    4668                 :                  GDALProgressFunc callback=NULL,
    4669                 :                  void* callback_data=NULL) {
    4670                 : 
    4671                 :     CPLErr eErr;
    4672                 : 
    4673               4 :     CPLErrorReset();
    4674                 : 
    4675               4 :     if( burn_values == 0 )
    4676                 :     {
    4677               1 :         burn_values_list = (double *) CPLMalloc(sizeof(double)*bands);
    4678               4 :         for( int i = 0; i < bands; i++ )
    4679               3 :             burn_values_list[i] = 255.0;
    4680                 :     }
    4681               3 :     else if( burn_values != bands )
    4682                 :     {
    4683                 :         CPLError( CE_Failure, CPLE_AppDefined, 
    4684               0 :                   "Did not get the expected number of burn values in RasterizeLayer()" );
    4685               0 :         return CE_Failure;
    4686                 :     }
    4687                 : 
    4688                 :     eErr = GDALRasterizeLayers( dataset, bands, band_list,
    4689                 :                                 1, &layer, 
    4690                 :                                 (GDALTransformerFunc) pfnTransformer, 
    4691                 :                                 pTransformArg,
    4692                 :                                 burn_values_list, options, 
    4693               4 :                                 callback, callback_data );
    4694                 : 
    4695               4 :     if( burn_values == 0 )
    4696               1 :         CPLFree( burn_values_list );
    4697                 : 
    4698               4 :     return eErr;
    4699                 : }
    4700                 : 
    4701                 : 
    4702               6 : int  Polygonize( GDALRasterBandShadow *srcBand,
    4703                 :          GDALRasterBandShadow *maskBand,
    4704                 :              OGRLayerShadow *outLayer, 
    4705                 :                  int iPixValField,
    4706                 :                  char **options = NULL,
    4707                 :                  GDALProgressFunc callback=NULL,
    4708                 :                  void* callback_data=NULL) {
    4709                 : 
    4710               6 :     CPLErrorReset();
    4711                 : 
    4712                 :     return GDALPolygonize( srcBand, maskBand, outLayer, iPixValField,
    4713               6 :                            options, callback, callback_data );
    4714                 : }
    4715                 : 
    4716                 : 
    4717               1 : int  FillNodata( GDALRasterBandShadow *targetBand,
    4718                 :          GDALRasterBandShadow *maskBand,
    4719                 :                  double maxSearchDist,
    4720                 :                  int smoothingIterations,
    4721                 :                  char **options = NULL,
    4722                 :                  GDALProgressFunc callback=NULL,
    4723                 :                  void* callback_data=NULL) {
    4724                 : 
    4725               1 :     CPLErrorReset();
    4726                 : 
    4727                 :     return GDALFillNodata( targetBand, maskBand, maxSearchDist, 
    4728                 :                0, smoothingIterations, options, 
    4729               1 :          callback, callback_data );
    4730                 : }
    4731                 : 
    4732                 : 
    4733               6 : int  SieveFilter( GDALRasterBandShadow *srcBand,
    4734                 :           GDALRasterBandShadow *maskBand,
    4735                 :               GDALRasterBandShadow *dstBand,
    4736                 :                   int threshold, int connectedness=4,
    4737                 :                   char **options = NULL,
    4738                 :                   GDALProgressFunc callback=NULL,
    4739                 :                   void* callback_data=NULL) {
    4740                 : 
    4741               6 :     CPLErrorReset();
    4742                 : 
    4743                 :     return GDALSieveFilter( srcBand, maskBand, dstBand, 
    4744                 :                             threshold, connectedness,
    4745               6 :                             options, callback, callback_data );
    4746                 : }
    4747                 : 
    4748                 : 
    4749               2 : int  RegenerateOverviews( GDALRasterBandShadow *srcBand,
    4750                 :             int overviewBandCount,
    4751                 :                           GDALRasterBandShadow **overviewBands,
    4752                 :                           const char *resampling = "average",
    4753                 :                           GDALProgressFunc callback=NULL,
    4754                 :                           void* callback_data=NULL) {
    4755                 : 
    4756               2 :     CPLErrorReset();
    4757                 : 
    4758                 :     return GDALRegenerateOverviews( srcBand, overviewBandCount, overviewBands,
    4759               2 :                   resampling ? resampling : "average", callback, callback_data );
    4760                 : }
    4761                 : 
    4762                 : 
    4763               2 : int  RegenerateOverview( GDALRasterBandShadow *srcBand,
    4764                 :                           GDALRasterBandShadow *overviewBand,
    4765                 :                           const char *resampling = "average",
    4766                 :                           GDALProgressFunc callback=NULL,
    4767                 :                           void* callback_data=NULL) {
    4768                 : 
    4769               2 :     CPLErrorReset();
    4770                 : 
    4771                 :     return GDALRegenerateOverviews( srcBand, 1, &overviewBand,
    4772               2 :                   resampling ? resampling : "average", callback, callback_data );
    4773                 : }
    4774                 : 
    4775                 : 
    4776               2 : int ContourGenerate( GDALRasterBandShadow *srcBand,
    4777                 :                      double contourInterval,
    4778                 :                      double contourBase,
    4779                 :                      int fixedLevelCount,
    4780                 :                      double *fixedLevels,
    4781                 :                      int useNoData,
    4782                 :                      double noDataValue,
    4783                 :                      OGRLayerShadow* dstLayer, 
    4784                 :                      int idField,
    4785                 :                      int elevField,
    4786                 :                      GDALProgressFunc callback = NULL,
    4787                 :                      void* callback_data = NULL)
    4788                 : {
    4789                 :     CPLErr eErr;
    4790                 : 
    4791               2 :     CPLErrorReset();
    4792                 : 
    4793                 :     eErr =  GDALContourGenerate( srcBand,
    4794                 :                                  contourInterval,
    4795                 :                                  contourBase,
    4796                 :                                  fixedLevelCount,
    4797                 :                                  fixedLevels,
    4798                 :                                  useNoData,
    4799                 :                                  noDataValue,
    4800                 :                                  dstLayer,
    4801                 :                                  idField,
    4802                 :                                  elevField,
    4803                 :                                  callback,
    4804               2 :                                  callback_data);
    4805                 : 
    4806               2 :     return eErr;
    4807                 : }
    4808                 : 
    4809                 : 
    4810              13 : GDALDatasetShadow *AutoCreateWarpedVRT( GDALDatasetShadow *src_ds,
    4811                 :                                         const char *src_wkt = 0,
    4812                 :                                         const char *dst_wkt = 0,
    4813                 :                                         GDALResampleAlg eResampleAlg = GRA_NearestNeighbour,
    4814                 :                                         double maxerror = 0.0 ) {
    4815                 :   GDALDatasetShadow *ds = GDALAutoCreateWarpedVRT( src_ds, src_wkt,
    4816                 :                                                    dst_wkt,
    4817                 :                                                    eResampleAlg,
    4818                 :                                                    maxerror,
    4819              13 :                                                    0 );
    4820                 :   if (ds == 0) {
    4821                 :     /*throw CPLGetLastErrorMsg(); causes a SWIG_exception later*/
    4822                 :   }
    4823              13 :   return ds;
    4824                 :   
    4825                 : }
    4826                 : 
    4827                 : SWIGINTERN GDALTransformerInfoShadow *new_GDALTransformerInfoShadow(GDALDatasetShadow *src,GDALDatasetShadow *dst,char **options){
    4828                 :     GDALTransformerInfoShadow *obj = (GDALTransformerInfoShadow*) 
    4829                 :        GDALCreateGenImgProjTransformer2( (GDALDatasetH)src, (GDALDatasetH)dst, 
    4830               8 :                                          options );
    4831               8 :     return obj;
    4832                 :   }
    4833                 : SWIGINTERN void delete_GDALTransformerInfoShadow(GDALTransformerInfoShadow *self){
    4834               8 :     GDALDestroyTransformer( self );
    4835                 :   }
    4836                 : SWIGINTERN int GDALTransformerInfoShadow_TransformPoint__SWIG_0(GDALTransformerInfoShadow *self,int bDstToSrc,double inout[3]){
    4837               0 :     int nRet, nSuccess = TRUE;
    4838                 : 
    4839                 :     nRet = GDALUseTransformer( self, bDstToSrc, 
    4840                 :                                1, &inout[0], &inout[1], &inout[2], 
    4841               0 :                                &nSuccess );
    4842                 : 
    4843               0 :     return nRet && nSuccess;
    4844                 :   }
    4845                 : SWIGINTERN int GDALTransformerInfoShadow_TransformPoint__SWIG_1(GDALTransformerInfoShadow *self,double argout[3],int bDstToSrc,double x,double y,double z=0.0){
    4846              16 :     int nRet, nSuccess = TRUE;
    4847                 :     
    4848              16 :     argout[0] = x;
    4849              16 :     argout[1] = y;
    4850              16 :     argout[2] = z;
    4851                 :     nRet = GDALUseTransformer( self, bDstToSrc, 
    4852                 :                                1, &argout[0], &argout[1], &argout[2], 
    4853              16 :                                &nSuccess );
    4854                 : 
    4855              16 :     return nRet && nSuccess;
    4856                 :   }
    4857                 : 
    4858                 : static int
    4859               1 : DecomposeSequenceOfCoordinates( PyObject *seq, int nCount, double *x, double *y, double *z )
    4860                 : {
    4861               2 :   for( int i = 0; i<nCount; ++i )
    4862                 :   {
    4863                 : 
    4864               1 :     PyObject *o = PySequence_GetItem(seq, i);
    4865               1 :     if ( !PySequence_Check(o) )
    4866                 :     {
    4867               0 :         Py_DECREF(o);
    4868               0 :         PyErr_SetString(PyExc_TypeError, "not a sequence");
    4869                 : 
    4870               0 :         return FALSE;
    4871                 :     }
    4872                 : 
    4873               1 :     Py_ssize_t len = PySequence_Size(o);
    4874                 : 
    4875               1 :     if (len == 2 || len == 3)
    4876                 :     {
    4877               1 :         PyObject *o1 = PySequence_GetItem(o, 0);
    4878               1 :         if (!PyNumber_Check(o1))
    4879                 :         {
    4880               0 :             Py_DECREF(o); Py_DECREF(o1);
    4881               0 :             PyErr_SetString(PyExc_TypeError, "not a number");
    4882                 : 
    4883               0 :             return FALSE;
    4884                 :         }
    4885               1 :         x[i] = PyFloat_AsDouble(o1);
    4886               1 :         Py_DECREF(o1);
    4887                 : 
    4888               1 :         o1 = PySequence_GetItem(o, 1);
    4889               1 :         if (!PyNumber_Check(o1))
    4890                 :         {
    4891               0 :             Py_DECREF(o); Py_DECREF(o1);
    4892               0 :             PyErr_SetString(PyExc_TypeError, "not a number");
    4893                 : 
    4894               0 :             return FALSE;
    4895                 :         }
    4896               1 :         y[i] = PyFloat_AsDouble(o1);
    4897               1 :         Py_DECREF(o1);
    4898                 : 
    4899                 :         /* The 3rd coordinate is optional, default 0.0 */
    4900               1 :         if (len == 3)
    4901                 :         {
    4902               0 :             o1 = PySequence_GetItem(o, 2);
    4903               0 :             if (!PyNumber_Check(o1))
    4904                 :             {
    4905               0 :                 Py_DECREF(o); Py_DECREF(o1);
    4906               0 :                 PyErr_SetString(PyExc_TypeError, "not a number");
    4907                 : 
    4908               0 :                 return FALSE;
    4909                 :             }
    4910               0 :             z[i] = PyFloat_AsDouble(o1);
    4911               0 :             Py_DECREF(o1);
    4912                 :         }
    4913                 :         else
    4914                 :         {
    4915               1 :             z[i] = 0.0;
    4916                 :         }
    4917                 :     }
    4918                 :     else
    4919                 :     {
    4920               0 :         Py_DECREF(o);
    4921               0 :         PyErr_SetString(PyExc_TypeError, "invalid coordinate");
    4922                 : 
    4923               0 :         return FALSE;
    4924                 :     }
    4925                 : 
    4926               1 :     Py_DECREF(o);
    4927                 :   }
    4928                 : 
    4929               1 :   return TRUE;
    4930                 : }
    4931                 : 
    4932                 : SWIGINTERN int GDALTransformerInfoShadow_TransformPoints(GDALTransformerInfoShadow *self,int bDstToSrc,int nCount,double *x,double *y,double *z,int *panSuccess){
    4933                 :     int nRet;
    4934                 : 
    4935               1 :     nRet = GDALUseTransformer( self, bDstToSrc, nCount, x, y, z, panSuccess );
    4936                 : 
    4937               1 :     return nRet;
    4938                 :   }
    4939                 : 
    4940              10 : GIntBig wrapper_GDALGetCacheMax()
    4941                 : {
    4942              10 :     return GDALGetCacheMax64();
    4943                 : }
    4944                 : 
    4945                 : 
    4946               2 : GIntBig wrapper_GDALGetCacheUsed()
    4947                 : {
    4948               2 :     return GDALGetCacheUsed64();
    4949                 : }
    4950                 : 
    4951                 : 
    4952              12 : void wrapper_GDALSetCacheMax(GIntBig nBytes)
    4953                 : {
    4954              12 :     return GDALSetCacheMax64(nBytes);
    4955                 : }
    4956                 : 
    4957                 : 
    4958                 : /************************************************************************/
    4959                 : /*                          XMLTreeToPyList()                           */
    4960                 : /************************************************************************/
    4961             127 : static PyObject *XMLTreeToPyList( CPLXMLNode *psTree )
    4962                 : {
    4963                 :     PyObject *pyList;
    4964             127 :     int      nChildCount = 0, iChild;
    4965                 :     CPLXMLNode *psChild;
    4966                 : 
    4967             248 :     for( psChild = psTree->psChild; 
    4968                 :          psChild != NULL; 
    4969                 :          psChild = psChild->psNext )
    4970             121 :         nChildCount++;
    4971                 : 
    4972             127 :     pyList = PyList_New(nChildCount+2);
    4973                 : 
    4974             127 :     PyList_SetItem( pyList, 0, Py_BuildValue( "i", (int) psTree->eType ) );
    4975             127 :     PyList_SetItem( pyList, 1, Py_BuildValue( "s", psTree->pszValue ) );
    4976                 : 
    4977             248 :     for( psChild = psTree->psChild, iChild = 2; 
    4978                 :          psChild != NULL; 
    4979                 :          psChild = psChild->psNext, iChild++ )
    4980                 :     {
    4981             121 :         PyList_SetItem( pyList, iChild, XMLTreeToPyList( psChild ) );
    4982                 :     }
    4983                 : 
    4984             127 :     return pyList; 
    4985                 : }
    4986                 : 
    4987                 : 
    4988                 : /************************************************************************/
    4989                 : /*                          PyListToXMLTree()                           */
    4990                 : /************************************************************************/
    4991              11 : static CPLXMLNode *PyListToXMLTree( PyObject *pyList )
    4992                 : 
    4993                 : {
    4994              11 :     int      nChildCount = 0, iChild, nType;
    4995                 :     CPLXMLNode *psThisNode;
    4996                 :     CPLXMLNode *psChild;
    4997              11 :     char       *pszText = NULL;
    4998                 : 
    4999              11 :     nChildCount = PyList_Size(pyList) - 2;
    5000              11 :     if( nChildCount < 0 )
    5001                 :     {
    5002               0 :         PyErr_SetString(PyExc_TypeError,"Error in input XMLTree." );
    5003               0 :         return NULL;
    5004                 :     }
    5005                 : 
    5006              11 :     PyArg_Parse( PyList_GET_ITEM(pyList,0), "i", &nType );
    5007              11 :     PyArg_Parse( PyList_GET_ITEM(pyList,1), "s", &pszText );
    5008                 : 
    5009                 :     /* Detect "pseudo" root */
    5010              11 :     if (nType == CXT_Element && pszText != NULL && strlen(pszText) == 0 && nChildCount == 2)
    5011                 :     {
    5012               1 :         PyObject *pyFirst = PyList_GET_ITEM(pyList, 2);
    5013               1 :         if (PyList_Size(pyFirst) < 2)
    5014                 :         {
    5015               0 :             PyErr_SetString(PyExc_TypeError,"Error in input XMLTree." );
    5016               0 :             return NULL;
    5017                 :         }
    5018               1 :         int nTypeFirst = 0;
    5019               1 :         char* pszTextFirst = NULL;
    5020               1 :         PyArg_Parse( PyList_GET_ITEM(pyFirst,0), "i", &nTypeFirst );
    5021               1 :         PyArg_Parse( PyList_GET_ITEM(pyFirst,1), "s", &pszTextFirst );
    5022               1 :         if (nTypeFirst == CXT_Element && pszTextFirst != NULL && pszTextFirst[0] == '?')
    5023                 :         {
    5024               1 :             psThisNode = PyListToXMLTree( PyList_GET_ITEM(pyList,2) );
    5025               1 :             psThisNode->psNext = PyListToXMLTree( PyList_GET_ITEM(pyList,3) );
    5026               1 :             return psThisNode;
    5027                 :         }
    5028                 :     }
    5029                 : 
    5030              10 :     psThisNode = CPLCreateXMLNode( NULL, (CPLXMLNodeType) nType, pszText );
    5031                 : 
    5032              17 :     for( iChild = 0; iChild < nChildCount; iChild++ )
    5033                 :     {
    5034               7 :         psChild = PyListToXMLTree( PyList_GET_ITEM(pyList,iChild+2) );
    5035               7 :         CPLAddXMLChild( psThisNode, psChild );
    5036                 :     }
    5037                 : 
    5038              10 :     return psThisNode;
    5039                 : }
    5040                 : 
    5041                 : 
    5042              18 : int GetDriverCount() {
    5043              18 :   return GDALGetDriverCount();
    5044                 : }
    5045                 : 
    5046                 : 
    5047            2070 : GDALDriverShadow* GetDriverByName( char const *name ) {
    5048            2070 :   return (GDALDriverShadow*) GDALGetDriverByName( name );
    5049                 : }
    5050                 : 
    5051                 : 
    5052            2286 : GDALDriverShadow* GetDriver( int i ) {
    5053            2286 :   return (GDALDriverShadow*) GDALGetDriver( i );
    5054                 : }
    5055                 : 
    5056                 : 
    5057            4292 : GDALDatasetShadow* Open( char const* utf8_path, GDALAccess eAccess = GA_ReadOnly ) {
    5058            4292 :   CPLErrorReset();
    5059            4292 :   GDALDatasetShadow *ds = GDALOpen( utf8_path, eAccess );
    5060            4292 :   if( ds != NULL && CPLGetLastErrorType() == CE_Failure )
    5061                 :   {
    5062               4 :       if ( GDALDereferenceDataset( ds ) <= 0 )
    5063               4 :           GDALClose(ds);
    5064               4 :       ds = NULL;
    5065                 :   }
    5066            4292 :   return (GDALDatasetShadow*) ds;
    5067                 : }
    5068                 : 
    5069                 : 
    5070            5004 : GDALDatasetShadow* OpenShared( char const* utf8_path, GDALAccess eAccess = GA_ReadOnly ) {
    5071            5004 :   CPLErrorReset();
    5072            5004 :   GDALDatasetShadow *ds = GDALOpenShared( utf8_path, eAccess );
    5073            5004 :   if( ds != NULL && CPLGetLastErrorType() == CE_Failure )
    5074                 :   {
    5075               0 :       if ( GDALDereferenceDataset( ds ) <= 0 )
    5076               0 :           GDALClose(ds);
    5077               0 :       ds = NULL;
    5078                 :   }
    5079            5004 :   return (GDALDatasetShadow*) ds;
    5080                 : }
    5081                 : 
    5082                 : 
    5083               6 : GDALDriverShadow *IdentifyDriver( const char *utf8_path, 
    5084                 :                                   char **papszSiblings = NULL ) {
    5085                 :     return (GDALDriverShadow *) GDALIdentifyDriver( utf8_path, 
    5086               6 :                                               papszSiblings );
    5087                 : }
    5088                 : 
    5089                 : 
    5090              44 :   char **GeneralCmdLineProcessor( char **papszArgv, int nOptions = 0 ) {
    5091                 :     int nResArgCount;
    5092                 : 
    5093                 :     nResArgCount = 
    5094              44 :       GDALGeneralCmdLineProcessor( CSLCount(papszArgv), &papszArgv, nOptions ); 
    5095                 : 
    5096              44 :     if( nResArgCount <= 0 )
    5097               0 :         return NULL;
    5098                 :     else
    5099              44 :         return papszArgv;
    5100                 :   }
    5101                 : 
    5102                 : #ifdef __cplusplus
    5103                 : extern "C" {
    5104                 : #endif
    5105               1 : SWIGINTERN PyObject *_wrap_GetUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5106               1 :   PyObject *resultobj = 0;
    5107                 :   int result;
    5108                 :   
    5109               1 :   if (!PyArg_ParseTuple(args,(char *)":GetUseExceptions")) SWIG_fail;
    5110               1 :   result = (int)GetUseExceptions();
    5111               1 :   resultobj = SWIG_From_int(static_cast< int >(result));
    5112               1 :   return resultobj;
    5113                 : fail:
    5114               0 :   return NULL;
    5115                 : }
    5116                 : 
    5117                 : 
    5118               1 : SWIGINTERN PyObject *_wrap_UseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5119               1 :   PyObject *resultobj = 0;
    5120                 :   
    5121               1 :   if (!PyArg_ParseTuple(args,(char *)":UseExceptions")) SWIG_fail;
    5122               1 :   UseExceptions();
    5123               1 :   resultobj = SWIG_Py_Void();
    5124               1 :   return resultobj;
    5125                 : fail:
    5126               0 :   return NULL;
    5127                 : }
    5128                 : 
    5129                 : 
    5130               1 : SWIGINTERN PyObject *_wrap_DontUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5131               1 :   PyObject *resultobj = 0;
    5132                 :   
    5133               1 :   if (!PyArg_ParseTuple(args,(char *)":DontUseExceptions")) SWIG_fail;
    5134               1 :   DontUseExceptions();
    5135               1 :   resultobj = SWIG_Py_Void();
    5136               1 :   return resultobj;
    5137                 : fail:
    5138               0 :   return NULL;
    5139                 : }
    5140                 : 
    5141                 : 
    5142              17 : SWIGINTERN PyObject *_wrap_VSIFReadL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5143              17 :   PyObject *resultobj = 0;
    5144              17 :   void **arg1 = (void **) 0 ;
    5145                 :   int arg2 ;
    5146                 :   int arg3 ;
    5147              17 :   VSILFILE *arg4 = (VSILFILE *) 0 ;
    5148              17 :   void *pyObject1 = NULL ;
    5149                 :   int val2 ;
    5150              17 :   int ecode2 = 0 ;
    5151                 :   int val3 ;
    5152              17 :   int ecode3 = 0 ;
    5153                 :   int res4 ;
    5154              17 :   PyObject * obj0 = 0 ;
    5155              17 :   PyObject * obj1 = 0 ;
    5156              17 :   PyObject * obj2 = 0 ;
    5157                 :   int result;
    5158                 :   
    5159                 :   {
    5160                 :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject1 = NULL ) */
    5161              17 :     arg1 = &pyObject1;
    5162                 :   }
    5163              17 :   if (!PyArg_ParseTuple(args,(char *)"OOO:VSIFReadL",&obj0,&obj1,&obj2)) SWIG_fail;
    5164              17 :   ecode2 = SWIG_AsVal_int(obj0, &val2);
    5165              17 :   if (!SWIG_IsOK(ecode2)) {
    5166               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VSIFReadL" "', argument " "2"" of type '" "int""'");
    5167                 :   } 
    5168              17 :   arg2 = static_cast< int >(val2);
    5169              17 :   ecode3 = SWIG_AsVal_int(obj1, &val3);
    5170              17 :   if (!SWIG_IsOK(ecode3)) {
    5171               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIFReadL" "', argument " "3"" of type '" "int""'");
    5172                 :   } 
    5173              17 :   arg3 = static_cast< int >(val3);
    5174              17 :   res4 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg4), 0, 0);
    5175              17 :   if (!SWIG_IsOK(res4)) {
    5176               0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "VSIFReadL" "', argument " "4"" of type '" "VSILFILE *""'"); 
    5177                 :   }
    5178                 :   {
    5179              17 :     if ( bUseExceptions ) {
    5180               0 :       CPLErrorReset();
    5181                 :     }
    5182              17 :     result = (int)wrapper_VSIFReadL(arg1,arg2,arg3,arg4);
    5183              17 :     if ( bUseExceptions ) {
    5184               0 :       CPLErr eclass = CPLGetLastErrorType();
    5185               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5186               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5187                 :       }
    5188                 :     }
    5189                 :   }
    5190              17 :   resultobj = SWIG_From_int(static_cast< int >(result));
    5191                 :   {
    5192                 :     /* %typemap(argout) ( void **outPythonObject ) */
    5193              17 :     Py_XDECREF(resultobj);
    5194              17 :     if (*arg1)
    5195                 :     {
    5196              17 :       resultobj = (PyObject*)*arg1;
    5197                 :     }
    5198                 :     else
    5199                 :     {
    5200               0 :       resultobj = Py_None;
    5201               0 :       Py_INCREF(resultobj);
    5202                 :     }
    5203                 :   }
    5204              17 :   return resultobj;
    5205                 : fail:
    5206               0 :   return NULL;
    5207                 : }
    5208                 : 
    5209                 : 
    5210             291 : SWIGINTERN PyObject *_wrap_Debug(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5211             291 :   PyObject *resultobj = 0;
    5212             291 :   char *arg1 = (char *) 0 ;
    5213             291 :   char *arg2 = (char *) 0 ;
    5214                 :   int res1 ;
    5215             291 :   char *buf1 = 0 ;
    5216             291 :   int alloc1 = 0 ;
    5217                 :   int res2 ;
    5218             291 :   char *buf2 = 0 ;
    5219             291 :   int alloc2 = 0 ;
    5220             291 :   PyObject * obj0 = 0 ;
    5221             291 :   PyObject * obj1 = 0 ;
    5222                 :   
    5223             291 :   if (!PyArg_ParseTuple(args,(char *)"OO:Debug",&obj0,&obj1)) SWIG_fail;
    5224             291 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
    5225             291 :   if (!SWIG_IsOK(res1)) {
    5226               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Debug" "', argument " "1"" of type '" "char const *""'");
    5227                 :   }
    5228             291 :   arg1 = reinterpret_cast< char * >(buf1);
    5229             291 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    5230             291 :   if (!SWIG_IsOK(res2)) {
    5231               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Debug" "', argument " "2"" of type '" "char const *""'");
    5232                 :   }
    5233             291 :   arg2 = reinterpret_cast< char * >(buf2);
    5234                 :   {
    5235             291 :     if ( bUseExceptions ) {
    5236               0 :       CPLErrorReset();
    5237                 :     }
    5238             291 :     Debug((char const *)arg1,(char const *)arg2);
    5239             291 :     if ( bUseExceptions ) {
    5240               0 :       CPLErr eclass = CPLGetLastErrorType();
    5241               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5242               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5243                 :       }
    5244                 :     }
    5245                 :   }
    5246             291 :   resultobj = SWIG_Py_Void();
    5247             291 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    5248             291 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    5249             291 :   return resultobj;
    5250                 : fail:
    5251               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    5252               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    5253               0 :   return NULL;
    5254                 : }
    5255                 : 
    5256                 : 
    5257            1094 : SWIGINTERN PyObject *_wrap_PushErrorHandler__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5258            1094 :   PyObject *resultobj = 0;
    5259            1094 :   char *arg1 = (char *) NULL ;
    5260                 :   int res1 ;
    5261            1094 :   char *buf1 = 0 ;
    5262            1094 :   int alloc1 = 0 ;
    5263            1094 :   PyObject * obj0 = 0 ;
    5264                 :   CPLErr result;
    5265                 :   
    5266            1094 :   if (!PyArg_ParseTuple(args,(char *)"|O:PushErrorHandler",&obj0)) SWIG_fail;
    5267            1094 :   if (obj0) {
    5268            1094 :     res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
    5269            1094 :     if (!SWIG_IsOK(res1)) {
    5270               0 :       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PushErrorHandler" "', argument " "1"" of type '" "char const *""'");
    5271                 :     }
    5272            1094 :     arg1 = reinterpret_cast< char * >(buf1);
    5273                 :   }
    5274                 :   {
    5275            1094 :     if ( bUseExceptions ) {
    5276               0 :       CPLErrorReset();
    5277                 :     }
    5278            1094 :     result = (CPLErr)PushErrorHandler((char const *)arg1);
    5279            1094 :     if ( bUseExceptions ) {
    5280               0 :       CPLErr eclass = CPLGetLastErrorType();
    5281               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5282               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5283                 :       }
    5284                 :     }
    5285                 :   }
    5286            2188 :   resultobj = SWIG_From_int(static_cast< int >(result));
    5287            1094 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    5288                 :   {
    5289                 :     /* %typemap(ret) CPLErr */
    5290            1094 :     if ( bUseExceptions == 0 ) {
    5291                 :       /* We're not using exceptions.  And no error has occurred */
    5292            1094 :       if ( resultobj == 0 ) {
    5293                 :         /* No other return values set so return ErrorCode */
    5294               0 :         resultobj = PyInt_FromLong(result);
    5295                 :       }
    5296                 :     }
    5297                 :   }
    5298            1094 :   return resultobj;
    5299                 : fail:
    5300               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    5301               0 :   return NULL;
    5302                 : }
    5303                 : 
    5304                 : 
    5305               0 : SWIGINTERN PyObject *_wrap_Error(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5306               0 :   PyObject *resultobj = 0;
    5307               0 :   CPLErr arg1 = (CPLErr) CE_Failure ;
    5308               0 :   int arg2 = (int) 0 ;
    5309               0 :   char *arg3 = (char *) "error" ;
    5310                 :   int val1 ;
    5311               0 :   int ecode1 = 0 ;
    5312                 :   int val2 ;
    5313               0 :   int ecode2 = 0 ;
    5314                 :   int res3 ;
    5315               0 :   char *buf3 = 0 ;
    5316               0 :   int alloc3 = 0 ;
    5317               0 :   PyObject * obj0 = 0 ;
    5318               0 :   PyObject * obj1 = 0 ;
    5319               0 :   PyObject * obj2 = 0 ;
    5320                 :   
    5321               0 :   if (!PyArg_ParseTuple(args,(char *)"|OOO:Error",&obj0,&obj1,&obj2)) SWIG_fail;
    5322               0 :   if (obj0) {
    5323               0 :     ecode1 = SWIG_AsVal_int(obj0, &val1);
    5324               0 :     if (!SWIG_IsOK(ecode1)) {
    5325               0 :       SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Error" "', argument " "1"" of type '" "CPLErr""'");
    5326                 :     } 
    5327               0 :     arg1 = static_cast< CPLErr >(val1);
    5328                 :   }
    5329               0 :   if (obj1) {
    5330               0 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
    5331               0 :     if (!SWIG_IsOK(ecode2)) {
    5332               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Error" "', argument " "2"" of type '" "int""'");
    5333                 :     } 
    5334               0 :     arg2 = static_cast< int >(val2);
    5335                 :   }
    5336               0 :   if (obj2) {
    5337               0 :     res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
    5338               0 :     if (!SWIG_IsOK(res3)) {
    5339               0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Error" "', argument " "3"" of type '" "char const *""'");
    5340                 :     }
    5341               0 :     arg3 = reinterpret_cast< char * >(buf3);
    5342                 :   }
    5343                 :   {
    5344               0 :     if ( bUseExceptions ) {
    5345               0 :       CPLErrorReset();
    5346                 :     }
    5347               0 :     Error(arg1,arg2,(char const *)arg3);
    5348               0 :     if ( bUseExceptions ) {
    5349               0 :       CPLErr eclass = CPLGetLastErrorType();
    5350               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5351               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5352                 :       }
    5353                 :     }
    5354                 :   }
    5355               0 :   resultobj = SWIG_Py_Void();
    5356               0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    5357               0 :   return resultobj;
    5358                 : fail:
    5359               0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    5360               0 :   return NULL;
    5361                 : }
    5362                 : 
    5363                 : 
    5364               0 : SWIGINTERN PyObject *_wrap_PushErrorHandler__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5365               0 :   PyObject *resultobj = 0;
    5366                 :   CPLErrorHandler arg1 ;
    5367                 :   void *argp1 ;
    5368               0 :   int res1 = 0 ;
    5369               0 :   PyObject * obj0 = 0 ;
    5370                 :   
    5371               0 :   if (!PyArg_ParseTuple(args,(char *)"O:PushErrorHandler",&obj0)) SWIG_fail;
    5372                 :   {
    5373               0 :     res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CPLErrorHandler,  0  | 0);
    5374               0 :     if (!SWIG_IsOK(res1)) {
    5375               0 :       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PushErrorHandler" "', argument " "1"" of type '" "CPLErrorHandler""'"); 
    5376                 :     }  
    5377               0 :     if (!argp1) {
    5378               0 :       SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PushErrorHandler" "', argument " "1"" of type '" "CPLErrorHandler""'");
    5379                 :     } else {
    5380               0 :       CPLErrorHandler * temp = reinterpret_cast< CPLErrorHandler * >(argp1);
    5381               0 :       arg1 = *temp;
    5382               0 :       if (SWIG_IsNewObj(res1)) delete temp;
    5383                 :     }
    5384                 :   }
    5385                 :   {
    5386               0 :     if ( bUseExceptions ) {
    5387               0 :       CPLErrorReset();
    5388                 :     }
    5389               0 :     CPLPushErrorHandler(arg1);
    5390               0 :     if ( bUseExceptions ) {
    5391               0 :       CPLErr eclass = CPLGetLastErrorType();
    5392               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5393               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5394                 :       }
    5395                 :     }
    5396                 :   }
    5397               0 :   resultobj = SWIG_Py_Void();
    5398               0 :   return resultobj;
    5399                 : fail:
    5400               0 :   return NULL;
    5401                 : }
    5402                 : 
    5403                 : 
    5404            1094 : SWIGINTERN PyObject *_wrap_PushErrorHandler(PyObject *self, PyObject *args) {
    5405                 :   int argc;
    5406                 :   PyObject *argv[2];
    5407                 :   int ii;
    5408                 :   
    5409            1094 :   if (!PyTuple_Check(args)) SWIG_fail;
    5410            1094 :   argc = (int)PyObject_Length(args);
    5411            2188 :   for (ii = 0; (ii < argc) && (ii < 1); ii++) {
    5412            1094 :     argv[ii] = PyTuple_GET_ITEM(args,ii);
    5413                 :   }
    5414            1094 :   if ((argc >= 0) && (argc <= 1)) {
    5415                 :     int _v;
    5416            1094 :     if (argc <= 0) {
    5417               0 :       return _wrap_PushErrorHandler__SWIG_0(self, args);
    5418                 :     }
    5419            1094 :     int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
    5420            1094 :     _v = SWIG_CheckState(res);
    5421            1094 :     if (_v) {
    5422            1094 :       return _wrap_PushErrorHandler__SWIG_0(self, args);
    5423                 :     }
    5424                 :   }
    5425               0 :   if (argc == 1) {
    5426                 :     int _v;
    5427               0 :     int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_CPLErrorHandler, 0);
    5428               0 :     _v = SWIG_CheckState(res);
    5429               0 :     if (_v) {
    5430               0 :       return _wrap_PushErrorHandler__SWIG_1(self, args);
    5431                 :     }
    5432                 :   }
    5433                 :   
    5434                 : fail:
    5435                 :   SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'PushErrorHandler'.\n"
    5436                 :     "  Possible C/C++ prototypes are:\n"
    5437                 :     "    PushErrorHandler(char const *)\n"
    5438               0 :     "    CPLPushErrorHandler(CPLErrorHandler)\n");
    5439               0 :   return NULL;
    5440                 : }
    5441                 : 
    5442                 : 
    5443            1094 : SWIGINTERN PyObject *_wrap_PopErrorHandler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5444            1094 :   PyObject *resultobj = 0;
    5445                 :   
    5446            1094 :   if (!PyArg_ParseTuple(args,(char *)":PopErrorHandler")) SWIG_fail;
    5447                 :   {
    5448            1094 :     if ( bUseExceptions ) {
    5449               0 :       CPLErrorReset();
    5450                 :     }
    5451            1094 :     CPLPopErrorHandler();
    5452            1094 :     if ( bUseExceptions ) {
    5453               0 :       CPLErr eclass = CPLGetLastErrorType();
    5454               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5455               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5456                 :       }
    5457                 :     }
    5458                 :   }
    5459            1094 :   resultobj = SWIG_Py_Void();
    5460            1094 :   return resultobj;
    5461                 : fail:
    5462               0 :   return NULL;
    5463                 : }
    5464                 : 
    5465                 : 
    5466             990 : SWIGINTERN PyObject *_wrap_ErrorReset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5467             990 :   PyObject *resultobj = 0;
    5468                 :   
    5469             990 :   if (!PyArg_ParseTuple(args,(char *)":ErrorReset")) SWIG_fail;
    5470                 :   {
    5471             990 :     if ( bUseExceptions ) {
    5472               0 :       CPLErrorReset();
    5473                 :     }
    5474             990 :     CPLErrorReset();
    5475             990 :     if ( bUseExceptions ) {
    5476               0 :       CPLErr eclass = CPLGetLastErrorType();
    5477               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5478               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5479                 :       }
    5480                 :     }
    5481                 :   }
    5482             990 :   resultobj = SWIG_Py_Void();
    5483             990 :   return resultobj;
    5484                 : fail:
    5485               0 :   return NULL;
    5486                 : }
    5487                 : 
    5488                 : 
    5489               0 : SWIGINTERN PyObject *_wrap_EscapeString(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    5490               0 :   PyObject *resultobj = 0;
    5491                 :   int arg1 ;
    5492               0 :   char *arg2 = (char *) 0 ;
    5493               0 :   int arg3 = (int) CPLES_SQL ;
    5494               0 :   int alloc1 = 0 ;
    5495                 :   int val3 ;
    5496               0 :   int ecode3 = 0 ;
    5497               0 :   PyObject * obj0 = 0 ;
    5498               0 :   PyObject * obj1 = 0 ;
    5499                 :   char *  kwnames[] = {
    5500                 :     (char *) "len",(char *) "scheme", NULL 
    5501               0 :   };
    5502               0 :   retStringAndCPLFree *result = 0 ;
    5503                 :   
    5504               0 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:EscapeString",kwnames,&obj0,&obj1)) SWIG_fail;
    5505                 :   {
    5506                 :     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
    5507                 : #if PY_VERSION_HEX>=0x03000000
    5508                 :     if (PyUnicode_Check(obj0))
    5509                 :     {
    5510                 :       size_t safeLen = 0;
    5511                 :       int ret = SWIG_AsCharPtrAndSize(obj0, (char**) &arg2, &safeLen, &alloc1);
    5512                 :       if (!SWIG_IsOK(ret)) {
    5513                 :         SWIG_exception( SWIG_RuntimeError, "invalid Unicode string" );
    5514                 :       }
    5515                 :       
    5516                 :       if (safeLen) safeLen--;
    5517                 :       arg1 = (int) safeLen;
    5518                 :     }
    5519                 :     else if (PyBytes_Check(obj0))
    5520                 :     {
    5521                 :       Py_ssize_t safeLen = 0;
    5522                 :       PyBytes_AsStringAndSize(obj0, (char**) &arg2, &safeLen);
    5523                 :       arg1 = (int) safeLen;
    5524                 :     }
    5525                 :     else
    5526                 :     {
    5527                 :       PyErr_SetString(PyExc_TypeError, "not a unicode string or a bytes");
    5528                 :       SWIG_fail;
    5529                 :     }
    5530                 : #else
    5531               0 :     if (PyString_Check(obj0))
    5532                 :     {
    5533               0 :       Py_ssize_t safeLen = 0;
    5534               0 :       PyString_AsStringAndSize(obj0, (char**) &arg2, &safeLen);
    5535               0 :       arg1 = (int) safeLen;
    5536                 :     }
    5537                 :     else
    5538                 :     {
    5539               0 :       PyErr_SetString(PyExc_TypeError, "not a string");
    5540               0 :       SWIG_fail;
    5541                 :     }
    5542                 : #endif
    5543                 :   }
    5544               0 :   if (obj1) {
    5545               0 :     ecode3 = SWIG_AsVal_int(obj1, &val3);
    5546               0 :     if (!SWIG_IsOK(ecode3)) {
    5547               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "EscapeString" "', argument " "3"" of type '" "int""'");
    5548                 :     } 
    5549               0 :     arg3 = static_cast< int >(val3);
    5550                 :   }
    5551                 :   {
    5552               0 :     if ( bUseExceptions ) {
    5553               0 :       CPLErrorReset();
    5554                 :     }
    5555               0 :     result = (retStringAndCPLFree *)EscapeString(arg1,arg2,arg3);
    5556               0 :     if ( bUseExceptions ) {
    5557               0 :       CPLErr eclass = CPLGetLastErrorType();
    5558               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5559               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5560                 :       }
    5561                 :     }
    5562                 :   }
    5563                 :   {
    5564                 :     /* %typemap(out) (retStringAndCPLFree*) */
    5565               0 :     if(result)
    5566                 :     {
    5567               0 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
    5568               0 :       CPLFree(result);
    5569                 :     }
    5570                 :   }
    5571                 :   {
    5572                 :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
    5573               0 :     if( alloc1 == SWIG_NEWOBJ ) {
    5574               0 :       delete[] arg2;
    5575                 :     }
    5576                 :   }
    5577               0 :   return resultobj;
    5578                 : fail:
    5579                 :   {
    5580                 :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
    5581               0 :     if( alloc1 == SWIG_NEWOBJ ) {
    5582               0 :       delete[] arg2;
    5583                 :     }
    5584                 :   }
    5585               0 :   return NULL;
    5586                 : }
    5587                 : 
    5588                 : 
    5589               2 : SWIGINTERN PyObject *_wrap_GetLastErrorNo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5590               2 :   PyObject *resultobj = 0;
    5591                 :   int result;
    5592                 :   
    5593               2 :   if (!PyArg_ParseTuple(args,(char *)":GetLastErrorNo")) SWIG_fail;
    5594                 :   {
    5595               2 :     result = CPLGetLastErrorNo();
    5596                 :   }
    5597               2 :   resultobj = SWIG_From_int(static_cast< int >(result));
    5598               2 :   return resultobj;
    5599                 : fail:
    5600               0 :   return NULL;
    5601                 : }
    5602                 : 
    5603                 : 
    5604             132 : SWIGINTERN PyObject *_wrap_GetLastErrorType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5605             132 :   PyObject *resultobj = 0;
    5606                 :   int result;
    5607                 :   
    5608             132 :   if (!PyArg_ParseTuple(args,(char *)":GetLastErrorType")) SWIG_fail;
    5609                 :   {
    5610             132 :     result = CPLGetLastErrorType();
    5611                 :   }
    5612             132 :   resultobj = SWIG_From_int(static_cast< int >(result));
    5613             132 :   return resultobj;
    5614                 : fail:
    5615               0 :   return NULL;
    5616                 : }
    5617                 : 
    5618                 : 
    5619             171 : SWIGINTERN PyObject *_wrap_GetLastErrorMsg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5620             171 :   PyObject *resultobj = 0;
    5621             171 :   char *result = 0 ;
    5622                 :   
    5623             171 :   if (!PyArg_ParseTuple(args,(char *)":GetLastErrorMsg")) SWIG_fail;
    5624                 :   {
    5625             171 :     result = (char*)CPLGetLastErrorMsg();
    5626                 :   }
    5627             171 :   resultobj = SWIG_FromCharPtr((const char *)result);
    5628             171 :   return resultobj;
    5629                 : fail:
    5630               0 :   return NULL;
    5631                 : }
    5632                 : 
    5633                 : 
    5634               0 : SWIGINTERN PyObject *_wrap_PushFinderLocation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5635               0 :   PyObject *resultobj = 0;
    5636               0 :   char *arg1 = (char *) 0 ;
    5637               0 :   int bToFree1 = 0 ;
    5638               0 :   PyObject * obj0 = 0 ;
    5639                 :   
    5640               0 :   if (!PyArg_ParseTuple(args,(char *)"O:PushFinderLocation",&obj0)) SWIG_fail;
    5641                 :   {
    5642                 :     /* %typemap(in) (const char *utf8_path) */
    5643               0 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    5644               0 :     if (arg1 == NULL)
    5645                 :     {
    5646               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    5647               0 :       SWIG_fail;
    5648                 :     }
    5649                 :   }
    5650                 :   {
    5651               0 :     if ( bUseExceptions ) {
    5652               0 :       CPLErrorReset();
    5653                 :     }
    5654               0 :     CPLPushFinderLocation((char const *)arg1);
    5655               0 :     if ( bUseExceptions ) {
    5656               0 :       CPLErr eclass = CPLGetLastErrorType();
    5657               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5658               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5659                 :       }
    5660                 :     }
    5661                 :   }
    5662               0 :   resultobj = SWIG_Py_Void();
    5663                 :   {
    5664                 :     /* %typemap(freearg) (const char *utf8_path) */
    5665               0 :     GDALPythonFreeCStr(arg1, bToFree1);
    5666                 :   }
    5667               0 :   return resultobj;
    5668                 : fail:
    5669                 :   {
    5670                 :     /* %typemap(freearg) (const char *utf8_path) */
    5671               0 :     GDALPythonFreeCStr(arg1, bToFree1);
    5672                 :   }
    5673               0 :   return NULL;
    5674                 : }
    5675                 : 
    5676                 : 
    5677               0 : SWIGINTERN PyObject *_wrap_PopFinderLocation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5678               0 :   PyObject *resultobj = 0;
    5679                 :   
    5680               0 :   if (!PyArg_ParseTuple(args,(char *)":PopFinderLocation")) SWIG_fail;
    5681                 :   {
    5682               0 :     if ( bUseExceptions ) {
    5683               0 :       CPLErrorReset();
    5684                 :     }
    5685               0 :     CPLPopFinderLocation();
    5686               0 :     if ( bUseExceptions ) {
    5687               0 :       CPLErr eclass = CPLGetLastErrorType();
    5688               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5689               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5690                 :       }
    5691                 :     }
    5692                 :   }
    5693               0 :   resultobj = SWIG_Py_Void();
    5694               0 :   return resultobj;
    5695                 : fail:
    5696               0 :   return NULL;
    5697                 : }
    5698                 : 
    5699                 : 
    5700               0 : SWIGINTERN PyObject *_wrap_FinderClean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5701               0 :   PyObject *resultobj = 0;
    5702                 :   
    5703               0 :   if (!PyArg_ParseTuple(args,(char *)":FinderClean")) SWIG_fail;
    5704                 :   {
    5705               0 :     if ( bUseExceptions ) {
    5706               0 :       CPLErrorReset();
    5707                 :     }
    5708               0 :     CPLFinderClean();
    5709               0 :     if ( bUseExceptions ) {
    5710               0 :       CPLErr eclass = CPLGetLastErrorType();
    5711               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5712               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5713                 :       }
    5714                 :     }
    5715                 :   }
    5716               0 :   resultobj = SWIG_Py_Void();
    5717               0 :   return resultobj;
    5718                 : fail:
    5719               0 :   return NULL;
    5720                 : }
    5721                 : 
    5722                 : 
    5723               8 : SWIGINTERN PyObject *_wrap_FindFile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5724               8 :   PyObject *resultobj = 0;
    5725               8 :   char *arg1 = (char *) 0 ;
    5726               8 :   char *arg2 = (char *) 0 ;
    5727                 :   int res1 ;
    5728               8 :   char *buf1 = 0 ;
    5729               8 :   int alloc1 = 0 ;
    5730               8 :   int bToFree2 = 0 ;
    5731               8 :   PyObject * obj0 = 0 ;
    5732               8 :   PyObject * obj1 = 0 ;
    5733               8 :   char *result = 0 ;
    5734                 :   
    5735               8 :   if (!PyArg_ParseTuple(args,(char *)"OO:FindFile",&obj0,&obj1)) SWIG_fail;
    5736               8 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
    5737               8 :   if (!SWIG_IsOK(res1)) {
    5738               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FindFile" "', argument " "1"" of type '" "char const *""'");
    5739                 :   }
    5740               8 :   arg1 = reinterpret_cast< char * >(buf1);
    5741                 :   {
    5742                 :     /* %typemap(in) (const char *utf8_path) */
    5743               8 :     arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    5744               8 :     if (arg2 == NULL)
    5745                 :     {
    5746               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    5747               0 :       SWIG_fail;
    5748                 :     }
    5749                 :   }
    5750                 :   {
    5751               8 :     if ( bUseExceptions ) {
    5752               0 :       CPLErrorReset();
    5753                 :     }
    5754               8 :     result = (char *)CPLFindFile((char const *)arg1,(char const *)arg2);
    5755               8 :     if ( bUseExceptions ) {
    5756               0 :       CPLErr eclass = CPLGetLastErrorType();
    5757               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5758               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5759                 :       }
    5760                 :     }
    5761                 :   }
    5762               8 :   resultobj = SWIG_FromCharPtr((const char *)result);
    5763               8 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    5764                 :   {
    5765                 :     /* %typemap(freearg) (const char *utf8_path) */
    5766               8 :     GDALPythonFreeCStr(arg2, bToFree2);
    5767                 :   }
    5768               8 :   return resultobj;
    5769                 : fail:
    5770               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    5771                 :   {
    5772                 :     /* %typemap(freearg) (const char *utf8_path) */
    5773               0 :     GDALPythonFreeCStr(arg2, bToFree2);
    5774                 :   }
    5775               0 :   return NULL;
    5776                 : }
    5777                 : 
    5778                 : 
    5779            1671 : SWIGINTERN PyObject *_wrap_ReadDir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5780            1671 :   PyObject *resultobj = 0;
    5781            1671 :   char *arg1 = (char *) 0 ;
    5782            1671 :   int bToFree1 = 0 ;
    5783            1671 :   PyObject * obj0 = 0 ;
    5784            1671 :   char **result = 0 ;
    5785                 :   
    5786            1671 :   if (!PyArg_ParseTuple(args,(char *)"O:ReadDir",&obj0)) SWIG_fail;
    5787                 :   {
    5788                 :     /* %typemap(in) (const char *utf8_path) */
    5789            1671 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    5790            1671 :     if (arg1 == NULL)
    5791                 :     {
    5792               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    5793               0 :       SWIG_fail;
    5794                 :     }
    5795                 :   }
    5796                 :   {
    5797            1671 :     if ( bUseExceptions ) {
    5798               0 :       CPLErrorReset();
    5799                 :     }
    5800            1671 :     result = (char **)VSIReadDir((char const *)arg1);
    5801            1671 :     if ( bUseExceptions ) {
    5802               0 :       CPLErr eclass = CPLGetLastErrorType();
    5803               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5804               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5805                 :       }
    5806                 :     }
    5807                 :   }
    5808                 :   {
    5809                 :     /* %typemap(out) char **CSL -> ( string ) */
    5810            1671 :     char **stringarray = result;
    5811            1671 :     if ( stringarray == NULL ) {
    5812            1520 :       resultobj = Py_None;
    5813            1520 :       Py_INCREF( resultobj );
    5814                 :     }
    5815                 :     else {
    5816             151 :       int len = CSLCount( stringarray );
    5817             151 :       resultobj = PyList_New( len );
    5818            2962 :       for ( int i = 0; i < len; ++i ) {
    5819            2811 :         PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
    5820            2811 :         PyList_SetItem(resultobj, i, o );
    5821                 :       }
    5822                 :     }
    5823            1671 :     CSLDestroy(result);
    5824                 :   }
    5825                 :   {
    5826                 :     /* %typemap(freearg) (const char *utf8_path) */
    5827            1671 :     GDALPythonFreeCStr(arg1, bToFree1);
    5828                 :   }
    5829            1671 :   return resultobj;
    5830                 : fail:
    5831                 :   {
    5832                 :     /* %typemap(freearg) (const char *utf8_path) */
    5833               0 :     GDALPythonFreeCStr(arg1, bToFree1);
    5834                 :   }
    5835               0 :   return NULL;
    5836                 : }
    5837                 : 
    5838                 : 
    5839             416 : SWIGINTERN PyObject *_wrap_SetConfigOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5840             416 :   PyObject *resultobj = 0;
    5841             416 :   char *arg1 = (char *) 0 ;
    5842             416 :   char *arg2 = (char *) 0 ;
    5843                 :   int res1 ;
    5844             416 :   char *buf1 = 0 ;
    5845             416 :   int alloc1 = 0 ;
    5846                 :   int res2 ;
    5847             416 :   char *buf2 = 0 ;
    5848             416 :   int alloc2 = 0 ;
    5849             416 :   PyObject * obj0 = 0 ;
    5850             416 :   PyObject * obj1 = 0 ;
    5851                 :   
    5852             416 :   if (!PyArg_ParseTuple(args,(char *)"OO:SetConfigOption",&obj0,&obj1)) SWIG_fail;
    5853             416 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
    5854             416 :   if (!SWIG_IsOK(res1)) {
    5855               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SetConfigOption" "', argument " "1"" of type '" "char const *""'");
    5856                 :   }
    5857             416 :   arg1 = reinterpret_cast< char * >(buf1);
    5858             416 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    5859             416 :   if (!SWIG_IsOK(res2)) {
    5860               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SetConfigOption" "', argument " "2"" of type '" "char const *""'");
    5861                 :   }
    5862             416 :   arg2 = reinterpret_cast< char * >(buf2);
    5863                 :   {
    5864             416 :     if (!arg1) {
    5865               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    5866                 :     }
    5867                 :   }
    5868                 :   {
    5869             416 :     if ( bUseExceptions ) {
    5870               0 :       CPLErrorReset();
    5871                 :     }
    5872             416 :     CPLSetConfigOption((char const *)arg1,(char const *)arg2);
    5873             416 :     if ( bUseExceptions ) {
    5874               0 :       CPLErr eclass = CPLGetLastErrorType();
    5875               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5876               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5877                 :       }
    5878                 :     }
    5879                 :   }
    5880             416 :   resultobj = SWIG_Py_Void();
    5881             416 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    5882             416 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    5883             416 :   return resultobj;
    5884                 : fail:
    5885               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    5886               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    5887               0 :   return NULL;
    5888                 : }
    5889                 : 
    5890                 : 
    5891             559 : SWIGINTERN PyObject *_wrap_GetConfigOption(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5892             559 :   PyObject *resultobj = 0;
    5893             559 :   char *arg1 = (char *) 0 ;
    5894             559 :   char *arg2 = (char *) NULL ;
    5895                 :   int res1 ;
    5896             559 :   char *buf1 = 0 ;
    5897             559 :   int alloc1 = 0 ;
    5898                 :   int res2 ;
    5899             559 :   char *buf2 = 0 ;
    5900             559 :   int alloc2 = 0 ;
    5901             559 :   PyObject * obj0 = 0 ;
    5902             559 :   PyObject * obj1 = 0 ;
    5903             559 :   char *result = 0 ;
    5904                 :   
    5905             559 :   if (!PyArg_ParseTuple(args,(char *)"O|O:GetConfigOption",&obj0,&obj1)) SWIG_fail;
    5906             559 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
    5907             559 :   if (!SWIG_IsOK(res1)) {
    5908               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetConfigOption" "', argument " "1"" of type '" "char const *""'");
    5909                 :   }
    5910             559 :   arg1 = reinterpret_cast< char * >(buf1);
    5911             559 :   if (obj1) {
    5912             542 :     res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    5913             542 :     if (!SWIG_IsOK(res2)) {
    5914               0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetConfigOption" "', argument " "2"" of type '" "char const *""'");
    5915                 :     }
    5916             542 :     arg2 = reinterpret_cast< char * >(buf2);
    5917                 :   }
    5918                 :   {
    5919             559 :     if (!arg1) {
    5920               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    5921                 :     }
    5922                 :   }
    5923                 :   {
    5924             559 :     if ( bUseExceptions ) {
    5925               0 :       CPLErrorReset();
    5926                 :     }
    5927             559 :     result = (char *)wrapper_CPLGetConfigOption((char const *)arg1,(char const *)arg2);
    5928             559 :     if ( bUseExceptions ) {
    5929               0 :       CPLErr eclass = CPLGetLastErrorType();
    5930               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    5931               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    5932                 :       }
    5933                 :     }
    5934                 :   }
    5935             559 :   resultobj = SWIG_FromCharPtr((const char *)result);
    5936             559 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    5937             559 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    5938             559 :   return resultobj;
    5939                 : fail:
    5940               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    5941               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    5942               0 :   return NULL;
    5943                 : }
    5944                 : 
    5945                 : 
    5946               0 : SWIGINTERN PyObject *_wrap_CPLBinaryToHex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    5947               0 :   PyObject *resultobj = 0;
    5948                 :   int arg1 ;
    5949               0 :   GByte *arg2 = (GByte *) 0 ;
    5950               0 :   int alloc1 = 0 ;
    5951               0 :   PyObject * obj0 = 0 ;
    5952               0 :   retStringAndCPLFree *result = 0 ;
    5953                 :   
    5954               0 :   if (!PyArg_ParseTuple(args,(char *)"O:CPLBinaryToHex",&obj0)) SWIG_fail;
    5955                 :   {
    5956                 :     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
    5957                 : #if PY_VERSION_HEX>=0x03000000
    5958                 :     if (PyUnicode_Check(obj0))
    5959                 :     {
    5960                 :       size_t safeLen = 0;
    5961                 :       int ret = SWIG_AsCharPtrAndSize(obj0, (char**) &arg2, &safeLen, &alloc1);
    5962                 :       if (!SWIG_IsOK(ret)) {
    5963                 :         SWIG_exception( SWIG_RuntimeError, "invalid Unicode string" );
    5964                 :       }
    5965                 :       
    5966                 :       if (safeLen) safeLen--;
    5967                 :       arg1 = (int) safeLen;
    5968                 :     }
    5969                 :     else if (PyBytes_Check(obj0))
    5970                 :     {
    5971                 :       Py_ssize_t safeLen = 0;
    5972                 :       PyBytes_AsStringAndSize(obj0, (char**) &arg2, &safeLen);
    5973                 :       arg1 = (int) safeLen;
    5974                 :     }
    5975                 :     else
    5976                 :     {
    5977                 :       PyErr_SetString(PyExc_TypeError, "not a unicode string or a bytes");
    5978                 :       SWIG_fail;
    5979                 :     }
    5980                 : #else
    5981               0 :     if (PyString_Check(obj0))
    5982                 :     {
    5983               0 :       Py_ssize_t safeLen = 0;
    5984               0 :       PyString_AsStringAndSize(obj0, (char**) &arg2, &safeLen);
    5985               0 :       arg1 = (int) safeLen;
    5986                 :     }
    5987                 :     else
    5988                 :     {
    5989               0 :       PyErr_SetString(PyExc_TypeError, "not a string");
    5990               0 :       SWIG_fail;
    5991                 :     }
    5992                 : #endif
    5993                 :   }
    5994                 :   {
    5995               0 :     if ( bUseExceptions ) {
    5996               0 :       CPLErrorReset();
    5997                 :     }
    5998               0 :     result = (retStringAndCPLFree *)CPLBinaryToHex(arg1,(GByte const *)arg2);
    5999               0 :     if ( bUseExceptions ) {
    6000               0 :       CPLErr eclass = CPLGetLastErrorType();
    6001               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6002               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6003                 :       }
    6004                 :     }
    6005                 :   }
    6006                 :   {
    6007                 :     /* %typemap(out) (retStringAndCPLFree*) */
    6008               0 :     if(result)
    6009                 :     {
    6010               0 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
    6011               0 :       CPLFree(result);
    6012                 :     }
    6013                 :   }
    6014                 :   {
    6015                 :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
    6016               0 :     if( alloc1 == SWIG_NEWOBJ ) {
    6017               0 :       delete[] arg2;
    6018                 :     }
    6019                 :   }
    6020               0 :   return resultobj;
    6021                 : fail:
    6022                 :   {
    6023                 :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
    6024               0 :     if( alloc1 == SWIG_NEWOBJ ) {
    6025               0 :       delete[] arg2;
    6026                 :     }
    6027                 :   }
    6028               0 :   return NULL;
    6029                 : }
    6030                 : 
    6031                 : 
    6032               0 : SWIGINTERN PyObject *_wrap_CPLHexToBinary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6033               0 :   PyObject *resultobj = 0;
    6034               0 :   char *arg1 = (char *) 0 ;
    6035               0 :   int *arg2 = (int *) 0 ;
    6036                 :   int res1 ;
    6037               0 :   char *buf1 = 0 ;
    6038               0 :   int alloc1 = 0 ;
    6039               0 :   void *argp2 = 0 ;
    6040               0 :   int res2 = 0 ;
    6041               0 :   PyObject * obj0 = 0 ;
    6042               0 :   PyObject * obj1 = 0 ;
    6043               0 :   GByte *result = 0 ;
    6044                 :   
    6045               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:CPLHexToBinary",&obj0,&obj1)) SWIG_fail;
    6046               0 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
    6047               0 :   if (!SWIG_IsOK(res1)) {
    6048               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CPLHexToBinary" "', argument " "1"" of type '" "char const *""'");
    6049                 :   }
    6050               0 :   arg1 = reinterpret_cast< char * >(buf1);
    6051               0 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 |  0 );
    6052               0 :   if (!SWIG_IsOK(res2)) {
    6053               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CPLHexToBinary" "', argument " "2"" of type '" "int *""'"); 
    6054                 :   }
    6055               0 :   arg2 = reinterpret_cast< int * >(argp2);
    6056                 :   {
    6057               0 :     if ( bUseExceptions ) {
    6058               0 :       CPLErrorReset();
    6059                 :     }
    6060               0 :     result = (GByte *)CPLHexToBinary((char const *)arg1,arg2);
    6061               0 :     if ( bUseExceptions ) {
    6062               0 :       CPLErr eclass = CPLGetLastErrorType();
    6063               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6064               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6065                 :       }
    6066                 :     }
    6067                 :   }
    6068               0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GByte, 0 |  0 );
    6069               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    6070               0 :   return resultobj;
    6071                 : fail:
    6072               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    6073               0 :   return NULL;
    6074                 : }
    6075                 : 
    6076                 : 
    6077               9 : SWIGINTERN PyObject *_wrap_FileFromMemBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6078               9 :   PyObject *resultobj = 0;
    6079               9 :   char *arg1 = (char *) 0 ;
    6080                 :   int arg2 ;
    6081               9 :   GByte *arg3 = (GByte *) 0 ;
    6082               9 :   int bToFree1 = 0 ;
    6083               9 :   int alloc2 = 0 ;
    6084               9 :   PyObject * obj0 = 0 ;
    6085               9 :   PyObject * obj1 = 0 ;
    6086                 :   
    6087               9 :   if (!PyArg_ParseTuple(args,(char *)"OO:FileFromMemBuffer",&obj0,&obj1)) SWIG_fail;
    6088                 :   {
    6089                 :     /* %typemap(in) (const char *utf8_path) */
    6090               9 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    6091               9 :     if (arg1 == NULL)
    6092                 :     {
    6093               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    6094               0 :       SWIG_fail;
    6095                 :     }
    6096                 :   }
    6097                 :   {
    6098                 :     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
    6099                 : #if PY_VERSION_HEX>=0x03000000
    6100                 :     if (PyUnicode_Check(obj1))
    6101                 :     {
    6102                 :       size_t safeLen = 0;
    6103                 :       int ret = SWIG_AsCharPtrAndSize(obj1, (char**) &arg3, &safeLen, &alloc2);
    6104                 :       if (!SWIG_IsOK(ret)) {
    6105                 :         SWIG_exception( SWIG_RuntimeError, "invalid Unicode string" );
    6106                 :       }
    6107                 :       
    6108                 :       if (safeLen) safeLen--;
    6109                 :       arg2 = (int) safeLen;
    6110                 :     }
    6111                 :     else if (PyBytes_Check(obj1))
    6112                 :     {
    6113                 :       Py_ssize_t safeLen = 0;
    6114                 :       PyBytes_AsStringAndSize(obj1, (char**) &arg3, &safeLen);
    6115                 :       arg2 = (int) safeLen;
    6116                 :     }
    6117                 :     else
    6118                 :     {
    6119                 :       PyErr_SetString(PyExc_TypeError, "not a unicode string or a bytes");
    6120                 :       SWIG_fail;
    6121                 :     }
    6122                 : #else
    6123               9 :     if (PyString_Check(obj1))
    6124                 :     {
    6125               9 :       Py_ssize_t safeLen = 0;
    6126               9 :       PyString_AsStringAndSize(obj1, (char**) &arg3, &safeLen);
    6127               9 :       arg2 = (int) safeLen;
    6128                 :     }
    6129                 :     else
    6130                 :     {
    6131               0 :       PyErr_SetString(PyExc_TypeError, "not a string");
    6132               0 :       SWIG_fail;
    6133                 :     }
    6134                 : #endif
    6135                 :   }
    6136                 :   {
    6137               9 :     if ( bUseExceptions ) {
    6138               0 :       CPLErrorReset();
    6139                 :     }
    6140               9 :     wrapper_VSIFileFromMemBuffer((char const *)arg1,arg2,(GByte const *)arg3);
    6141               9 :     if ( bUseExceptions ) {
    6142               0 :       CPLErr eclass = CPLGetLastErrorType();
    6143               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6144               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6145                 :       }
    6146                 :     }
    6147                 :   }
    6148               9 :   resultobj = SWIG_Py_Void();
    6149                 :   {
    6150                 :     /* %typemap(freearg) (const char *utf8_path) */
    6151               9 :     GDALPythonFreeCStr(arg1, bToFree1);
    6152                 :   }
    6153                 :   {
    6154                 :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
    6155               9 :     if( alloc2 == SWIG_NEWOBJ ) {
    6156               0 :       delete[] arg3;
    6157                 :     }
    6158                 :   }
    6159               9 :   return resultobj;
    6160                 : fail:
    6161                 :   {
    6162                 :     /* %typemap(freearg) (const char *utf8_path) */
    6163               0 :     GDALPythonFreeCStr(arg1, bToFree1);
    6164                 :   }
    6165                 :   {
    6166                 :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
    6167               0 :     if( alloc2 == SWIG_NEWOBJ ) {
    6168               0 :       delete[] arg3;
    6169                 :     }
    6170                 :   }
    6171               0 :   return NULL;
    6172                 : }
    6173                 : 
    6174                 : 
    6175             359 : SWIGINTERN PyObject *_wrap_Unlink(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6176             359 :   PyObject *resultobj = 0;
    6177             359 :   char *arg1 = (char *) 0 ;
    6178             359 :   int bToFree1 = 0 ;
    6179             359 :   PyObject * obj0 = 0 ;
    6180                 :   int result;
    6181                 :   
    6182             359 :   if (!PyArg_ParseTuple(args,(char *)"O:Unlink",&obj0)) SWIG_fail;
    6183                 :   {
    6184                 :     /* %typemap(in) (const char *utf8_path) */
    6185             359 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    6186             359 :     if (arg1 == NULL)
    6187                 :     {
    6188               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    6189               0 :       SWIG_fail;
    6190                 :     }
    6191                 :   }
    6192                 :   {
    6193             359 :     if ( bUseExceptions ) {
    6194               0 :       CPLErrorReset();
    6195                 :     }
    6196             359 :     result = (int)VSIUnlink((char const *)arg1);
    6197             359 :     if ( bUseExceptions ) {
    6198               0 :       CPLErr eclass = CPLGetLastErrorType();
    6199               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6200               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6201                 :       }
    6202                 :     }
    6203                 :   }
    6204             359 :   resultobj = SWIG_From_int(static_cast< int >(result));
    6205                 :   {
    6206                 :     /* %typemap(freearg) (const char *utf8_path) */
    6207             359 :     GDALPythonFreeCStr(arg1, bToFree1);
    6208                 :   }
    6209             359 :   return resultobj;
    6210                 : fail:
    6211                 :   {
    6212                 :     /* %typemap(freearg) (const char *utf8_path) */
    6213               0 :     GDALPythonFreeCStr(arg1, bToFree1);
    6214                 :   }
    6215               0 :   return NULL;
    6216                 : }
    6217                 : 
    6218                 : 
    6219               0 : SWIGINTERN PyObject *_wrap_HasThreadSupport(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6220               0 :   PyObject *resultobj = 0;
    6221                 :   int result;
    6222                 :   
    6223               0 :   if (!PyArg_ParseTuple(args,(char *)":HasThreadSupport")) SWIG_fail;
    6224                 :   {
    6225               0 :     if ( bUseExceptions ) {
    6226               0 :       CPLErrorReset();
    6227                 :     }
    6228               0 :     result = (int)wrapper_HasThreadSupport();
    6229               0 :     if ( bUseExceptions ) {
    6230               0 :       CPLErr eclass = CPLGetLastErrorType();
    6231               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6232               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6233                 :       }
    6234                 :     }
    6235                 :   }
    6236               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
    6237               0 :   return resultobj;
    6238                 : fail:
    6239               0 :   return NULL;
    6240                 : }
    6241                 : 
    6242                 : 
    6243               1 : SWIGINTERN PyObject *_wrap_Mkdir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6244               1 :   PyObject *resultobj = 0;
    6245               1 :   char *arg1 = (char *) 0 ;
    6246                 :   int arg2 ;
    6247               1 :   int bToFree1 = 0 ;
    6248                 :   int val2 ;
    6249               1 :   int ecode2 = 0 ;
    6250               1 :   PyObject * obj0 = 0 ;
    6251               1 :   PyObject * obj1 = 0 ;
    6252                 :   int result;
    6253                 :   
    6254               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:Mkdir",&obj0,&obj1)) SWIG_fail;
    6255                 :   {
    6256                 :     /* %typemap(in) (const char *utf8_path) */
    6257               1 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    6258               1 :     if (arg1 == NULL)
    6259                 :     {
    6260               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    6261               0 :       SWIG_fail;
    6262                 :     }
    6263                 :   }
    6264               1 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
    6265               1 :   if (!SWIG_IsOK(ecode2)) {
    6266               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Mkdir" "', argument " "2"" of type '" "int""'");
    6267                 :   } 
    6268               1 :   arg2 = static_cast< int >(val2);
    6269                 :   {
    6270               1 :     if ( bUseExceptions ) {
    6271               0 :       CPLErrorReset();
    6272                 :     }
    6273               1 :     result = (int)VSIMkdir((char const *)arg1,arg2);
    6274               1 :     if ( bUseExceptions ) {
    6275               0 :       CPLErr eclass = CPLGetLastErrorType();
    6276               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6277               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6278                 :       }
    6279                 :     }
    6280                 :   }
    6281               1 :   resultobj = SWIG_From_int(static_cast< int >(result));
    6282                 :   {
    6283                 :     /* %typemap(freearg) (const char *utf8_path) */
    6284               1 :     GDALPythonFreeCStr(arg1, bToFree1);
    6285                 :   }
    6286               1 :   return resultobj;
    6287                 : fail:
    6288                 :   {
    6289                 :     /* %typemap(freearg) (const char *utf8_path) */
    6290               0 :     GDALPythonFreeCStr(arg1, bToFree1);
    6291                 :   }
    6292               0 :   return NULL;
    6293                 : }
    6294                 : 
    6295                 : 
    6296               1 : SWIGINTERN PyObject *_wrap_Rmdir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6297               1 :   PyObject *resultobj = 0;
    6298               1 :   char *arg1 = (char *) 0 ;
    6299               1 :   int bToFree1 = 0 ;
    6300               1 :   PyObject * obj0 = 0 ;
    6301                 :   int result;
    6302                 :   
    6303               1 :   if (!PyArg_ParseTuple(args,(char *)"O:Rmdir",&obj0)) SWIG_fail;
    6304                 :   {
    6305                 :     /* %typemap(in) (const char *utf8_path) */
    6306               1 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    6307               1 :     if (arg1 == NULL)
    6308                 :     {
    6309               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    6310               0 :       SWIG_fail;
    6311                 :     }
    6312                 :   }
    6313                 :   {
    6314               1 :     if ( bUseExceptions ) {
    6315               0 :       CPLErrorReset();
    6316                 :     }
    6317               1 :     result = (int)VSIRmdir((char const *)arg1);
    6318               1 :     if ( bUseExceptions ) {
    6319               0 :       CPLErr eclass = CPLGetLastErrorType();
    6320               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6321               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6322                 :       }
    6323                 :     }
    6324                 :   }
    6325               1 :   resultobj = SWIG_From_int(static_cast< int >(result));
    6326                 :   {
    6327                 :     /* %typemap(freearg) (const char *utf8_path) */
    6328               1 :     GDALPythonFreeCStr(arg1, bToFree1);
    6329                 :   }
    6330               1 :   return resultobj;
    6331                 : fail:
    6332                 :   {
    6333                 :     /* %typemap(freearg) (const char *utf8_path) */
    6334               0 :     GDALPythonFreeCStr(arg1, bToFree1);
    6335                 :   }
    6336               0 :   return NULL;
    6337                 : }
    6338                 : 
    6339                 : 
    6340               1 : SWIGINTERN PyObject *_wrap_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6341               1 :   PyObject *resultobj = 0;
    6342               1 :   char *arg1 = (char *) 0 ;
    6343               1 :   char *arg2 = (char *) 0 ;
    6344                 :   int res1 ;
    6345               1 :   char *buf1 = 0 ;
    6346               1 :   int alloc1 = 0 ;
    6347                 :   int res2 ;
    6348               1 :   char *buf2 = 0 ;
    6349               1 :   int alloc2 = 0 ;
    6350               1 :   PyObject * obj0 = 0 ;
    6351               1 :   PyObject * obj1 = 0 ;
    6352                 :   int result;
    6353                 :   
    6354               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:Rename",&obj0,&obj1)) SWIG_fail;
    6355               1 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
    6356               1 :   if (!SWIG_IsOK(res1)) {
    6357               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rename" "', argument " "1"" of type '" "char const *""'");
    6358                 :   }
    6359               1 :   arg1 = reinterpret_cast< char * >(buf1);
    6360               1 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    6361               1 :   if (!SWIG_IsOK(res2)) {
    6362               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Rename" "', argument " "2"" of type '" "char const *""'");
    6363                 :   }
    6364               1 :   arg2 = reinterpret_cast< char * >(buf2);
    6365                 :   {
    6366               1 :     if ( bUseExceptions ) {
    6367               0 :       CPLErrorReset();
    6368                 :     }
    6369               1 :     result = (int)VSIRename((char const *)arg1,(char const *)arg2);
    6370               1 :     if ( bUseExceptions ) {
    6371               0 :       CPLErr eclass = CPLGetLastErrorType();
    6372               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6373               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6374                 :       }
    6375                 :     }
    6376                 :   }
    6377               1 :   resultobj = SWIG_From_int(static_cast< int >(result));
    6378               1 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    6379               1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    6380               1 :   return resultobj;
    6381                 : fail:
    6382               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    6383               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    6384               0 :   return NULL;
    6385                 : }
    6386                 : 
    6387                 : 
    6388               0 : SWIGINTERN PyObject *_wrap_StatBuf_mode_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6389               0 :   PyObject *resultobj = 0;
    6390               0 :   StatBuf *arg1 = (StatBuf *) 0 ;
    6391               0 :   void *argp1 = 0 ;
    6392               0 :   int res1 = 0 ;
    6393               0 :   PyObject * obj0 = 0 ;
    6394                 :   int result;
    6395                 :   
    6396               0 :   if (!PyArg_ParseTuple(args,(char *)"O:StatBuf_mode_get",&obj0)) SWIG_fail;
    6397               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
    6398               0 :   if (!SWIG_IsOK(res1)) {
    6399               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_mode_get" "', argument " "1"" of type '" "StatBuf *""'"); 
    6400                 :   }
    6401               0 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
    6402               0 :   result = (int) ((arg1)->mode);
    6403               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
    6404               0 :   return resultobj;
    6405                 : fail:
    6406               0 :   return NULL;
    6407                 : }
    6408                 : 
    6409                 : 
    6410             261 : SWIGINTERN PyObject *_wrap_StatBuf_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6411             261 :   PyObject *resultobj = 0;
    6412             261 :   StatBuf *arg1 = (StatBuf *) 0 ;
    6413             261 :   void *argp1 = 0 ;
    6414             261 :   int res1 = 0 ;
    6415             261 :   PyObject * obj0 = 0 ;
    6416                 :   GIntBig result;
    6417                 :   
    6418             261 :   if (!PyArg_ParseTuple(args,(char *)"O:StatBuf_size_get",&obj0)) SWIG_fail;
    6419             261 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
    6420             261 :   if (!SWIG_IsOK(res1)) {
    6421               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_size_get" "', argument " "1"" of type '" "StatBuf *""'"); 
    6422                 :   }
    6423             261 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
    6424             261 :   result =  ((arg1)->size);
    6425                 :   {
    6426                 :     char szTmp[32];
    6427                 :     sprintf(szTmp, CPL_FRMT_GIB, result);
    6428                 : #if PY_VERSION_HEX>=0x03000000
    6429                 :     resultobj = PyLong_FromString(szTmp, NULL, 10);
    6430                 : #else
    6431             261 :     resultobj = PyInt_FromString(szTmp, NULL, 10);
    6432                 : #endif
    6433                 :   }
    6434             261 :   return resultobj;
    6435                 : fail:
    6436               0 :   return NULL;
    6437                 : }
    6438                 : 
    6439                 : 
    6440             258 : SWIGINTERN PyObject *_wrap_StatBuf_mtime_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6441             258 :   PyObject *resultobj = 0;
    6442             258 :   StatBuf *arg1 = (StatBuf *) 0 ;
    6443             258 :   void *argp1 = 0 ;
    6444             258 :   int res1 = 0 ;
    6445             258 :   PyObject * obj0 = 0 ;
    6446                 :   GIntBig result;
    6447                 :   
    6448             258 :   if (!PyArg_ParseTuple(args,(char *)"O:StatBuf_mtime_get",&obj0)) SWIG_fail;
    6449             258 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
    6450             258 :   if (!SWIG_IsOK(res1)) {
    6451               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_mtime_get" "', argument " "1"" of type '" "StatBuf *""'"); 
    6452                 :   }
    6453             258 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
    6454             258 :   result =  ((arg1)->mtime);
    6455                 :   {
    6456                 :     char szTmp[32];
    6457                 :     sprintf(szTmp, CPL_FRMT_GIB, result);
    6458                 : #if PY_VERSION_HEX>=0x03000000
    6459                 :     resultobj = PyLong_FromString(szTmp, NULL, 10);
    6460                 : #else
    6461             258 :     resultobj = PyInt_FromString(szTmp, NULL, 10);
    6462                 : #endif
    6463                 :   }
    6464             258 :   return resultobj;
    6465                 : fail:
    6466               0 :   return NULL;
    6467                 : }
    6468                 : 
    6469                 : 
    6470               0 : SWIGINTERN PyObject *_wrap_new_StatBuf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6471               0 :   PyObject *resultobj = 0;
    6472               0 :   StatBuf *arg1 = (StatBuf *) 0 ;
    6473               0 :   void *argp1 = 0 ;
    6474               0 :   int res1 = 0 ;
    6475               0 :   PyObject * obj0 = 0 ;
    6476               0 :   StatBuf *result = 0 ;
    6477                 :   
    6478               0 :   if (!PyArg_ParseTuple(args,(char *)"O:new_StatBuf",&obj0)) SWIG_fail;
    6479               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
    6480               0 :   if (!SWIG_IsOK(res1)) {
    6481               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StatBuf" "', argument " "1"" of type '" "StatBuf *""'"); 
    6482                 :   }
    6483               0 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
    6484                 :   {
    6485               0 :     if ( bUseExceptions ) {
    6486               0 :       CPLErrorReset();
    6487                 :     }
    6488               0 :     result = (StatBuf *)new_StatBuf(arg1);
    6489               0 :     if ( bUseExceptions ) {
    6490               0 :       CPLErr eclass = CPLGetLastErrorType();
    6491               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6492               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6493                 :       }
    6494                 :     }
    6495                 :   }
    6496               0 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StatBuf, SWIG_POINTER_NEW |  0 );
    6497               0 :   return resultobj;
    6498                 : fail:
    6499               0 :   return NULL;
    6500                 : }
    6501                 : 
    6502                 : 
    6503            1910 : SWIGINTERN PyObject *_wrap_delete_StatBuf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6504            1910 :   PyObject *resultobj = 0;
    6505            1910 :   StatBuf *arg1 = (StatBuf *) 0 ;
    6506            1910 :   void *argp1 = 0 ;
    6507            1910 :   int res1 = 0 ;
    6508            1910 :   PyObject * obj0 = 0 ;
    6509                 :   
    6510            1910 :   if (!PyArg_ParseTuple(args,(char *)"O:delete_StatBuf",&obj0)) SWIG_fail;
    6511            1910 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StatBuf, SWIG_POINTER_DISOWN |  0 );
    6512            1910 :   if (!SWIG_IsOK(res1)) {
    6513               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StatBuf" "', argument " "1"" of type '" "StatBuf *""'"); 
    6514                 :   }
    6515            1910 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
    6516                 :   {
    6517            1910 :     if ( bUseExceptions ) {
    6518               0 :       CPLErrorReset();
    6519                 :     }
    6520                 :     delete_StatBuf(arg1);
    6521            1910 :     if ( bUseExceptions ) {
    6522               0 :       CPLErr eclass = CPLGetLastErrorType();
    6523               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6524               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6525                 :       }
    6526                 :     }
    6527                 :   }
    6528            1910 :   resultobj = SWIG_Py_Void();
    6529            1910 :   return resultobj;
    6530                 : fail:
    6531               0 :   return NULL;
    6532                 : }
    6533                 : 
    6534                 : 
    6535            2165 : SWIGINTERN PyObject *_wrap_StatBuf_IsDirectory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6536            2165 :   PyObject *resultobj = 0;
    6537            2165 :   StatBuf *arg1 = (StatBuf *) 0 ;
    6538            2165 :   void *argp1 = 0 ;
    6539            2165 :   int res1 = 0 ;
    6540            2165 :   PyObject * obj0 = 0 ;
    6541                 :   int result;
    6542                 :   
    6543            2165 :   if (!PyArg_ParseTuple(args,(char *)"O:StatBuf_IsDirectory",&obj0)) SWIG_fail;
    6544            2165 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StatBuf, 0 |  0 );
    6545            2165 :   if (!SWIG_IsOK(res1)) {
    6546               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StatBuf_IsDirectory" "', argument " "1"" of type '" "StatBuf *""'"); 
    6547                 :   }
    6548            2165 :   arg1 = reinterpret_cast< StatBuf * >(argp1);
    6549                 :   {
    6550            2165 :     if ( bUseExceptions ) {
    6551               0 :       CPLErrorReset();
    6552                 :     }
    6553            2165 :     result = (int)StatBuf_IsDirectory(arg1);
    6554            2165 :     if ( bUseExceptions ) {
    6555               0 :       CPLErr eclass = CPLGetLastErrorType();
    6556               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6557               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6558                 :       }
    6559                 :     }
    6560                 :   }
    6561            2165 :   resultobj = SWIG_From_int(static_cast< int >(result));
    6562            2165 :   return resultobj;
    6563                 : fail:
    6564               0 :   return NULL;
    6565                 : }
    6566                 : 
    6567                 : 
    6568               6 : SWIGINTERN PyObject *StatBuf_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6569                 :   PyObject *obj;
    6570               6 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
    6571               6 :   SWIG_TypeNewClientData(SWIGTYPE_p_StatBuf, SWIG_NewClientData(obj));
    6572               6 :   return SWIG_Py_Void();
    6573                 : }
    6574                 : 
    6575            1912 : SWIGINTERN PyObject *_wrap_VSIStatL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6576            1912 :   PyObject *resultobj = 0;
    6577            1912 :   char *arg1 = (char *) 0 ;
    6578            1912 :   StatBuf *arg2 = (StatBuf *) 0 ;
    6579            1912 :   int arg3 = (int) 0 ;
    6580            1912 :   int bToFree1 = 0 ;
    6581                 :   StatBuf sStatBuf2 ;
    6582                 :   int val3 ;
    6583            1912 :   int ecode3 = 0 ;
    6584            1912 :   PyObject * obj0 = 0 ;
    6585            1912 :   PyObject * obj1 = 0 ;
    6586                 :   int result;
    6587                 :   
    6588                 :   {
    6589                 :     /* %typemap(in,numinputs=0) (StatBuf *psStatBufOut) (StatBuf sStatBuf2 ) */
    6590            1912 :     arg2 = &sStatBuf2;
    6591                 :   }
    6592            1912 :   if (!PyArg_ParseTuple(args,(char *)"O|O:VSIStatL",&obj0,&obj1)) SWIG_fail;
    6593                 :   {
    6594                 :     /* %typemap(in) (const char *utf8_path) */
    6595            1912 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    6596            1912 :     if (arg1 == NULL)
    6597                 :     {
    6598               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    6599               0 :       SWIG_fail;
    6600                 :     }
    6601                 :   }
    6602            1912 :   if (obj1) {
    6603            1912 :     ecode3 = SWIG_AsVal_int(obj1, &val3);
    6604            1912 :     if (!SWIG_IsOK(ecode3)) {
    6605               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIStatL" "', argument " "3"" of type '" "int""'");
    6606                 :     } 
    6607            1912 :     arg3 = static_cast< int >(val3);
    6608                 :   }
    6609                 :   {
    6610            1912 :     if ( bUseExceptions ) {
    6611               0 :       CPLErrorReset();
    6612                 :     }
    6613            1912 :     result = (int)wrapper_VSIStatL((char const *)arg1,arg2,arg3);
    6614            1912 :     if ( bUseExceptions ) {
    6615               0 :       CPLErr eclass = CPLGetLastErrorType();
    6616               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6617               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6618                 :       }
    6619                 :     }
    6620                 :   }
    6621            1912 :   resultobj = SWIG_From_int(static_cast< int >(result));
    6622                 :   {
    6623                 :     /* %typemap(argout) (StatBuf *psStatBufOut)*/
    6624            1912 :     Py_DECREF(resultobj);
    6625            1912 :     if (result == 0)
    6626            3820 :     resultobj = SWIG_NewPointerObj((void*)new_StatBuf( arg2 ),SWIGTYPE_p_StatBuf,1);
    6627                 :     else
    6628               2 :     resultobj = Py_None;
    6629                 :   }
    6630                 :   {
    6631                 :     /* %typemap(freearg) (const char *utf8_path) */
    6632            1912 :     GDALPythonFreeCStr(arg1, bToFree1);
    6633                 :   }
    6634            1912 :   return resultobj;
    6635                 : fail:
    6636                 :   {
    6637                 :     /* %typemap(freearg) (const char *utf8_path) */
    6638               0 :     GDALPythonFreeCStr(arg1, bToFree1);
    6639                 :   }
    6640               0 :   return NULL;
    6641                 : }
    6642                 : 
    6643                 : 
    6644              78 : SWIGINTERN PyObject *_wrap_VSIFOpenL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6645              78 :   PyObject *resultobj = 0;
    6646              78 :   char *arg1 = (char *) 0 ;
    6647              78 :   char *arg2 = (char *) 0 ;
    6648              78 :   int bToFree1 = 0 ;
    6649                 :   int res2 ;
    6650              78 :   char *buf2 = 0 ;
    6651              78 :   int alloc2 = 0 ;
    6652              78 :   PyObject * obj0 = 0 ;
    6653              78 :   PyObject * obj1 = 0 ;
    6654              78 :   VSILFILE *result = 0 ;
    6655                 :   
    6656              78 :   if (!PyArg_ParseTuple(args,(char *)"OO:VSIFOpenL",&obj0,&obj1)) SWIG_fail;
    6657                 :   {
    6658                 :     /* %typemap(in) (const char *utf8_path) */
    6659              78 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    6660              78 :     if (arg1 == NULL)
    6661                 :     {
    6662               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    6663               0 :       SWIG_fail;
    6664                 :     }
    6665                 :   }
    6666              78 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    6667              78 :   if (!SWIG_IsOK(res2)) {
    6668               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VSIFOpenL" "', argument " "2"" of type '" "char const *""'");
    6669                 :   }
    6670              78 :   arg2 = reinterpret_cast< char * >(buf2);
    6671                 :   {
    6672              78 :     if ( bUseExceptions ) {
    6673               0 :       CPLErrorReset();
    6674                 :     }
    6675              78 :     result = (VSILFILE *)VSIFOpenL((char const *)arg1,(char const *)arg2);
    6676              78 :     if ( bUseExceptions ) {
    6677               0 :       CPLErr eclass = CPLGetLastErrorType();
    6678               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6679               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6680                 :       }
    6681                 :     }
    6682                 :   }
    6683              78 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
    6684                 :   {
    6685                 :     /* %typemap(freearg) (const char *utf8_path) */
    6686              78 :     GDALPythonFreeCStr(arg1, bToFree1);
    6687                 :   }
    6688              78 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    6689              78 :   return resultobj;
    6690                 : fail:
    6691                 :   {
    6692                 :     /* %typemap(freearg) (const char *utf8_path) */
    6693               0 :     GDALPythonFreeCStr(arg1, bToFree1);
    6694                 :   }
    6695               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    6696               0 :   return NULL;
    6697                 : }
    6698                 : 
    6699                 : 
    6700              72 : SWIGINTERN PyObject *_wrap_VSIFCloseL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6701              72 :   PyObject *resultobj = 0;
    6702              72 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
    6703                 :   int res1 ;
    6704              72 :   PyObject * obj0 = 0 ;
    6705                 :   
    6706              72 :   if (!PyArg_ParseTuple(args,(char *)"O:VSIFCloseL",&obj0)) SWIG_fail;
    6707              72 :   res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0);
    6708              72 :   if (!SWIG_IsOK(res1)) {
    6709               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFCloseL" "', argument " "1"" of type '" "VSILFILE *""'"); 
    6710                 :   }
    6711                 :   {
    6712              72 :     if ( bUseExceptions ) {
    6713               0 :       CPLErrorReset();
    6714                 :     }
    6715              72 :     VSIFCloseL(arg1);
    6716              72 :     if ( bUseExceptions ) {
    6717               0 :       CPLErr eclass = CPLGetLastErrorType();
    6718               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6719               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6720                 :       }
    6721                 :     }
    6722                 :   }
    6723              72 :   resultobj = SWIG_Py_Void();
    6724              72 :   return resultobj;
    6725                 : fail:
    6726               0 :   return NULL;
    6727                 : }
    6728                 : 
    6729                 : 
    6730               9 : SWIGINTERN PyObject *_wrap_VSIFSeekL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6731               9 :   PyObject *resultobj = 0;
    6732               9 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
    6733                 :   GIntBig arg2 ;
    6734                 :   int arg3 ;
    6735                 :   int res1 ;
    6736                 :   int val3 ;
    6737               9 :   int ecode3 = 0 ;
    6738               9 :   PyObject * obj0 = 0 ;
    6739               9 :   PyObject * obj1 = 0 ;
    6740               9 :   PyObject * obj2 = 0 ;
    6741                 :   int result;
    6742                 :   
    6743               9 :   if (!PyArg_ParseTuple(args,(char *)"OOO:VSIFSeekL",&obj0,&obj1,&obj2)) SWIG_fail;
    6744               9 :   res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0);
    6745               9 :   if (!SWIG_IsOK(res1)) {
    6746               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFSeekL" "', argument " "1"" of type '" "VSILFILE *""'"); 
    6747                 :   }
    6748                 :   {
    6749                 :     PY_LONG_LONG val;
    6750               9 :     if ( !PyArg_Parse(obj1,"L",&val) ) {
    6751               0 :       PyErr_SetString(PyExc_TypeError, "not an integer");
    6752               0 :       SWIG_fail;
    6753                 :     }
    6754               9 :     arg2 = (GIntBig)val;
    6755                 :   }
    6756               9 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
    6757               9 :   if (!SWIG_IsOK(ecode3)) {
    6758               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIFSeekL" "', argument " "3"" of type '" "int""'");
    6759                 :   } 
    6760               9 :   arg3 = static_cast< int >(val3);
    6761                 :   {
    6762               9 :     if ( bUseExceptions ) {
    6763               0 :       CPLErrorReset();
    6764                 :     }
    6765               9 :     result = (int)VSIFSeekL(arg1,arg2,arg3);
    6766               9 :     if ( bUseExceptions ) {
    6767               0 :       CPLErr eclass = CPLGetLastErrorType();
    6768               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6769               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6770                 :       }
    6771                 :     }
    6772                 :   }
    6773               9 :   resultobj = SWIG_From_int(static_cast< int >(result));
    6774               9 :   return resultobj;
    6775                 : fail:
    6776               0 :   return NULL;
    6777                 : }
    6778                 : 
    6779                 : 
    6780               6 : SWIGINTERN PyObject *_wrap_VSIFTellL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6781               6 :   PyObject *resultobj = 0;
    6782               6 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
    6783                 :   int res1 ;
    6784               6 :   PyObject * obj0 = 0 ;
    6785                 :   GIntBig result;
    6786                 :   
    6787               6 :   if (!PyArg_ParseTuple(args,(char *)"O:VSIFTellL",&obj0)) SWIG_fail;
    6788               6 :   res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0);
    6789               6 :   if (!SWIG_IsOK(res1)) {
    6790               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFTellL" "', argument " "1"" of type '" "VSILFILE *""'"); 
    6791                 :   }
    6792                 :   {
    6793               6 :     if ( bUseExceptions ) {
    6794               0 :       CPLErrorReset();
    6795                 :     }
    6796               6 :     result = VSIFTellL(arg1);
    6797               6 :     if ( bUseExceptions ) {
    6798               0 :       CPLErr eclass = CPLGetLastErrorType();
    6799               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6800               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6801                 :       }
    6802                 :     }
    6803                 :   }
    6804                 :   {
    6805                 :     char szTmp[32];
    6806                 :     sprintf(szTmp, CPL_FRMT_GIB, result);
    6807                 : #if PY_VERSION_HEX>=0x03000000
    6808                 :     resultobj = PyLong_FromString(szTmp, NULL, 10);
    6809                 : #else
    6810               6 :     resultobj = PyInt_FromString(szTmp, NULL, 10);
    6811                 : #endif
    6812                 :   }
    6813               6 :   return resultobj;
    6814                 : fail:
    6815               0 :   return NULL;
    6816                 : }
    6817                 : 
    6818                 : 
    6819               3 : SWIGINTERN PyObject *_wrap_VSIFTruncateL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6820               3 :   PyObject *resultobj = 0;
    6821               3 :   VSILFILE *arg1 = (VSILFILE *) 0 ;
    6822                 :   GIntBig arg2 ;
    6823                 :   int res1 ;
    6824               3 :   PyObject * obj0 = 0 ;
    6825               3 :   PyObject * obj1 = 0 ;
    6826                 :   int result;
    6827                 :   
    6828               3 :   if (!PyArg_ParseTuple(args,(char *)"OO:VSIFTruncateL",&obj0,&obj1)) SWIG_fail;
    6829               3 :   res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0);
    6830               3 :   if (!SWIG_IsOK(res1)) {
    6831               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VSIFTruncateL" "', argument " "1"" of type '" "VSILFILE *""'"); 
    6832                 :   }
    6833                 :   {
    6834                 :     PY_LONG_LONG val;
    6835               3 :     if ( !PyArg_Parse(obj1,"L",&val) ) {
    6836               0 :       PyErr_SetString(PyExc_TypeError, "not an integer");
    6837               0 :       SWIG_fail;
    6838                 :     }
    6839               3 :     arg2 = (GIntBig)val;
    6840                 :   }
    6841                 :   {
    6842               3 :     if ( bUseExceptions ) {
    6843               0 :       CPLErrorReset();
    6844                 :     }
    6845               3 :     result = (int)VSIFTruncateL(arg1,arg2);
    6846               3 :     if ( bUseExceptions ) {
    6847               0 :       CPLErr eclass = CPLGetLastErrorType();
    6848               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6849               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6850                 :       }
    6851                 :     }
    6852                 :   }
    6853               3 :   resultobj = SWIG_From_int(static_cast< int >(result));
    6854               3 :   return resultobj;
    6855                 : fail:
    6856               0 :   return NULL;
    6857                 : }
    6858                 : 
    6859                 : 
    6860              55 : SWIGINTERN PyObject *_wrap_VSIFWriteL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6861              55 :   PyObject *resultobj = 0;
    6862                 :   int arg1 ;
    6863              55 :   char *arg2 = (char *) 0 ;
    6864                 :   int arg3 ;
    6865                 :   int arg4 ;
    6866              55 :   VSILFILE *arg5 = (VSILFILE *) 0 ;
    6867              55 :   int alloc1 = 0 ;
    6868                 :   int val3 ;
    6869              55 :   int ecode3 = 0 ;
    6870                 :   int val4 ;
    6871              55 :   int ecode4 = 0 ;
    6872                 :   int res5 ;
    6873              55 :   PyObject * obj0 = 0 ;
    6874              55 :   PyObject * obj1 = 0 ;
    6875              55 :   PyObject * obj2 = 0 ;
    6876              55 :   PyObject * obj3 = 0 ;
    6877                 :   int result;
    6878                 :   
    6879              55 :   if (!PyArg_ParseTuple(args,(char *)"OOOO:VSIFWriteL",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
    6880                 :   {
    6881                 :     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
    6882                 : #if PY_VERSION_HEX>=0x03000000
    6883                 :     if (PyUnicode_Check(obj0))
    6884                 :     {
    6885                 :       size_t safeLen = 0;
    6886                 :       int ret = SWIG_AsCharPtrAndSize(obj0, (char**) &arg2, &safeLen, &alloc1);
    6887                 :       if (!SWIG_IsOK(ret)) {
    6888                 :         SWIG_exception( SWIG_RuntimeError, "invalid Unicode string" );
    6889                 :       }
    6890                 :       
    6891                 :       if (safeLen) safeLen--;
    6892                 :       arg1 = (int) safeLen;
    6893                 :     }
    6894                 :     else if (PyBytes_Check(obj0))
    6895                 :     {
    6896                 :       Py_ssize_t safeLen = 0;
    6897                 :       PyBytes_AsStringAndSize(obj0, (char**) &arg2, &safeLen);
    6898                 :       arg1 = (int) safeLen;
    6899                 :     }
    6900                 :     else
    6901                 :     {
    6902                 :       PyErr_SetString(PyExc_TypeError, "not a unicode string or a bytes");
    6903                 :       SWIG_fail;
    6904                 :     }
    6905                 : #else
    6906              55 :     if (PyString_Check(obj0))
    6907                 :     {
    6908              55 :       Py_ssize_t safeLen = 0;
    6909              55 :       PyString_AsStringAndSize(obj0, (char**) &arg2, &safeLen);
    6910              55 :       arg1 = (int) safeLen;
    6911                 :     }
    6912                 :     else
    6913                 :     {
    6914               0 :       PyErr_SetString(PyExc_TypeError, "not a string");
    6915               0 :       SWIG_fail;
    6916                 :     }
    6917                 : #endif
    6918                 :   }
    6919              55 :   ecode3 = SWIG_AsVal_int(obj1, &val3);
    6920              55 :   if (!SWIG_IsOK(ecode3)) {
    6921               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VSIFWriteL" "', argument " "3"" of type '" "int""'");
    6922                 :   } 
    6923              55 :   arg3 = static_cast< int >(val3);
    6924              55 :   ecode4 = SWIG_AsVal_int(obj2, &val4);
    6925              55 :   if (!SWIG_IsOK(ecode4)) {
    6926               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VSIFWriteL" "', argument " "4"" of type '" "int""'");
    6927                 :   } 
    6928              55 :   arg4 = static_cast< int >(val4);
    6929              55 :   res5 = SWIG_ConvertPtr(obj3,SWIG_as_voidptrptr(&arg5), 0, 0);
    6930              55 :   if (!SWIG_IsOK(res5)) {
    6931               0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "VSIFWriteL" "', argument " "5"" of type '" "VSILFILE *""'"); 
    6932                 :   }
    6933                 :   {
    6934              55 :     if ( bUseExceptions ) {
    6935               0 :       CPLErrorReset();
    6936                 :     }
    6937              55 :     result = (int)wrapper_VSIFWriteL(arg1,arg2,arg3,arg4,arg5);
    6938              55 :     if ( bUseExceptions ) {
    6939               0 :       CPLErr eclass = CPLGetLastErrorType();
    6940               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6941               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6942                 :       }
    6943                 :     }
    6944                 :   }
    6945              55 :   resultobj = SWIG_From_int(static_cast< int >(result));
    6946                 :   {
    6947                 :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
    6948              55 :     if( alloc1 == SWIG_NEWOBJ ) {
    6949               0 :       delete[] arg2;
    6950                 :     }
    6951                 :   }
    6952              55 :   return resultobj;
    6953                 : fail:
    6954                 :   {
    6955                 :     /* %typemap(freearg) (int *nLen, char *pBuf ) */
    6956               0 :     if( alloc1 == SWIG_NEWOBJ ) {
    6957               0 :       delete[] arg2;
    6958                 :     }
    6959                 :   }
    6960               0 :   return NULL;
    6961                 : }
    6962                 : 
    6963                 : 
    6964              68 : SWIGINTERN PyObject *_wrap_MajorObject_GetDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6965              68 :   PyObject *resultobj = 0;
    6966              68 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    6967              68 :   void *argp1 = 0 ;
    6968              68 :   int res1 = 0 ;
    6969              68 :   PyObject * obj0 = 0 ;
    6970              68 :   char *result = 0 ;
    6971                 :   
    6972              68 :   if (!PyArg_ParseTuple(args,(char *)"O:MajorObject_GetDescription",&obj0)) SWIG_fail;
    6973              68 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
    6974              68 :   if (!SWIG_IsOK(res1)) {
    6975               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetDescription" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
    6976                 :   }
    6977              68 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
    6978                 :   {
    6979              68 :     if ( bUseExceptions ) {
    6980               0 :       CPLErrorReset();
    6981                 :     }
    6982              68 :     result = (char *)GDALMajorObjectShadow_GetDescription(arg1);
    6983              68 :     if ( bUseExceptions ) {
    6984               0 :       CPLErr eclass = CPLGetLastErrorType();
    6985               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    6986               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    6987                 :       }
    6988                 :     }
    6989                 :   }
    6990              68 :   resultobj = SWIG_FromCharPtr((const char *)result);
    6991              68 :   return resultobj;
    6992                 : fail:
    6993               0 :   return NULL;
    6994                 : }
    6995                 : 
    6996                 : 
    6997              23 : SWIGINTERN PyObject *_wrap_MajorObject_SetDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    6998              23 :   PyObject *resultobj = 0;
    6999              23 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    7000              23 :   char *arg2 = (char *) 0 ;
    7001              23 :   void *argp1 = 0 ;
    7002              23 :   int res1 = 0 ;
    7003                 :   int res2 ;
    7004              23 :   char *buf2 = 0 ;
    7005              23 :   int alloc2 = 0 ;
    7006              23 :   PyObject * obj0 = 0 ;
    7007              23 :   PyObject * obj1 = 0 ;
    7008                 :   
    7009              23 :   if (!PyArg_ParseTuple(args,(char *)"OO:MajorObject_SetDescription",&obj0,&obj1)) SWIG_fail;
    7010              23 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
    7011              23 :   if (!SWIG_IsOK(res1)) {
    7012               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetDescription" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
    7013                 :   }
    7014              23 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
    7015              23 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    7016              23 :   if (!SWIG_IsOK(res2)) {
    7017               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetDescription" "', argument " "2"" of type '" "char const *""'");
    7018                 :   }
    7019              23 :   arg2 = reinterpret_cast< char * >(buf2);
    7020                 :   {
    7021              23 :     if (!arg2) {
    7022               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    7023                 :     }
    7024                 :   }
    7025                 :   {
    7026              23 :     if ( bUseExceptions ) {
    7027               0 :       CPLErrorReset();
    7028                 :     }
    7029                 :     GDALMajorObjectShadow_SetDescription(arg1,(char const *)arg2);
    7030              23 :     if ( bUseExceptions ) {
    7031               0 :       CPLErr eclass = CPLGetLastErrorType();
    7032               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7033               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7034                 :       }
    7035                 :     }
    7036                 :   }
    7037              23 :   resultobj = SWIG_Py_Void();
    7038              23 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7039              23 :   return resultobj;
    7040                 : fail:
    7041               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7042               0 :   return NULL;
    7043                 : }
    7044                 : 
    7045                 : 
    7046            2591 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadata_Dict(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7047            2591 :   PyObject *resultobj = 0;
    7048            2591 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    7049            2591 :   char *arg2 = (char *) "" ;
    7050            2591 :   void *argp1 = 0 ;
    7051            2591 :   int res1 = 0 ;
    7052                 :   int res2 ;
    7053            2591 :   char *buf2 = 0 ;
    7054            2591 :   int alloc2 = 0 ;
    7055            2591 :   PyObject * obj0 = 0 ;
    7056            2591 :   PyObject * obj1 = 0 ;
    7057            2591 :   char **result = 0 ;
    7058                 :   
    7059            2591 :   if (!PyArg_ParseTuple(args,(char *)"O|O:MajorObject_GetMetadata_Dict",&obj0,&obj1)) SWIG_fail;
    7060            2591 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
    7061            2591 :   if (!SWIG_IsOK(res1)) {
    7062               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadata_Dict" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
    7063                 :   }
    7064            2591 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
    7065            2591 :   if (obj1) {
    7066            2591 :     res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    7067            2591 :     if (!SWIG_IsOK(res2)) {
    7068               0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadata_Dict" "', argument " "2"" of type '" "char const *""'");
    7069                 :     }
    7070            2591 :     arg2 = reinterpret_cast< char * >(buf2);
    7071                 :   }
    7072                 :   {
    7073            2591 :     if ( bUseExceptions ) {
    7074               0 :       CPLErrorReset();
    7075                 :     }
    7076            2591 :     result = (char **)GDALMajorObjectShadow_GetMetadata_Dict(arg1,(char const *)arg2);
    7077            2591 :     if ( bUseExceptions ) {
    7078               0 :       CPLErr eclass = CPLGetLastErrorType();
    7079               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7080               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7081                 :       }
    7082                 :     }
    7083                 :   }
    7084                 :   {
    7085                 :     /* %typemap(out) char **dict */
    7086            2591 :     char **stringarray = result;
    7087            2591 :     resultobj = PyDict_New();
    7088            2591 :     if ( stringarray != NULL ) {
    7089           16510 :       while (*stringarray != NULL ) {
    7090                 :         char const *valptr;
    7091                 :         char *keyptr;
    7092           13933 :         const char* pszSep = strchr( *stringarray, '=' );
    7093           13933 :         if ( pszSep != NULL) {
    7094           13933 :           keyptr = CPLStrdup(*stringarray);
    7095           13933 :           keyptr[pszSep - *stringarray] = '\0';
    7096           13933 :           valptr = pszSep + 1;
    7097           13933 :           PyObject *nm = GDALPythonObjectFromCStr( keyptr );
    7098           13933 :           PyObject *val = GDALPythonObjectFromCStr( valptr );
    7099           13933 :           PyDict_SetItem(resultobj, nm, val );
    7100           13933 :           Py_DECREF(nm);
    7101           13933 :           Py_DECREF(val);
    7102           13933 :           CPLFree( keyptr );
    7103                 :         }
    7104           13933 :         stringarray++;
    7105                 :       }
    7106                 :     }
    7107                 :   }
    7108            2591 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7109            2591 :   return resultobj;
    7110                 : fail:
    7111               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7112               0 :   return NULL;
    7113                 : }
    7114                 : 
    7115                 : 
    7116             148 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadata_List(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7117             148 :   PyObject *resultobj = 0;
    7118             148 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    7119             148 :   char *arg2 = (char *) "" ;
    7120             148 :   void *argp1 = 0 ;
    7121             148 :   int res1 = 0 ;
    7122                 :   int res2 ;
    7123             148 :   char *buf2 = 0 ;
    7124             148 :   int alloc2 = 0 ;
    7125             148 :   PyObject * obj0 = 0 ;
    7126             148 :   PyObject * obj1 = 0 ;
    7127             148 :   char **result = 0 ;
    7128                 :   
    7129             148 :   if (!PyArg_ParseTuple(args,(char *)"O|O:MajorObject_GetMetadata_List",&obj0,&obj1)) SWIG_fail;
    7130             148 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
    7131             148 :   if (!SWIG_IsOK(res1)) {
    7132               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadata_List" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
    7133                 :   }
    7134             148 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
    7135             148 :   if (obj1) {
    7136             115 :     res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    7137             115 :     if (!SWIG_IsOK(res2)) {
    7138               0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadata_List" "', argument " "2"" of type '" "char const *""'");
    7139                 :     }
    7140             115 :     arg2 = reinterpret_cast< char * >(buf2);
    7141                 :   }
    7142                 :   {
    7143             148 :     if ( bUseExceptions ) {
    7144               0 :       CPLErrorReset();
    7145                 :     }
    7146             148 :     result = (char **)GDALMajorObjectShadow_GetMetadata_List(arg1,(char const *)arg2);
    7147             148 :     if ( bUseExceptions ) {
    7148               0 :       CPLErr eclass = CPLGetLastErrorType();
    7149               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7150               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7151                 :       }
    7152                 :     }
    7153                 :   }
    7154                 :   {
    7155                 :     /* %typemap(out) char **options -> ( string ) */
    7156             148 :     char **stringarray = result;
    7157             148 :     if ( stringarray == NULL ) {
    7158              94 :       resultobj = Py_None;
    7159              94 :       Py_INCREF( resultobj );
    7160                 :     }
    7161                 :     else {
    7162              54 :       int len = CSLCount( stringarray );
    7163              54 :       resultobj = PyList_New( len );
    7164             377 :       for ( int i = 0; i < len; ++i ) {
    7165             323 :         PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
    7166             323 :         PyList_SetItem(resultobj, i, o );
    7167                 :       }
    7168                 :     }
    7169                 :   }
    7170             148 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7171             148 :   return resultobj;
    7172                 : fail:
    7173               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7174               0 :   return NULL;
    7175                 : }
    7176                 : 
    7177                 : 
    7178              69 : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7179              69 :   PyObject *resultobj = 0;
    7180              69 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    7181              69 :   char **arg2 = (char **) 0 ;
    7182              69 :   char *arg3 = (char *) "" ;
    7183              69 :   void *argp1 = 0 ;
    7184              69 :   int res1 = 0 ;
    7185                 :   int res3 ;
    7186              69 :   char *buf3 = 0 ;
    7187              69 :   int alloc3 = 0 ;
    7188              69 :   PyObject * obj0 = 0 ;
    7189              69 :   PyObject * obj1 = 0 ;
    7190              69 :   PyObject * obj2 = 0 ;
    7191                 :   CPLErr result;
    7192                 :   
    7193              69 :   if (!PyArg_ParseTuple(args,(char *)"OO|O:MajorObject_SetMetadata",&obj0,&obj1,&obj2)) SWIG_fail;
    7194              69 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
    7195              69 :   if (!SWIG_IsOK(res1)) {
    7196               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadata" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
    7197                 :   }
    7198              69 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
    7199                 :   {
    7200                 :     /* %typemap(in) char **dict */
    7201              69 :     arg2 = NULL;
    7202              69 :     if ( PySequence_Check( obj1 ) ) {
    7203               9 :       int size = PySequence_Size(obj1);
    7204              20 :       for (int i = 0; i < size; i++) {
    7205              11 :         char *pszItem = NULL;
    7206              11 :         PyObject* pyObj = PySequence_GetItem(obj1,i);
    7207              11 :         if ( ! PyArg_Parse( pyObj, "s", &pszItem ) ) {
    7208               0 :           Py_DECREF(pyObj);
    7209               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
    7210               0 :           SWIG_fail;
    7211                 :         }
    7212              11 :         arg2 = CSLAddString( arg2, pszItem );
    7213              11 :         Py_DECREF(pyObj);
    7214                 :       }
    7215                 :     }
    7216              60 :     else if ( PyMapping_Check( obj1 ) ) {
    7217                 :       /* We need to use the dictionary form. */
    7218              60 :       int size = PyMapping_Length( obj1 );
    7219              60 :       if ( size > 0 ) {
    7220              60 :         PyObject *item_list = PyMapping_Items( obj1 );
    7221             132 :         for( int i=0; i<size; i++ ) {
    7222              72 :           PyObject *it = PySequence_GetItem( item_list, i );
    7223                 :           char *nm;
    7224                 :           char *val;
    7225              72 :           if ( ! PyArg_ParseTuple( it, "ss", &nm, &val ) ) {
    7226               0 :             Py_DECREF(it);
    7227               0 :             PyErr_SetString(PyExc_TypeError,"dictionnaire must contain tuples of strings");
    7228               0 :             SWIG_fail;
    7229                 :           }
    7230              72 :           arg2 = CSLAddNameValue( arg2, nm, val );
    7231              72 :           Py_DECREF(it);
    7232                 :         }
    7233              60 :         Py_DECREF(item_list);
    7234                 :       }
    7235                 :     }
    7236                 :     else {
    7237               0 :       PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
    7238               0 :       SWIG_fail;
    7239                 :     }
    7240                 :   }
    7241              69 :   if (obj2) {
    7242              11 :     res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
    7243              11 :     if (!SWIG_IsOK(res3)) {
    7244               0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadata" "', argument " "3"" of type '" "char const *""'");
    7245                 :     }
    7246              11 :     arg3 = reinterpret_cast< char * >(buf3);
    7247                 :   }
    7248                 :   {
    7249              69 :     if ( bUseExceptions ) {
    7250               0 :       CPLErrorReset();
    7251                 :     }
    7252              69 :     result = (CPLErr)GDALMajorObjectShadow_SetMetadata__SWIG_0(arg1,arg2,(char const *)arg3);
    7253              69 :     if ( bUseExceptions ) {
    7254               0 :       CPLErr eclass = CPLGetLastErrorType();
    7255               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7256               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7257                 :       }
    7258                 :     }
    7259                 :   }
    7260             138 :   resultobj = SWIG_From_int(static_cast< int >(result));
    7261                 :   {
    7262                 :     /* %typemap(freearg) char **dict */
    7263              69 :     CSLDestroy( arg2 );
    7264                 :   }
    7265              69 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    7266                 :   {
    7267                 :     /* %typemap(ret) CPLErr */
    7268              69 :     if ( bUseExceptions == 0 ) {
    7269                 :       /* We're not using exceptions.  And no error has occurred */
    7270              69 :       if ( resultobj == 0 ) {
    7271                 :         /* No other return values set so return ErrorCode */
    7272               0 :         resultobj = PyInt_FromLong(result);
    7273                 :       }
    7274                 :     }
    7275                 :   }
    7276              69 :   return resultobj;
    7277                 : fail:
    7278                 :   {
    7279                 :     /* %typemap(freearg) char **dict */
    7280               0 :     CSLDestroy( arg2 );
    7281                 :   }
    7282               0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    7283               0 :   return NULL;
    7284                 : }
    7285                 : 
    7286                 : 
    7287               2 : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7288               2 :   PyObject *resultobj = 0;
    7289               2 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    7290               2 :   char *arg2 = (char *) 0 ;
    7291               2 :   char *arg3 = (char *) "" ;
    7292               2 :   void *argp1 = 0 ;
    7293               2 :   int res1 = 0 ;
    7294                 :   int res2 ;
    7295               2 :   char *buf2 = 0 ;
    7296               2 :   int alloc2 = 0 ;
    7297                 :   int res3 ;
    7298               2 :   char *buf3 = 0 ;
    7299               2 :   int alloc3 = 0 ;
    7300               2 :   PyObject * obj0 = 0 ;
    7301               2 :   PyObject * obj1 = 0 ;
    7302               2 :   PyObject * obj2 = 0 ;
    7303                 :   CPLErr result;
    7304                 :   
    7305               2 :   if (!PyArg_ParseTuple(args,(char *)"OO|O:MajorObject_SetMetadata",&obj0,&obj1,&obj2)) SWIG_fail;
    7306               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
    7307               2 :   if (!SWIG_IsOK(res1)) {
    7308               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadata" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
    7309                 :   }
    7310               2 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
    7311               2 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    7312               2 :   if (!SWIG_IsOK(res2)) {
    7313               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetMetadata" "', argument " "2"" of type '" "char *""'");
    7314                 :   }
    7315               2 :   arg2 = reinterpret_cast< char * >(buf2);
    7316               2 :   if (obj2) {
    7317               2 :     res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
    7318               2 :     if (!SWIG_IsOK(res3)) {
    7319               0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadata" "', argument " "3"" of type '" "char const *""'");
    7320                 :     }
    7321               2 :     arg3 = reinterpret_cast< char * >(buf3);
    7322                 :   }
    7323                 :   {
    7324               2 :     if ( bUseExceptions ) {
    7325               0 :       CPLErrorReset();
    7326                 :     }
    7327               2 :     result = (CPLErr)GDALMajorObjectShadow_SetMetadata__SWIG_1(arg1,arg2,(char const *)arg3);
    7328               2 :     if ( bUseExceptions ) {
    7329               0 :       CPLErr eclass = CPLGetLastErrorType();
    7330               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7331               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7332                 :       }
    7333                 :     }
    7334                 :   }
    7335               4 :   resultobj = SWIG_From_int(static_cast< int >(result));
    7336               2 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7337               2 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    7338                 :   {
    7339                 :     /* %typemap(ret) CPLErr */
    7340               2 :     if ( bUseExceptions == 0 ) {
    7341                 :       /* We're not using exceptions.  And no error has occurred */
    7342               2 :       if ( resultobj == 0 ) {
    7343                 :         /* No other return values set so return ErrorCode */
    7344               0 :         resultobj = PyInt_FromLong(result);
    7345                 :       }
    7346                 :     }
    7347                 :   }
    7348               2 :   return resultobj;
    7349                 : fail:
    7350               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7351               0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    7352               0 :   return NULL;
    7353                 : }
    7354                 : 
    7355                 : 
    7356              71 : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata(PyObject *self, PyObject *args) {
    7357                 :   int argc;
    7358                 :   PyObject *argv[4];
    7359                 :   int ii;
    7360                 :   
    7361              71 :   if (!PyTuple_Check(args)) SWIG_fail;
    7362              71 :   argc = (int)PyObject_Length(args);
    7363             226 :   for (ii = 0; (ii < argc) && (ii < 3); ii++) {
    7364             155 :     argv[ii] = PyTuple_GET_ITEM(args,ii);
    7365                 :   }
    7366              71 :   if ((argc >= 2) && (argc <= 3)) {
    7367                 :     int _v;
    7368              71 :     void *vptr = 0;
    7369              71 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALMajorObjectShadow, 0);
    7370              71 :     _v = SWIG_CheckState(res);
    7371              71 :     if (_v) {
    7372                 :       {
    7373                 :         /* %typecheck(SWIG_TYPECHECK_POINTER) (char **dict) */
    7374              71 :         _v = (PyMapping_Check(argv[1]) || PySequence_Check(argv[1]) ) ? 1 : 0;
    7375                 :       }
    7376              71 :       if (_v) {
    7377              69 :         if (argc <= 2) {
    7378              58 :           return _wrap_MajorObject_SetMetadata__SWIG_0(self, args);
    7379                 :         }
    7380              11 :         int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
    7381              11 :         _v = SWIG_CheckState(res);
    7382              11 :         if (_v) {
    7383              11 :           return _wrap_MajorObject_SetMetadata__SWIG_0(self, args);
    7384                 :         }
    7385                 :       }
    7386                 :     }
    7387                 :   }
    7388               2 :   if ((argc >= 2) && (argc <= 3)) {
    7389                 :     int _v;
    7390               2 :     void *vptr = 0;
    7391               2 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALMajorObjectShadow, 0);
    7392               2 :     _v = SWIG_CheckState(res);
    7393               2 :     if (_v) {
    7394               2 :       int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
    7395               2 :       _v = SWIG_CheckState(res);
    7396               2 :       if (_v) {
    7397               2 :         if (argc <= 2) {
    7398               0 :           return _wrap_MajorObject_SetMetadata__SWIG_1(self, args);
    7399                 :         }
    7400               2 :         int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
    7401               2 :         _v = SWIG_CheckState(res);
    7402               2 :         if (_v) {
    7403               2 :           return _wrap_MajorObject_SetMetadata__SWIG_1(self, args);
    7404                 :         }
    7405                 :       }
    7406                 :     }
    7407                 :   }
    7408                 :   
    7409                 : fail:
    7410                 :   SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'MajorObject_SetMetadata'.\n"
    7411                 :     "  Possible C/C++ prototypes are:\n"
    7412                 :     "    SetMetadata(GDALMajorObjectShadow *,char **,char const *)\n"
    7413               0 :     "    SetMetadata(GDALMajorObjectShadow *,char *,char const *)\n");
    7414               0 :   return NULL;
    7415                 : }
    7416                 : 
    7417                 : 
    7418             146 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadataItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7419             146 :   PyObject *resultobj = 0;
    7420             146 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    7421             146 :   char *arg2 = (char *) 0 ;
    7422             146 :   char *arg3 = (char *) "" ;
    7423             146 :   void *argp1 = 0 ;
    7424             146 :   int res1 = 0 ;
    7425                 :   int res2 ;
    7426             146 :   char *buf2 = 0 ;
    7427             146 :   int alloc2 = 0 ;
    7428                 :   int res3 ;
    7429             146 :   char *buf3 = 0 ;
    7430             146 :   int alloc3 = 0 ;
    7431             146 :   PyObject * obj0 = 0 ;
    7432             146 :   PyObject * obj1 = 0 ;
    7433             146 :   PyObject * obj2 = 0 ;
    7434             146 :   char *result = 0 ;
    7435                 :   
    7436             146 :   if (!PyArg_ParseTuple(args,(char *)"OO|O:MajorObject_GetMetadataItem",&obj0,&obj1,&obj2)) SWIG_fail;
    7437             146 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
    7438             146 :   if (!SWIG_IsOK(res1)) {
    7439               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadataItem" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
    7440                 :   }
    7441             146 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
    7442             146 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    7443             146 :   if (!SWIG_IsOK(res2)) {
    7444               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadataItem" "', argument " "2"" of type '" "char const *""'");
    7445                 :   }
    7446             146 :   arg2 = reinterpret_cast< char * >(buf2);
    7447             146 :   if (obj2) {
    7448              84 :     res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
    7449              84 :     if (!SWIG_IsOK(res3)) {
    7450               0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_GetMetadataItem" "', argument " "3"" of type '" "char const *""'");
    7451                 :     }
    7452              84 :     arg3 = reinterpret_cast< char * >(buf3);
    7453                 :   }
    7454                 :   {
    7455             146 :     if (!arg2) {
    7456               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    7457                 :     }
    7458                 :   }
    7459                 :   {
    7460             146 :     if ( bUseExceptions ) {
    7461               0 :       CPLErrorReset();
    7462                 :     }
    7463             146 :     result = (char *)GDALMajorObjectShadow_GetMetadataItem(arg1,(char const *)arg2,(char const *)arg3);
    7464             146 :     if ( bUseExceptions ) {
    7465               0 :       CPLErr eclass = CPLGetLastErrorType();
    7466               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7467               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7468                 :       }
    7469                 :     }
    7470                 :   }
    7471             146 :   resultobj = SWIG_FromCharPtr((const char *)result);
    7472             146 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7473             146 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    7474             146 :   return resultobj;
    7475                 : fail:
    7476               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7477               0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    7478               0 :   return NULL;
    7479                 : }
    7480                 : 
    7481                 : 
    7482              33 : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadataItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7483              33 :   PyObject *resultobj = 0;
    7484              33 :   GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    7485              33 :   char *arg2 = (char *) 0 ;
    7486              33 :   char *arg3 = (char *) 0 ;
    7487              33 :   char *arg4 = (char *) "" ;
    7488              33 :   void *argp1 = 0 ;
    7489              33 :   int res1 = 0 ;
    7490                 :   int res2 ;
    7491              33 :   char *buf2 = 0 ;
    7492              33 :   int alloc2 = 0 ;
    7493                 :   int res3 ;
    7494              33 :   char *buf3 = 0 ;
    7495              33 :   int alloc3 = 0 ;
    7496                 :   int res4 ;
    7497              33 :   char *buf4 = 0 ;
    7498              33 :   int alloc4 = 0 ;
    7499              33 :   PyObject * obj0 = 0 ;
    7500              33 :   PyObject * obj1 = 0 ;
    7501              33 :   PyObject * obj2 = 0 ;
    7502              33 :   PyObject * obj3 = 0 ;
    7503                 :   CPLErr result;
    7504                 :   
    7505              33 :   if (!PyArg_ParseTuple(args,(char *)"OOO|O:MajorObject_SetMetadataItem",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
    7506              33 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
    7507              33 :   if (!SWIG_IsOK(res1)) {
    7508               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadataItem" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
    7509                 :   }
    7510              33 :   arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
    7511              33 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    7512              33 :   if (!SWIG_IsOK(res2)) {
    7513               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetMetadataItem" "', argument " "2"" of type '" "char const *""'");
    7514                 :   }
    7515              33 :   arg2 = reinterpret_cast< char * >(buf2);
    7516              33 :   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
    7517              33 :   if (!SWIG_IsOK(res3)) {
    7518               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadataItem" "', argument " "3"" of type '" "char const *""'");
    7519                 :   }
    7520              33 :   arg3 = reinterpret_cast< char * >(buf3);
    7521              33 :   if (obj3) {
    7522               7 :     res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
    7523               7 :     if (!SWIG_IsOK(res4)) {
    7524               0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MajorObject_SetMetadataItem" "', argument " "4"" of type '" "char const *""'");
    7525                 :     }
    7526               7 :     arg4 = reinterpret_cast< char * >(buf4);
    7527                 :   }
    7528                 :   {
    7529              33 :     if (!arg2) {
    7530               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    7531                 :     }
    7532                 :   }
    7533                 :   {
    7534              33 :     if ( bUseExceptions ) {
    7535               0 :       CPLErrorReset();
    7536                 :     }
    7537              33 :     result = (CPLErr)GDALMajorObjectShadow_SetMetadataItem(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
    7538              33 :     if ( bUseExceptions ) {
    7539               0 :       CPLErr eclass = CPLGetLastErrorType();
    7540               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7541               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7542                 :       }
    7543                 :     }
    7544                 :   }
    7545              66 :   resultobj = SWIG_From_int(static_cast< int >(result));
    7546              33 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7547              33 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    7548              33 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
    7549                 :   {
    7550                 :     /* %typemap(ret) CPLErr */
    7551              33 :     if ( bUseExceptions == 0 ) {
    7552                 :       /* We're not using exceptions.  And no error has occurred */
    7553              33 :       if ( resultobj == 0 ) {
    7554                 :         /* No other return values set so return ErrorCode */
    7555               0 :         resultobj = PyInt_FromLong(result);
    7556                 :       }
    7557                 :     }
    7558                 :   }
    7559              33 :   return resultobj;
    7560                 : fail:
    7561               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    7562               0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    7563               0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
    7564               0 :   return NULL;
    7565                 : }
    7566                 : 
    7567                 : 
    7568               6 : SWIGINTERN PyObject *MajorObject_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7569                 :   PyObject *obj;
    7570               6 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
    7571               6 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALMajorObjectShadow, SWIG_NewClientData(obj));
    7572               6 :   return SWIG_Py_Void();
    7573                 : }
    7574                 : 
    7575           22051 : SWIGINTERN PyObject *_wrap_Driver_ShortName_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7576           22051 :   PyObject *resultobj = 0;
    7577           22051 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    7578           22051 :   void *argp1 = 0 ;
    7579           22051 :   int res1 = 0 ;
    7580           22051 :   PyObject * obj0 = 0 ;
    7581           22051 :   char *result = 0 ;
    7582                 :   
    7583           22051 :   if (!PyArg_ParseTuple(args,(char *)"O:Driver_ShortName_get",&obj0)) SWIG_fail;
    7584           22051 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
    7585           22051 :   if (!SWIG_IsOK(res1)) {
    7586               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_ShortName_get" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
    7587                 :   }
    7588           22051 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
    7589                 :   {
    7590           22051 :     if ( bUseExceptions ) {
    7591               0 :       CPLErrorReset();
    7592                 :     }
    7593           22051 :     result = (char *)GDALDriverShadow_ShortName_get(arg1);
    7594           22051 :     if ( bUseExceptions ) {
    7595               0 :       CPLErr eclass = CPLGetLastErrorType();
    7596               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7597               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7598                 :       }
    7599                 :     }
    7600                 :   }
    7601           22051 :   resultobj = SWIG_FromCharPtr((const char *)result);
    7602           22051 :   return resultobj;
    7603                 : fail:
    7604               0 :   return NULL;
    7605                 : }
    7606                 : 
    7607                 : 
    7608              17 : SWIGINTERN PyObject *_wrap_Driver_LongName_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7609              17 :   PyObject *resultobj = 0;
    7610              17 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    7611              17 :   void *argp1 = 0 ;
    7612              17 :   int res1 = 0 ;
    7613              17 :   PyObject * obj0 = 0 ;
    7614              17 :   char *result = 0 ;
    7615                 :   
    7616              17 :   if (!PyArg_ParseTuple(args,(char *)"O:Driver_LongName_get",&obj0)) SWIG_fail;
    7617              17 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
    7618              17 :   if (!SWIG_IsOK(res1)) {
    7619               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_LongName_get" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
    7620                 :   }
    7621              17 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
    7622                 :   {
    7623              17 :     if ( bUseExceptions ) {
    7624               0 :       CPLErrorReset();
    7625                 :     }
    7626              17 :     result = (char *)GDALDriverShadow_LongName_get(arg1);
    7627              17 :     if ( bUseExceptions ) {
    7628               0 :       CPLErr eclass = CPLGetLastErrorType();
    7629               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7630               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7631                 :       }
    7632                 :     }
    7633                 :   }
    7634              17 :   resultobj = SWIG_FromCharPtr((const char *)result);
    7635              17 :   return resultobj;
    7636                 : fail:
    7637               0 :   return NULL;
    7638                 : }
    7639                 : 
    7640                 : 
    7641               0 : SWIGINTERN PyObject *_wrap_Driver_HelpTopic_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    7642               0 :   PyObject *resultobj = 0;
    7643               0 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    7644               0 :   void *argp1 = 0 ;
    7645               0 :   int res1 = 0 ;
    7646               0 :   PyObject * obj0 = 0 ;
    7647               0 :   char *result = 0 ;
    7648                 :   
    7649               0 :   if (!PyArg_ParseTuple(args,(char *)"O:Driver_HelpTopic_get",&obj0)) SWIG_fail;
    7650               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
    7651               0 :   if (!SWIG_IsOK(res1)) {
    7652               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_HelpTopic_get" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
    7653                 :   }
    7654               0 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
    7655                 :   {
    7656               0 :     if ( bUseExceptions ) {
    7657               0 :       CPLErrorReset();
    7658                 :     }
    7659               0 :     result = (char *)GDALDriverShadow_HelpTopic_get(arg1);
    7660               0 :     if ( bUseExceptions ) {
    7661               0 :       CPLErr eclass = CPLGetLastErrorType();
    7662               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7663               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7664                 :       }
    7665                 :     }
    7666                 :   }
    7667               0 :   resultobj = SWIG_FromCharPtr((const char *)result);
    7668               0 :   return resultobj;
    7669                 : fail:
    7670               0 :   return NULL;
    7671                 : }
    7672                 : 
    7673                 : 
    7674            6948 : SWIGINTERN PyObject *_wrap_Driver_Create(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    7675            6948 :   PyObject *resultobj = 0;
    7676            6948 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    7677            6948 :   char *arg2 = (char *) 0 ;
    7678                 :   int arg3 ;
    7679                 :   int arg4 ;
    7680            6948 :   int arg5 = (int) 1 ;
    7681            6948 :   GDALDataType arg6 = (GDALDataType) GDT_Byte ;
    7682            6948 :   char **arg7 = (char **) 0 ;
    7683            6948 :   void *argp1 = 0 ;
    7684            6948 :   int res1 = 0 ;
    7685            6948 :   int bToFree2 = 0 ;
    7686                 :   int val3 ;
    7687            6948 :   int ecode3 = 0 ;
    7688                 :   int val4 ;
    7689            6948 :   int ecode4 = 0 ;
    7690                 :   int val5 ;
    7691            6948 :   int ecode5 = 0 ;
    7692                 :   int val6 ;
    7693            6948 :   int ecode6 = 0 ;
    7694            6948 :   PyObject * obj0 = 0 ;
    7695            6948 :   PyObject * obj1 = 0 ;
    7696            6948 :   PyObject * obj2 = 0 ;
    7697            6948 :   PyObject * obj3 = 0 ;
    7698            6948 :   PyObject * obj4 = 0 ;
    7699            6948 :   PyObject * obj5 = 0 ;
    7700            6948 :   PyObject * obj6 = 0 ;
    7701                 :   char *  kwnames[] = {
    7702                 :     (char *) "self",(char *) "utf8_path",(char *) "xsize",(char *) "ysize",(char *) "bands",(char *) "eType",(char *) "options", NULL 
    7703            6948 :   };
    7704            6948 :   GDALDatasetShadow *result = 0 ;
    7705                 :   
    7706            6948 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOO:Driver_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
    7707            6948 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
    7708            6948 :   if (!SWIG_IsOK(res1)) {
    7709               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Create" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
    7710                 :   }
    7711            6948 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
    7712                 :   {
    7713                 :     /* %typemap(in) (const char *utf8_path) */
    7714            6948 :     arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    7715            6948 :     if (arg2 == NULL)
    7716                 :     {
    7717               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    7718               0 :       SWIG_fail;
    7719                 :     }
    7720                 :   }
    7721            6948 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
    7722            6948 :   if (!SWIG_IsOK(ecode3)) {
    7723               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Driver_Create" "', argument " "3"" of type '" "int""'");
    7724                 :   } 
    7725            6948 :   arg3 = static_cast< int >(val3);
    7726            6948 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
    7727            6948 :   if (!SWIG_IsOK(ecode4)) {
    7728               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Driver_Create" "', argument " "4"" of type '" "int""'");
    7729                 :   } 
    7730            6948 :   arg4 = static_cast< int >(val4);
    7731            6948 :   if (obj4) {
    7732            6733 :     ecode5 = SWIG_AsVal_int(obj4, &val5);
    7733            6733 :     if (!SWIG_IsOK(ecode5)) {
    7734               0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Driver_Create" "', argument " "5"" of type '" "int""'");
    7735                 :     } 
    7736            6733 :     arg5 = static_cast< int >(val5);
    7737                 :   }
    7738            6948 :   if (obj5) {
    7739            1579 :     ecode6 = SWIG_AsVal_int(obj5, &val6);
    7740            1579 :     if (!SWIG_IsOK(ecode6)) {
    7741               0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Driver_Create" "', argument " "6"" of type '" "GDALDataType""'");
    7742                 :     } 
    7743            1579 :     arg6 = static_cast< GDALDataType >(val6);
    7744                 :   }
    7745            6948 :   if (obj6) {
    7746                 :     {
    7747                 :       /* %typemap(in) char **options */
    7748                 :       /* Check if is a list */
    7749             355 :       if ( ! PySequence_Check(obj6)) {
    7750               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
    7751               0 :         SWIG_fail;
    7752                 :       }
    7753                 :       
    7754             355 :       int size = PySequence_Size(obj6);
    7755             678 :       for (int i = 0; i < size; i++) {
    7756             323 :         PyObject* pyObj = PySequence_GetItem(obj6,i);
    7757             323 :         if (PyUnicode_Check(pyObj))
    7758                 :         {
    7759                 :           char *pszStr;
    7760                 :           Py_ssize_t nLen;
    7761               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
    7762                 : #if PY_VERSION_HEX >= 0x03000000
    7763                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    7764                 : #else
    7765               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    7766                 : #endif
    7767               0 :           arg7 = CSLAddString( arg7, pszStr );
    7768               0 :           Py_XDECREF(pyUTF8Str);
    7769                 :         }
    7770                 : #if PY_VERSION_HEX >= 0x03000000
    7771                 :         else if (PyBytes_Check(pyObj))
    7772                 :         arg7 = CSLAddString( arg7, PyBytes_AsString(pyObj) );
    7773                 : #else
    7774             323 :         else if (PyString_Check(pyObj))
    7775             323 :         arg7 = CSLAddString( arg7, PyString_AsString(pyObj) );
    7776                 : #endif
    7777                 :         else
    7778                 :         {
    7779               0 :           Py_DECREF(pyObj);
    7780               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
    7781               0 :           SWIG_fail;
    7782                 :         }
    7783             323 :         Py_DECREF(pyObj);
    7784                 :       }
    7785                 :     }
    7786                 :   }
    7787                 :   {
    7788            6948 :     if ( bUseExceptions ) {
    7789               0 :       CPLErrorReset();
    7790                 :     }
    7791            6948 :     result = (GDALDatasetShadow *)GDALDriverShadow_Create(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
    7792            6948 :     if ( bUseExceptions ) {
    7793               0 :       CPLErr eclass = CPLGetLastErrorType();
    7794               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7795               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7796                 :       }
    7797                 :     }
    7798                 :   }
    7799            6948 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
    7800                 :   {
    7801                 :     /* %typemap(freearg) (const char *utf8_path) */
    7802            6948 :     GDALPythonFreeCStr(arg2, bToFree2);
    7803                 :   }
    7804                 :   {
    7805                 :     /* %typemap(freearg) char **options */
    7806            6948 :     CSLDestroy( arg7 );
    7807                 :   }
    7808            6948 :   return resultobj;
    7809                 : fail:
    7810                 :   {
    7811                 :     /* %typemap(freearg) (const char *utf8_path) */
    7812               0 :     GDALPythonFreeCStr(arg2, bToFree2);
    7813                 :   }
    7814                 :   {
    7815                 :     /* %typemap(freearg) char **options */
    7816               0 :     CSLDestroy( arg7 );
    7817                 :   }
    7818               0 :   return NULL;
    7819                 : }
    7820                 : 
    7821                 : 
    7822            1620 : SWIGINTERN PyObject *_wrap_Driver_CreateCopy(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
    7823            1620 :   PyObject *resultobj = 0;
    7824            1620 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    7825            1620 :   char *arg2 = (char *) 0 ;
    7826            1620 :   GDALDatasetShadow *arg3 = (GDALDatasetShadow *) 0 ;
    7827            1620 :   int arg4 = (int) 1 ;
    7828            1620 :   char **arg5 = (char **) 0 ;
    7829            1620 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
    7830            1620 :   void *arg7 = (void *) NULL ;
    7831            1620 :   void *argp1 = 0 ;
    7832            1620 :   int res1 = 0 ;
    7833            1620 :   int bToFree2 = 0 ;
    7834            1620 :   void *argp3 = 0 ;
    7835            1620 :   int res3 = 0 ;
    7836                 :   int val4 ;
    7837            1620 :   int ecode4 = 0 ;
    7838            1620 :   PyObject * obj0 = 0 ;
    7839            1620 :   PyObject * obj1 = 0 ;
    7840            1620 :   PyObject * obj2 = 0 ;
    7841            1620 :   PyObject * obj3 = 0 ;
    7842            1620 :   PyObject * obj4 = 0 ;
    7843            1620 :   PyObject * obj5 = 0 ;
    7844            1620 :   PyObject * obj6 = 0 ;
    7845                 :   char *  kwnames[] = {
    7846                 :     (char *) "self",(char *) "utf8_path",(char *) "src",(char *) "strict",(char *) "options",(char *) "callback",(char *) "callback_data", NULL 
    7847            1620 :   };
    7848            1620 :   GDALDatasetShadow *result = 0 ;
    7849                 :   
    7850                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
    7851                 :   PyProgressData *psProgressInfo;
    7852            1620 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
    7853            1620 :   psProgressInfo->nLastReported = -1;
    7854            1620 :   psProgressInfo->psPyCallback = NULL;
    7855            1620 :   psProgressInfo->psPyCallbackData = NULL;
    7856            1620 :   arg7 = psProgressInfo;
    7857            1620 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:Driver_CreateCopy",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
    7858            1620 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
    7859            1620 :   if (!SWIG_IsOK(res1)) {
    7860               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CreateCopy" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
    7861                 :   }
    7862            1620 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
    7863                 :   {
    7864                 :     /* %typemap(in) (const char *utf8_path) */
    7865            1620 :     arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    7866            1620 :     if (arg2 == NULL)
    7867                 :     {
    7868               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    7869               0 :       SWIG_fail;
    7870                 :     }
    7871                 :   }
    7872            1620 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
    7873            1620 :   if (!SWIG_IsOK(res3)) {
    7874               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Driver_CreateCopy" "', argument " "3"" of type '" "GDALDatasetShadow *""'"); 
    7875                 :   }
    7876            1620 :   arg3 = reinterpret_cast< GDALDatasetShadow * >(argp3);
    7877            1620 :   if (obj3) {
    7878             234 :     ecode4 = SWIG_AsVal_int(obj3, &val4);
    7879             234 :     if (!SWIG_IsOK(ecode4)) {
    7880               0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Driver_CreateCopy" "', argument " "4"" of type '" "int""'");
    7881                 :     } 
    7882             234 :     arg4 = static_cast< int >(val4);
    7883                 :   }
    7884            1620 :   if (obj4) {
    7885                 :     {
    7886                 :       /* %typemap(in) char **options */
    7887                 :       /* Check if is a list */
    7888             346 :       if ( ! PySequence_Check(obj4)) {
    7889               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
    7890               0 :         SWIG_fail;
    7891                 :       }
    7892                 :       
    7893             346 :       int size = PySequence_Size(obj4);
    7894             658 :       for (int i = 0; i < size; i++) {
    7895             312 :         PyObject* pyObj = PySequence_GetItem(obj4,i);
    7896             312 :         if (PyUnicode_Check(pyObj))
    7897                 :         {
    7898                 :           char *pszStr;
    7899                 :           Py_ssize_t nLen;
    7900               1 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
    7901                 : #if PY_VERSION_HEX >= 0x03000000
    7902                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    7903                 : #else
    7904               1 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
    7905                 : #endif
    7906               1 :           arg5 = CSLAddString( arg5, pszStr );
    7907               1 :           Py_XDECREF(pyUTF8Str);
    7908                 :         }
    7909                 : #if PY_VERSION_HEX >= 0x03000000
    7910                 :         else if (PyBytes_Check(pyObj))
    7911                 :         arg5 = CSLAddString( arg5, PyBytes_AsString(pyObj) );
    7912                 : #else
    7913             311 :         else if (PyString_Check(pyObj))
    7914             311 :         arg5 = CSLAddString( arg5, PyString_AsString(pyObj) );
    7915                 : #endif
    7916                 :         else
    7917                 :         {
    7918               0 :           Py_DECREF(pyObj);
    7919               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
    7920               0 :           SWIG_fail;
    7921                 :         }
    7922             312 :         Py_DECREF(pyObj);
    7923                 :       }
    7924                 :     }
    7925                 :   }
    7926            1620 :   if (obj5) {
    7927                 :     {
    7928                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
    7929                 :       /* callback_func typemap */
    7930               0 :       if (obj5 && obj5 != Py_None ) {
    7931               0 :         void* cbfunction = NULL;
    7932                 :         SWIG_ConvertPtr( obj5, 
    7933                 :           (void**)&cbfunction, 
    7934                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int, 
    7935               0 :           SWIG_POINTER_EXCEPTION | 0 );
    7936                 :         
    7937               0 :         if ( cbfunction == GDALTermProgress ) {
    7938               0 :           arg6 = GDALTermProgress;
    7939                 :         } else {
    7940               0 :           if (!PyCallable_Check(obj5)) {
    7941                 :             PyErr_SetString( PyExc_RuntimeError, 
    7942               0 :               "Object given is not a Python function" );
    7943               0 :             SWIG_fail;
    7944                 :           }
    7945               0 :           psProgressInfo->psPyCallback = obj5;
    7946               0 :           arg6 = PyProgressProxy;
    7947                 :         }
    7948                 :         
    7949                 :       }
    7950                 :       
    7951                 :     }
    7952                 :   }
    7953            1620 :   if (obj6) {
    7954                 :     {
    7955                 :       /* %typemap(in) ( void* callback_data=NULL)  */
    7956               0 :       psProgressInfo->psPyCallbackData = obj6 ;
    7957                 :     }
    7958                 :   }
    7959                 :   {
    7960            1620 :     if (!arg3) {
    7961               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    7962                 :     }
    7963                 :   }
    7964                 :   {
    7965            1620 :     if ( bUseExceptions ) {
    7966               0 :       CPLErrorReset();
    7967                 :     }
    7968            1620 :     result = (GDALDatasetShadow *)GDALDriverShadow_CreateCopy(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
    7969            1620 :     if ( bUseExceptions ) {
    7970               0 :       CPLErr eclass = CPLGetLastErrorType();
    7971               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    7972               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    7973                 :       }
    7974                 :     }
    7975                 :   }
    7976            1620 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
    7977                 :   {
    7978                 :     /* %typemap(freearg) (const char *utf8_path) */
    7979            1620 :     GDALPythonFreeCStr(arg2, bToFree2);
    7980                 :   }
    7981                 :   {
    7982                 :     /* %typemap(freearg) char **options */
    7983            1620 :     CSLDestroy( arg5 );
    7984                 :   }
    7985                 :   {
    7986                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
    7987                 :     
    7988            1620 :     CPLFree(psProgressInfo);
    7989                 :     
    7990                 :   }
    7991            1620 :   return resultobj;
    7992                 : fail:
    7993                 :   {
    7994                 :     /* %typemap(freearg) (const char *utf8_path) */
    7995               0 :     GDALPythonFreeCStr(arg2, bToFree2);
    7996                 :   }
    7997                 :   {
    7998                 :     /* %typemap(freearg) char **options */
    7999               0 :     CSLDestroy( arg5 );
    8000                 :   }
    8001                 :   {
    8002                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
    8003                 :     
    8004               0 :     CPLFree(psProgressInfo);
    8005                 :     
    8006                 :   }
    8007               0 :   return NULL;
    8008                 : }
    8009                 : 
    8010                 : 
    8011            1299 : SWIGINTERN PyObject *_wrap_Driver_Delete(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8012            1299 :   PyObject *resultobj = 0;
    8013            1299 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    8014            1299 :   char *arg2 = (char *) 0 ;
    8015            1299 :   void *argp1 = 0 ;
    8016            1299 :   int res1 = 0 ;
    8017            1299 :   int bToFree2 = 0 ;
    8018            1299 :   PyObject * obj0 = 0 ;
    8019            1299 :   PyObject * obj1 = 0 ;
    8020                 :   int result;
    8021                 :   
    8022            1299 :   if (!PyArg_ParseTuple(args,(char *)"OO:Driver_Delete",&obj0,&obj1)) SWIG_fail;
    8023            1299 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
    8024            1299 :   if (!SWIG_IsOK(res1)) {
    8025               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Delete" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
    8026                 :   }
    8027            1299 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
    8028                 :   {
    8029                 :     /* %typemap(in) (const char *utf8_path) */
    8030            1299 :     arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    8031            1299 :     if (arg2 == NULL)
    8032                 :     {
    8033               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
    8034               0 :       SWIG_fail;
    8035                 :     }
    8036                 :   }
    8037                 :   {
    8038            1299 :     if ( bUseExceptions ) {
    8039               0 :       CPLErrorReset();
    8040                 :     }
    8041            1299 :     result = (int)GDALDriverShadow_Delete(arg1,(char const *)arg2);
    8042            1299 :     if ( bUseExceptions ) {
    8043               0 :       CPLErr eclass = CPLGetLastErrorType();
    8044               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8045               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8046                 :       }
    8047                 :     }
    8048                 :   }
    8049            1299 :   resultobj = SWIG_From_int(static_cast< int >(result));
    8050                 :   {
    8051                 :     /* %typemap(freearg) (const char *utf8_path) */
    8052            1299 :     GDALPythonFreeCStr(arg2, bToFree2);
    8053                 :   }
    8054            1299 :   return resultobj;
    8055                 : fail:
    8056                 :   {
    8057                 :     /* %typemap(freearg) (const char *utf8_path) */
    8058               0 :     GDALPythonFreeCStr(arg2, bToFree2);
    8059                 :   }
    8060               0 :   return NULL;
    8061                 : }
    8062                 : 
    8063                 : 
    8064               1 : SWIGINTERN PyObject *_wrap_Driver_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8065               1 :   PyObject *resultobj = 0;
    8066               1 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    8067               1 :   char *arg2 = (char *) 0 ;
    8068               1 :   char *arg3 = (char *) 0 ;
    8069               1 :   void *argp1 = 0 ;
    8070               1 :   int res1 = 0 ;
    8071                 :   int res2 ;
    8072               1 :   char *buf2 = 0 ;
    8073               1 :   int alloc2 = 0 ;
    8074                 :   int res3 ;
    8075               1 :   char *buf3 = 0 ;
    8076               1 :   int alloc3 = 0 ;
    8077               1 :   PyObject * obj0 = 0 ;
    8078               1 :   PyObject * obj1 = 0 ;
    8079               1 :   PyObject * obj2 = 0 ;
    8080                 :   int result;
    8081                 :   
    8082               1 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Driver_Rename",&obj0,&obj1,&obj2)) SWIG_fail;
    8083               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
    8084               1 :   if (!SWIG_IsOK(res1)) {
    8085               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Rename" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
    8086                 :   }
    8087               1 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
    8088               1 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    8089               1 :   if (!SWIG_IsOK(res2)) {
    8090               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Driver_Rename" "', argument " "2"" of type '" "char const *""'");
    8091                 :   }
    8092               1 :   arg2 = reinterpret_cast< char * >(buf2);
    8093               1 :   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
    8094               1 :   if (!SWIG_IsOK(res3)) {
    8095               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Driver_Rename" "', argument " "3"" of type '" "char const *""'");
    8096                 :   }
    8097               1 :   arg3 = reinterpret_cast< char * >(buf3);
    8098                 :   {
    8099               1 :     if (!arg2) {
    8100               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    8101                 :     }
    8102                 :   }
    8103                 :   {
    8104               1 :     if (!arg3) {
    8105               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    8106                 :     }
    8107                 :   }
    8108                 :   {
    8109               1 :     if ( bUseExceptions ) {
    8110               0 :       CPLErrorReset();
    8111                 :     }
    8112               1 :     result = (int)GDALDriverShadow_Rename(arg1,(char const *)arg2,(char const *)arg3);
    8113               1 :     if ( bUseExceptions ) {
    8114               0 :       CPLErr eclass = CPLGetLastErrorType();
    8115               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8116               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8117                 :       }
    8118                 :     }
    8119                 :   }
    8120               1 :   resultobj = SWIG_From_int(static_cast< int >(result));
    8121               1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    8122               1 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    8123               1 :   return resultobj;
    8124                 : fail:
    8125               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    8126               0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    8127               0 :   return NULL;
    8128                 : }
    8129                 : 
    8130                 : 
    8131               1 : SWIGINTERN PyObject *_wrap_Driver_CopyFiles(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8132               1 :   PyObject *resultobj = 0;
    8133               1 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    8134               1 :   char *arg2 = (char *) 0 ;
    8135               1 :   char *arg3 = (char *) 0 ;
    8136               1 :   void *argp1 = 0 ;
    8137               1 :   int res1 = 0 ;
    8138                 :   int res2 ;
    8139               1 :   char *buf2 = 0 ;
    8140               1 :   int alloc2 = 0 ;
    8141                 :   int res3 ;
    8142               1 :   char *buf3 = 0 ;
    8143               1 :   int alloc3 = 0 ;
    8144               1 :   PyObject * obj0 = 0 ;
    8145               1 :   PyObject * obj1 = 0 ;
    8146               1 :   PyObject * obj2 = 0 ;
    8147                 :   int result;
    8148                 :   
    8149               1 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Driver_CopyFiles",&obj0,&obj1,&obj2)) SWIG_fail;
    8150               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
    8151               1 :   if (!SWIG_IsOK(res1)) {
    8152               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CopyFiles" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
    8153                 :   }
    8154               1 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
    8155               1 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    8156               1 :   if (!SWIG_IsOK(res2)) {
    8157               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Driver_CopyFiles" "', argument " "2"" of type '" "char const *""'");
    8158                 :   }
    8159               1 :   arg2 = reinterpret_cast< char * >(buf2);
    8160               1 :   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
    8161               1 :   if (!SWIG_IsOK(res3)) {
    8162               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Driver_CopyFiles" "', argument " "3"" of type '" "char const *""'");
    8163                 :   }
    8164               1 :   arg3 = reinterpret_cast< char * >(buf3);
    8165                 :   {
    8166               1 :     if (!arg2) {
    8167               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    8168                 :     }
    8169                 :   }
    8170                 :   {
    8171               1 :     if (!arg3) {
    8172               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    8173                 :     }
    8174                 :   }
    8175                 :   {
    8176               1 :     if ( bUseExceptions ) {
    8177               0 :       CPLErrorReset();
    8178                 :     }
    8179               1 :     result = (int)GDALDriverShadow_CopyFiles(arg1,(char const *)arg2,(char const *)arg3);
    8180               1 :     if ( bUseExceptions ) {
    8181               0 :       CPLErr eclass = CPLGetLastErrorType();
    8182               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8183               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8184                 :       }
    8185                 :     }
    8186                 :   }
    8187               1 :   resultobj = SWIG_From_int(static_cast< int >(result));
    8188               1 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    8189               1 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    8190               1 :   return resultobj;
    8191                 : fail:
    8192               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    8193               0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    8194               0 :   return NULL;
    8195                 : }
    8196                 : 
    8197                 : 
    8198              75 : SWIGINTERN PyObject *_wrap_Driver_Register(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8199              75 :   PyObject *resultobj = 0;
    8200              75 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    8201              75 :   void *argp1 = 0 ;
    8202              75 :   int res1 = 0 ;
    8203              75 :   PyObject * obj0 = 0 ;
    8204                 :   int result;
    8205                 :   
    8206              75 :   if (!PyArg_ParseTuple(args,(char *)"O:Driver_Register",&obj0)) SWIG_fail;
    8207              75 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
    8208              75 :   if (!SWIG_IsOK(res1)) {
    8209               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Register" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
    8210                 :   }
    8211              75 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
    8212                 :   {
    8213              75 :     if ( bUseExceptions ) {
    8214               0 :       CPLErrorReset();
    8215                 :     }
    8216              75 :     result = (int)GDALDriverShadow_Register(arg1);
    8217              75 :     if ( bUseExceptions ) {
    8218               0 :       CPLErr eclass = CPLGetLastErrorType();
    8219               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8220               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8221                 :       }
    8222                 :     }
    8223                 :   }
    8224              75 :   resultobj = SWIG_From_int(static_cast< int >(result));
    8225              75 :   return resultobj;
    8226                 : fail:
    8227               0 :   return NULL;
    8228                 : }
    8229                 : 
    8230                 : 
    8231              72 : SWIGINTERN PyObject *_wrap_Driver_Deregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8232              72 :   PyObject *resultobj = 0;
    8233              72 :   GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    8234              72 :   void *argp1 = 0 ;
    8235              72 :   int res1 = 0 ;
    8236              72 :   PyObject * obj0 = 0 ;
    8237                 :   
    8238              72 :   if (!PyArg_ParseTuple(args,(char *)"O:Driver_Deregister",&obj0)) SWIG_fail;
    8239              72 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
    8240              72 :   if (!SWIG_IsOK(res1)) {
    8241               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Deregister" "', argument " "1"" of type '" "GDALDriverShadow *""'"); 
    8242                 :   }
    8243              72 :   arg1 = reinterpret_cast< GDALDriverShadow * >(argp1);
    8244                 :   {
    8245              72 :     if ( bUseExceptions ) {
    8246               0 :       CPLErrorReset();
    8247                 :     }
    8248                 :     GDALDriverShadow_Deregister(arg1);
    8249              72 :     if ( bUseExceptions ) {
    8250               0 :       CPLErr eclass = CPLGetLastErrorType();
    8251               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8252               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8253                 :       }
    8254                 :     }
    8255                 :   }
    8256              72 :   resultobj = SWIG_Py_Void();
    8257              72 :   return resultobj;
    8258                 : fail:
    8259               0 :   return NULL;
    8260                 : }
    8261                 : 
    8262                 : 
    8263               6 : SWIGINTERN PyObject *Driver_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8264                 :   PyObject *obj;
    8265               6 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
    8266               6 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALDriverShadow, SWIG_NewClientData(obj));
    8267               6 :   return SWIG_Py_Void();
    8268                 : }
    8269                 : 
    8270               0 : SWIGINTERN PyObject *_wrap_ColorEntry_c1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8271               0 :   PyObject *resultobj = 0;
    8272               0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
    8273                 :   short arg2 ;
    8274                 :   GDALColorEntry ce1 ;
    8275                 :   short val2 ;
    8276               0 :   int ecode2 = 0 ;
    8277               0 :   PyObject * obj0 = 0 ;
    8278               0 :   PyObject * obj1 = 0 ;
    8279                 :   
    8280               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:ColorEntry_c1_set",&obj0,&obj1)) SWIG_fail;
    8281                 :   {
    8282                 :     /* %typemap(in) GDALColorEntry* */
    8283               0 :     ce1.c4 = 255;
    8284               0 :     if (! PySequence_Check(obj0) ) {
    8285               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
    8286               0 :       SWIG_fail;
    8287                 :     }
    8288               0 :     int size = PySequence_Size(obj0);
    8289               0 :     if ( size > 4 ) {
    8290               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
    8291               0 :       SWIG_fail;
    8292                 :     }
    8293               0 :     if ( size < 3 ) {
    8294               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
    8295               0 :       SWIG_fail;
    8296                 :     }
    8297               0 :     if ( !PyArg_ParseTuple( obj0,"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
    8298               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
    8299               0 :       SWIG_fail;
    8300                 :     }
    8301               0 :     arg1 = &ce1;
    8302                 :   }
    8303               0 :   ecode2 = SWIG_AsVal_short(obj1, &val2);
    8304               0 :   if (!SWIG_IsOK(ecode2)) {
    8305               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c1_set" "', argument " "2"" of type '" "short""'");
    8306                 :   } 
    8307               0 :   arg2 = static_cast< short >(val2);
    8308               0 :   if (arg1) (arg1)->c1 = arg2;
    8309               0 :   resultobj = SWIG_Py_Void();
    8310               0 :   return resultobj;
    8311                 : fail:
    8312               0 :   return NULL;
    8313                 : }
    8314                 : 
    8315                 : 
    8316               0 : SWIGINTERN PyObject *_wrap_ColorEntry_c1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8317               0 :   PyObject *resultobj = 0;
    8318               0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
    8319                 :   GDALColorEntry ce1 ;
    8320               0 :   PyObject * obj0 = 0 ;
    8321                 :   short result;
    8322                 :   
    8323               0 :   if (!PyArg_ParseTuple(args,(char *)"O:ColorEntry_c1_get",&obj0)) SWIG_fail;
    8324                 :   {
    8325                 :     /* %typemap(in) GDALColorEntry* */
    8326               0 :     ce1.c4 = 255;
    8327               0 :     if (! PySequence_Check(obj0) ) {
    8328               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
    8329               0 :       SWIG_fail;
    8330                 :     }
    8331               0 :     int size = PySequence_Size(obj0);
    8332               0 :     if ( size > 4 ) {
    8333               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
    8334               0 :       SWIG_fail;
    8335                 :     }
    8336               0 :     if ( size < 3 ) {
    8337               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
    8338               0 :       SWIG_fail;
    8339                 :     }
    8340               0 :     if ( !PyArg_ParseTuple( obj0,"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
    8341               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
    8342               0 :       SWIG_fail;
    8343                 :     }
    8344               0 :     arg1 = &ce1;
    8345                 :   }
    8346               0 :   result = (short) ((arg1)->c1);
    8347               0 :   resultobj = SWIG_From_short(static_cast< short >(result));
    8348               0 :   return resultobj;
    8349                 : fail:
    8350               0 :   return NULL;
    8351                 : }
    8352                 : 
    8353                 : 
    8354               0 : SWIGINTERN PyObject *_wrap_ColorEntry_c2_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8355               0 :   PyObject *resultobj = 0;
    8356               0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
    8357                 :   short arg2 ;
    8358                 :   GDALColorEntry ce1 ;
    8359                 :   short val2 ;
    8360               0 :   int ecode2 = 0 ;
    8361               0 :   PyObject * obj0 = 0 ;
    8362               0 :   PyObject * obj1 = 0 ;
    8363                 :   
    8364               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:ColorEntry_c2_set",&obj0,&obj1)) SWIG_fail;
    8365                 :   {
    8366                 :     /* %typemap(in) GDALColorEntry* */
    8367               0 :     ce1.c4 = 255;
    8368               0 :     if (! PySequence_Check(obj0) ) {
    8369               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
    8370               0 :       SWIG_fail;
    8371                 :     }
    8372               0 :     int size = PySequence_Size(obj0);
    8373               0 :     if ( size > 4 ) {
    8374               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
    8375               0 :       SWIG_fail;
    8376                 :     }
    8377               0 :     if ( size < 3 ) {
    8378               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
    8379               0 :       SWIG_fail;
    8380                 :     }
    8381               0 :     if ( !PyArg_ParseTuple( obj0,"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
    8382               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
    8383               0 :       SWIG_fail;
    8384                 :     }
    8385               0 :     arg1 = &ce1;
    8386                 :   }
    8387               0 :   ecode2 = SWIG_AsVal_short(obj1, &val2);
    8388               0 :   if (!SWIG_IsOK(ecode2)) {
    8389               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c2_set" "', argument " "2"" of type '" "short""'");
    8390                 :   } 
    8391               0 :   arg2 = static_cast< short >(val2);
    8392               0 :   if (arg1) (arg1)->c2 = arg2;
    8393               0 :   resultobj = SWIG_Py_Void();
    8394               0 :   return resultobj;
    8395                 : fail:
    8396               0 :   return NULL;
    8397                 : }
    8398                 : 
    8399                 : 
    8400               0 : SWIGINTERN PyObject *_wrap_ColorEntry_c2_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8401               0 :   PyObject *resultobj = 0;
    8402               0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
    8403                 :   GDALColorEntry ce1 ;
    8404               0 :   PyObject * obj0 = 0 ;
    8405                 :   short result;
    8406                 :   
    8407               0 :   if (!PyArg_ParseTuple(args,(char *)"O:ColorEntry_c2_get",&obj0)) SWIG_fail;
    8408                 :   {
    8409                 :     /* %typemap(in) GDALColorEntry* */
    8410               0 :     ce1.c4 = 255;
    8411               0 :     if (! PySequence_Check(obj0) ) {
    8412               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
    8413               0 :       SWIG_fail;
    8414                 :     }
    8415               0 :     int size = PySequence_Size(obj0);
    8416               0 :     if ( size > 4 ) {
    8417               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
    8418               0 :       SWIG_fail;
    8419                 :     }
    8420               0 :     if ( size < 3 ) {
    8421               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
    8422               0 :       SWIG_fail;
    8423                 :     }
    8424               0 :     if ( !PyArg_ParseTuple( obj0,"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
    8425               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
    8426               0 :       SWIG_fail;
    8427                 :     }
    8428               0 :     arg1 = &ce1;
    8429                 :   }
    8430               0 :   result = (short) ((arg1)->c2);
    8431               0 :   resultobj = SWIG_From_short(static_cast< short >(result));
    8432               0 :   return resultobj;
    8433                 : fail:
    8434               0 :   return NULL;
    8435                 : }
    8436                 : 
    8437                 : 
    8438               0 : SWIGINTERN PyObject *_wrap_ColorEntry_c3_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8439               0 :   PyObject *resultobj = 0;
    8440               0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
    8441                 :   short arg2 ;
    8442                 :   GDALColorEntry ce1 ;
    8443                 :   short val2 ;
    8444               0 :   int ecode2 = 0 ;
    8445               0 :   PyObject * obj0 = 0 ;
    8446               0 :   PyObject * obj1 = 0 ;
    8447                 :   
    8448               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:ColorEntry_c3_set",&obj0,&obj1)) SWIG_fail;
    8449                 :   {
    8450                 :     /* %typemap(in) GDALColorEntry* */
    8451               0 :     ce1.c4 = 255;
    8452               0 :     if (! PySequence_Check(obj0) ) {
    8453               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
    8454               0 :       SWIG_fail;
    8455                 :     }
    8456               0 :     int size = PySequence_Size(obj0);
    8457               0 :     if ( size > 4 ) {
    8458               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
    8459               0 :       SWIG_fail;
    8460                 :     }
    8461               0 :     if ( size < 3 ) {
    8462               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
    8463               0 :       SWIG_fail;
    8464                 :     }
    8465               0 :     if ( !PyArg_ParseTuple( obj0,"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
    8466               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
    8467               0 :       SWIG_fail;
    8468                 :     }
    8469               0 :     arg1 = &ce1;
    8470                 :   }
    8471               0 :   ecode2 = SWIG_AsVal_short(obj1, &val2);
    8472               0 :   if (!SWIG_IsOK(ecode2)) {
    8473               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c3_set" "', argument " "2"" of type '" "short""'");
    8474                 :   } 
    8475               0 :   arg2 = static_cast< short >(val2);
    8476               0 :   if (arg1) (arg1)->c3 = arg2;
    8477               0 :   resultobj = SWIG_Py_Void();
    8478               0 :   return resultobj;
    8479                 : fail:
    8480               0 :   return NULL;
    8481                 : }
    8482                 : 
    8483                 : 
    8484               0 : SWIGINTERN PyObject *_wrap_ColorEntry_c3_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8485               0 :   PyObject *resultobj = 0;
    8486               0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
    8487                 :   GDALColorEntry ce1 ;
    8488               0 :   PyObject * obj0 = 0 ;
    8489                 :   short result;
    8490                 :   
    8491               0 :   if (!PyArg_ParseTuple(args,(char *)"O:ColorEntry_c3_get",&obj0)) SWIG_fail;
    8492                 :   {
    8493                 :     /* %typemap(in) GDALColorEntry* */
    8494               0 :     ce1.c4 = 255;
    8495               0 :     if (! PySequence_Check(obj0) ) {
    8496               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
    8497               0 :       SWIG_fail;
    8498                 :     }
    8499               0 :     int size = PySequence_Size(obj0);
    8500               0 :     if ( size > 4 ) {
    8501               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
    8502               0 :       SWIG_fail;
    8503                 :     }
    8504               0 :     if ( size < 3 ) {
    8505               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
    8506               0 :       SWIG_fail;
    8507                 :     }
    8508               0 :     if ( !PyArg_ParseTuple( obj0,"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
    8509               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
    8510               0 :       SWIG_fail;
    8511                 :     }
    8512               0 :     arg1 = &ce1;
    8513                 :   }
    8514               0 :   result = (short) ((arg1)->c3);
    8515               0 :   resultobj = SWIG_From_short(static_cast< short >(result));
    8516               0 :   return resultobj;
    8517                 : fail:
    8518               0 :   return NULL;
    8519                 : }
    8520                 : 
    8521                 : 
    8522               0 : SWIGINTERN PyObject *_wrap_ColorEntry_c4_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8523               0 :   PyObject *resultobj = 0;
    8524               0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
    8525                 :   short arg2 ;
    8526                 :   GDALColorEntry ce1 ;
    8527                 :   short val2 ;
    8528               0 :   int ecode2 = 0 ;
    8529               0 :   PyObject * obj0 = 0 ;
    8530               0 :   PyObject * obj1 = 0 ;
    8531                 :   
    8532               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:ColorEntry_c4_set",&obj0,&obj1)) SWIG_fail;
    8533                 :   {
    8534                 :     /* %typemap(in) GDALColorEntry* */
    8535               0 :     ce1.c4 = 255;
    8536               0 :     if (! PySequence_Check(obj0) ) {
    8537               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
    8538               0 :       SWIG_fail;
    8539                 :     }
    8540               0 :     int size = PySequence_Size(obj0);
    8541               0 :     if ( size > 4 ) {
    8542               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
    8543               0 :       SWIG_fail;
    8544                 :     }
    8545               0 :     if ( size < 3 ) {
    8546               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
    8547               0 :       SWIG_fail;
    8548                 :     }
    8549               0 :     if ( !PyArg_ParseTuple( obj0,"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
    8550               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
    8551               0 :       SWIG_fail;
    8552                 :     }
    8553               0 :     arg1 = &ce1;
    8554                 :   }
    8555               0 :   ecode2 = SWIG_AsVal_short(obj1, &val2);
    8556               0 :   if (!SWIG_IsOK(ecode2)) {
    8557               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorEntry_c4_set" "', argument " "2"" of type '" "short""'");
    8558                 :   } 
    8559               0 :   arg2 = static_cast< short >(val2);
    8560               0 :   if (arg1) (arg1)->c4 = arg2;
    8561               0 :   resultobj = SWIG_Py_Void();
    8562               0 :   return resultobj;
    8563                 : fail:
    8564               0 :   return NULL;
    8565                 : }
    8566                 : 
    8567                 : 
    8568               0 : SWIGINTERN PyObject *_wrap_ColorEntry_c4_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8569               0 :   PyObject *resultobj = 0;
    8570               0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
    8571                 :   GDALColorEntry ce1 ;
    8572               0 :   PyObject * obj0 = 0 ;
    8573                 :   short result;
    8574                 :   
    8575               0 :   if (!PyArg_ParseTuple(args,(char *)"O:ColorEntry_c4_get",&obj0)) SWIG_fail;
    8576                 :   {
    8577                 :     /* %typemap(in) GDALColorEntry* */
    8578               0 :     ce1.c4 = 255;
    8579               0 :     if (! PySequence_Check(obj0) ) {
    8580               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
    8581               0 :       SWIG_fail;
    8582                 :     }
    8583               0 :     int size = PySequence_Size(obj0);
    8584               0 :     if ( size > 4 ) {
    8585               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
    8586               0 :       SWIG_fail;
    8587                 :     }
    8588               0 :     if ( size < 3 ) {
    8589               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
    8590               0 :       SWIG_fail;
    8591                 :     }
    8592               0 :     if ( !PyArg_ParseTuple( obj0,"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
    8593               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
    8594               0 :       SWIG_fail;
    8595                 :     }
    8596               0 :     arg1 = &ce1;
    8597                 :   }
    8598               0 :   result = (short) ((arg1)->c4);
    8599               0 :   resultobj = SWIG_From_short(static_cast< short >(result));
    8600               0 :   return resultobj;
    8601                 : fail:
    8602               0 :   return NULL;
    8603                 : }
    8604                 : 
    8605                 : 
    8606               0 : SWIGINTERN PyObject *_wrap_new_ColorEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8607               0 :   PyObject *resultobj = 0;
    8608               0 :   GDALColorEntry *result = 0 ;
    8609                 :   
    8610               0 :   if (!PyArg_ParseTuple(args,(char *)":new_ColorEntry")) SWIG_fail;
    8611                 :   {
    8612               0 :     if ( bUseExceptions ) {
    8613               0 :       CPLErrorReset();
    8614                 :     }
    8615               0 :     result = (GDALColorEntry *)new GDALColorEntry();
    8616               0 :     if ( bUseExceptions ) {
    8617               0 :       CPLErr eclass = CPLGetLastErrorType();
    8618               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8619               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8620                 :       }
    8621                 :     }
    8622                 :   }
    8623                 :   {
    8624                 :     /* %typemap(out) GDALColorEntry* */
    8625               0 :     if ( result != NULL )
    8626               0 :     resultobj = Py_BuildValue( "(hhhh)", (*result).c1,(*result).c2,(*result).c3,(*result).c4);
    8627                 :     else
    8628               0 :     resultobj = NULL;
    8629                 :   }
    8630               0 :   return resultobj;
    8631                 : fail:
    8632               0 :   return NULL;
    8633                 : }
    8634                 : 
    8635                 : 
    8636               0 : SWIGINTERN PyObject *_wrap_delete_ColorEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8637               0 :   PyObject *resultobj = 0;
    8638               0 :   GDALColorEntry *arg1 = (GDALColorEntry *) 0 ;
    8639                 :   GDALColorEntry ce1 ;
    8640               0 :   PyObject * obj0 = 0 ;
    8641                 :   
    8642               0 :   if (!PyArg_ParseTuple(args,(char *)"O:delete_ColorEntry",&obj0)) SWIG_fail;
    8643                 :   {
    8644                 :     /* %typemap(in) GDALColorEntry* */
    8645               0 :     ce1.c4 = 255;
    8646               0 :     if (! PySequence_Check(obj0) ) {
    8647               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
    8648               0 :       SWIG_fail;
    8649                 :     }
    8650               0 :     int size = PySequence_Size(obj0);
    8651               0 :     if ( size > 4 ) {
    8652               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
    8653               0 :       SWIG_fail;
    8654                 :     }
    8655               0 :     if ( size < 3 ) {
    8656               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
    8657               0 :       SWIG_fail;
    8658                 :     }
    8659               0 :     if ( !PyArg_ParseTuple( obj0,"hhh|h", &ce1.c1, &ce1.c2, &ce1.c3, &ce1.c4 ) ) {
    8660               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
    8661               0 :       SWIG_fail;
    8662                 :     }
    8663               0 :     arg1 = &ce1;
    8664                 :   }
    8665                 :   {
    8666               0 :     if ( bUseExceptions ) {
    8667               0 :       CPLErrorReset();
    8668                 :     }
    8669               0 :     delete arg1;
    8670               0 :     if ( bUseExceptions ) {
    8671               0 :       CPLErr eclass = CPLGetLastErrorType();
    8672               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8673               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8674                 :       }
    8675                 :     }
    8676                 :   }
    8677               0 :   resultobj = SWIG_Py_Void();
    8678               0 :   return resultobj;
    8679                 : fail:
    8680               0 :   return NULL;
    8681                 : }
    8682                 : 
    8683                 : 
    8684               6 : SWIGINTERN PyObject *ColorEntry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8685                 :   PyObject *obj;
    8686               6 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
    8687               6 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALColorEntry, SWIG_NewClientData(obj));
    8688               6 :   return SWIG_Py_Void();
    8689                 : }
    8690                 : 
    8691               8 : SWIGINTERN PyObject *_wrap_GCP_GCPX_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8692               8 :   PyObject *resultobj = 0;
    8693               8 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    8694                 :   double arg2 ;
    8695               8 :   void *argp1 = 0 ;
    8696               8 :   int res1 = 0 ;
    8697                 :   double val2 ;
    8698               8 :   int ecode2 = 0 ;
    8699               8 :   PyObject * obj0 = 0 ;
    8700               8 :   PyObject * obj1 = 0 ;
    8701                 :   
    8702               8 :   if (!PyArg_ParseTuple(args,(char *)"OO:GCP_GCPX_set",&obj0,&obj1)) SWIG_fail;
    8703               8 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    8704               8 :   if (!SWIG_IsOK(res1)) {
    8705               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPX_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    8706                 :   }
    8707               8 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    8708               8 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
    8709               8 :   if (!SWIG_IsOK(ecode2)) {
    8710               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPX_set" "', argument " "2"" of type '" "double""'");
    8711                 :   } 
    8712               8 :   arg2 = static_cast< double >(val2);
    8713                 :   {
    8714               8 :     if ( bUseExceptions ) {
    8715               0 :       CPLErrorReset();
    8716                 :     }
    8717               8 :     GDAL_GCP_GCPX_set(arg1,arg2);
    8718               8 :     if ( bUseExceptions ) {
    8719               0 :       CPLErr eclass = CPLGetLastErrorType();
    8720               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8721               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8722                 :       }
    8723                 :     }
    8724                 :   }
    8725               8 :   resultobj = SWIG_Py_Void();
    8726               8 :   return resultobj;
    8727                 : fail:
    8728               0 :   return NULL;
    8729                 : }
    8730                 : 
    8731                 : 
    8732            2773 : SWIGINTERN PyObject *_wrap_GCP_GCPX_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8733            2773 :   PyObject *resultobj = 0;
    8734            2773 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    8735            2773 :   void *argp1 = 0 ;
    8736            2773 :   int res1 = 0 ;
    8737            2773 :   PyObject * obj0 = 0 ;
    8738                 :   double result;
    8739                 :   
    8740            2773 :   if (!PyArg_ParseTuple(args,(char *)"O:GCP_GCPX_get",&obj0)) SWIG_fail;
    8741            2773 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    8742            2773 :   if (!SWIG_IsOK(res1)) {
    8743               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPX_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    8744                 :   }
    8745            2773 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    8746                 :   {
    8747            2773 :     if ( bUseExceptions ) {
    8748               0 :       CPLErrorReset();
    8749                 :     }
    8750            2773 :     result = (double)GDAL_GCP_GCPX_get(arg1);
    8751            2773 :     if ( bUseExceptions ) {
    8752               0 :       CPLErr eclass = CPLGetLastErrorType();
    8753               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8754               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8755                 :       }
    8756                 :     }
    8757                 :   }
    8758            2773 :   resultobj = SWIG_From_double(static_cast< double >(result));
    8759            2773 :   return resultobj;
    8760                 : fail:
    8761               0 :   return NULL;
    8762                 : }
    8763                 : 
    8764                 : 
    8765               8 : SWIGINTERN PyObject *_wrap_GCP_GCPY_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8766               8 :   PyObject *resultobj = 0;
    8767               8 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    8768                 :   double arg2 ;
    8769               8 :   void *argp1 = 0 ;
    8770               8 :   int res1 = 0 ;
    8771                 :   double val2 ;
    8772               8 :   int ecode2 = 0 ;
    8773               8 :   PyObject * obj0 = 0 ;
    8774               8 :   PyObject * obj1 = 0 ;
    8775                 :   
    8776               8 :   if (!PyArg_ParseTuple(args,(char *)"OO:GCP_GCPY_set",&obj0,&obj1)) SWIG_fail;
    8777               8 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    8778               8 :   if (!SWIG_IsOK(res1)) {
    8779               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPY_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    8780                 :   }
    8781               8 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    8782               8 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
    8783               8 :   if (!SWIG_IsOK(ecode2)) {
    8784               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPY_set" "', argument " "2"" of type '" "double""'");
    8785                 :   } 
    8786               8 :   arg2 = static_cast< double >(val2);
    8787                 :   {
    8788               8 :     if ( bUseExceptions ) {
    8789               0 :       CPLErrorReset();
    8790                 :     }
    8791               8 :     GDAL_GCP_GCPY_set(arg1,arg2);
    8792               8 :     if ( bUseExceptions ) {
    8793               0 :       CPLErr eclass = CPLGetLastErrorType();
    8794               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8795               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8796                 :       }
    8797                 :     }
    8798                 :   }
    8799               8 :   resultobj = SWIG_Py_Void();
    8800               8 :   return resultobj;
    8801                 : fail:
    8802               0 :   return NULL;
    8803                 : }
    8804                 : 
    8805                 : 
    8806            2773 : SWIGINTERN PyObject *_wrap_GCP_GCPY_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8807            2773 :   PyObject *resultobj = 0;
    8808            2773 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    8809            2773 :   void *argp1 = 0 ;
    8810            2773 :   int res1 = 0 ;
    8811            2773 :   PyObject * obj0 = 0 ;
    8812                 :   double result;
    8813                 :   
    8814            2773 :   if (!PyArg_ParseTuple(args,(char *)"O:GCP_GCPY_get",&obj0)) SWIG_fail;
    8815            2773 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    8816            2773 :   if (!SWIG_IsOK(res1)) {
    8817               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPY_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    8818                 :   }
    8819            2773 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    8820                 :   {
    8821            2773 :     if ( bUseExceptions ) {
    8822               0 :       CPLErrorReset();
    8823                 :     }
    8824            2773 :     result = (double)GDAL_GCP_GCPY_get(arg1);
    8825            2773 :     if ( bUseExceptions ) {
    8826               0 :       CPLErr eclass = CPLGetLastErrorType();
    8827               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8828               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8829                 :       }
    8830                 :     }
    8831                 :   }
    8832            2773 :   resultobj = SWIG_From_double(static_cast< double >(result));
    8833            2773 :   return resultobj;
    8834                 : fail:
    8835               0 :   return NULL;
    8836                 : }
    8837                 : 
    8838                 : 
    8839               0 : SWIGINTERN PyObject *_wrap_GCP_GCPZ_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8840               0 :   PyObject *resultobj = 0;
    8841               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    8842                 :   double arg2 ;
    8843               0 :   void *argp1 = 0 ;
    8844               0 :   int res1 = 0 ;
    8845                 :   double val2 ;
    8846               0 :   int ecode2 = 0 ;
    8847               0 :   PyObject * obj0 = 0 ;
    8848               0 :   PyObject * obj1 = 0 ;
    8849                 :   
    8850               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GCP_GCPZ_set",&obj0,&obj1)) SWIG_fail;
    8851               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    8852               0 :   if (!SWIG_IsOK(res1)) {
    8853               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPZ_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    8854                 :   }
    8855               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    8856               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
    8857               0 :   if (!SWIG_IsOK(ecode2)) {
    8858               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPZ_set" "', argument " "2"" of type '" "double""'");
    8859                 :   } 
    8860               0 :   arg2 = static_cast< double >(val2);
    8861                 :   {
    8862               0 :     if ( bUseExceptions ) {
    8863               0 :       CPLErrorReset();
    8864                 :     }
    8865               0 :     GDAL_GCP_GCPZ_set(arg1,arg2);
    8866               0 :     if ( bUseExceptions ) {
    8867               0 :       CPLErr eclass = CPLGetLastErrorType();
    8868               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8869               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8870                 :       }
    8871                 :     }
    8872                 :   }
    8873               0 :   resultobj = SWIG_Py_Void();
    8874               0 :   return resultobj;
    8875                 : fail:
    8876               0 :   return NULL;
    8877                 : }
    8878                 : 
    8879                 : 
    8880            2748 : SWIGINTERN PyObject *_wrap_GCP_GCPZ_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8881            2748 :   PyObject *resultobj = 0;
    8882            2748 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    8883            2748 :   void *argp1 = 0 ;
    8884            2748 :   int res1 = 0 ;
    8885            2748 :   PyObject * obj0 = 0 ;
    8886                 :   double result;
    8887                 :   
    8888            2748 :   if (!PyArg_ParseTuple(args,(char *)"O:GCP_GCPZ_get",&obj0)) SWIG_fail;
    8889            2748 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    8890            2748 :   if (!SWIG_IsOK(res1)) {
    8891               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPZ_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    8892                 :   }
    8893            2748 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    8894                 :   {
    8895            2748 :     if ( bUseExceptions ) {
    8896               0 :       CPLErrorReset();
    8897                 :     }
    8898            2748 :     result = (double)GDAL_GCP_GCPZ_get(arg1);
    8899            2748 :     if ( bUseExceptions ) {
    8900               0 :       CPLErr eclass = CPLGetLastErrorType();
    8901               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8902               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8903                 :       }
    8904                 :     }
    8905                 :   }
    8906            2748 :   resultobj = SWIG_From_double(static_cast< double >(result));
    8907            2748 :   return resultobj;
    8908                 : fail:
    8909               0 :   return NULL;
    8910                 : }
    8911                 : 
    8912                 : 
    8913              16 : SWIGINTERN PyObject *_wrap_GCP_GCPPixel_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8914              16 :   PyObject *resultobj = 0;
    8915              16 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    8916                 :   double arg2 ;
    8917              16 :   void *argp1 = 0 ;
    8918              16 :   int res1 = 0 ;
    8919                 :   double val2 ;
    8920              16 :   int ecode2 = 0 ;
    8921              16 :   PyObject * obj0 = 0 ;
    8922              16 :   PyObject * obj1 = 0 ;
    8923                 :   
    8924              16 :   if (!PyArg_ParseTuple(args,(char *)"OO:GCP_GCPPixel_set",&obj0,&obj1)) SWIG_fail;
    8925              16 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    8926              16 :   if (!SWIG_IsOK(res1)) {
    8927               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPPixel_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    8928                 :   }
    8929              16 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    8930              16 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
    8931              16 :   if (!SWIG_IsOK(ecode2)) {
    8932               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPPixel_set" "', argument " "2"" of type '" "double""'");
    8933                 :   } 
    8934              16 :   arg2 = static_cast< double >(val2);
    8935                 :   {
    8936              16 :     if ( bUseExceptions ) {
    8937               0 :       CPLErrorReset();
    8938                 :     }
    8939              16 :     GDAL_GCP_GCPPixel_set(arg1,arg2);
    8940              16 :     if ( bUseExceptions ) {
    8941               0 :       CPLErr eclass = CPLGetLastErrorType();
    8942               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8943               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8944                 :       }
    8945                 :     }
    8946                 :   }
    8947              16 :   resultobj = SWIG_Py_Void();
    8948              16 :   return resultobj;
    8949                 : fail:
    8950               0 :   return NULL;
    8951                 : }
    8952                 : 
    8953                 : 
    8954            2781 : SWIGINTERN PyObject *_wrap_GCP_GCPPixel_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8955            2781 :   PyObject *resultobj = 0;
    8956            2781 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    8957            2781 :   void *argp1 = 0 ;
    8958            2781 :   int res1 = 0 ;
    8959            2781 :   PyObject * obj0 = 0 ;
    8960                 :   double result;
    8961                 :   
    8962            2781 :   if (!PyArg_ParseTuple(args,(char *)"O:GCP_GCPPixel_get",&obj0)) SWIG_fail;
    8963            2781 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    8964            2781 :   if (!SWIG_IsOK(res1)) {
    8965               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPPixel_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    8966                 :   }
    8967            2781 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    8968                 :   {
    8969            2781 :     if ( bUseExceptions ) {
    8970               0 :       CPLErrorReset();
    8971                 :     }
    8972            2781 :     result = (double)GDAL_GCP_GCPPixel_get(arg1);
    8973            2781 :     if ( bUseExceptions ) {
    8974               0 :       CPLErr eclass = CPLGetLastErrorType();
    8975               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    8976               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    8977                 :       }
    8978                 :     }
    8979                 :   }
    8980            2781 :   resultobj = SWIG_From_double(static_cast< double >(result));
    8981            2781 :   return resultobj;
    8982                 : fail:
    8983               0 :   return NULL;
    8984                 : }
    8985                 : 
    8986                 : 
    8987              16 : SWIGINTERN PyObject *_wrap_GCP_GCPLine_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    8988              16 :   PyObject *resultobj = 0;
    8989              16 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    8990                 :   double arg2 ;
    8991              16 :   void *argp1 = 0 ;
    8992              16 :   int res1 = 0 ;
    8993                 :   double val2 ;
    8994              16 :   int ecode2 = 0 ;
    8995              16 :   PyObject * obj0 = 0 ;
    8996              16 :   PyObject * obj1 = 0 ;
    8997                 :   
    8998              16 :   if (!PyArg_ParseTuple(args,(char *)"OO:GCP_GCPLine_set",&obj0,&obj1)) SWIG_fail;
    8999              16 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9000              16 :   if (!SWIG_IsOK(res1)) {
    9001               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPLine_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9002                 :   }
    9003              16 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9004              16 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
    9005              16 :   if (!SWIG_IsOK(ecode2)) {
    9006               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GCP_GCPLine_set" "', argument " "2"" of type '" "double""'");
    9007                 :   } 
    9008              16 :   arg2 = static_cast< double >(val2);
    9009                 :   {
    9010              16 :     if ( bUseExceptions ) {
    9011               0 :       CPLErrorReset();
    9012                 :     }
    9013              16 :     GDAL_GCP_GCPLine_set(arg1,arg2);
    9014              16 :     if ( bUseExceptions ) {
    9015               0 :       CPLErr eclass = CPLGetLastErrorType();
    9016               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9017               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9018                 :       }
    9019                 :     }
    9020                 :   }
    9021              16 :   resultobj = SWIG_Py_Void();
    9022              16 :   return resultobj;
    9023                 : fail:
    9024               0 :   return NULL;
    9025                 : }
    9026                 : 
    9027                 : 
    9028            2781 : SWIGINTERN PyObject *_wrap_GCP_GCPLine_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9029            2781 :   PyObject *resultobj = 0;
    9030            2781 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9031            2781 :   void *argp1 = 0 ;
    9032            2781 :   int res1 = 0 ;
    9033            2781 :   PyObject * obj0 = 0 ;
    9034                 :   double result;
    9035                 :   
    9036            2781 :   if (!PyArg_ParseTuple(args,(char *)"O:GCP_GCPLine_get",&obj0)) SWIG_fail;
    9037            2781 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9038            2781 :   if (!SWIG_IsOK(res1)) {
    9039               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_GCPLine_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9040                 :   }
    9041            2781 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9042                 :   {
    9043            2781 :     if ( bUseExceptions ) {
    9044               0 :       CPLErrorReset();
    9045                 :     }
    9046            2781 :     result = (double)GDAL_GCP_GCPLine_get(arg1);
    9047            2781 :     if ( bUseExceptions ) {
    9048               0 :       CPLErr eclass = CPLGetLastErrorType();
    9049               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9050               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9051                 :       }
    9052                 :     }
    9053                 :   }
    9054            2781 :   resultobj = SWIG_From_double(static_cast< double >(result));
    9055            2781 :   return resultobj;
    9056                 : fail:
    9057               0 :   return NULL;
    9058                 : }
    9059                 : 
    9060                 : 
    9061               0 : SWIGINTERN PyObject *_wrap_GCP_Info_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9062               0 :   PyObject *resultobj = 0;
    9063               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9064               0 :   char *arg2 = (char *) 0 ;
    9065               0 :   void *argp1 = 0 ;
    9066               0 :   int res1 = 0 ;
    9067                 :   int res2 ;
    9068               0 :   char *buf2 = 0 ;
    9069               0 :   int alloc2 = 0 ;
    9070               0 :   PyObject * obj0 = 0 ;
    9071               0 :   PyObject * obj1 = 0 ;
    9072                 :   
    9073               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GCP_Info_set",&obj0,&obj1)) SWIG_fail;
    9074               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9075               0 :   if (!SWIG_IsOK(res1)) {
    9076               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Info_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9077                 :   }
    9078               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9079               0 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    9080               0 :   if (!SWIG_IsOK(res2)) {
    9081               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GCP_Info_set" "', argument " "2"" of type '" "char *""'");
    9082                 :   }
    9083               0 :   arg2 = reinterpret_cast< char * >(buf2);
    9084                 :   {
    9085               0 :     if ( bUseExceptions ) {
    9086               0 :       CPLErrorReset();
    9087                 :     }
    9088                 :     
    9089                 :     /* char* Info memberin typemap */
    9090               0 :     GDAL_GCP_Info_set(arg1,arg2);
    9091                 :     
    9092               0 :     if ( bUseExceptions ) {
    9093               0 :       CPLErr eclass = CPLGetLastErrorType();
    9094               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9095               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9096                 :       }
    9097                 :     }
    9098                 :   }
    9099               0 :   resultobj = SWIG_Py_Void();
    9100               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9101               0 :   return resultobj;
    9102                 : fail:
    9103               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9104               0 :   return NULL;
    9105                 : }
    9106                 : 
    9107                 : 
    9108               4 : SWIGINTERN PyObject *_wrap_GCP_Info_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9109               4 :   PyObject *resultobj = 0;
    9110               4 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9111               4 :   void *argp1 = 0 ;
    9112               4 :   int res1 = 0 ;
    9113               4 :   PyObject * obj0 = 0 ;
    9114               4 :   char *result = 0 ;
    9115                 :   
    9116               4 :   if (!PyArg_ParseTuple(args,(char *)"O:GCP_Info_get",&obj0)) SWIG_fail;
    9117               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9118               4 :   if (!SWIG_IsOK(res1)) {
    9119               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Info_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9120                 :   }
    9121               4 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9122                 :   {
    9123               4 :     if ( bUseExceptions ) {
    9124               0 :       CPLErrorReset();
    9125                 :     }
    9126               4 :     result = (char *)GDAL_GCP_Info_get(arg1);
    9127               4 :     if ( bUseExceptions ) {
    9128               0 :       CPLErr eclass = CPLGetLastErrorType();
    9129               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9130               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9131                 :       }
    9132                 :     }
    9133                 :   }
    9134               4 :   resultobj = SWIG_FromCharPtr((const char *)result);
    9135               4 :   return resultobj;
    9136                 : fail:
    9137               0 :   return NULL;
    9138                 : }
    9139                 : 
    9140                 : 
    9141               0 : SWIGINTERN PyObject *_wrap_GCP_Id_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9142               0 :   PyObject *resultobj = 0;
    9143               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9144               0 :   char *arg2 = (char *) 0 ;
    9145               0 :   void *argp1 = 0 ;
    9146               0 :   int res1 = 0 ;
    9147                 :   int res2 ;
    9148               0 :   char *buf2 = 0 ;
    9149               0 :   int alloc2 = 0 ;
    9150               0 :   PyObject * obj0 = 0 ;
    9151               0 :   PyObject * obj1 = 0 ;
    9152                 :   
    9153               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GCP_Id_set",&obj0,&obj1)) SWIG_fail;
    9154               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9155               0 :   if (!SWIG_IsOK(res1)) {
    9156               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Id_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9157                 :   }
    9158               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9159               0 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    9160               0 :   if (!SWIG_IsOK(res2)) {
    9161               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GCP_Id_set" "', argument " "2"" of type '" "char *""'");
    9162                 :   }
    9163               0 :   arg2 = reinterpret_cast< char * >(buf2);
    9164                 :   {
    9165               0 :     if ( bUseExceptions ) {
    9166               0 :       CPLErrorReset();
    9167                 :     }
    9168                 :     
    9169                 :     /* char* Info memberin typemap */
    9170               0 :     GDAL_GCP_Id_set(arg1,arg2);
    9171                 :     
    9172               0 :     if ( bUseExceptions ) {
    9173               0 :       CPLErr eclass = CPLGetLastErrorType();
    9174               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9175               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9176                 :       }
    9177                 :     }
    9178                 :   }
    9179               0 :   resultobj = SWIG_Py_Void();
    9180               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9181               0 :   return resultobj;
    9182                 : fail:
    9183               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9184               0 :   return NULL;
    9185                 : }
    9186                 : 
    9187                 : 
    9188               4 : SWIGINTERN PyObject *_wrap_GCP_Id_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9189               4 :   PyObject *resultobj = 0;
    9190               4 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9191               4 :   void *argp1 = 0 ;
    9192               4 :   int res1 = 0 ;
    9193               4 :   PyObject * obj0 = 0 ;
    9194               4 :   char *result = 0 ;
    9195                 :   
    9196               4 :   if (!PyArg_ParseTuple(args,(char *)"O:GCP_Id_get",&obj0)) SWIG_fail;
    9197               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9198               4 :   if (!SWIG_IsOK(res1)) {
    9199               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GCP_Id_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9200                 :   }
    9201               4 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9202                 :   {
    9203               4 :     if ( bUseExceptions ) {
    9204               0 :       CPLErrorReset();
    9205                 :     }
    9206               4 :     result = (char *)GDAL_GCP_Id_get(arg1);
    9207               4 :     if ( bUseExceptions ) {
    9208               0 :       CPLErr eclass = CPLGetLastErrorType();
    9209               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9210               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9211                 :       }
    9212                 :     }
    9213                 :   }
    9214               4 :   resultobj = SWIG_FromCharPtr((const char *)result);
    9215               4 :   return resultobj;
    9216                 : fail:
    9217               0 :   return NULL;
    9218                 : }
    9219                 : 
    9220                 : 
    9221               8 : SWIGINTERN PyObject *_wrap_new_GCP(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9222               8 :   PyObject *resultobj = 0;
    9223               8 :   double arg1 = (double) 0.0 ;
    9224               8 :   double arg2 = (double) 0.0 ;
    9225               8 :   double arg3 = (double) 0.0 ;
    9226               8 :   double arg4 = (double) 0.0 ;
    9227               8 :   double arg5 = (double) 0.0 ;
    9228               8 :   char *arg6 = (char *) "" ;
    9229               8 :   char *arg7 = (char *) "" ;
    9230                 :   double val1 ;
    9231               8 :   int ecode1 = 0 ;
    9232                 :   double val2 ;
    9233               8 :   int ecode2 = 0 ;
    9234                 :   double val3 ;
    9235               8 :   int ecode3 = 0 ;
    9236                 :   double val4 ;
    9237               8 :   int ecode4 = 0 ;
    9238                 :   double val5 ;
    9239               8 :   int ecode5 = 0 ;
    9240                 :   int res6 ;
    9241               8 :   char *buf6 = 0 ;
    9242               8 :   int alloc6 = 0 ;
    9243                 :   int res7 ;
    9244               8 :   char *buf7 = 0 ;
    9245               8 :   int alloc7 = 0 ;
    9246               8 :   PyObject * obj0 = 0 ;
    9247               8 :   PyObject * obj1 = 0 ;
    9248               8 :   PyObject * obj2 = 0 ;
    9249               8 :   PyObject * obj3 = 0 ;
    9250               8 :   PyObject * obj4 = 0 ;
    9251               8 :   PyObject * obj5 = 0 ;
    9252               8 :   PyObject * obj6 = 0 ;
    9253               8 :   GDAL_GCP *result = 0 ;
    9254                 :   
    9255               8 :   if (!PyArg_ParseTuple(args,(char *)"|OOOOOOO:new_GCP",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
    9256               8 :   if (obj0) {
    9257               0 :     ecode1 = SWIG_AsVal_double(obj0, &val1);
    9258               0 :     if (!SWIG_IsOK(ecode1)) {
    9259               0 :       SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GCP" "', argument " "1"" of type '" "double""'");
    9260                 :     } 
    9261               0 :     arg1 = static_cast< double >(val1);
    9262                 :   }
    9263               8 :   if (obj1) {
    9264               0 :     ecode2 = SWIG_AsVal_double(obj1, &val2);
    9265               0 :     if (!SWIG_IsOK(ecode2)) {
    9266               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GCP" "', argument " "2"" of type '" "double""'");
    9267                 :     } 
    9268               0 :     arg2 = static_cast< double >(val2);
    9269                 :   }
    9270               8 :   if (obj2) {
    9271               0 :     ecode3 = SWIG_AsVal_double(obj2, &val3);
    9272               0 :     if (!SWIG_IsOK(ecode3)) {
    9273               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_GCP" "', argument " "3"" of type '" "double""'");
    9274                 :     } 
    9275               0 :     arg3 = static_cast< double >(val3);
    9276                 :   }
    9277               8 :   if (obj3) {
    9278               0 :     ecode4 = SWIG_AsVal_double(obj3, &val4);
    9279               0 :     if (!SWIG_IsOK(ecode4)) {
    9280               0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_GCP" "', argument " "4"" of type '" "double""'");
    9281                 :     } 
    9282               0 :     arg4 = static_cast< double >(val4);
    9283                 :   }
    9284               8 :   if (obj4) {
    9285               0 :     ecode5 = SWIG_AsVal_double(obj4, &val5);
    9286               0 :     if (!SWIG_IsOK(ecode5)) {
    9287               0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_GCP" "', argument " "5"" of type '" "double""'");
    9288                 :     } 
    9289               0 :     arg5 = static_cast< double >(val5);
    9290                 :   }
    9291               8 :   if (obj5) {
    9292               0 :     res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6);
    9293               0 :     if (!SWIG_IsOK(res6)) {
    9294               0 :       SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_GCP" "', argument " "6"" of type '" "char const *""'");
    9295                 :     }
    9296               0 :     arg6 = reinterpret_cast< char * >(buf6);
    9297                 :   }
    9298               8 :   if (obj6) {
    9299               0 :     res7 = SWIG_AsCharPtrAndSize(obj6, &buf7, NULL, &alloc7);
    9300               0 :     if (!SWIG_IsOK(res7)) {
    9301               0 :       SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_GCP" "', argument " "7"" of type '" "char const *""'");
    9302                 :     }
    9303               0 :     arg7 = reinterpret_cast< char * >(buf7);
    9304                 :   }
    9305                 :   {
    9306               8 :     if ( bUseExceptions ) {
    9307               0 :       CPLErrorReset();
    9308                 :     }
    9309               8 :     result = (GDAL_GCP *)new_GDAL_GCP(arg1,arg2,arg3,arg4,arg5,(char const *)arg6,(char const *)arg7);
    9310               8 :     if ( bUseExceptions ) {
    9311               0 :       CPLErr eclass = CPLGetLastErrorType();
    9312               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9313               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9314                 :       }
    9315                 :     }
    9316                 :   }
    9317               8 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_NEW |  0 );
    9318               8 :   if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
    9319               8 :   if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
    9320               8 :   return resultobj;
    9321                 : fail:
    9322               0 :   if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
    9323               0 :   if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
    9324               0 :   return NULL;
    9325                 : }
    9326                 : 
    9327                 : 
    9328            5553 : SWIGINTERN PyObject *_wrap_delete_GCP(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9329            5553 :   PyObject *resultobj = 0;
    9330            5553 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9331            5553 :   void *argp1 = 0 ;
    9332            5553 :   int res1 = 0 ;
    9333            5553 :   PyObject * obj0 = 0 ;
    9334                 :   
    9335            5553 :   if (!PyArg_ParseTuple(args,(char *)"O:delete_GCP",&obj0)) SWIG_fail;
    9336            5553 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_DISOWN |  0 );
    9337            5553 :   if (!SWIG_IsOK(res1)) {
    9338               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GCP" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9339                 :   }
    9340            5553 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9341                 :   {
    9342            5553 :     if ( bUseExceptions ) {
    9343               0 :       CPLErrorReset();
    9344                 :     }
    9345                 :     delete_GDAL_GCP(arg1);
    9346            5553 :     if ( bUseExceptions ) {
    9347               0 :       CPLErr eclass = CPLGetLastErrorType();
    9348               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9349               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9350                 :       }
    9351                 :     }
    9352                 :   }
    9353            5553 :   resultobj = SWIG_Py_Void();
    9354            5553 :   return resultobj;
    9355                 : fail:
    9356               0 :   return NULL;
    9357                 : }
    9358                 : 
    9359                 : 
    9360               6 : SWIGINTERN PyObject *GCP_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9361                 :   PyObject *obj;
    9362               6 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
    9363               6 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDAL_GCP, SWIG_NewClientData(obj));
    9364               6 :   return SWIG_Py_Void();
    9365                 : }
    9366                 : 
    9367               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPX_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9368               0 :   PyObject *resultobj = 0;
    9369               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9370               0 :   void *argp1 = 0 ;
    9371               0 :   int res1 = 0 ;
    9372               0 :   PyObject * obj0 = 0 ;
    9373                 :   double result;
    9374                 :   
    9375               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_GCPX_get",&obj0)) SWIG_fail;
    9376               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9377               0 :   if (!SWIG_IsOK(res1)) {
    9378               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPX_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9379                 :   }
    9380               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9381                 :   {
    9382               0 :     if (!arg1) {
    9383               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9384                 :     }
    9385                 :   }
    9386                 :   {
    9387               0 :     if ( bUseExceptions ) {
    9388               0 :       CPLErrorReset();
    9389                 :     }
    9390               0 :     result = (double)GDAL_GCP_GCPX_get(arg1);
    9391               0 :     if ( bUseExceptions ) {
    9392               0 :       CPLErr eclass = CPLGetLastErrorType();
    9393               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9394               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9395                 :       }
    9396                 :     }
    9397                 :   }
    9398               0 :   resultobj = SWIG_From_double(static_cast< double >(result));
    9399               0 :   return resultobj;
    9400                 : fail:
    9401               0 :   return NULL;
    9402                 : }
    9403                 : 
    9404                 : 
    9405               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPX_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9406               0 :   PyObject *resultobj = 0;
    9407               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9408                 :   double arg2 ;
    9409               0 :   void *argp1 = 0 ;
    9410               0 :   int res1 = 0 ;
    9411                 :   double val2 ;
    9412               0 :   int ecode2 = 0 ;
    9413               0 :   PyObject * obj0 = 0 ;
    9414               0 :   PyObject * obj1 = 0 ;
    9415                 :   
    9416               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_GCPX_set",&obj0,&obj1)) SWIG_fail;
    9417               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9418               0 :   if (!SWIG_IsOK(res1)) {
    9419               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPX_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9420                 :   }
    9421               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9422               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
    9423               0 :   if (!SWIG_IsOK(ecode2)) {
    9424               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPX_set" "', argument " "2"" of type '" "double""'");
    9425                 :   } 
    9426               0 :   arg2 = static_cast< double >(val2);
    9427                 :   {
    9428               0 :     if (!arg1) {
    9429               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9430                 :     }
    9431                 :   }
    9432                 :   {
    9433               0 :     if ( bUseExceptions ) {
    9434               0 :       CPLErrorReset();
    9435                 :     }
    9436               0 :     GDAL_GCP_GCPX_set(arg1,arg2);
    9437               0 :     if ( bUseExceptions ) {
    9438               0 :       CPLErr eclass = CPLGetLastErrorType();
    9439               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9440               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9441                 :       }
    9442                 :     }
    9443                 :   }
    9444               0 :   resultobj = SWIG_Py_Void();
    9445               0 :   return resultobj;
    9446                 : fail:
    9447               0 :   return NULL;
    9448                 : }
    9449                 : 
    9450                 : 
    9451               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPY_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9452               0 :   PyObject *resultobj = 0;
    9453               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9454               0 :   void *argp1 = 0 ;
    9455               0 :   int res1 = 0 ;
    9456               0 :   PyObject * obj0 = 0 ;
    9457                 :   double result;
    9458                 :   
    9459               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_GCPY_get",&obj0)) SWIG_fail;
    9460               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9461               0 :   if (!SWIG_IsOK(res1)) {
    9462               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPY_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9463                 :   }
    9464               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9465                 :   {
    9466               0 :     if (!arg1) {
    9467               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9468                 :     }
    9469                 :   }
    9470                 :   {
    9471               0 :     if ( bUseExceptions ) {
    9472               0 :       CPLErrorReset();
    9473                 :     }
    9474               0 :     result = (double)GDAL_GCP_GCPY_get(arg1);
    9475               0 :     if ( bUseExceptions ) {
    9476               0 :       CPLErr eclass = CPLGetLastErrorType();
    9477               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9478               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9479                 :       }
    9480                 :     }
    9481                 :   }
    9482               0 :   resultobj = SWIG_From_double(static_cast< double >(result));
    9483               0 :   return resultobj;
    9484                 : fail:
    9485               0 :   return NULL;
    9486                 : }
    9487                 : 
    9488                 : 
    9489               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPY_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9490               0 :   PyObject *resultobj = 0;
    9491               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9492                 :   double arg2 ;
    9493               0 :   void *argp1 = 0 ;
    9494               0 :   int res1 = 0 ;
    9495                 :   double val2 ;
    9496               0 :   int ecode2 = 0 ;
    9497               0 :   PyObject * obj0 = 0 ;
    9498               0 :   PyObject * obj1 = 0 ;
    9499                 :   
    9500               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_GCPY_set",&obj0,&obj1)) SWIG_fail;
    9501               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9502               0 :   if (!SWIG_IsOK(res1)) {
    9503               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPY_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9504                 :   }
    9505               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9506               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
    9507               0 :   if (!SWIG_IsOK(ecode2)) {
    9508               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPY_set" "', argument " "2"" of type '" "double""'");
    9509                 :   } 
    9510               0 :   arg2 = static_cast< double >(val2);
    9511                 :   {
    9512               0 :     if (!arg1) {
    9513               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9514                 :     }
    9515                 :   }
    9516                 :   {
    9517               0 :     if ( bUseExceptions ) {
    9518               0 :       CPLErrorReset();
    9519                 :     }
    9520               0 :     GDAL_GCP_GCPY_set(arg1,arg2);
    9521               0 :     if ( bUseExceptions ) {
    9522               0 :       CPLErr eclass = CPLGetLastErrorType();
    9523               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9524               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9525                 :       }
    9526                 :     }
    9527                 :   }
    9528               0 :   resultobj = SWIG_Py_Void();
    9529               0 :   return resultobj;
    9530                 : fail:
    9531               0 :   return NULL;
    9532                 : }
    9533                 : 
    9534                 : 
    9535               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPZ_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9536               0 :   PyObject *resultobj = 0;
    9537               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9538               0 :   void *argp1 = 0 ;
    9539               0 :   int res1 = 0 ;
    9540               0 :   PyObject * obj0 = 0 ;
    9541                 :   double result;
    9542                 :   
    9543               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_GCPZ_get",&obj0)) SWIG_fail;
    9544               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9545               0 :   if (!SWIG_IsOK(res1)) {
    9546               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPZ_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9547                 :   }
    9548               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9549                 :   {
    9550               0 :     if (!arg1) {
    9551               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9552                 :     }
    9553                 :   }
    9554                 :   {
    9555               0 :     if ( bUseExceptions ) {
    9556               0 :       CPLErrorReset();
    9557                 :     }
    9558               0 :     result = (double)GDAL_GCP_GCPZ_get(arg1);
    9559               0 :     if ( bUseExceptions ) {
    9560               0 :       CPLErr eclass = CPLGetLastErrorType();
    9561               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9562               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9563                 :       }
    9564                 :     }
    9565                 :   }
    9566               0 :   resultobj = SWIG_From_double(static_cast< double >(result));
    9567               0 :   return resultobj;
    9568                 : fail:
    9569               0 :   return NULL;
    9570                 : }
    9571                 : 
    9572                 : 
    9573               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPZ_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9574               0 :   PyObject *resultobj = 0;
    9575               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9576                 :   double arg2 ;
    9577               0 :   void *argp1 = 0 ;
    9578               0 :   int res1 = 0 ;
    9579                 :   double val2 ;
    9580               0 :   int ecode2 = 0 ;
    9581               0 :   PyObject * obj0 = 0 ;
    9582               0 :   PyObject * obj1 = 0 ;
    9583                 :   
    9584               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_GCPZ_set",&obj0,&obj1)) SWIG_fail;
    9585               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9586               0 :   if (!SWIG_IsOK(res1)) {
    9587               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPZ_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9588                 :   }
    9589               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9590               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
    9591               0 :   if (!SWIG_IsOK(ecode2)) {
    9592               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPZ_set" "', argument " "2"" of type '" "double""'");
    9593                 :   } 
    9594               0 :   arg2 = static_cast< double >(val2);
    9595                 :   {
    9596               0 :     if (!arg1) {
    9597               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9598                 :     }
    9599                 :   }
    9600                 :   {
    9601               0 :     if ( bUseExceptions ) {
    9602               0 :       CPLErrorReset();
    9603                 :     }
    9604               0 :     GDAL_GCP_GCPZ_set(arg1,arg2);
    9605               0 :     if ( bUseExceptions ) {
    9606               0 :       CPLErr eclass = CPLGetLastErrorType();
    9607               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9608               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9609                 :       }
    9610                 :     }
    9611                 :   }
    9612               0 :   resultobj = SWIG_Py_Void();
    9613               0 :   return resultobj;
    9614                 : fail:
    9615               0 :   return NULL;
    9616                 : }
    9617                 : 
    9618                 : 
    9619               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPPixel_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9620               0 :   PyObject *resultobj = 0;
    9621               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9622               0 :   void *argp1 = 0 ;
    9623               0 :   int res1 = 0 ;
    9624               0 :   PyObject * obj0 = 0 ;
    9625                 :   double result;
    9626                 :   
    9627               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_GCPPixel_get",&obj0)) SWIG_fail;
    9628               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9629               0 :   if (!SWIG_IsOK(res1)) {
    9630               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPPixel_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9631                 :   }
    9632               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9633                 :   {
    9634               0 :     if (!arg1) {
    9635               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9636                 :     }
    9637                 :   }
    9638                 :   {
    9639               0 :     if ( bUseExceptions ) {
    9640               0 :       CPLErrorReset();
    9641                 :     }
    9642               0 :     result = (double)GDAL_GCP_GCPPixel_get(arg1);
    9643               0 :     if ( bUseExceptions ) {
    9644               0 :       CPLErr eclass = CPLGetLastErrorType();
    9645               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9646               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9647                 :       }
    9648                 :     }
    9649                 :   }
    9650               0 :   resultobj = SWIG_From_double(static_cast< double >(result));
    9651               0 :   return resultobj;
    9652                 : fail:
    9653               0 :   return NULL;
    9654                 : }
    9655                 : 
    9656                 : 
    9657               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPPixel_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9658               0 :   PyObject *resultobj = 0;
    9659               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9660                 :   double arg2 ;
    9661               0 :   void *argp1 = 0 ;
    9662               0 :   int res1 = 0 ;
    9663                 :   double val2 ;
    9664               0 :   int ecode2 = 0 ;
    9665               0 :   PyObject * obj0 = 0 ;
    9666               0 :   PyObject * obj1 = 0 ;
    9667                 :   
    9668               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_GCPPixel_set",&obj0,&obj1)) SWIG_fail;
    9669               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9670               0 :   if (!SWIG_IsOK(res1)) {
    9671               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPPixel_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9672                 :   }
    9673               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9674               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
    9675               0 :   if (!SWIG_IsOK(ecode2)) {
    9676               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPPixel_set" "', argument " "2"" of type '" "double""'");
    9677                 :   } 
    9678               0 :   arg2 = static_cast< double >(val2);
    9679                 :   {
    9680               0 :     if (!arg1) {
    9681               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9682                 :     }
    9683                 :   }
    9684                 :   {
    9685               0 :     if ( bUseExceptions ) {
    9686               0 :       CPLErrorReset();
    9687                 :     }
    9688               0 :     GDAL_GCP_GCPPixel_set(arg1,arg2);
    9689               0 :     if ( bUseExceptions ) {
    9690               0 :       CPLErr eclass = CPLGetLastErrorType();
    9691               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9692               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9693                 :       }
    9694                 :     }
    9695                 :   }
    9696               0 :   resultobj = SWIG_Py_Void();
    9697               0 :   return resultobj;
    9698                 : fail:
    9699               0 :   return NULL;
    9700                 : }
    9701                 : 
    9702                 : 
    9703               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPLine_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9704               0 :   PyObject *resultobj = 0;
    9705               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9706               0 :   void *argp1 = 0 ;
    9707               0 :   int res1 = 0 ;
    9708               0 :   PyObject * obj0 = 0 ;
    9709                 :   double result;
    9710                 :   
    9711               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_GCPLine_get",&obj0)) SWIG_fail;
    9712               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9713               0 :   if (!SWIG_IsOK(res1)) {
    9714               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPLine_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9715                 :   }
    9716               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9717                 :   {
    9718               0 :     if (!arg1) {
    9719               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9720                 :     }
    9721                 :   }
    9722                 :   {
    9723               0 :     if ( bUseExceptions ) {
    9724               0 :       CPLErrorReset();
    9725                 :     }
    9726               0 :     result = (double)GDAL_GCP_GCPLine_get(arg1);
    9727               0 :     if ( bUseExceptions ) {
    9728               0 :       CPLErr eclass = CPLGetLastErrorType();
    9729               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9730               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9731                 :       }
    9732                 :     }
    9733                 :   }
    9734               0 :   resultobj = SWIG_From_double(static_cast< double >(result));
    9735               0 :   return resultobj;
    9736                 : fail:
    9737               0 :   return NULL;
    9738                 : }
    9739                 : 
    9740                 : 
    9741               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_GCPLine_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9742               0 :   PyObject *resultobj = 0;
    9743               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9744                 :   double arg2 ;
    9745               0 :   void *argp1 = 0 ;
    9746               0 :   int res1 = 0 ;
    9747                 :   double val2 ;
    9748               0 :   int ecode2 = 0 ;
    9749               0 :   PyObject * obj0 = 0 ;
    9750               0 :   PyObject * obj1 = 0 ;
    9751                 :   
    9752               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_GCPLine_set",&obj0,&obj1)) SWIG_fail;
    9753               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9754               0 :   if (!SWIG_IsOK(res1)) {
    9755               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_GCPLine_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9756                 :   }
    9757               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9758               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
    9759               0 :   if (!SWIG_IsOK(ecode2)) {
    9760               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_GCPLine_set" "', argument " "2"" of type '" "double""'");
    9761                 :   } 
    9762               0 :   arg2 = static_cast< double >(val2);
    9763                 :   {
    9764               0 :     if (!arg1) {
    9765               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9766                 :     }
    9767                 :   }
    9768                 :   {
    9769               0 :     if ( bUseExceptions ) {
    9770               0 :       CPLErrorReset();
    9771                 :     }
    9772               0 :     GDAL_GCP_GCPLine_set(arg1,arg2);
    9773               0 :     if ( bUseExceptions ) {
    9774               0 :       CPLErr eclass = CPLGetLastErrorType();
    9775               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9776               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9777                 :       }
    9778                 :     }
    9779                 :   }
    9780               0 :   resultobj = SWIG_Py_Void();
    9781               0 :   return resultobj;
    9782                 : fail:
    9783               0 :   return NULL;
    9784                 : }
    9785                 : 
    9786                 : 
    9787               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_Info_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9788               0 :   PyObject *resultobj = 0;
    9789               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9790               0 :   void *argp1 = 0 ;
    9791               0 :   int res1 = 0 ;
    9792               0 :   PyObject * obj0 = 0 ;
    9793               0 :   char *result = 0 ;
    9794                 :   
    9795               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_Info_get",&obj0)) SWIG_fail;
    9796               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9797               0 :   if (!SWIG_IsOK(res1)) {
    9798               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Info_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9799                 :   }
    9800               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9801                 :   {
    9802               0 :     if (!arg1) {
    9803               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9804                 :     }
    9805                 :   }
    9806                 :   {
    9807               0 :     if ( bUseExceptions ) {
    9808               0 :       CPLErrorReset();
    9809                 :     }
    9810               0 :     result = (char *)GDAL_GCP_Info_get(arg1);
    9811               0 :     if ( bUseExceptions ) {
    9812               0 :       CPLErr eclass = CPLGetLastErrorType();
    9813               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9814               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9815                 :       }
    9816                 :     }
    9817                 :   }
    9818               0 :   resultobj = SWIG_FromCharPtr((const char *)result);
    9819               0 :   return resultobj;
    9820                 : fail:
    9821               0 :   return NULL;
    9822                 : }
    9823                 : 
    9824                 : 
    9825               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_Info_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9826               0 :   PyObject *resultobj = 0;
    9827               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9828               0 :   char *arg2 = (char *) 0 ;
    9829               0 :   void *argp1 = 0 ;
    9830               0 :   int res1 = 0 ;
    9831                 :   int res2 ;
    9832               0 :   char *buf2 = 0 ;
    9833               0 :   int alloc2 = 0 ;
    9834               0 :   PyObject * obj0 = 0 ;
    9835               0 :   PyObject * obj1 = 0 ;
    9836                 :   
    9837               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_Info_set",&obj0,&obj1)) SWIG_fail;
    9838               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9839               0 :   if (!SWIG_IsOK(res1)) {
    9840               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Info_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9841                 :   }
    9842               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9843               0 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    9844               0 :   if (!SWIG_IsOK(res2)) {
    9845               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GDAL_GCP_Info_set" "', argument " "2"" of type '" "char const *""'");
    9846                 :   }
    9847               0 :   arg2 = reinterpret_cast< char * >(buf2);
    9848                 :   {
    9849               0 :     if (!arg1) {
    9850               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9851                 :     }
    9852                 :   }
    9853                 :   {
    9854               0 :     if ( bUseExceptions ) {
    9855               0 :       CPLErrorReset();
    9856                 :     }
    9857               0 :     GDAL_GCP_Info_set(arg1,(char const *)arg2);
    9858               0 :     if ( bUseExceptions ) {
    9859               0 :       CPLErr eclass = CPLGetLastErrorType();
    9860               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9861               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9862                 :       }
    9863                 :     }
    9864                 :   }
    9865               0 :   resultobj = SWIG_Py_Void();
    9866               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9867               0 :   return resultobj;
    9868                 : fail:
    9869               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9870               0 :   return NULL;
    9871                 : }
    9872                 : 
    9873                 : 
    9874               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_Id_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9875               0 :   PyObject *resultobj = 0;
    9876               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9877               0 :   void *argp1 = 0 ;
    9878               0 :   int res1 = 0 ;
    9879               0 :   PyObject * obj0 = 0 ;
    9880               0 :   char *result = 0 ;
    9881                 :   
    9882               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_Id_get",&obj0)) SWIG_fail;
    9883               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9884               0 :   if (!SWIG_IsOK(res1)) {
    9885               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Id_get" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9886                 :   }
    9887               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9888                 :   {
    9889               0 :     if (!arg1) {
    9890               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9891                 :     }
    9892                 :   }
    9893                 :   {
    9894               0 :     if ( bUseExceptions ) {
    9895               0 :       CPLErrorReset();
    9896                 :     }
    9897               0 :     result = (char *)GDAL_GCP_Id_get(arg1);
    9898               0 :     if ( bUseExceptions ) {
    9899               0 :       CPLErr eclass = CPLGetLastErrorType();
    9900               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9901               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9902                 :       }
    9903                 :     }
    9904                 :   }
    9905               0 :   resultobj = SWIG_FromCharPtr((const char *)result);
    9906               0 :   return resultobj;
    9907                 : fail:
    9908               0 :   return NULL;
    9909                 : }
    9910                 : 
    9911                 : 
    9912               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_Id_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9913               0 :   PyObject *resultobj = 0;
    9914               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9915               0 :   char *arg2 = (char *) 0 ;
    9916               0 :   void *argp1 = 0 ;
    9917               0 :   int res1 = 0 ;
    9918                 :   int res2 ;
    9919               0 :   char *buf2 = 0 ;
    9920               0 :   int alloc2 = 0 ;
    9921               0 :   PyObject * obj0 = 0 ;
    9922               0 :   PyObject * obj1 = 0 ;
    9923                 :   
    9924               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_Id_set",&obj0,&obj1)) SWIG_fail;
    9925               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9926               0 :   if (!SWIG_IsOK(res1)) {
    9927               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_Id_set" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9928                 :   }
    9929               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9930               0 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    9931               0 :   if (!SWIG_IsOK(res2)) {
    9932               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GDAL_GCP_Id_set" "', argument " "2"" of type '" "char const *""'");
    9933                 :   }
    9934               0 :   arg2 = reinterpret_cast< char * >(buf2);
    9935                 :   {
    9936               0 :     if (!arg1) {
    9937               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9938                 :     }
    9939                 :   }
    9940                 :   {
    9941               0 :     if ( bUseExceptions ) {
    9942               0 :       CPLErrorReset();
    9943                 :     }
    9944               0 :     GDAL_GCP_Id_set(arg1,(char const *)arg2);
    9945               0 :     if ( bUseExceptions ) {
    9946               0 :       CPLErr eclass = CPLGetLastErrorType();
    9947               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9948               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9949                 :       }
    9950                 :     }
    9951                 :   }
    9952               0 :   resultobj = SWIG_Py_Void();
    9953               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9954               0 :   return resultobj;
    9955                 : fail:
    9956               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    9957               0 :   return NULL;
    9958                 : }
    9959                 : 
    9960                 : 
    9961               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_get_GCPX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
    9962               0 :   PyObject *resultobj = 0;
    9963               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    9964               0 :   void *argp1 = 0 ;
    9965               0 :   int res1 = 0 ;
    9966               0 :   PyObject * obj0 = 0 ;
    9967                 :   double result;
    9968                 :   
    9969               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_get_GCPX",&obj0)) SWIG_fail;
    9970               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
    9971               0 :   if (!SWIG_IsOK(res1)) {
    9972               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_get_GCPX" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
    9973                 :   }
    9974               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
    9975                 :   {
    9976               0 :     if (!arg1) {
    9977               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    9978                 :     }
    9979                 :   }
    9980                 :   {
    9981               0 :     if ( bUseExceptions ) {
    9982               0 :       CPLErrorReset();
    9983                 :     }
    9984               0 :     result = (double)GDAL_GCP_get_GCPX(arg1);
    9985               0 :     if ( bUseExceptions ) {
    9986               0 :       CPLErr eclass = CPLGetLastErrorType();
    9987               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
    9988               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
    9989                 :       }
    9990                 :     }
    9991                 :   }
    9992               0 :   resultobj = SWIG_From_double(static_cast< double >(result));
    9993               0 :   return resultobj;
    9994                 : fail:
    9995               0 :   return NULL;
    9996                 : }
    9997                 : 
    9998                 : 
    9999               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_set_GCPX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10000               0 :   PyObject *resultobj = 0;
   10001               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10002                 :   double arg2 ;
   10003               0 :   void *argp1 = 0 ;
   10004               0 :   int res1 = 0 ;
   10005                 :   double val2 ;
   10006               0 :   int ecode2 = 0 ;
   10007               0 :   PyObject * obj0 = 0 ;
   10008               0 :   PyObject * obj1 = 0 ;
   10009                 :   
   10010               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_set_GCPX",&obj0,&obj1)) SWIG_fail;
   10011               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10012               0 :   if (!SWIG_IsOK(res1)) {
   10013               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_set_GCPX" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10014                 :   }
   10015               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10016               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   10017               0 :   if (!SWIG_IsOK(ecode2)) {
   10018               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_set_GCPX" "', argument " "2"" of type '" "double""'");
   10019                 :   } 
   10020               0 :   arg2 = static_cast< double >(val2);
   10021                 :   {
   10022               0 :     if (!arg1) {
   10023               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10024                 :     }
   10025                 :   }
   10026                 :   {
   10027               0 :     if ( bUseExceptions ) {
   10028               0 :       CPLErrorReset();
   10029                 :     }
   10030               0 :     GDAL_GCP_set_GCPX(arg1,arg2);
   10031               0 :     if ( bUseExceptions ) {
   10032               0 :       CPLErr eclass = CPLGetLastErrorType();
   10033               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10034               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10035                 :       }
   10036                 :     }
   10037                 :   }
   10038               0 :   resultobj = SWIG_Py_Void();
   10039               0 :   return resultobj;
   10040                 : fail:
   10041               0 :   return NULL;
   10042                 : }
   10043                 : 
   10044                 : 
   10045               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_get_GCPY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10046               0 :   PyObject *resultobj = 0;
   10047               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10048               0 :   void *argp1 = 0 ;
   10049               0 :   int res1 = 0 ;
   10050               0 :   PyObject * obj0 = 0 ;
   10051                 :   double result;
   10052                 :   
   10053               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_get_GCPY",&obj0)) SWIG_fail;
   10054               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10055               0 :   if (!SWIG_IsOK(res1)) {
   10056               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_get_GCPY" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10057                 :   }
   10058               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10059                 :   {
   10060               0 :     if (!arg1) {
   10061               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10062                 :     }
   10063                 :   }
   10064                 :   {
   10065               0 :     if ( bUseExceptions ) {
   10066               0 :       CPLErrorReset();
   10067                 :     }
   10068               0 :     result = (double)GDAL_GCP_get_GCPY(arg1);
   10069               0 :     if ( bUseExceptions ) {
   10070               0 :       CPLErr eclass = CPLGetLastErrorType();
   10071               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10072               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10073                 :       }
   10074                 :     }
   10075                 :   }
   10076               0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   10077               0 :   return resultobj;
   10078                 : fail:
   10079               0 :   return NULL;
   10080                 : }
   10081                 : 
   10082                 : 
   10083               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_set_GCPY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10084               0 :   PyObject *resultobj = 0;
   10085               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10086                 :   double arg2 ;
   10087               0 :   void *argp1 = 0 ;
   10088               0 :   int res1 = 0 ;
   10089                 :   double val2 ;
   10090               0 :   int ecode2 = 0 ;
   10091               0 :   PyObject * obj0 = 0 ;
   10092               0 :   PyObject * obj1 = 0 ;
   10093                 :   
   10094               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_set_GCPY",&obj0,&obj1)) SWIG_fail;
   10095               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10096               0 :   if (!SWIG_IsOK(res1)) {
   10097               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_set_GCPY" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10098                 :   }
   10099               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10100               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   10101               0 :   if (!SWIG_IsOK(ecode2)) {
   10102               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_set_GCPY" "', argument " "2"" of type '" "double""'");
   10103                 :   } 
   10104               0 :   arg2 = static_cast< double >(val2);
   10105                 :   {
   10106               0 :     if (!arg1) {
   10107               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10108                 :     }
   10109                 :   }
   10110                 :   {
   10111               0 :     if ( bUseExceptions ) {
   10112               0 :       CPLErrorReset();
   10113                 :     }
   10114               0 :     GDAL_GCP_set_GCPY(arg1,arg2);
   10115               0 :     if ( bUseExceptions ) {
   10116               0 :       CPLErr eclass = CPLGetLastErrorType();
   10117               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10118               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10119                 :       }
   10120                 :     }
   10121                 :   }
   10122               0 :   resultobj = SWIG_Py_Void();
   10123               0 :   return resultobj;
   10124                 : fail:
   10125               0 :   return NULL;
   10126                 : }
   10127                 : 
   10128                 : 
   10129               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_get_GCPZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10130               0 :   PyObject *resultobj = 0;
   10131               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10132               0 :   void *argp1 = 0 ;
   10133               0 :   int res1 = 0 ;
   10134               0 :   PyObject * obj0 = 0 ;
   10135                 :   double result;
   10136                 :   
   10137               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_get_GCPZ",&obj0)) SWIG_fail;
   10138               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10139               0 :   if (!SWIG_IsOK(res1)) {
   10140               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_get_GCPZ" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10141                 :   }
   10142               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10143                 :   {
   10144               0 :     if (!arg1) {
   10145               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10146                 :     }
   10147                 :   }
   10148                 :   {
   10149               0 :     if ( bUseExceptions ) {
   10150               0 :       CPLErrorReset();
   10151                 :     }
   10152               0 :     result = (double)GDAL_GCP_get_GCPZ(arg1);
   10153               0 :     if ( bUseExceptions ) {
   10154               0 :       CPLErr eclass = CPLGetLastErrorType();
   10155               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10156               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10157                 :       }
   10158                 :     }
   10159                 :   }
   10160               0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   10161               0 :   return resultobj;
   10162                 : fail:
   10163               0 :   return NULL;
   10164                 : }
   10165                 : 
   10166                 : 
   10167               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_set_GCPZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10168               0 :   PyObject *resultobj = 0;
   10169               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10170                 :   double arg2 ;
   10171               0 :   void *argp1 = 0 ;
   10172               0 :   int res1 = 0 ;
   10173                 :   double val2 ;
   10174               0 :   int ecode2 = 0 ;
   10175               0 :   PyObject * obj0 = 0 ;
   10176               0 :   PyObject * obj1 = 0 ;
   10177                 :   
   10178               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_set_GCPZ",&obj0,&obj1)) SWIG_fail;
   10179               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10180               0 :   if (!SWIG_IsOK(res1)) {
   10181               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_set_GCPZ" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10182                 :   }
   10183               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10184               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   10185               0 :   if (!SWIG_IsOK(ecode2)) {
   10186               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_set_GCPZ" "', argument " "2"" of type '" "double""'");
   10187                 :   } 
   10188               0 :   arg2 = static_cast< double >(val2);
   10189                 :   {
   10190               0 :     if (!arg1) {
   10191               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10192                 :     }
   10193                 :   }
   10194                 :   {
   10195               0 :     if ( bUseExceptions ) {
   10196               0 :       CPLErrorReset();
   10197                 :     }
   10198               0 :     GDAL_GCP_set_GCPZ(arg1,arg2);
   10199               0 :     if ( bUseExceptions ) {
   10200               0 :       CPLErr eclass = CPLGetLastErrorType();
   10201               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10202               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10203                 :       }
   10204                 :     }
   10205                 :   }
   10206               0 :   resultobj = SWIG_Py_Void();
   10207               0 :   return resultobj;
   10208                 : fail:
   10209               0 :   return NULL;
   10210                 : }
   10211                 : 
   10212                 : 
   10213               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_get_GCPPixel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10214               0 :   PyObject *resultobj = 0;
   10215               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10216               0 :   void *argp1 = 0 ;
   10217               0 :   int res1 = 0 ;
   10218               0 :   PyObject * obj0 = 0 ;
   10219                 :   double result;
   10220                 :   
   10221               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_get_GCPPixel",&obj0)) SWIG_fail;
   10222               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10223               0 :   if (!SWIG_IsOK(res1)) {
   10224               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_get_GCPPixel" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10225                 :   }
   10226               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10227                 :   {
   10228               0 :     if (!arg1) {
   10229               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10230                 :     }
   10231                 :   }
   10232                 :   {
   10233               0 :     if ( bUseExceptions ) {
   10234               0 :       CPLErrorReset();
   10235                 :     }
   10236               0 :     result = (double)GDAL_GCP_get_GCPPixel(arg1);
   10237               0 :     if ( bUseExceptions ) {
   10238               0 :       CPLErr eclass = CPLGetLastErrorType();
   10239               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10240               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10241                 :       }
   10242                 :     }
   10243                 :   }
   10244               0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   10245               0 :   return resultobj;
   10246                 : fail:
   10247               0 :   return NULL;
   10248                 : }
   10249                 : 
   10250                 : 
   10251               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_set_GCPPixel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10252               0 :   PyObject *resultobj = 0;
   10253               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10254                 :   double arg2 ;
   10255               0 :   void *argp1 = 0 ;
   10256               0 :   int res1 = 0 ;
   10257                 :   double val2 ;
   10258               0 :   int ecode2 = 0 ;
   10259               0 :   PyObject * obj0 = 0 ;
   10260               0 :   PyObject * obj1 = 0 ;
   10261                 :   
   10262               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_set_GCPPixel",&obj0,&obj1)) SWIG_fail;
   10263               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10264               0 :   if (!SWIG_IsOK(res1)) {
   10265               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_set_GCPPixel" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10266                 :   }
   10267               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10268               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   10269               0 :   if (!SWIG_IsOK(ecode2)) {
   10270               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_set_GCPPixel" "', argument " "2"" of type '" "double""'");
   10271                 :   } 
   10272               0 :   arg2 = static_cast< double >(val2);
   10273                 :   {
   10274               0 :     if (!arg1) {
   10275               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10276                 :     }
   10277                 :   }
   10278                 :   {
   10279               0 :     if ( bUseExceptions ) {
   10280               0 :       CPLErrorReset();
   10281                 :     }
   10282               0 :     GDAL_GCP_set_GCPPixel(arg1,arg2);
   10283               0 :     if ( bUseExceptions ) {
   10284               0 :       CPLErr eclass = CPLGetLastErrorType();
   10285               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10286               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10287                 :       }
   10288                 :     }
   10289                 :   }
   10290               0 :   resultobj = SWIG_Py_Void();
   10291               0 :   return resultobj;
   10292                 : fail:
   10293               0 :   return NULL;
   10294                 : }
   10295                 : 
   10296                 : 
   10297               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_get_GCPLine(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10298               0 :   PyObject *resultobj = 0;
   10299               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10300               0 :   void *argp1 = 0 ;
   10301               0 :   int res1 = 0 ;
   10302               0 :   PyObject * obj0 = 0 ;
   10303                 :   double result;
   10304                 :   
   10305               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_get_GCPLine",&obj0)) SWIG_fail;
   10306               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10307               0 :   if (!SWIG_IsOK(res1)) {
   10308               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_get_GCPLine" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10309                 :   }
   10310               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10311                 :   {
   10312               0 :     if (!arg1) {
   10313               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10314                 :     }
   10315                 :   }
   10316                 :   {
   10317               0 :     if ( bUseExceptions ) {
   10318               0 :       CPLErrorReset();
   10319                 :     }
   10320               0 :     result = (double)GDAL_GCP_get_GCPLine(arg1);
   10321               0 :     if ( bUseExceptions ) {
   10322               0 :       CPLErr eclass = CPLGetLastErrorType();
   10323               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10324               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10325                 :       }
   10326                 :     }
   10327                 :   }
   10328               0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   10329               0 :   return resultobj;
   10330                 : fail:
   10331               0 :   return NULL;
   10332                 : }
   10333                 : 
   10334                 : 
   10335               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_set_GCPLine(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10336               0 :   PyObject *resultobj = 0;
   10337               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10338                 :   double arg2 ;
   10339               0 :   void *argp1 = 0 ;
   10340               0 :   int res1 = 0 ;
   10341                 :   double val2 ;
   10342               0 :   int ecode2 = 0 ;
   10343               0 :   PyObject * obj0 = 0 ;
   10344               0 :   PyObject * obj1 = 0 ;
   10345                 :   
   10346               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_set_GCPLine",&obj0,&obj1)) SWIG_fail;
   10347               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10348               0 :   if (!SWIG_IsOK(res1)) {
   10349               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_set_GCPLine" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10350                 :   }
   10351               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10352               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   10353               0 :   if (!SWIG_IsOK(ecode2)) {
   10354               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GDAL_GCP_set_GCPLine" "', argument " "2"" of type '" "double""'");
   10355                 :   } 
   10356               0 :   arg2 = static_cast< double >(val2);
   10357                 :   {
   10358               0 :     if (!arg1) {
   10359               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10360                 :     }
   10361                 :   }
   10362                 :   {
   10363               0 :     if ( bUseExceptions ) {
   10364               0 :       CPLErrorReset();
   10365                 :     }
   10366               0 :     GDAL_GCP_set_GCPLine(arg1,arg2);
   10367               0 :     if ( bUseExceptions ) {
   10368               0 :       CPLErr eclass = CPLGetLastErrorType();
   10369               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10370               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10371                 :       }
   10372                 :     }
   10373                 :   }
   10374               0 :   resultobj = SWIG_Py_Void();
   10375               0 :   return resultobj;
   10376                 : fail:
   10377               0 :   return NULL;
   10378                 : }
   10379                 : 
   10380                 : 
   10381               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_get_Info(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10382               0 :   PyObject *resultobj = 0;
   10383               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10384               0 :   void *argp1 = 0 ;
   10385               0 :   int res1 = 0 ;
   10386               0 :   PyObject * obj0 = 0 ;
   10387               0 :   char *result = 0 ;
   10388                 :   
   10389               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_get_Info",&obj0)) SWIG_fail;
   10390               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10391               0 :   if (!SWIG_IsOK(res1)) {
   10392               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_get_Info" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10393                 :   }
   10394               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10395                 :   {
   10396               0 :     if (!arg1) {
   10397               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10398                 :     }
   10399                 :   }
   10400                 :   {
   10401               0 :     if ( bUseExceptions ) {
   10402               0 :       CPLErrorReset();
   10403                 :     }
   10404               0 :     result = (char *)GDAL_GCP_get_Info(arg1);
   10405               0 :     if ( bUseExceptions ) {
   10406               0 :       CPLErr eclass = CPLGetLastErrorType();
   10407               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10408               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10409                 :       }
   10410                 :     }
   10411                 :   }
   10412               0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   10413               0 :   return resultobj;
   10414                 : fail:
   10415               0 :   return NULL;
   10416                 : }
   10417                 : 
   10418                 : 
   10419               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_set_Info(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10420               0 :   PyObject *resultobj = 0;
   10421               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10422               0 :   char *arg2 = (char *) 0 ;
   10423               0 :   void *argp1 = 0 ;
   10424               0 :   int res1 = 0 ;
   10425                 :   int res2 ;
   10426               0 :   char *buf2 = 0 ;
   10427               0 :   int alloc2 = 0 ;
   10428               0 :   PyObject * obj0 = 0 ;
   10429               0 :   PyObject * obj1 = 0 ;
   10430                 :   
   10431               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_set_Info",&obj0,&obj1)) SWIG_fail;
   10432               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10433               0 :   if (!SWIG_IsOK(res1)) {
   10434               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_set_Info" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10435                 :   }
   10436               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10437               0 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   10438               0 :   if (!SWIG_IsOK(res2)) {
   10439               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GDAL_GCP_set_Info" "', argument " "2"" of type '" "char const *""'");
   10440                 :   }
   10441               0 :   arg2 = reinterpret_cast< char * >(buf2);
   10442                 :   {
   10443               0 :     if (!arg1) {
   10444               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10445                 :     }
   10446                 :   }
   10447                 :   {
   10448               0 :     if ( bUseExceptions ) {
   10449               0 :       CPLErrorReset();
   10450                 :     }
   10451               0 :     GDAL_GCP_set_Info(arg1,(char const *)arg2);
   10452               0 :     if ( bUseExceptions ) {
   10453               0 :       CPLErr eclass = CPLGetLastErrorType();
   10454               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10455               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10456                 :       }
   10457                 :     }
   10458                 :   }
   10459               0 :   resultobj = SWIG_Py_Void();
   10460               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10461               0 :   return resultobj;
   10462                 : fail:
   10463               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10464               0 :   return NULL;
   10465                 : }
   10466                 : 
   10467                 : 
   10468               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_get_Id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10469               0 :   PyObject *resultobj = 0;
   10470               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10471               0 :   void *argp1 = 0 ;
   10472               0 :   int res1 = 0 ;
   10473               0 :   PyObject * obj0 = 0 ;
   10474               0 :   char *result = 0 ;
   10475                 :   
   10476               0 :   if (!PyArg_ParseTuple(args,(char *)"O:GDAL_GCP_get_Id",&obj0)) SWIG_fail;
   10477               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10478               0 :   if (!SWIG_IsOK(res1)) {
   10479               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_get_Id" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10480                 :   }
   10481               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10482                 :   {
   10483               0 :     if (!arg1) {
   10484               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10485                 :     }
   10486                 :   }
   10487                 :   {
   10488               0 :     if ( bUseExceptions ) {
   10489               0 :       CPLErrorReset();
   10490                 :     }
   10491               0 :     result = (char *)GDAL_GCP_get_Id(arg1);
   10492               0 :     if ( bUseExceptions ) {
   10493               0 :       CPLErr eclass = CPLGetLastErrorType();
   10494               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10495               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10496                 :       }
   10497                 :     }
   10498                 :   }
   10499               0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   10500               0 :   return resultobj;
   10501                 : fail:
   10502               0 :   return NULL;
   10503                 : }
   10504                 : 
   10505                 : 
   10506               0 : SWIGINTERN PyObject *_wrap_GDAL_GCP_set_Id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10507               0 :   PyObject *resultobj = 0;
   10508               0 :   GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
   10509               0 :   char *arg2 = (char *) 0 ;
   10510               0 :   void *argp1 = 0 ;
   10511               0 :   int res1 = 0 ;
   10512                 :   int res2 ;
   10513               0 :   char *buf2 = 0 ;
   10514               0 :   int alloc2 = 0 ;
   10515               0 :   PyObject * obj0 = 0 ;
   10516               0 :   PyObject * obj1 = 0 ;
   10517                 :   
   10518               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:GDAL_GCP_set_Id",&obj0,&obj1)) SWIG_fail;
   10519               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDAL_GCP, 0 |  0 );
   10520               0 :   if (!SWIG_IsOK(res1)) {
   10521               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GDAL_GCP_set_Id" "', argument " "1"" of type '" "GDAL_GCP *""'"); 
   10522                 :   }
   10523               0 :   arg1 = reinterpret_cast< GDAL_GCP * >(argp1);
   10524               0 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   10525               0 :   if (!SWIG_IsOK(res2)) {
   10526               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GDAL_GCP_set_Id" "', argument " "2"" of type '" "char const *""'");
   10527                 :   }
   10528               0 :   arg2 = reinterpret_cast< char * >(buf2);
   10529                 :   {
   10530               0 :     if (!arg1) {
   10531               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   10532                 :     }
   10533                 :   }
   10534                 :   {
   10535               0 :     if ( bUseExceptions ) {
   10536               0 :       CPLErrorReset();
   10537                 :     }
   10538               0 :     GDAL_GCP_set_Id(arg1,(char const *)arg2);
   10539               0 :     if ( bUseExceptions ) {
   10540               0 :       CPLErr eclass = CPLGetLastErrorType();
   10541               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10542               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10543                 :       }
   10544                 :     }
   10545                 :   }
   10546               0 :   resultobj = SWIG_Py_Void();
   10547               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10548               0 :   return resultobj;
   10549                 : fail:
   10550               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   10551               0 :   return NULL;
   10552                 : }
   10553                 : 
   10554                 : 
   10555               0 : SWIGINTERN PyObject *_wrap_GCPsToGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10556               0 :   PyObject *resultobj = 0;
   10557                 :   int arg1 ;
   10558               0 :   GDAL_GCP *arg2 = (GDAL_GCP *) 0 ;
   10559                 :   double *arg3 ;
   10560               0 :   int arg4 = (int) 1 ;
   10561                 :   GDAL_GCP *tmpGCPList1 ;
   10562                 :   double argout3[6] ;
   10563                 :   int val4 ;
   10564               0 :   int ecode4 = 0 ;
   10565               0 :   PyObject * obj0 = 0 ;
   10566               0 :   PyObject * obj1 = 0 ;
   10567                 :   RETURN_NONE result;
   10568                 :   
   10569                 :   {
   10570                 :     /* %typemap(in,numinputs=0) (double argout3[ANY]) */
   10571               0 :     arg3 = argout3;
   10572                 :   }
   10573               0 :   if (!PyArg_ParseTuple(args,(char *)"O|O:GCPsToGeoTransform",&obj0,&obj1)) SWIG_fail;
   10574                 :   {
   10575                 :     /* %typemap(in,numinputs=1) (int nGCPs, GDAL_GCP const *pGCPs ) */
   10576                 :     /* check if is List */
   10577               0 :     if ( !PySequence_Check(obj0) ) {
   10578               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   10579               0 :       SWIG_fail;
   10580                 :     }
   10581               0 :     arg1 = PySequence_Size(obj0);
   10582               0 :     tmpGCPList1 = (GDAL_GCP*) malloc(arg1*sizeof(GDAL_GCP));
   10583               0 :     arg2 = tmpGCPList1;
   10584               0 :     for( int i = 0; i<arg1; i++ ) {
   10585               0 :       PyObject *o = PySequence_GetItem(obj0,i);
   10586               0 :       GDAL_GCP *item = 0;
   10587               0 :       SWIG_ConvertPtr( o, (void**)&item, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0 );
   10588               0 :       if ( ! item ) {
   10589               0 :         Py_DECREF(o);
   10590                 :         SWIG_fail;
   10591                 :       }
   10592               0 :       memcpy( (void*) tmpGCPList1, (void*) item, sizeof( GDAL_GCP ) );
   10593               0 :       ++tmpGCPList1;
   10594               0 :       Py_DECREF(o);
   10595                 :     }
   10596                 :   }
   10597               0 :   if (obj1) {
   10598               0 :     ecode4 = SWIG_AsVal_int(obj1, &val4);
   10599               0 :     if (!SWIG_IsOK(ecode4)) {
   10600               0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "GCPsToGeoTransform" "', argument " "4"" of type '" "int""'");
   10601                 :     } 
   10602               0 :     arg4 = static_cast< int >(val4);
   10603                 :   }
   10604                 :   {
   10605               0 :     if ( bUseExceptions ) {
   10606               0 :       CPLErrorReset();
   10607                 :     }
   10608               0 :     result = GDALGCPsToGeoTransform(arg1,(GDAL_GCP const *)arg2,arg3,arg4);
   10609               0 :     if ( bUseExceptions ) {
   10610               0 :       CPLErr eclass = CPLGetLastErrorType();
   10611               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10612               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10613                 :       }
   10614                 :     }
   10615                 :   }
   10616                 :   /*%typemap(out) IF_FALSE_RETURN_NONE */
   10617                 :   {
   10618                 :     /* %typemap(argout) (double argout[ANY]) */
   10619               0 :     PyObject *out = CreateTupleFromDoubleArray( arg3, 6 );
   10620               0 :     resultobj = t_output_helper(resultobj,out);
   10621                 :   }
   10622                 :   {
   10623                 :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   10624               0 :     if (arg2) {
   10625               0 :       free( (void*) arg2 );
   10626                 :     }
   10627                 :   }
   10628                 :   {
   10629                 :     /* %typemap(ret) IF_FALSE_RETURN_NONE */
   10630               0 :     if (result == 0 ) {
   10631               0 :       Py_XDECREF( resultobj );
   10632               0 :       resultobj = Py_None;
   10633               0 :       Py_INCREF(resultobj);
   10634                 :     }
   10635               0 :     if (resultobj == 0) {
   10636               0 :       resultobj = Py_None;
   10637               0 :       Py_INCREF(resultobj);
   10638                 :     }
   10639                 :   }
   10640               0 :   return resultobj;
   10641                 : fail:
   10642                 :   {
   10643                 :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   10644               0 :     if (arg2) {
   10645               0 :       free( (void*) arg2 );
   10646                 :     }
   10647                 :   }
   10648               0 :   return NULL;
   10649                 : }
   10650                 : 
   10651                 : 
   10652               1 : SWIGINTERN PyObject *_wrap_delete_AsyncReader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10653               1 :   PyObject *resultobj = 0;
   10654               1 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   10655               1 :   void *argp1 = 0 ;
   10656               1 :   int res1 = 0 ;
   10657               1 :   PyObject * obj0 = 0 ;
   10658                 :   
   10659               1 :   if (!PyArg_ParseTuple(args,(char *)"O:delete_AsyncReader",&obj0)) SWIG_fail;
   10660               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, SWIG_POINTER_DISOWN |  0 );
   10661               1 :   if (!SWIG_IsOK(res1)) {
   10662               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AsyncReader" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   10663                 :   }
   10664               1 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   10665                 :   {
   10666               1 :     if ( bUseExceptions ) {
   10667               0 :       CPLErrorReset();
   10668                 :     }
   10669                 :     delete_GDALAsyncReaderShadow(arg1);
   10670               1 :     if ( bUseExceptions ) {
   10671               0 :       CPLErr eclass = CPLGetLastErrorType();
   10672               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10673               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10674                 :       }
   10675                 :     }
   10676                 :   }
   10677               1 :   resultobj = SWIG_Py_Void();
   10678               1 :   return resultobj;
   10679                 : fail:
   10680               0 :   return NULL;
   10681                 : }
   10682                 : 
   10683                 : 
   10684               1 : SWIGINTERN PyObject *_wrap_AsyncReader_GetNextUpdatedRegion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10685               1 :   PyObject *resultobj = 0;
   10686               1 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   10687                 :   double arg2 ;
   10688               1 :   int *arg3 = (int *) 0 ;
   10689               1 :   int *arg4 = (int *) 0 ;
   10690               1 :   int *arg5 = (int *) 0 ;
   10691               1 :   int *arg6 = (int *) 0 ;
   10692               1 :   void *argp1 = 0 ;
   10693               1 :   int res1 = 0 ;
   10694                 :   double val2 ;
   10695               1 :   int ecode2 = 0 ;
   10696                 :   int temp3 ;
   10697               1 :   int res3 = SWIG_TMPOBJ ;
   10698                 :   int temp4 ;
   10699               1 :   int res4 = SWIG_TMPOBJ ;
   10700                 :   int temp5 ;
   10701               1 :   int res5 = SWIG_TMPOBJ ;
   10702                 :   int temp6 ;
   10703               1 :   int res6 = SWIG_TMPOBJ ;
   10704               1 :   PyObject * obj0 = 0 ;
   10705               1 :   PyObject * obj1 = 0 ;
   10706                 :   GDALAsyncStatusType result;
   10707                 :   
   10708               1 :   arg3 = &temp3;
   10709               1 :   arg4 = &temp4;
   10710               1 :   arg5 = &temp5;
   10711               1 :   arg6 = &temp6;
   10712               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:AsyncReader_GetNextUpdatedRegion",&obj0,&obj1)) SWIG_fail;
   10713               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   10714               1 :   if (!SWIG_IsOK(res1)) {
   10715               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_GetNextUpdatedRegion" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   10716                 :   }
   10717               1 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   10718               1 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   10719               1 :   if (!SWIG_IsOK(ecode2)) {
   10720               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AsyncReader_GetNextUpdatedRegion" "', argument " "2"" of type '" "double""'");
   10721                 :   } 
   10722               1 :   arg2 = static_cast< double >(val2);
   10723                 :   {
   10724               1 :     if ( bUseExceptions ) {
   10725               0 :       CPLErrorReset();
   10726                 :     }
   10727               1 :     result = (GDALAsyncStatusType)GDALAsyncReaderShadow_GetNextUpdatedRegion(arg1,arg2,arg3,arg4,arg5,arg6);
   10728               1 :     if ( bUseExceptions ) {
   10729               0 :       CPLErr eclass = CPLGetLastErrorType();
   10730               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10731               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10732                 :       }
   10733                 :     }
   10734                 :   }
   10735               2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10736               2 :   if (SWIG_IsTmpObj(res3)) {
   10737               2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3)));
   10738                 :   } else {
   10739               0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   10740               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags));
   10741                 :   }
   10742               2 :   if (SWIG_IsTmpObj(res4)) {
   10743               2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4)));
   10744                 :   } else {
   10745               0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   10746               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags));
   10747                 :   }
   10748               2 :   if (SWIG_IsTmpObj(res5)) {
   10749               2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5)));
   10750                 :   } else {
   10751               0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   10752               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags));
   10753                 :   }
   10754               2 :   if (SWIG_IsTmpObj(res6)) {
   10755               2 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6)));
   10756                 :   } else {
   10757               0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   10758               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags));
   10759                 :   }
   10760               1 :   return resultobj;
   10761                 : fail:
   10762               0 :   return NULL;
   10763                 : }
   10764                 : 
   10765                 : 
   10766               1 : SWIGINTERN PyObject *_wrap_AsyncReader_GetBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10767               1 :   PyObject *resultobj = 0;
   10768               1 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   10769               1 :   void **arg2 = (void **) 0 ;
   10770               1 :   void *argp1 = 0 ;
   10771               1 :   int res1 = 0 ;
   10772               1 :   void *pyObject2 = NULL ;
   10773               1 :   PyObject * obj0 = 0 ;
   10774                 :   
   10775                 :   {
   10776                 :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject2 = NULL ) */
   10777               1 :     arg2 = &pyObject2;
   10778                 :   }
   10779               1 :   if (!PyArg_ParseTuple(args,(char *)"O:AsyncReader_GetBuffer",&obj0)) SWIG_fail;
   10780               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   10781               1 :   if (!SWIG_IsOK(res1)) {
   10782               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_GetBuffer" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   10783                 :   }
   10784               1 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   10785                 :   {
   10786               1 :     if ( bUseExceptions ) {
   10787               0 :       CPLErrorReset();
   10788                 :     }
   10789                 :     GDALAsyncReaderShadow_GetBuffer(arg1,arg2);
   10790               1 :     if ( bUseExceptions ) {
   10791               0 :       CPLErr eclass = CPLGetLastErrorType();
   10792               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10793               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10794                 :       }
   10795                 :     }
   10796                 :   }
   10797               1 :   resultobj = SWIG_Py_Void();
   10798                 :   {
   10799                 :     /* %typemap(argout) ( void **outPythonObject ) */
   10800               1 :     Py_XDECREF(resultobj);
   10801               1 :     if (*arg2)
   10802                 :     {
   10803               1 :       resultobj = (PyObject*)*arg2;
   10804                 :     }
   10805                 :     else
   10806                 :     {
   10807               0 :       resultobj = Py_None;
   10808               0 :       Py_INCREF(resultobj);
   10809                 :     }
   10810                 :   }
   10811               1 :   return resultobj;
   10812                 : fail:
   10813               0 :   return NULL;
   10814                 : }
   10815                 : 
   10816                 : 
   10817               0 : SWIGINTERN PyObject *_wrap_AsyncReader_LockBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10818               0 :   PyObject *resultobj = 0;
   10819               0 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   10820                 :   double arg2 ;
   10821               0 :   void *argp1 = 0 ;
   10822               0 :   int res1 = 0 ;
   10823                 :   double val2 ;
   10824               0 :   int ecode2 = 0 ;
   10825               0 :   PyObject * obj0 = 0 ;
   10826               0 :   PyObject * obj1 = 0 ;
   10827                 :   int result;
   10828                 :   
   10829               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:AsyncReader_LockBuffer",&obj0,&obj1)) SWIG_fail;
   10830               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   10831               0 :   if (!SWIG_IsOK(res1)) {
   10832               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_LockBuffer" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   10833                 :   }
   10834               0 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   10835               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   10836               0 :   if (!SWIG_IsOK(ecode2)) {
   10837               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AsyncReader_LockBuffer" "', argument " "2"" of type '" "double""'");
   10838                 :   } 
   10839               0 :   arg2 = static_cast< double >(val2);
   10840                 :   {
   10841               0 :     if ( bUseExceptions ) {
   10842               0 :       CPLErrorReset();
   10843                 :     }
   10844               0 :     result = (int)GDALAsyncReaderShadow_LockBuffer(arg1,arg2);
   10845               0 :     if ( bUseExceptions ) {
   10846               0 :       CPLErr eclass = CPLGetLastErrorType();
   10847               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10848               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10849                 :       }
   10850                 :     }
   10851                 :   }
   10852               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10853               0 :   return resultobj;
   10854                 : fail:
   10855               0 :   return NULL;
   10856                 : }
   10857                 : 
   10858                 : 
   10859               0 : SWIGINTERN PyObject *_wrap_AsyncReader_UnlockBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10860               0 :   PyObject *resultobj = 0;
   10861               0 :   GDALAsyncReaderShadow *arg1 = (GDALAsyncReaderShadow *) 0 ;
   10862               0 :   void *argp1 = 0 ;
   10863               0 :   int res1 = 0 ;
   10864               0 :   PyObject * obj0 = 0 ;
   10865                 :   
   10866               0 :   if (!PyArg_ParseTuple(args,(char *)"O:AsyncReader_UnlockBuffer",&obj0)) SWIG_fail;
   10867               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   10868               0 :   if (!SWIG_IsOK(res1)) {
   10869               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsyncReader_UnlockBuffer" "', argument " "1"" of type '" "GDALAsyncReaderShadow *""'"); 
   10870                 :   }
   10871               0 :   arg1 = reinterpret_cast< GDALAsyncReaderShadow * >(argp1);
   10872                 :   {
   10873               0 :     if ( bUseExceptions ) {
   10874               0 :       CPLErrorReset();
   10875                 :     }
   10876                 :     GDALAsyncReaderShadow_UnlockBuffer(arg1);
   10877               0 :     if ( bUseExceptions ) {
   10878               0 :       CPLErr eclass = CPLGetLastErrorType();
   10879               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10880               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10881                 :       }
   10882                 :     }
   10883                 :   }
   10884               0 :   resultobj = SWIG_Py_Void();
   10885               0 :   return resultobj;
   10886                 : fail:
   10887               0 :   return NULL;
   10888                 : }
   10889                 : 
   10890                 : 
   10891               6 : SWIGINTERN PyObject *AsyncReader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10892                 :   PyObject *obj;
   10893               6 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   10894               6 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALAsyncReaderShadow, SWIG_NewClientData(obj));
   10895               6 :   return SWIG_Py_Void();
   10896                 : }
   10897                 : 
   10898            2139 : SWIGINTERN PyObject *_wrap_Dataset_RasterXSize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10899            2139 :   PyObject *resultobj = 0;
   10900            2139 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   10901            2139 :   void *argp1 = 0 ;
   10902            2139 :   int res1 = 0 ;
   10903            2139 :   PyObject * obj0 = 0 ;
   10904                 :   int result;
   10905                 :   
   10906            2139 :   if (!PyArg_ParseTuple(args,(char *)"O:Dataset_RasterXSize_get",&obj0)) SWIG_fail;
   10907            2139 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   10908            2139 :   if (!SWIG_IsOK(res1)) {
   10909               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_RasterXSize_get" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   10910                 :   }
   10911            2139 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   10912                 :   {
   10913            2139 :     if ( bUseExceptions ) {
   10914               0 :       CPLErrorReset();
   10915                 :     }
   10916            2139 :     result = (int)GDALDatasetShadow_RasterXSize_get(arg1);
   10917            2139 :     if ( bUseExceptions ) {
   10918               0 :       CPLErr eclass = CPLGetLastErrorType();
   10919               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10920               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10921                 :       }
   10922                 :     }
   10923                 :   }
   10924            2139 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10925            2139 :   return resultobj;
   10926                 : fail:
   10927               0 :   return NULL;
   10928                 : }
   10929                 : 
   10930                 : 
   10931           10516 : SWIGINTERN PyObject *_wrap_Dataset_RasterYSize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10932           10516 :   PyObject *resultobj = 0;
   10933           10516 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   10934           10516 :   void *argp1 = 0 ;
   10935           10516 :   int res1 = 0 ;
   10936           10516 :   PyObject * obj0 = 0 ;
   10937                 :   int result;
   10938                 :   
   10939           10516 :   if (!PyArg_ParseTuple(args,(char *)"O:Dataset_RasterYSize_get",&obj0)) SWIG_fail;
   10940           10516 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   10941           10516 :   if (!SWIG_IsOK(res1)) {
   10942               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_RasterYSize_get" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   10943                 :   }
   10944           10516 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   10945                 :   {
   10946           10516 :     if ( bUseExceptions ) {
   10947               0 :       CPLErrorReset();
   10948                 :     }
   10949           10516 :     result = (int)GDALDatasetShadow_RasterYSize_get(arg1);
   10950           10516 :     if ( bUseExceptions ) {
   10951               0 :       CPLErr eclass = CPLGetLastErrorType();
   10952               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10953               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10954                 :       }
   10955                 :     }
   10956                 :   }
   10957           10516 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10958           10516 :   return resultobj;
   10959                 : fail:
   10960               0 :   return NULL;
   10961                 : }
   10962                 : 
   10963                 : 
   10964          335614 : SWIGINTERN PyObject *_wrap_Dataset_RasterCount_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10965          335614 :   PyObject *resultobj = 0;
   10966          335614 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   10967          335614 :   void *argp1 = 0 ;
   10968          335614 :   int res1 = 0 ;
   10969          335614 :   PyObject * obj0 = 0 ;
   10970                 :   int result;
   10971                 :   
   10972          335614 :   if (!PyArg_ParseTuple(args,(char *)"O:Dataset_RasterCount_get",&obj0)) SWIG_fail;
   10973          335614 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   10974          335614 :   if (!SWIG_IsOK(res1)) {
   10975               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_RasterCount_get" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   10976                 :   }
   10977          335614 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   10978                 :   {
   10979          335614 :     if ( bUseExceptions ) {
   10980               0 :       CPLErrorReset();
   10981                 :     }
   10982          335614 :     result = (int)GDALDatasetShadow_RasterCount_get(arg1);
   10983          335614 :     if ( bUseExceptions ) {
   10984               0 :       CPLErr eclass = CPLGetLastErrorType();
   10985               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   10986               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   10987                 :       }
   10988                 :     }
   10989                 :   }
   10990          335614 :   resultobj = SWIG_From_int(static_cast< int >(result));
   10991          335614 :   return resultobj;
   10992                 : fail:
   10993               0 :   return NULL;
   10994                 : }
   10995                 : 
   10996                 : 
   10997           16057 : SWIGINTERN PyObject *_wrap_delete_Dataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   10998           16057 :   PyObject *resultobj = 0;
   10999           16057 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11000           16057 :   void *argp1 = 0 ;
   11001           16057 :   int res1 = 0 ;
   11002           16057 :   PyObject * obj0 = 0 ;
   11003                 :   
   11004           16057 :   if (!PyArg_ParseTuple(args,(char *)"O:delete_Dataset",&obj0)) SWIG_fail;
   11005           16057 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_DISOWN |  0 );
   11006           16057 :   if (!SWIG_IsOK(res1)) {
   11007               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Dataset" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11008                 :   }
   11009           16057 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11010                 :   {
   11011           16057 :     if ( bUseExceptions ) {
   11012               0 :       CPLErrorReset();
   11013                 :     }
   11014                 :     delete_GDALDatasetShadow(arg1);
   11015           16057 :     if ( bUseExceptions ) {
   11016               0 :       CPLErr eclass = CPLGetLastErrorType();
   11017               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11018               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11019                 :       }
   11020                 :     }
   11021                 :   }
   11022           16057 :   resultobj = SWIG_Py_Void();
   11023           16057 :   return resultobj;
   11024                 : fail:
   11025               0 :   return NULL;
   11026                 : }
   11027                 : 
   11028                 : 
   11029             532 : SWIGINTERN PyObject *_wrap_Dataset_GetDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11030             532 :   PyObject *resultobj = 0;
   11031             532 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11032             532 :   void *argp1 = 0 ;
   11033             532 :   int res1 = 0 ;
   11034             532 :   PyObject * obj0 = 0 ;
   11035             532 :   GDALDriverShadow *result = 0 ;
   11036                 :   
   11037             532 :   if (!PyArg_ParseTuple(args,(char *)"O:Dataset_GetDriver",&obj0)) SWIG_fail;
   11038             532 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11039             532 :   if (!SWIG_IsOK(res1)) {
   11040               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetDriver" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11041                 :   }
   11042             532 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11043                 :   {
   11044             532 :     if ( bUseExceptions ) {
   11045               0 :       CPLErrorReset();
   11046                 :     }
   11047             532 :     result = (GDALDriverShadow *)GDALDatasetShadow_GetDriver(arg1);
   11048             532 :     if ( bUseExceptions ) {
   11049               0 :       CPLErr eclass = CPLGetLastErrorType();
   11050               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11051               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11052                 :       }
   11053                 :     }
   11054                 :   }
   11055             532 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   11056             532 :   return resultobj;
   11057                 : fail:
   11058               0 :   return NULL;
   11059                 : }
   11060                 : 
   11061                 : 
   11062          173954 : SWIGINTERN PyObject *_wrap_Dataset_GetRasterBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11063          173954 :   PyObject *resultobj = 0;
   11064          173954 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11065                 :   int arg2 ;
   11066          173954 :   void *argp1 = 0 ;
   11067          173954 :   int res1 = 0 ;
   11068                 :   int val2 ;
   11069          173954 :   int ecode2 = 0 ;
   11070          173954 :   PyObject * obj0 = 0 ;
   11071          173954 :   PyObject * obj1 = 0 ;
   11072          173954 :   GDALRasterBandShadow *result = 0 ;
   11073                 :   
   11074          173954 :   if (!PyArg_ParseTuple(args,(char *)"OO:Dataset_GetRasterBand",&obj0,&obj1)) SWIG_fail;
   11075          173954 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11076          173954 :   if (!SWIG_IsOK(res1)) {
   11077               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetRasterBand" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11078                 :   }
   11079          173954 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11080          173954 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   11081          173954 :   if (!SWIG_IsOK(ecode2)) {
   11082               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_GetRasterBand" "', argument " "2"" of type '" "int""'");
   11083                 :   } 
   11084          173954 :   arg2 = static_cast< int >(val2);
   11085                 :   {
   11086          173954 :     if ( bUseExceptions ) {
   11087               0 :       CPLErrorReset();
   11088                 :     }
   11089          173954 :     result = (GDALRasterBandShadow *)GDALDatasetShadow_GetRasterBand(arg1,arg2);
   11090          173954 :     if ( bUseExceptions ) {
   11091               0 :       CPLErr eclass = CPLGetLastErrorType();
   11092               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11093               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11094                 :       }
   11095                 :     }
   11096                 :   }
   11097          173954 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   11098          173954 :   return resultobj;
   11099                 : fail:
   11100               0 :   return NULL;
   11101                 : }
   11102                 : 
   11103                 : 
   11104             374 : SWIGINTERN PyObject *_wrap_Dataset_GetProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11105             374 :   PyObject *resultobj = 0;
   11106             374 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11107             374 :   void *argp1 = 0 ;
   11108             374 :   int res1 = 0 ;
   11109             374 :   PyObject * obj0 = 0 ;
   11110             374 :   char *result = 0 ;
   11111                 :   
   11112             374 :   if (!PyArg_ParseTuple(args,(char *)"O:Dataset_GetProjection",&obj0)) SWIG_fail;
   11113             374 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11114             374 :   if (!SWIG_IsOK(res1)) {
   11115               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetProjection" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11116                 :   }
   11117             374 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11118                 :   {
   11119             374 :     if ( bUseExceptions ) {
   11120               0 :       CPLErrorReset();
   11121                 :     }
   11122             374 :     result = (char *)GDALDatasetShadow_GetProjection(arg1);
   11123             374 :     if ( bUseExceptions ) {
   11124               0 :       CPLErr eclass = CPLGetLastErrorType();
   11125               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11126               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11127                 :       }
   11128                 :     }
   11129                 :   }
   11130             374 :   resultobj = SWIG_FromCharPtr((const char *)result);
   11131             374 :   return resultobj;
   11132                 : fail:
   11133               0 :   return NULL;
   11134                 : }
   11135                 : 
   11136                 : 
   11137             178 : SWIGINTERN PyObject *_wrap_Dataset_GetProjectionRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11138             178 :   PyObject *resultobj = 0;
   11139             178 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11140             178 :   void *argp1 = 0 ;
   11141             178 :   int res1 = 0 ;
   11142             178 :   PyObject * obj0 = 0 ;
   11143             178 :   char *result = 0 ;
   11144                 :   
   11145             178 :   if (!PyArg_ParseTuple(args,(char *)"O:Dataset_GetProjectionRef",&obj0)) SWIG_fail;
   11146             178 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11147             178 :   if (!SWIG_IsOK(res1)) {
   11148               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetProjectionRef" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11149                 :   }
   11150             178 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11151                 :   {
   11152             178 :     if ( bUseExceptions ) {
   11153               0 :       CPLErrorReset();
   11154                 :     }
   11155             178 :     result = (char *)GDALDatasetShadow_GetProjectionRef(arg1);
   11156             178 :     if ( bUseExceptions ) {
   11157               0 :       CPLErr eclass = CPLGetLastErrorType();
   11158               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11159               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11160                 :       }
   11161                 :     }
   11162                 :   }
   11163             178 :   resultobj = SWIG_FromCharPtr((const char *)result);
   11164             178 :   return resultobj;
   11165                 : fail:
   11166               0 :   return NULL;
   11167                 : }
   11168                 : 
   11169                 : 
   11170             906 : SWIGINTERN PyObject *_wrap_Dataset_SetProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11171             906 :   PyObject *resultobj = 0;
   11172             906 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11173             906 :   char *arg2 = (char *) 0 ;
   11174             906 :   void *argp1 = 0 ;
   11175             906 :   int res1 = 0 ;
   11176                 :   int res2 ;
   11177             906 :   char *buf2 = 0 ;
   11178             906 :   int alloc2 = 0 ;
   11179             906 :   PyObject * obj0 = 0 ;
   11180             906 :   PyObject * obj1 = 0 ;
   11181                 :   CPLErr result;
   11182                 :   
   11183             906 :   if (!PyArg_ParseTuple(args,(char *)"OO:Dataset_SetProjection",&obj0,&obj1)) SWIG_fail;
   11184             906 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11185             906 :   if (!SWIG_IsOK(res1)) {
   11186               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_SetProjection" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11187                 :   }
   11188             906 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11189             906 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   11190             906 :   if (!SWIG_IsOK(res2)) {
   11191               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_SetProjection" "', argument " "2"" of type '" "char const *""'");
   11192                 :   }
   11193             906 :   arg2 = reinterpret_cast< char * >(buf2);
   11194                 :   {
   11195             906 :     if (!arg2) {
   11196               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   11197                 :     }
   11198                 :   }
   11199                 :   {
   11200             906 :     if ( bUseExceptions ) {
   11201               0 :       CPLErrorReset();
   11202                 :     }
   11203             906 :     result = (CPLErr)GDALDatasetShadow_SetProjection(arg1,(char const *)arg2);
   11204             906 :     if ( bUseExceptions ) {
   11205               0 :       CPLErr eclass = CPLGetLastErrorType();
   11206               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11207               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11208                 :       }
   11209                 :     }
   11210                 :   }
   11211            1812 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11212             906 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11213                 :   {
   11214                 :     /* %typemap(ret) CPLErr */
   11215             906 :     if ( bUseExceptions == 0 ) {
   11216                 :       /* We're not using exceptions.  And no error has occurred */
   11217             906 :       if ( resultobj == 0 ) {
   11218                 :         /* No other return values set so return ErrorCode */
   11219               0 :         resultobj = PyInt_FromLong(result);
   11220                 :       }
   11221                 :     }
   11222                 :   }
   11223             906 :   return resultobj;
   11224                 : fail:
   11225               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11226               0 :   return NULL;
   11227                 : }
   11228                 : 
   11229                 : 
   11230            1070 : SWIGINTERN PyObject *_wrap_Dataset_GetGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   11231            1070 :   PyObject *resultobj = 0;
   11232            1070 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11233                 :   double *arg2 ;
   11234            1070 :   int *arg3 = (int *) 0 ;
   11235            1070 :   int *arg4 = (int *) 0 ;
   11236            1070 :   void *argp1 = 0 ;
   11237            1070 :   int res1 = 0 ;
   11238                 :   double argout2[6] ;
   11239                 :   int isvalid2 ;
   11240                 :   int val4 ;
   11241            1070 :   PyObject * obj0 = 0 ;
   11242            1070 :   PyObject * obj1 = 0 ;
   11243                 :   char *  kwnames[] = {
   11244                 :     (char *) "self",(char *) "can_return_null", NULL 
   11245            1070 :   };
   11246                 :   
   11247                 :   {
   11248                 :     /* %typemap(in,numinputs=0) (double argout2[6], int* isvalid2) */
   11249            1070 :     arg2 = argout2;
   11250            1070 :     arg3 = &isvalid2;
   11251                 :   }
   11252            1070 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Dataset_GetGeoTransform",kwnames,&obj0,&obj1)) SWIG_fail;
   11253            1070 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11254            1070 :   if (!SWIG_IsOK(res1)) {
   11255               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGeoTransform" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11256                 :   }
   11257            1070 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11258            1070 :   if (obj1) {
   11259                 :     {
   11260                 :       /* %typemap(in) (int *optional_##int) */
   11261             102 :       if ( obj1 == Py_None ) {
   11262               0 :         arg4 = 0;
   11263                 :       }
   11264             102 :       else if ( PyArg_Parse( obj1,"i" ,&val4 ) ) {
   11265             102 :         arg4 = (int *) &val4;
   11266                 :       }
   11267                 :       else {
   11268               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   11269               0 :         SWIG_fail;
   11270                 :       }
   11271                 :     }
   11272                 :   }
   11273                 :   {
   11274            1070 :     if ( bUseExceptions ) {
   11275               0 :       CPLErrorReset();
   11276                 :     }
   11277                 :     GDALDatasetShadow_GetGeoTransform(arg1,arg2,arg3,arg4);
   11278            1070 :     if ( bUseExceptions ) {
   11279               0 :       CPLErr eclass = CPLGetLastErrorType();
   11280               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11281               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11282                 :       }
   11283                 :     }
   11284                 :   }
   11285            1070 :   resultobj = SWIG_Py_Void();
   11286                 :   {
   11287                 :     /* %typemap(argout) (double argout[6], int* isvalid)  */
   11288                 :     PyObject *r;
   11289            1070 :     if ( !*arg3 ) {
   11290              24 :       Py_INCREF(Py_None);
   11291              24 :       r = Py_None;
   11292                 :     }
   11293                 :     else {
   11294            1046 :       r = CreateTupleFromDoubleArray(arg2, 6);
   11295                 :     }
   11296            1070 :     resultobj = t_output_helper(resultobj,r);
   11297                 :   }
   11298            1070 :   return resultobj;
   11299                 : fail:
   11300               0 :   return NULL;
   11301                 : }
   11302                 : 
   11303                 : 
   11304             891 : SWIGINTERN PyObject *_wrap_Dataset_SetGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11305             891 :   PyObject *resultobj = 0;
   11306             891 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11307                 :   double *arg2 ;
   11308             891 :   void *argp1 = 0 ;
   11309             891 :   int res1 = 0 ;
   11310                 :   double argin2[6] ;
   11311             891 :   PyObject * obj0 = 0 ;
   11312             891 :   PyObject * obj1 = 0 ;
   11313                 :   CPLErr result;
   11314                 :   
   11315             891 :   if (!PyArg_ParseTuple(args,(char *)"OO:Dataset_SetGeoTransform",&obj0,&obj1)) SWIG_fail;
   11316             891 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11317             891 :   if (!SWIG_IsOK(res1)) {
   11318               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_SetGeoTransform" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11319                 :   }
   11320             891 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11321                 :   {
   11322                 :     /* %typemap(in) (double argin2[ANY]) */
   11323             891 :     arg2 = argin2;
   11324             891 :     if (! PySequence_Check(obj1) ) {
   11325               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   11326               0 :       SWIG_fail;
   11327                 :     }
   11328             891 :     int seq_size = PySequence_Size(obj1);
   11329             891 :     if ( seq_size != 6 ) {
   11330               0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   11331               0 :       SWIG_fail;
   11332                 :     }
   11333            6237 :     for (unsigned int i=0; i<6; i++) {
   11334            5346 :       PyObject *o = PySequence_GetItem(obj1,i);
   11335                 :       double val;
   11336            5346 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   11337               0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   11338               0 :         Py_DECREF(o);
   11339                 :         SWIG_fail;
   11340                 :       }
   11341            5346 :       arg2[i] =  val;
   11342            5346 :       Py_DECREF(o);
   11343                 :     }
   11344                 :   }
   11345                 :   {
   11346             891 :     if ( bUseExceptions ) {
   11347               0 :       CPLErrorReset();
   11348                 :     }
   11349             891 :     result = (CPLErr)GDALDatasetShadow_SetGeoTransform(arg1,arg2);
   11350             891 :     if ( bUseExceptions ) {
   11351               0 :       CPLErr eclass = CPLGetLastErrorType();
   11352               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11353               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11354                 :       }
   11355                 :     }
   11356                 :   }
   11357            1782 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11358                 :   {
   11359                 :     /* %typemap(ret) CPLErr */
   11360             891 :     if ( bUseExceptions == 0 ) {
   11361                 :       /* We're not using exceptions.  And no error has occurred */
   11362             891 :       if ( resultobj == 0 ) {
   11363                 :         /* No other return values set so return ErrorCode */
   11364               0 :         resultobj = PyInt_FromLong(result);
   11365                 :       }
   11366                 :     }
   11367                 :   }
   11368             891 :   return resultobj;
   11369                 : fail:
   11370               0 :   return NULL;
   11371                 : }
   11372                 : 
   11373                 : 
   11374             167 : SWIGINTERN PyObject *_wrap_Dataset_BuildOverviews(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   11375             167 :   PyObject *resultobj = 0;
   11376             167 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11377             167 :   char *arg2 = (char *) "NEAREST" ;
   11378             167 :   int arg3 = (int) 0 ;
   11379             167 :   int *arg4 = (int *) 0 ;
   11380             167 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   11381             167 :   void *arg6 = (void *) NULL ;
   11382             167 :   void *argp1 = 0 ;
   11383             167 :   int res1 = 0 ;
   11384                 :   int res2 ;
   11385             167 :   char *buf2 = 0 ;
   11386             167 :   int alloc2 = 0 ;
   11387             167 :   PyObject * obj0 = 0 ;
   11388             167 :   PyObject * obj1 = 0 ;
   11389             167 :   PyObject * obj2 = 0 ;
   11390             167 :   PyObject * obj3 = 0 ;
   11391             167 :   PyObject * obj4 = 0 ;
   11392                 :   char *  kwnames[] = {
   11393                 :     (char *) "self",(char *) "resampling",(char *) "overviewlist",(char *) "callback",(char *) "callback_data", NULL 
   11394             167 :   };
   11395                 :   int result;
   11396                 :   
   11397                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   11398                 :   PyProgressData *psProgressInfo;
   11399             167 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   11400             167 :   psProgressInfo->nLastReported = -1;
   11401             167 :   psProgressInfo->psPyCallback = NULL;
   11402             167 :   psProgressInfo->psPyCallbackData = NULL;
   11403             167 :   arg6 = psProgressInfo;
   11404             167 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOO:Dataset_BuildOverviews",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   11405             167 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11406             167 :   if (!SWIG_IsOK(res1)) {
   11407               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_BuildOverviews" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11408                 :   }
   11409             167 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11410             167 :   if (obj1) {
   11411             134 :     res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   11412             134 :     if (!SWIG_IsOK(res2)) {
   11413               0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_BuildOverviews" "', argument " "2"" of type '" "char const *""'");
   11414                 :     }
   11415             134 :     arg2 = reinterpret_cast< char * >(buf2);
   11416                 :   }
   11417             167 :   if (obj2) {
   11418                 :     {
   11419                 :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   11420                 :       /* check if is List */
   11421             167 :       if ( !PySequence_Check(obj2) ) {
   11422               0 :         PyErr_SetString(PyExc_TypeError, "not a sequence");
   11423               0 :         SWIG_fail;
   11424                 :       }
   11425             167 :       arg3 = PySequence_Size(obj2);
   11426             167 :       arg4 = (int*) malloc(arg3*sizeof(int));
   11427             393 :       for( int i = 0; i<arg3; i++ ) {
   11428             226 :         PyObject *o = PySequence_GetItem(obj2,i);
   11429             226 :         if ( !PyArg_Parse(o,"i",&arg4[i]) ) {
   11430               0 :           PyErr_SetString(PyExc_TypeError, "not an integer");
   11431               0 :           Py_DECREF(o);
   11432                 :           SWIG_fail;
   11433                 :         }
   11434             226 :         Py_DECREF(o);
   11435                 :       }
   11436                 :     }
   11437                 :   }
   11438             167 :   if (obj3) {
   11439                 :     {
   11440                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   11441                 :       /* callback_func typemap */
   11442               0 :       if (obj3 && obj3 != Py_None ) {
   11443               0 :         void* cbfunction = NULL;
   11444                 :         SWIG_ConvertPtr( obj3, 
   11445                 :           (void**)&cbfunction, 
   11446                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int, 
   11447               0 :           SWIG_POINTER_EXCEPTION | 0 );
   11448                 :         
   11449               0 :         if ( cbfunction == GDALTermProgress ) {
   11450               0 :           arg5 = GDALTermProgress;
   11451                 :         } else {
   11452               0 :           if (!PyCallable_Check(obj3)) {
   11453                 :             PyErr_SetString( PyExc_RuntimeError, 
   11454               0 :               "Object given is not a Python function" );
   11455               0 :             SWIG_fail;
   11456                 :           }
   11457               0 :           psProgressInfo->psPyCallback = obj3;
   11458               0 :           arg5 = PyProgressProxy;
   11459                 :         }
   11460                 :         
   11461                 :       }
   11462                 :       
   11463                 :     }
   11464                 :   }
   11465             167 :   if (obj4) {
   11466                 :     {
   11467                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   11468               0 :       psProgressInfo->psPyCallbackData = obj4 ;
   11469                 :     }
   11470                 :   }
   11471                 :   {
   11472             167 :     if ( bUseExceptions ) {
   11473               0 :       CPLErrorReset();
   11474                 :     }
   11475             167 :     result = (int)GDALDatasetShadow_BuildOverviews(arg1,(char const *)arg2,arg3,arg4,arg5,arg6);
   11476             167 :     if ( bUseExceptions ) {
   11477               0 :       CPLErr eclass = CPLGetLastErrorType();
   11478               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11479               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11480                 :       }
   11481                 :     }
   11482                 :   }
   11483             167 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11484             167 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11485                 :   {
   11486                 :     /* %typemap(freearg) (int nList, int* pList) */
   11487             167 :     if (arg4) {
   11488             167 :       free((void*) arg4);
   11489                 :     }
   11490                 :   }
   11491                 :   {
   11492                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   11493                 :     
   11494             167 :     CPLFree(psProgressInfo);
   11495                 :     
   11496                 :   }
   11497             167 :   return resultobj;
   11498                 : fail:
   11499               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   11500                 :   {
   11501                 :     /* %typemap(freearg) (int nList, int* pList) */
   11502               0 :     if (arg4) {
   11503               0 :       free((void*) arg4);
   11504                 :     }
   11505                 :   }
   11506                 :   {
   11507                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   11508                 :     
   11509               0 :     CPLFree(psProgressInfo);
   11510                 :     
   11511                 :   }
   11512               0 :   return NULL;
   11513                 : }
   11514                 : 
   11515                 : 
   11516              27 : SWIGINTERN PyObject *_wrap_Dataset_GetGCPCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11517              27 :   PyObject *resultobj = 0;
   11518              27 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11519              27 :   void *argp1 = 0 ;
   11520              27 :   int res1 = 0 ;
   11521              27 :   PyObject * obj0 = 0 ;
   11522                 :   int result;
   11523                 :   
   11524              27 :   if (!PyArg_ParseTuple(args,(char *)"O:Dataset_GetGCPCount",&obj0)) SWIG_fail;
   11525              27 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11526              27 :   if (!SWIG_IsOK(res1)) {
   11527               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGCPCount" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11528                 :   }
   11529              27 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11530                 :   {
   11531              27 :     if ( bUseExceptions ) {
   11532               0 :       CPLErrorReset();
   11533                 :     }
   11534              27 :     result = (int)GDALDatasetShadow_GetGCPCount(arg1);
   11535              27 :     if ( bUseExceptions ) {
   11536               0 :       CPLErr eclass = CPLGetLastErrorType();
   11537               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11538               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11539                 :       }
   11540                 :     }
   11541                 :   }
   11542              27 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11543              27 :   return resultobj;
   11544                 : fail:
   11545               0 :   return NULL;
   11546                 : }
   11547                 : 
   11548                 : 
   11549              21 : SWIGINTERN PyObject *_wrap_Dataset_GetGCPProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11550              21 :   PyObject *resultobj = 0;
   11551              21 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11552              21 :   void *argp1 = 0 ;
   11553              21 :   int res1 = 0 ;
   11554              21 :   PyObject * obj0 = 0 ;
   11555              21 :   char *result = 0 ;
   11556                 :   
   11557              21 :   if (!PyArg_ParseTuple(args,(char *)"O:Dataset_GetGCPProjection",&obj0)) SWIG_fail;
   11558              21 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11559              21 :   if (!SWIG_IsOK(res1)) {
   11560               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGCPProjection" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11561                 :   }
   11562              21 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11563                 :   {
   11564              21 :     if ( bUseExceptions ) {
   11565               0 :       CPLErrorReset();
   11566                 :     }
   11567              21 :     result = (char *)GDALDatasetShadow_GetGCPProjection(arg1);
   11568              21 :     if ( bUseExceptions ) {
   11569               0 :       CPLErr eclass = CPLGetLastErrorType();
   11570               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11571               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11572                 :       }
   11573                 :     }
   11574                 :   }
   11575              21 :   resultobj = SWIG_FromCharPtr((const char *)result);
   11576              21 :   return resultobj;
   11577                 : fail:
   11578               0 :   return NULL;
   11579                 : }
   11580                 : 
   11581                 : 
   11582              42 : SWIGINTERN PyObject *_wrap_Dataset_GetGCPs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11583              42 :   PyObject *resultobj = 0;
   11584              42 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11585              42 :   int *arg2 = (int *) 0 ;
   11586              42 :   GDAL_GCP **arg3 = (GDAL_GCP **) 0 ;
   11587              42 :   void *argp1 = 0 ;
   11588              42 :   int res1 = 0 ;
   11589              42 :   int nGCPs2 = 0 ;
   11590              42 :   GDAL_GCP *pGCPs2 = 0 ;
   11591              42 :   PyObject * obj0 = 0 ;
   11592                 :   
   11593                 :   {
   11594                 :     /* %typemap(in,numinputs=0) (int *nGCPs2, GDAL_GCP const **pGCPs2 ) */
   11595              42 :     arg2 = &nGCPs2;
   11596              42 :     arg3 = &pGCPs2;
   11597                 :   }
   11598              42 :   if (!PyArg_ParseTuple(args,(char *)"O:Dataset_GetGCPs",&obj0)) SWIG_fail;
   11599              42 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11600              42 :   if (!SWIG_IsOK(res1)) {
   11601               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetGCPs" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11602                 :   }
   11603              42 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11604                 :   {
   11605              42 :     if ( bUseExceptions ) {
   11606               0 :       CPLErrorReset();
   11607                 :     }
   11608                 :     GDALDatasetShadow_GetGCPs(arg1,arg2,(GDAL_GCP const **)arg3);
   11609              42 :     if ( bUseExceptions ) {
   11610               0 :       CPLErr eclass = CPLGetLastErrorType();
   11611               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11612               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11613                 :       }
   11614                 :     }
   11615                 :   }
   11616              42 :   resultobj = SWIG_Py_Void();
   11617                 :   {
   11618                 :     /* %typemap(argout) (int *nGCPs, GDAL_GCP const **pGCPs ) */
   11619              42 :     PyObject *dict = PyTuple_New( *arg2 );
   11620            5587 :     for( int i = 0; i < *arg2; i++ ) {
   11621            5545 :       GDAL_GCP *o = new_GDAL_GCP( (*arg3)[i].dfGCPX,
   11622            5545 :         (*arg3)[i].dfGCPY,
   11623            5545 :         (*arg3)[i].dfGCPZ,
   11624            5545 :         (*arg3)[i].dfGCPPixel,
   11625            5545 :         (*arg3)[i].dfGCPLine,
   11626            5545 :         (*arg3)[i].pszInfo,
   11627           38815 :         (*arg3)[i].pszId );
   11628                 :       
   11629                 :       PyTuple_SetItem(dict, i, 
   11630            5545 :         SWIG_NewPointerObj((void*)o,SWIGTYPE_p_GDAL_GCP,1) );
   11631                 :     }
   11632              42 :     Py_DECREF(resultobj);
   11633              42 :     resultobj = dict;
   11634                 :   }
   11635              42 :   return resultobj;
   11636                 : fail:
   11637               0 :   return NULL;
   11638                 : }
   11639                 : 
   11640                 : 
   11641               6 : SWIGINTERN PyObject *_wrap_Dataset_SetGCPs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11642               6 :   PyObject *resultobj = 0;
   11643               6 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11644                 :   int arg2 ;
   11645               6 :   GDAL_GCP *arg3 = (GDAL_GCP *) 0 ;
   11646               6 :   char *arg4 = (char *) 0 ;
   11647               6 :   void *argp1 = 0 ;
   11648               6 :   int res1 = 0 ;
   11649                 :   GDAL_GCP *tmpGCPList2 ;
   11650                 :   int res4 ;
   11651               6 :   char *buf4 = 0 ;
   11652               6 :   int alloc4 = 0 ;
   11653               6 :   PyObject * obj0 = 0 ;
   11654               6 :   PyObject * obj1 = 0 ;
   11655               6 :   PyObject * obj2 = 0 ;
   11656                 :   CPLErr result;
   11657                 :   
   11658               6 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Dataset_SetGCPs",&obj0,&obj1,&obj2)) SWIG_fail;
   11659               6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11660               6 :   if (!SWIG_IsOK(res1)) {
   11661               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_SetGCPs" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11662                 :   }
   11663               6 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11664                 :   {
   11665                 :     /* %typemap(in,numinputs=1) (int nGCPs, GDAL_GCP const *pGCPs ) */
   11666                 :     /* check if is List */
   11667               6 :     if ( !PySequence_Check(obj1) ) {
   11668               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   11669               0 :       SWIG_fail;
   11670                 :     }
   11671               6 :     arg2 = PySequence_Size(obj1);
   11672               6 :     tmpGCPList2 = (GDAL_GCP*) malloc(arg2*sizeof(GDAL_GCP));
   11673               6 :     arg3 = tmpGCPList2;
   11674              34 :     for( int i = 0; i<arg2; i++ ) {
   11675              28 :       PyObject *o = PySequence_GetItem(obj1,i);
   11676              28 :       GDAL_GCP *item = 0;
   11677              28 :       SWIG_ConvertPtr( o, (void**)&item, SWIGTYPE_p_GDAL_GCP, SWIG_POINTER_EXCEPTION | 0 );
   11678              28 :       if ( ! item ) {
   11679               0 :         Py_DECREF(o);
   11680                 :         SWIG_fail;
   11681                 :       }
   11682              28 :       memcpy( (void*) tmpGCPList2, (void*) item, sizeof( GDAL_GCP ) );
   11683              28 :       ++tmpGCPList2;
   11684              28 :       Py_DECREF(o);
   11685                 :     }
   11686                 :   }
   11687               6 :   res4 = SWIG_AsCharPtrAndSize(obj2, &buf4, NULL, &alloc4);
   11688               6 :   if (!SWIG_IsOK(res4)) {
   11689               0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Dataset_SetGCPs" "', argument " "4"" of type '" "char const *""'");
   11690                 :   }
   11691               6 :   arg4 = reinterpret_cast< char * >(buf4);
   11692                 :   {
   11693               6 :     if ( bUseExceptions ) {
   11694               0 :       CPLErrorReset();
   11695                 :     }
   11696               6 :     result = (CPLErr)GDALDatasetShadow_SetGCPs(arg1,arg2,(GDAL_GCP const *)arg3,(char const *)arg4);
   11697               6 :     if ( bUseExceptions ) {
   11698               0 :       CPLErr eclass = CPLGetLastErrorType();
   11699               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11700               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11701                 :       }
   11702                 :     }
   11703                 :   }
   11704              12 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11705                 :   {
   11706                 :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   11707               6 :     if (arg3) {
   11708               6 :       free( (void*) arg3 );
   11709                 :     }
   11710                 :   }
   11711               6 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   11712                 :   {
   11713                 :     /* %typemap(ret) CPLErr */
   11714               6 :     if ( bUseExceptions == 0 ) {
   11715                 :       /* We're not using exceptions.  And no error has occurred */
   11716               6 :       if ( resultobj == 0 ) {
   11717                 :         /* No other return values set so return ErrorCode */
   11718               0 :         resultobj = PyInt_FromLong(result);
   11719                 :       }
   11720                 :     }
   11721                 :   }
   11722               6 :   return resultobj;
   11723                 : fail:
   11724                 :   {
   11725                 :     /* %typemap(freearg) (int nGCPs, GDAL_GCP const *pGCPs ) */
   11726               0 :     if (arg3) {
   11727               0 :       free( (void*) arg3 );
   11728                 :     }
   11729                 :   }
   11730               0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   11731               0 :   return NULL;
   11732                 : }
   11733                 : 
   11734                 : 
   11735              14 : SWIGINTERN PyObject *_wrap_Dataset_FlushCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11736              14 :   PyObject *resultobj = 0;
   11737              14 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11738              14 :   void *argp1 = 0 ;
   11739              14 :   int res1 = 0 ;
   11740              14 :   PyObject * obj0 = 0 ;
   11741                 :   
   11742              14 :   if (!PyArg_ParseTuple(args,(char *)"O:Dataset_FlushCache",&obj0)) SWIG_fail;
   11743              14 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11744              14 :   if (!SWIG_IsOK(res1)) {
   11745               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_FlushCache" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11746                 :   }
   11747              14 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11748                 :   {
   11749              14 :     if ( bUseExceptions ) {
   11750               0 :       CPLErrorReset();
   11751                 :     }
   11752                 :     GDALDatasetShadow_FlushCache(arg1);
   11753              14 :     if ( bUseExceptions ) {
   11754               0 :       CPLErr eclass = CPLGetLastErrorType();
   11755               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11756               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11757                 :       }
   11758                 :     }
   11759                 :   }
   11760              14 :   resultobj = SWIG_Py_Void();
   11761              14 :   return resultobj;
   11762                 : fail:
   11763               0 :   return NULL;
   11764                 : }
   11765                 : 
   11766                 : 
   11767               6 : SWIGINTERN PyObject *_wrap_Dataset_AddBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   11768               6 :   PyObject *resultobj = 0;
   11769               6 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11770               6 :   GDALDataType arg2 = (GDALDataType) GDT_Byte ;
   11771               6 :   char **arg3 = (char **) 0 ;
   11772               6 :   void *argp1 = 0 ;
   11773               6 :   int res1 = 0 ;
   11774                 :   int val2 ;
   11775               6 :   int ecode2 = 0 ;
   11776               6 :   PyObject * obj0 = 0 ;
   11777               6 :   PyObject * obj1 = 0 ;
   11778               6 :   PyObject * obj2 = 0 ;
   11779                 :   char *  kwnames[] = {
   11780                 :     (char *) "self",(char *) "datatype",(char *) "options", NULL 
   11781               6 :   };
   11782                 :   CPLErr result;
   11783                 :   
   11784               6 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:Dataset_AddBand",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
   11785               6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11786               6 :   if (!SWIG_IsOK(res1)) {
   11787               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_AddBand" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11788                 :   }
   11789               6 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11790               6 :   if (obj1) {
   11791               6 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   11792               6 :     if (!SWIG_IsOK(ecode2)) {
   11793               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_AddBand" "', argument " "2"" of type '" "GDALDataType""'");
   11794                 :     } 
   11795               6 :     arg2 = static_cast< GDALDataType >(val2);
   11796                 :   }
   11797               6 :   if (obj2) {
   11798                 :     {
   11799                 :       /* %typemap(in) char **options */
   11800                 :       /* Check if is a list */
   11801               6 :       if ( ! PySequence_Check(obj2)) {
   11802               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
   11803               0 :         SWIG_fail;
   11804                 :       }
   11805                 :       
   11806               6 :       int size = PySequence_Size(obj2);
   11807              24 :       for (int i = 0; i < size; i++) {
   11808              18 :         PyObject* pyObj = PySequence_GetItem(obj2,i);
   11809              18 :         if (PyUnicode_Check(pyObj))
   11810                 :         {
   11811                 :           char *pszStr;
   11812                 :           Py_ssize_t nLen;
   11813               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   11814                 : #if PY_VERSION_HEX >= 0x03000000
   11815                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   11816                 : #else
   11817               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   11818                 : #endif
   11819               0 :           arg3 = CSLAddString( arg3, pszStr );
   11820               0 :           Py_XDECREF(pyUTF8Str);
   11821                 :         }
   11822                 : #if PY_VERSION_HEX >= 0x03000000
   11823                 :         else if (PyBytes_Check(pyObj))
   11824                 :         arg3 = CSLAddString( arg3, PyBytes_AsString(pyObj) );
   11825                 : #else
   11826              18 :         else if (PyString_Check(pyObj))
   11827              18 :         arg3 = CSLAddString( arg3, PyString_AsString(pyObj) );
   11828                 : #endif
   11829                 :         else
   11830                 :         {
   11831               0 :           Py_DECREF(pyObj);
   11832               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   11833               0 :           SWIG_fail;
   11834                 :         }
   11835              18 :         Py_DECREF(pyObj);
   11836                 :       }
   11837                 :     }
   11838                 :   }
   11839                 :   {
   11840               6 :     if ( bUseExceptions ) {
   11841               0 :       CPLErrorReset();
   11842                 :     }
   11843               6 :     result = (CPLErr)GDALDatasetShadow_AddBand(arg1,arg2,arg3);
   11844               6 :     if ( bUseExceptions ) {
   11845               0 :       CPLErr eclass = CPLGetLastErrorType();
   11846               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11847               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11848                 :       }
   11849                 :     }
   11850                 :   }
   11851              12 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11852                 :   {
   11853                 :     /* %typemap(freearg) char **options */
   11854               6 :     CSLDestroy( arg3 );
   11855                 :   }
   11856                 :   {
   11857                 :     /* %typemap(ret) CPLErr */
   11858               6 :     if ( bUseExceptions == 0 ) {
   11859                 :       /* We're not using exceptions.  And no error has occurred */
   11860               6 :       if ( resultobj == 0 ) {
   11861                 :         /* No other return values set so return ErrorCode */
   11862               0 :         resultobj = PyInt_FromLong(result);
   11863                 :       }
   11864                 :     }
   11865                 :   }
   11866               6 :   return resultobj;
   11867                 : fail:
   11868                 :   {
   11869                 :     /* %typemap(freearg) char **options */
   11870               0 :     CSLDestroy( arg3 );
   11871                 :   }
   11872               0 :   return NULL;
   11873                 : }
   11874                 : 
   11875                 : 
   11876              17 : SWIGINTERN PyObject *_wrap_Dataset_CreateMaskBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11877              17 :   PyObject *resultobj = 0;
   11878              17 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11879                 :   int arg2 ;
   11880              17 :   void *argp1 = 0 ;
   11881              17 :   int res1 = 0 ;
   11882                 :   int val2 ;
   11883              17 :   int ecode2 = 0 ;
   11884              17 :   PyObject * obj0 = 0 ;
   11885              17 :   PyObject * obj1 = 0 ;
   11886                 :   CPLErr result;
   11887                 :   
   11888              17 :   if (!PyArg_ParseTuple(args,(char *)"OO:Dataset_CreateMaskBand",&obj0,&obj1)) SWIG_fail;
   11889              17 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11890              17 :   if (!SWIG_IsOK(res1)) {
   11891               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_CreateMaskBand" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11892                 :   }
   11893              17 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11894              17 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   11895              17 :   if (!SWIG_IsOK(ecode2)) {
   11896               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_CreateMaskBand" "', argument " "2"" of type '" "int""'");
   11897                 :   } 
   11898              17 :   arg2 = static_cast< int >(val2);
   11899                 :   {
   11900              17 :     if ( bUseExceptions ) {
   11901               0 :       CPLErrorReset();
   11902                 :     }
   11903              17 :     result = (CPLErr)GDALDatasetShadow_CreateMaskBand(arg1,arg2);
   11904              17 :     if ( bUseExceptions ) {
   11905               0 :       CPLErr eclass = CPLGetLastErrorType();
   11906               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11907               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11908                 :       }
   11909                 :     }
   11910                 :   }
   11911              34 :   resultobj = SWIG_From_int(static_cast< int >(result));
   11912                 :   {
   11913                 :     /* %typemap(ret) CPLErr */
   11914              17 :     if ( bUseExceptions == 0 ) {
   11915                 :       /* We're not using exceptions.  And no error has occurred */
   11916              17 :       if ( resultobj == 0 ) {
   11917                 :         /* No other return values set so return ErrorCode */
   11918               0 :         resultobj = PyInt_FromLong(result);
   11919                 :       }
   11920                 :     }
   11921                 :   }
   11922              17 :   return resultobj;
   11923                 : fail:
   11924               0 :   return NULL;
   11925                 : }
   11926                 : 
   11927                 : 
   11928              35 : SWIGINTERN PyObject *_wrap_Dataset_GetFileList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   11929              35 :   PyObject *resultobj = 0;
   11930              35 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11931              35 :   void *argp1 = 0 ;
   11932              35 :   int res1 = 0 ;
   11933              35 :   PyObject * obj0 = 0 ;
   11934              35 :   char **result = 0 ;
   11935                 :   
   11936              35 :   if (!PyArg_ParseTuple(args,(char *)"O:Dataset_GetFileList",&obj0)) SWIG_fail;
   11937              35 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   11938              35 :   if (!SWIG_IsOK(res1)) {
   11939               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_GetFileList" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   11940                 :   }
   11941              35 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   11942                 :   {
   11943              35 :     if ( bUseExceptions ) {
   11944               0 :       CPLErrorReset();
   11945                 :     }
   11946              35 :     result = (char **)GDALDatasetShadow_GetFileList(arg1);
   11947              35 :     if ( bUseExceptions ) {
   11948               0 :       CPLErr eclass = CPLGetLastErrorType();
   11949               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   11950               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   11951                 :       }
   11952                 :     }
   11953                 :   }
   11954                 :   {
   11955                 :     /* %typemap(out) char **CSL -> ( string ) */
   11956              35 :     char **stringarray = result;
   11957              35 :     if ( stringarray == NULL ) {
   11958               0 :       resultobj = Py_None;
   11959               0 :       Py_INCREF( resultobj );
   11960                 :     }
   11961                 :     else {
   11962              35 :       int len = CSLCount( stringarray );
   11963              35 :       resultobj = PyList_New( len );
   11964             103 :       for ( int i = 0; i < len; ++i ) {
   11965              68 :         PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
   11966              68 :         PyList_SetItem(resultobj, i, o );
   11967                 :       }
   11968                 :     }
   11969              35 :     CSLDestroy(result);
   11970                 :   }
   11971              35 :   return resultobj;
   11972                 : fail:
   11973               0 :   return NULL;
   11974                 : }
   11975                 : 
   11976                 : 
   11977          169075 : SWIGINTERN PyObject *_wrap_Dataset_WriteRaster(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   11978          169075 :   PyObject *resultobj = 0;
   11979          169075 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   11980                 :   int arg2 ;
   11981                 :   int arg3 ;
   11982                 :   int arg4 ;
   11983                 :   int arg5 ;
   11984                 :   GIntBig arg6 ;
   11985          169075 :   char *arg7 = (char *) 0 ;
   11986          169075 :   int *arg8 = (int *) 0 ;
   11987          169075 :   int *arg9 = (int *) 0 ;
   11988          169075 :   GDALDataType *arg10 = (GDALDataType *) 0 ;
   11989          169075 :   int arg11 = (int) 0 ;
   11990          169075 :   int *arg12 = (int *) 0 ;
   11991          169075 :   int *arg13 = (int *) 0 ;
   11992          169075 :   int *arg14 = (int *) 0 ;
   11993          169075 :   int *arg15 = (int *) 0 ;
   11994          169075 :   void *argp1 = 0 ;
   11995          169075 :   int res1 = 0 ;
   11996                 :   int val2 ;
   11997          169075 :   int ecode2 = 0 ;
   11998                 :   int val3 ;
   11999          169075 :   int ecode3 = 0 ;
   12000                 :   int val4 ;
   12001          169075 :   int ecode4 = 0 ;
   12002                 :   int val5 ;
   12003          169075 :   int ecode5 = 0 ;
   12004          169075 :   int alloc6 = 0 ;
   12005                 :   int val8 ;
   12006                 :   int val9 ;
   12007                 :   int val10 ;
   12008                 :   int val13 ;
   12009                 :   int val14 ;
   12010                 :   int val15 ;
   12011          169075 :   PyObject * obj0 = 0 ;
   12012          169075 :   PyObject * obj1 = 0 ;
   12013          169075 :   PyObject * obj2 = 0 ;
   12014          169075 :   PyObject * obj3 = 0 ;
   12015          169075 :   PyObject * obj4 = 0 ;
   12016          169075 :   PyObject * obj5 = 0 ;
   12017          169075 :   PyObject * obj6 = 0 ;
   12018          169075 :   PyObject * obj7 = 0 ;
   12019          169075 :   PyObject * obj8 = 0 ;
   12020          169075 :   PyObject * obj9 = 0 ;
   12021          169075 :   PyObject * obj10 = 0 ;
   12022          169075 :   PyObject * obj11 = 0 ;
   12023          169075 :   PyObject * obj12 = 0 ;
   12024                 :   char *  kwnames[] = {
   12025                 :     (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 
   12026          169075 :   };
   12027                 :   CPLErr result;
   12028                 :   
   12029          169075 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO|OOOOOOO:Dataset_WriteRaster",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12)) SWIG_fail;
   12030          169075 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   12031          169075 :   if (!SWIG_IsOK(res1)) {
   12032               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_WriteRaster" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   12033                 :   }
   12034          169075 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   12035          169075 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   12036          169075 :   if (!SWIG_IsOK(ecode2)) {
   12037               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_WriteRaster" "', argument " "2"" of type '" "int""'");
   12038                 :   } 
   12039          169075 :   arg2 = static_cast< int >(val2);
   12040          169075 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   12041          169075 :   if (!SWIG_IsOK(ecode3)) {
   12042               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_WriteRaster" "', argument " "3"" of type '" "int""'");
   12043                 :   } 
   12044          169075 :   arg3 = static_cast< int >(val3);
   12045          169075 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   12046          169075 :   if (!SWIG_IsOK(ecode4)) {
   12047               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_WriteRaster" "', argument " "4"" of type '" "int""'");
   12048                 :   } 
   12049          169075 :   arg4 = static_cast< int >(val4);
   12050          169075 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   12051          169075 :   if (!SWIG_IsOK(ecode5)) {
   12052               0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_WriteRaster" "', argument " "5"" of type '" "int""'");
   12053                 :   } 
   12054          169075 :   arg5 = static_cast< int >(val5);
   12055                 :   {
   12056                 :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   12057                 : #if PY_VERSION_HEX>=0x03000000
   12058                 :     if (PyUnicode_Check(obj5))
   12059                 :     {
   12060                 :       size_t safeLen = 0;
   12061                 :       int ret = SWIG_AsCharPtrAndSize(obj5, (char**) &arg7, &safeLen, &alloc6);
   12062                 :       if (!SWIG_IsOK(ret)) {
   12063                 :         SWIG_exception( SWIG_RuntimeError, "invalid Unicode string" );
   12064                 :       }
   12065                 :       
   12066                 :       if (safeLen) safeLen--;
   12067                 :       arg6 = (GIntBig) safeLen;
   12068                 :     }
   12069                 :     else if (PyBytes_Check(obj5))
   12070                 :     {
   12071                 :       Py_ssize_t safeLen = 0;
   12072                 :       PyBytes_AsStringAndSize(obj5, (char**) &arg7, &safeLen);
   12073                 :       arg6 = (GIntBig) safeLen;
   12074                 :     }
   12075                 :     else
   12076                 :     {
   12077                 :       PyErr_SetString(PyExc_TypeError, "not a unicode string or a bytes");
   12078                 :       SWIG_fail;
   12079                 :     }
   12080                 : #else
   12081          169075 :     if (PyString_Check(obj5))
   12082                 :     {
   12083          169074 :       Py_ssize_t safeLen = 0;
   12084          169074 :       PyString_AsStringAndSize(obj5, (char**) &arg7, &safeLen);
   12085          169074 :       arg6 = (GIntBig) safeLen;
   12086                 :     }
   12087                 :     else
   12088                 :     {
   12089               1 :       PyErr_SetString(PyExc_TypeError, "not a string");
   12090               1 :       SWIG_fail;
   12091                 :     }
   12092                 : #endif
   12093                 :   }
   12094          169074 :   if (obj6) {
   12095                 :     {
   12096                 :       /* %typemap(in) (int *optional_##int) */
   12097          169074 :       if ( obj6 == Py_None ) {
   12098               0 :         arg8 = 0;
   12099                 :       }
   12100          169074 :       else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
   12101          169074 :         arg8 = (int *) &val8;
   12102                 :       }
   12103                 :       else {
   12104               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   12105               0 :         SWIG_fail;
   12106                 :       }
   12107                 :     }
   12108                 :   }
   12109          169074 :   if (obj7) {
   12110                 :     {
   12111                 :       /* %typemap(in) (int *optional_##int) */
   12112          169074 :       if ( obj7 == Py_None ) {
   12113               0 :         arg9 = 0;
   12114                 :       }
   12115          169074 :       else if ( PyArg_Parse( obj7,"i" ,&val9 ) ) {
   12116          169074 :         arg9 = (int *) &val9;
   12117                 :       }
   12118                 :       else {
   12119               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   12120               0 :         SWIG_fail;
   12121                 :       }
   12122                 :     }
   12123                 :   }
   12124          169074 :   if (obj8) {
   12125                 :     {
   12126                 :       /* %typemap(in) (int *optional_##int) */
   12127          169074 :       if ( obj8 == Py_None ) {
   12128               0 :         arg10 = 0;
   12129                 :       }
   12130          169074 :       else if ( PyArg_Parse( obj8,"i" ,&val10 ) ) {
   12131          169074 :         arg10 = (GDALDataType *) &val10;
   12132                 :       }
   12133                 :       else {
   12134               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   12135               0 :         SWIG_fail;
   12136                 :       }
   12137                 :     }
   12138                 :   }
   12139          169074 :   if (obj9) {
   12140                 :     {
   12141                 :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   12142                 :       /* check if is List */
   12143          169074 :       if ( !PySequence_Check(obj9) ) {
   12144               0 :         PyErr_SetString(PyExc_TypeError, "not a sequence");
   12145               0 :         SWIG_fail;
   12146                 :       }
   12147          169074 :       arg11 = PySequence_Size(obj9);
   12148          169074 :       arg12 = (int*) malloc(arg11*sizeof(int));
   12149          339557 :       for( int i = 0; i<arg11; i++ ) {
   12150          170483 :         PyObject *o = PySequence_GetItem(obj9,i);
   12151          170483 :         if ( !PyArg_Parse(o,"i",&arg12[i]) ) {
   12152               0 :           PyErr_SetString(PyExc_TypeError, "not an integer");
   12153               0 :           Py_DECREF(o);
   12154                 :           SWIG_fail;
   12155                 :         }
   12156          170483 :         Py_DECREF(o);
   12157                 :       }
   12158                 :     }
   12159                 :   }
   12160          169074 :   if (obj10) {
   12161                 :     {
   12162                 :       /* %typemap(in) (int *optional_##int) */
   12163          169074 :       if ( obj10 == Py_None ) {
   12164          169074 :         arg13 = 0;
   12165                 :       }
   12166               0 :       else if ( PyArg_Parse( obj10,"i" ,&val13 ) ) {
   12167               0 :         arg13 = (int *) &val13;
   12168                 :       }
   12169                 :       else {
   12170               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   12171               0 :         SWIG_fail;
   12172                 :       }
   12173                 :     }
   12174                 :   }
   12175          169074 :   if (obj11) {
   12176                 :     {
   12177                 :       /* %typemap(in) (int *optional_##int) */
   12178          169074 :       if ( obj11 == Py_None ) {
   12179          169074 :         arg14 = 0;
   12180                 :       }
   12181               0 :       else if ( PyArg_Parse( obj11,"i" ,&val14 ) ) {
   12182               0 :         arg14 = (int *) &val14;
   12183                 :       }
   12184                 :       else {
   12185               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   12186               0 :         SWIG_fail;
   12187                 :       }
   12188                 :     }
   12189                 :   }
   12190          169074 :   if (obj12) {
   12191                 :     {
   12192                 :       /* %typemap(in) (int *optional_##int) */
   12193          169074 :       if ( obj12 == Py_None ) {
   12194          169074 :         arg15 = 0;
   12195                 :       }
   12196               0 :       else if ( PyArg_Parse( obj12,"i" ,&val15 ) ) {
   12197               0 :         arg15 = (int *) &val15;
   12198                 :       }
   12199                 :       else {
   12200               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   12201               0 :         SWIG_fail;
   12202                 :       }
   12203                 :     }
   12204                 :   }
   12205                 :   {
   12206          169074 :     if ( bUseExceptions ) {
   12207               0 :       CPLErrorReset();
   12208                 :     }
   12209          169074 :     result = (CPLErr)GDALDatasetShadow_WriteRaster(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
   12210          169074 :     if ( bUseExceptions ) {
   12211               0 :       CPLErr eclass = CPLGetLastErrorType();
   12212               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12213               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12214                 :       }
   12215                 :     }
   12216                 :   }
   12217          338148 :   resultobj = SWIG_From_int(static_cast< int >(result));
   12218                 :   {
   12219                 :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   12220          169074 :     if( alloc6 == SWIG_NEWOBJ ) {
   12221               0 :       delete[] arg7;
   12222                 :     }
   12223                 :   }
   12224                 :   {
   12225                 :     /* %typemap(freearg) (int nList, int* pList) */
   12226          169074 :     if (arg12) {
   12227          169074 :       free((void*) arg12);
   12228                 :     }
   12229                 :   }
   12230                 :   {
   12231                 :     /* %typemap(ret) CPLErr */
   12232          169074 :     if ( bUseExceptions == 0 ) {
   12233                 :       /* We're not using exceptions.  And no error has occurred */
   12234          169074 :       if ( resultobj == 0 ) {
   12235                 :         /* No other return values set so return ErrorCode */
   12236               0 :         resultobj = PyInt_FromLong(result);
   12237                 :       }
   12238                 :     }
   12239                 :   }
   12240          169074 :   return resultobj;
   12241                 : fail:
   12242                 :   {
   12243                 :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   12244               1 :     if( alloc6 == SWIG_NEWOBJ ) {
   12245               0 :       delete[] arg7;
   12246                 :     }
   12247                 :   }
   12248                 :   {
   12249                 :     /* %typemap(freearg) (int nList, int* pList) */
   12250               1 :     if (arg12) {
   12251               0 :       free((void*) arg12);
   12252                 :     }
   12253                 :   }
   12254               1 :   return NULL;
   12255                 : }
   12256                 : 
   12257                 : 
   12258               1 : SWIGINTERN PyObject *_wrap_Dataset_BeginAsyncReader(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   12259               1 :   PyObject *resultobj = 0;
   12260               1 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   12261                 :   int arg2 ;
   12262                 :   int arg3 ;
   12263                 :   int arg4 ;
   12264                 :   int arg5 ;
   12265                 :   int arg6 ;
   12266               1 :   char *arg7 = (char *) 0 ;
   12267               1 :   void *arg8 = (void *) 0 ;
   12268                 :   int arg9 ;
   12269                 :   int arg10 ;
   12270               1 :   GDALDataType arg11 = (GDALDataType) (GDALDataType) 0 ;
   12271               1 :   int arg12 = (int) 0 ;
   12272               1 :   int *arg13 = (int *) 0 ;
   12273               1 :   int arg14 = (int) 0 ;
   12274               1 :   int arg15 = (int) 0 ;
   12275               1 :   int arg16 = (int) 0 ;
   12276               1 :   char **arg17 = (char **) 0 ;
   12277               1 :   void *argp1 = 0 ;
   12278               1 :   int res1 = 0 ;
   12279                 :   int val2 ;
   12280               1 :   int ecode2 = 0 ;
   12281                 :   int val3 ;
   12282               1 :   int ecode3 = 0 ;
   12283                 :   int val4 ;
   12284               1 :   int ecode4 = 0 ;
   12285                 :   int val5 ;
   12286               1 :   int ecode5 = 0 ;
   12287                 :   int val9 ;
   12288               1 :   int ecode9 = 0 ;
   12289                 :   int val10 ;
   12290               1 :   int ecode10 = 0 ;
   12291                 :   int val11 ;
   12292               1 :   int ecode11 = 0 ;
   12293                 :   int val14 ;
   12294               1 :   int ecode14 = 0 ;
   12295                 :   int val15 ;
   12296               1 :   int ecode15 = 0 ;
   12297                 :   int val16 ;
   12298               1 :   int ecode16 = 0 ;
   12299               1 :   PyObject * obj0 = 0 ;
   12300               1 :   PyObject * obj1 = 0 ;
   12301               1 :   PyObject * obj2 = 0 ;
   12302               1 :   PyObject * obj3 = 0 ;
   12303               1 :   PyObject * obj4 = 0 ;
   12304               1 :   PyObject * obj5 = 0 ;
   12305               1 :   PyObject * obj6 = 0 ;
   12306               1 :   PyObject * obj7 = 0 ;
   12307               1 :   PyObject * obj8 = 0 ;
   12308               1 :   PyObject * obj9 = 0 ;
   12309               1 :   PyObject * obj10 = 0 ;
   12310               1 :   PyObject * obj11 = 0 ;
   12311               1 :   PyObject * obj12 = 0 ;
   12312               1 :   PyObject * obj13 = 0 ;
   12313                 :   char *  kwnames[] = {
   12314                 :     (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 
   12315               1 :   };
   12316               1 :   GDALAsyncReaderShadow *result = 0 ;
   12317                 :   
   12318               1 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOOOO|OOOOOO:Dataset_BeginAsyncReader",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12,&obj13)) SWIG_fail;
   12319               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   12320               1 :   if (!SWIG_IsOK(res1)) {
   12321               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_BeginAsyncReader" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   12322                 :   }
   12323               1 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   12324               1 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   12325               1 :   if (!SWIG_IsOK(ecode2)) {
   12326               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_BeginAsyncReader" "', argument " "2"" of type '" "int""'");
   12327                 :   } 
   12328               1 :   arg2 = static_cast< int >(val2);
   12329               1 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   12330               1 :   if (!SWIG_IsOK(ecode3)) {
   12331               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_BeginAsyncReader" "', argument " "3"" of type '" "int""'");
   12332                 :   } 
   12333               1 :   arg3 = static_cast< int >(val3);
   12334               1 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   12335               1 :   if (!SWIG_IsOK(ecode4)) {
   12336               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_BeginAsyncReader" "', argument " "4"" of type '" "int""'");
   12337                 :   } 
   12338               1 :   arg4 = static_cast< int >(val4);
   12339               1 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   12340               1 :   if (!SWIG_IsOK(ecode5)) {
   12341               0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_BeginAsyncReader" "', argument " "5"" of type '" "int""'");
   12342                 :   } 
   12343               1 :   arg5 = static_cast< int >(val5);
   12344                 :   {
   12345                 :     /* %typemap(in,numinputs=1) (int nLenKeepObject, char *pBufKeepObject, void* pyObject) */
   12346                 : #if PY_VERSION_HEX>=0x03000000
   12347                 :     if (PyBytes_Check(obj5))
   12348                 :     {
   12349                 :       Py_ssize_t safeLen = 0;
   12350                 :       PyBytes_AsStringAndSize(obj5, (char**) &arg7, &safeLen);
   12351                 :       arg6 = (int) safeLen;
   12352                 :       arg8 = obj5;
   12353                 :     }
   12354                 :     else
   12355                 :     {
   12356                 :       PyErr_SetString(PyExc_TypeError, "not a bytes");
   12357                 :       SWIG_fail;
   12358                 :     }
   12359                 : #else
   12360               1 :     if (PyString_Check(obj5))
   12361                 :     {
   12362               1 :       Py_ssize_t safeLen = 0;
   12363               1 :       PyString_AsStringAndSize(obj5, (char**) &arg7, &safeLen);
   12364               1 :       arg6 = (int) safeLen;
   12365               1 :       arg8 = obj5;
   12366                 :     }
   12367                 :     else
   12368                 :     {
   12369               0 :       PyErr_SetString(PyExc_TypeError, "not a string");
   12370               0 :       SWIG_fail;
   12371                 :     }
   12372                 : #endif
   12373                 :   }
   12374               1 :   ecode9 = SWIG_AsVal_int(obj6, &val9);
   12375               1 :   if (!SWIG_IsOK(ecode9)) {
   12376               0 :     SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "Dataset_BeginAsyncReader" "', argument " "9"" of type '" "int""'");
   12377                 :   } 
   12378               1 :   arg9 = static_cast< int >(val9);
   12379               1 :   ecode10 = SWIG_AsVal_int(obj7, &val10);
   12380               1 :   if (!SWIG_IsOK(ecode10)) {
   12381               0 :     SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "Dataset_BeginAsyncReader" "', argument " "10"" of type '" "int""'");
   12382                 :   } 
   12383               1 :   arg10 = static_cast< int >(val10);
   12384               1 :   if (obj8) {
   12385               1 :     ecode11 = SWIG_AsVal_int(obj8, &val11);
   12386               1 :     if (!SWIG_IsOK(ecode11)) {
   12387               0 :       SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "Dataset_BeginAsyncReader" "', argument " "11"" of type '" "GDALDataType""'");
   12388                 :     } 
   12389               1 :     arg11 = static_cast< GDALDataType >(val11);
   12390                 :   }
   12391               1 :   if (obj9) {
   12392                 :     {
   12393                 :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   12394                 :       /* check if is List */
   12395               1 :       if ( !PySequence_Check(obj9) ) {
   12396               0 :         PyErr_SetString(PyExc_TypeError, "not a sequence");
   12397               0 :         SWIG_fail;
   12398                 :       }
   12399               1 :       arg12 = PySequence_Size(obj9);
   12400               1 :       arg13 = (int*) malloc(arg12*sizeof(int));
   12401               4 :       for( int i = 0; i<arg12; i++ ) {
   12402               3 :         PyObject *o = PySequence_GetItem(obj9,i);
   12403               3 :         if ( !PyArg_Parse(o,"i",&arg13[i]) ) {
   12404               0 :           PyErr_SetString(PyExc_TypeError, "not an integer");
   12405               0 :           Py_DECREF(o);
   12406                 :           SWIG_fail;
   12407                 :         }
   12408               3 :         Py_DECREF(o);
   12409                 :       }
   12410                 :     }
   12411                 :   }
   12412               1 :   if (obj10) {
   12413               1 :     ecode14 = SWIG_AsVal_int(obj10, &val14);
   12414               1 :     if (!SWIG_IsOK(ecode14)) {
   12415               0 :       SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "Dataset_BeginAsyncReader" "', argument " "14"" of type '" "int""'");
   12416                 :     } 
   12417               1 :     arg14 = static_cast< int >(val14);
   12418                 :   }
   12419               1 :   if (obj11) {
   12420               1 :     ecode15 = SWIG_AsVal_int(obj11, &val15);
   12421               1 :     if (!SWIG_IsOK(ecode15)) {
   12422               0 :       SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "Dataset_BeginAsyncReader" "', argument " "15"" of type '" "int""'");
   12423                 :     } 
   12424               1 :     arg15 = static_cast< int >(val15);
   12425                 :   }
   12426               1 :   if (obj12) {
   12427               1 :     ecode16 = SWIG_AsVal_int(obj12, &val16);
   12428               1 :     if (!SWIG_IsOK(ecode16)) {
   12429               0 :       SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "Dataset_BeginAsyncReader" "', argument " "16"" of type '" "int""'");
   12430                 :     } 
   12431               1 :     arg16 = static_cast< int >(val16);
   12432                 :   }
   12433               1 :   if (obj13) {
   12434                 :     {
   12435                 :       /* %typemap(in) char **options */
   12436                 :       /* Check if is a list */
   12437               1 :       if ( ! PySequence_Check(obj13)) {
   12438               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
   12439               0 :         SWIG_fail;
   12440                 :       }
   12441                 :       
   12442               1 :       int size = PySequence_Size(obj13);
   12443               1 :       for (int i = 0; i < size; i++) {
   12444               0 :         PyObject* pyObj = PySequence_GetItem(obj13,i);
   12445               0 :         if (PyUnicode_Check(pyObj))
   12446                 :         {
   12447                 :           char *pszStr;
   12448                 :           Py_ssize_t nLen;
   12449               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   12450                 : #if PY_VERSION_HEX >= 0x03000000
   12451                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   12452                 : #else
   12453               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   12454                 : #endif
   12455               0 :           arg17 = CSLAddString( arg17, pszStr );
   12456               0 :           Py_XDECREF(pyUTF8Str);
   12457                 :         }
   12458                 : #if PY_VERSION_HEX >= 0x03000000
   12459                 :         else if (PyBytes_Check(pyObj))
   12460                 :         arg17 = CSLAddString( arg17, PyBytes_AsString(pyObj) );
   12461                 : #else
   12462               0 :         else if (PyString_Check(pyObj))
   12463               0 :         arg17 = CSLAddString( arg17, PyString_AsString(pyObj) );
   12464                 : #endif
   12465                 :         else
   12466                 :         {
   12467               0 :           Py_DECREF(pyObj);
   12468               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   12469               0 :           SWIG_fail;
   12470                 :         }
   12471               0 :         Py_DECREF(pyObj);
   12472                 :       }
   12473                 :     }
   12474                 :   }
   12475                 :   {
   12476               1 :     if ( bUseExceptions ) {
   12477               0 :       CPLErrorReset();
   12478                 :     }
   12479               1 :     result = (GDALAsyncReaderShadow *)GDALDatasetShadow_BeginAsyncReader(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17);
   12480               1 :     if ( bUseExceptions ) {
   12481               0 :       CPLErr eclass = CPLGetLastErrorType();
   12482               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12483               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12484                 :       }
   12485                 :     }
   12486                 :   }
   12487               1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALAsyncReaderShadow, SWIG_POINTER_OWN |  0 );
   12488                 :   {
   12489                 :     /* %typemap(freearg) (int nList, int* pList) */
   12490               1 :     if (arg13) {
   12491               1 :       free((void*) arg13);
   12492                 :     }
   12493                 :   }
   12494                 :   {
   12495                 :     /* %typemap(freearg) char **options */
   12496               1 :     CSLDestroy( arg17 );
   12497                 :   }
   12498               1 :   return resultobj;
   12499                 : fail:
   12500                 :   {
   12501                 :     /* %typemap(freearg) (int nList, int* pList) */
   12502               0 :     if (arg13) {
   12503               0 :       free((void*) arg13);
   12504                 :     }
   12505                 :   }
   12506                 :   {
   12507                 :     /* %typemap(freearg) char **options */
   12508               0 :     CSLDestroy( arg17 );
   12509                 :   }
   12510               0 :   return NULL;
   12511                 : }
   12512                 : 
   12513                 : 
   12514               1 : SWIGINTERN PyObject *_wrap_Dataset_EndAsyncReader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12515               1 :   PyObject *resultobj = 0;
   12516               1 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   12517               1 :   GDALAsyncReaderShadow *arg2 = (GDALAsyncReaderShadow *) 0 ;
   12518               1 :   void *argp1 = 0 ;
   12519               1 :   int res1 = 0 ;
   12520               1 :   void *argp2 = 0 ;
   12521               1 :   int res2 = 0 ;
   12522               1 :   PyObject * obj0 = 0 ;
   12523               1 :   PyObject * obj1 = 0 ;
   12524                 :   
   12525               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:Dataset_EndAsyncReader",&obj0,&obj1)) SWIG_fail;
   12526               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   12527               1 :   if (!SWIG_IsOK(res1)) {
   12528               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_EndAsyncReader" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   12529                 :   }
   12530               1 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   12531               1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALAsyncReaderShadow, 0 |  0 );
   12532               1 :   if (!SWIG_IsOK(res2)) {
   12533               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Dataset_EndAsyncReader" "', argument " "2"" of type '" "GDALAsyncReaderShadow *""'"); 
   12534                 :   }
   12535               1 :   arg2 = reinterpret_cast< GDALAsyncReaderShadow * >(argp2);
   12536                 :   {
   12537               1 :     if ( bUseExceptions ) {
   12538               0 :       CPLErrorReset();
   12539                 :     }
   12540                 :     GDALDatasetShadow_EndAsyncReader(arg1,arg2);
   12541               1 :     if ( bUseExceptions ) {
   12542               0 :       CPLErr eclass = CPLGetLastErrorType();
   12543               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12544               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12545                 :       }
   12546                 :     }
   12547                 :   }
   12548               1 :   resultobj = SWIG_Py_Void();
   12549               1 :   return resultobj;
   12550                 : fail:
   12551               0 :   return NULL;
   12552                 : }
   12553                 : 
   12554                 : 
   12555          167637 : SWIGINTERN PyObject *_wrap_Dataset_ReadRaster1(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   12556          167637 :   PyObject *resultobj = 0;
   12557          167637 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   12558                 :   int arg2 ;
   12559                 :   int arg3 ;
   12560                 :   int arg4 ;
   12561                 :   int arg5 ;
   12562          167637 :   void **arg6 = (void **) 0 ;
   12563          167637 :   int *arg7 = (int *) 0 ;
   12564          167637 :   int *arg8 = (int *) 0 ;
   12565          167637 :   GDALDataType *arg9 = (GDALDataType *) 0 ;
   12566          167637 :   int arg10 = (int) 0 ;
   12567          167637 :   int *arg11 = (int *) 0 ;
   12568          167637 :   int *arg12 = (int *) 0 ;
   12569          167637 :   int *arg13 = (int *) 0 ;
   12570          167637 :   int *arg14 = (int *) 0 ;
   12571          167637 :   void *argp1 = 0 ;
   12572          167637 :   int res1 = 0 ;
   12573                 :   int val2 ;
   12574          167637 :   int ecode2 = 0 ;
   12575                 :   int val3 ;
   12576          167637 :   int ecode3 = 0 ;
   12577                 :   int val4 ;
   12578          167637 :   int ecode4 = 0 ;
   12579                 :   int val5 ;
   12580          167637 :   int ecode5 = 0 ;
   12581          167637 :   void *pyObject6 = NULL ;
   12582                 :   int val7 ;
   12583                 :   int val8 ;
   12584                 :   int val9 ;
   12585                 :   int val12 ;
   12586                 :   int val13 ;
   12587                 :   int val14 ;
   12588          167637 :   PyObject * obj0 = 0 ;
   12589          167637 :   PyObject * obj1 = 0 ;
   12590          167637 :   PyObject * obj2 = 0 ;
   12591          167637 :   PyObject * obj3 = 0 ;
   12592          167637 :   PyObject * obj4 = 0 ;
   12593          167637 :   PyObject * obj5 = 0 ;
   12594          167637 :   PyObject * obj6 = 0 ;
   12595          167637 :   PyObject * obj7 = 0 ;
   12596          167637 :   PyObject * obj8 = 0 ;
   12597          167637 :   PyObject * obj9 = 0 ;
   12598          167637 :   PyObject * obj10 = 0 ;
   12599          167637 :   PyObject * obj11 = 0 ;
   12600                 :   char *  kwnames[] = {
   12601                 :     (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", NULL 
   12602          167637 :   };
   12603                 :   CPLErr result;
   12604                 :   
   12605                 :   {
   12606                 :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject6 = NULL ) */
   12607          167637 :     arg6 = &pyObject6;
   12608                 :   }
   12609          167637 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO|OOOOOOO:Dataset_ReadRaster1",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11)) SWIG_fail;
   12610          167637 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   12611          167637 :   if (!SWIG_IsOK(res1)) {
   12612               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dataset_ReadRaster1" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   12613                 :   }
   12614          167637 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   12615          167637 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   12616          167637 :   if (!SWIG_IsOK(ecode2)) {
   12617               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Dataset_ReadRaster1" "', argument " "2"" of type '" "int""'");
   12618                 :   } 
   12619          167637 :   arg2 = static_cast< int >(val2);
   12620          167637 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   12621          167637 :   if (!SWIG_IsOK(ecode3)) {
   12622               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Dataset_ReadRaster1" "', argument " "3"" of type '" "int""'");
   12623                 :   } 
   12624          167637 :   arg3 = static_cast< int >(val3);
   12625          167637 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   12626          167637 :   if (!SWIG_IsOK(ecode4)) {
   12627               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Dataset_ReadRaster1" "', argument " "4"" of type '" "int""'");
   12628                 :   } 
   12629          167637 :   arg4 = static_cast< int >(val4);
   12630          167637 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   12631          167637 :   if (!SWIG_IsOK(ecode5)) {
   12632               0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Dataset_ReadRaster1" "', argument " "5"" of type '" "int""'");
   12633                 :   } 
   12634          167637 :   arg5 = static_cast< int >(val5);
   12635          167637 :   if (obj5) {
   12636                 :     {
   12637                 :       /* %typemap(in) (int *optional_##int) */
   12638          167637 :       if ( obj5 == Py_None ) {
   12639               0 :         arg7 = 0;
   12640                 :       }
   12641          167637 :       else if ( PyArg_Parse( obj5,"i" ,&val7 ) ) {
   12642          167637 :         arg7 = (int *) &val7;
   12643                 :       }
   12644                 :       else {
   12645               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   12646               0 :         SWIG_fail;
   12647                 :       }
   12648                 :     }
   12649                 :   }
   12650          167637 :   if (obj6) {
   12651                 :     {
   12652                 :       /* %typemap(in) (int *optional_##int) */
   12653          167637 :       if ( obj6 == Py_None ) {
   12654               0 :         arg8 = 0;
   12655                 :       }
   12656          167637 :       else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
   12657          167637 :         arg8 = (int *) &val8;
   12658                 :       }
   12659                 :       else {
   12660               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   12661               0 :         SWIG_fail;
   12662                 :       }
   12663                 :     }
   12664                 :   }
   12665          167637 :   if (obj7) {
   12666                 :     {
   12667                 :       /* %typemap(in) (int *optional_##int) */
   12668          167637 :       if ( obj7 == Py_None ) {
   12669               0 :         arg9 = 0;
   12670                 :       }
   12671          167637 :       else if ( PyArg_Parse( obj7,"i" ,&val9 ) ) {
   12672          167637 :         arg9 = (GDALDataType *) &val9;
   12673                 :       }
   12674                 :       else {
   12675               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   12676               0 :         SWIG_fail;
   12677                 :       }
   12678                 :     }
   12679                 :   }
   12680          167637 :   if (obj8) {
   12681                 :     {
   12682                 :       /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   12683                 :       /* check if is List */
   12684          167637 :       if ( !PySequence_Check(obj8) ) {
   12685               0 :         PyErr_SetString(PyExc_TypeError, "not a sequence");
   12686               0 :         SWIG_fail;
   12687                 :       }
   12688          167637 :       arg10 = PySequence_Size(obj8);
   12689          167637 :       arg11 = (int*) malloc(arg10*sizeof(int));
   12690          335281 :       for( int i = 0; i<arg10; i++ ) {
   12691          167644 :         PyObject *o = PySequence_GetItem(obj8,i);
   12692          167644 :         if ( !PyArg_Parse(o,"i",&arg11[i]) ) {
   12693               0 :           PyErr_SetString(PyExc_TypeError, "not an integer");
   12694               0 :           Py_DECREF(o);
   12695                 :           SWIG_fail;
   12696                 :         }
   12697          167644 :         Py_DECREF(o);
   12698                 :       }
   12699                 :     }
   12700                 :   }
   12701          167637 :   if (obj9) {
   12702                 :     {
   12703                 :       /* %typemap(in) (int *optional_##int) */
   12704          167637 :       if ( obj9 == Py_None ) {
   12705          167637 :         arg12 = 0;
   12706                 :       }
   12707               0 :       else if ( PyArg_Parse( obj9,"i" ,&val12 ) ) {
   12708               0 :         arg12 = (int *) &val12;
   12709                 :       }
   12710                 :       else {
   12711               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   12712               0 :         SWIG_fail;
   12713                 :       }
   12714                 :     }
   12715                 :   }
   12716          167637 :   if (obj10) {
   12717                 :     {
   12718                 :       /* %typemap(in) (int *optional_##int) */
   12719          167637 :       if ( obj10 == Py_None ) {
   12720          167637 :         arg13 = 0;
   12721                 :       }
   12722               0 :       else if ( PyArg_Parse( obj10,"i" ,&val13 ) ) {
   12723               0 :         arg13 = (int *) &val13;
   12724                 :       }
   12725                 :       else {
   12726               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   12727               0 :         SWIG_fail;
   12728                 :       }
   12729                 :     }
   12730                 :   }
   12731          167637 :   if (obj11) {
   12732                 :     {
   12733                 :       /* %typemap(in) (int *optional_##int) */
   12734          167637 :       if ( obj11 == Py_None ) {
   12735          167637 :         arg14 = 0;
   12736                 :       }
   12737               0 :       else if ( PyArg_Parse( obj11,"i" ,&val14 ) ) {
   12738               0 :         arg14 = (int *) &val14;
   12739                 :       }
   12740                 :       else {
   12741               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   12742               0 :         SWIG_fail;
   12743                 :       }
   12744                 :     }
   12745                 :   }
   12746                 :   {
   12747          167637 :     if ( bUseExceptions ) {
   12748               0 :       CPLErrorReset();
   12749                 :     }
   12750          167637 :     result = (CPLErr)GDALDatasetShadow_ReadRaster1(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14);
   12751          167637 :     if ( bUseExceptions ) {
   12752               0 :       CPLErr eclass = CPLGetLastErrorType();
   12753               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12754               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12755                 :       }
   12756                 :     }
   12757                 :   }
   12758          335274 :   resultobj = SWIG_From_int(static_cast< int >(result));
   12759                 :   {
   12760                 :     /* %typemap(argout) ( void **outPythonObject ) */
   12761          167637 :     Py_XDECREF(resultobj);
   12762          167637 :     if (*arg6)
   12763                 :     {
   12764          167634 :       resultobj = (PyObject*)*arg6;
   12765                 :     }
   12766                 :     else
   12767                 :     {
   12768               3 :       resultobj = Py_None;
   12769               3 :       Py_INCREF(resultobj);
   12770                 :     }
   12771                 :   }
   12772                 :   {
   12773                 :     /* %typemap(freearg) (int nList, int* pList) */
   12774          167637 :     if (arg11) {
   12775          167637 :       free((void*) arg11);
   12776                 :     }
   12777                 :   }
   12778                 :   {
   12779                 :     /* %typemap(ret) CPLErr */
   12780          167637 :     if ( bUseExceptions == 0 ) {
   12781                 :       /* We're not using exceptions.  And no error has occurred */
   12782          167637 :       if ( resultobj == 0 ) {
   12783                 :         /* No other return values set so return ErrorCode */
   12784               0 :         resultobj = PyInt_FromLong(result);
   12785                 :       }
   12786                 :     }
   12787                 :   }
   12788          167637 :   return resultobj;
   12789                 : fail:
   12790                 :   {
   12791                 :     /* %typemap(freearg) (int nList, int* pList) */
   12792               0 :     if (arg11) {
   12793               0 :       free((void*) arg11);
   12794                 :     }
   12795                 :   }
   12796               0 :   return NULL;
   12797                 : }
   12798                 : 
   12799                 : 
   12800               6 : SWIGINTERN PyObject *Dataset_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12801                 :   PyObject *obj;
   12802               6 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   12803               6 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALDatasetShadow, SWIG_NewClientData(obj));
   12804               6 :   return SWIG_Py_Void();
   12805                 : }
   12806                 : 
   12807             304 : SWIGINTERN PyObject *_wrap_Band_XSize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12808             304 :   PyObject *resultobj = 0;
   12809             304 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   12810             304 :   void *argp1 = 0 ;
   12811             304 :   int res1 = 0 ;
   12812             304 :   PyObject * obj0 = 0 ;
   12813                 :   int result;
   12814                 :   
   12815             304 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_XSize_get",&obj0)) SWIG_fail;
   12816             304 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   12817             304 :   if (!SWIG_IsOK(res1)) {
   12818               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_XSize_get" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   12819                 :   }
   12820             304 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   12821                 :   {
   12822             304 :     if ( bUseExceptions ) {
   12823               0 :       CPLErrorReset();
   12824                 :     }
   12825             304 :     result = (int)GDALRasterBandShadow_XSize_get(arg1);
   12826             304 :     if ( bUseExceptions ) {
   12827               0 :       CPLErr eclass = CPLGetLastErrorType();
   12828               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12829               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12830                 :       }
   12831                 :     }
   12832                 :   }
   12833             304 :   resultobj = SWIG_From_int(static_cast< int >(result));
   12834             304 :   return resultobj;
   12835                 : fail:
   12836               0 :   return NULL;
   12837                 : }
   12838                 : 
   12839                 : 
   12840             265 : SWIGINTERN PyObject *_wrap_Band_YSize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12841             265 :   PyObject *resultobj = 0;
   12842             265 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   12843             265 :   void *argp1 = 0 ;
   12844             265 :   int res1 = 0 ;
   12845             265 :   PyObject * obj0 = 0 ;
   12846                 :   int result;
   12847                 :   
   12848             265 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_YSize_get",&obj0)) SWIG_fail;
   12849             265 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   12850             265 :   if (!SWIG_IsOK(res1)) {
   12851               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_YSize_get" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   12852                 :   }
   12853             265 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   12854                 :   {
   12855             265 :     if ( bUseExceptions ) {
   12856               0 :       CPLErrorReset();
   12857                 :     }
   12858             265 :     result = (int)GDALRasterBandShadow_YSize_get(arg1);
   12859             265 :     if ( bUseExceptions ) {
   12860               0 :       CPLErr eclass = CPLGetLastErrorType();
   12861               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12862               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12863                 :       }
   12864                 :     }
   12865                 :   }
   12866             265 :   resultobj = SWIG_From_int(static_cast< int >(result));
   12867             265 :   return resultobj;
   12868                 : fail:
   12869               0 :   return NULL;
   12870                 : }
   12871                 : 
   12872                 : 
   12873             576 : SWIGINTERN PyObject *_wrap_Band_DataType_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12874             576 :   PyObject *resultobj = 0;
   12875             576 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   12876             576 :   void *argp1 = 0 ;
   12877             576 :   int res1 = 0 ;
   12878             576 :   PyObject * obj0 = 0 ;
   12879                 :   GDALDataType result;
   12880                 :   
   12881             576 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_DataType_get",&obj0)) SWIG_fail;
   12882             576 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   12883             576 :   if (!SWIG_IsOK(res1)) {
   12884               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_DataType_get" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   12885                 :   }
   12886             576 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   12887                 :   {
   12888             576 :     if ( bUseExceptions ) {
   12889               0 :       CPLErrorReset();
   12890                 :     }
   12891             576 :     result = (GDALDataType)GDALRasterBandShadow_DataType_get(arg1);
   12892             576 :     if ( bUseExceptions ) {
   12893               0 :       CPLErr eclass = CPLGetLastErrorType();
   12894               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12895               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12896                 :       }
   12897                 :     }
   12898                 :   }
   12899            1152 :   resultobj = SWIG_From_int(static_cast< int >(result));
   12900             576 :   return resultobj;
   12901                 : fail:
   12902               0 :   return NULL;
   12903                 : }
   12904                 : 
   12905                 : 
   12906               0 : SWIGINTERN PyObject *_wrap_Band_GetBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12907               0 :   PyObject *resultobj = 0;
   12908               0 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   12909               0 :   void *argp1 = 0 ;
   12910               0 :   int res1 = 0 ;
   12911               0 :   PyObject * obj0 = 0 ;
   12912                 :   int result;
   12913                 :   
   12914               0 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetBand",&obj0)) SWIG_fail;
   12915               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   12916               0 :   if (!SWIG_IsOK(res1)) {
   12917               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   12918                 :   }
   12919               0 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   12920                 :   {
   12921               0 :     if ( bUseExceptions ) {
   12922               0 :       CPLErrorReset();
   12923                 :     }
   12924               0 :     result = (int)GDALRasterBandShadow_GetBand(arg1);
   12925               0 :     if ( bUseExceptions ) {
   12926               0 :       CPLErr eclass = CPLGetLastErrorType();
   12927               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12928               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12929                 :       }
   12930                 :     }
   12931                 :   }
   12932               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   12933               0 :   return resultobj;
   12934                 : fail:
   12935               0 :   return NULL;
   12936                 : }
   12937                 : 
   12938                 : 
   12939              31 : SWIGINTERN PyObject *_wrap_Band_GetBlockSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12940              31 :   PyObject *resultobj = 0;
   12941              31 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   12942              31 :   int *arg2 = (int *) 0 ;
   12943              31 :   int *arg3 = (int *) 0 ;
   12944              31 :   void *argp1 = 0 ;
   12945              31 :   int res1 = 0 ;
   12946                 :   int temp2 ;
   12947              31 :   int res2 = SWIG_TMPOBJ ;
   12948                 :   int temp3 ;
   12949              31 :   int res3 = SWIG_TMPOBJ ;
   12950              31 :   PyObject * obj0 = 0 ;
   12951                 :   
   12952              31 :   arg2 = &temp2;
   12953              31 :   arg3 = &temp3;
   12954              31 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetBlockSize",&obj0)) SWIG_fail;
   12955              31 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   12956              31 :   if (!SWIG_IsOK(res1)) {
   12957               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetBlockSize" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   12958                 :   }
   12959              31 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   12960                 :   {
   12961              31 :     if ( bUseExceptions ) {
   12962               0 :       CPLErrorReset();
   12963                 :     }
   12964                 :     GDALRasterBandShadow_GetBlockSize(arg1,arg2,arg3);
   12965              31 :     if ( bUseExceptions ) {
   12966               0 :       CPLErr eclass = CPLGetLastErrorType();
   12967               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   12968               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   12969                 :       }
   12970                 :     }
   12971                 :   }
   12972              31 :   resultobj = SWIG_Py_Void();
   12973              62 :   if (SWIG_IsTmpObj(res2)) {
   12974              62 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2)));
   12975                 :   } else {
   12976               0 :     int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   12977               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags));
   12978                 :   }
   12979              62 :   if (SWIG_IsTmpObj(res3)) {
   12980              62 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3)));
   12981                 :   } else {
   12982               0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   12983               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags));
   12984                 :   }
   12985              31 :   return resultobj;
   12986                 : fail:
   12987               0 :   return NULL;
   12988                 : }
   12989                 : 
   12990                 : 
   12991              21 : SWIGINTERN PyObject *_wrap_Band_GetColorInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   12992              21 :   PyObject *resultobj = 0;
   12993              21 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   12994              21 :   void *argp1 = 0 ;
   12995              21 :   int res1 = 0 ;
   12996              21 :   PyObject * obj0 = 0 ;
   12997                 :   GDALColorInterp result;
   12998                 :   
   12999              21 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetColorInterpretation",&obj0)) SWIG_fail;
   13000              21 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13001              21 :   if (!SWIG_IsOK(res1)) {
   13002               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13003                 :   }
   13004              21 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13005                 :   {
   13006              21 :     if ( bUseExceptions ) {
   13007               0 :       CPLErrorReset();
   13008                 :     }
   13009              21 :     result = (GDALColorInterp)GDALRasterBandShadow_GetColorInterpretation(arg1);
   13010              21 :     if ( bUseExceptions ) {
   13011               0 :       CPLErr eclass = CPLGetLastErrorType();
   13012               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13013               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13014                 :       }
   13015                 :     }
   13016                 :   }
   13017              42 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13018              21 :   return resultobj;
   13019                 : fail:
   13020               0 :   return NULL;
   13021                 : }
   13022                 : 
   13023                 : 
   13024             154 : SWIGINTERN PyObject *_wrap_Band_GetRasterColorInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13025             154 :   PyObject *resultobj = 0;
   13026             154 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13027             154 :   void *argp1 = 0 ;
   13028             154 :   int res1 = 0 ;
   13029             154 :   PyObject * obj0 = 0 ;
   13030                 :   GDALColorInterp result;
   13031                 :   
   13032             154 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetRasterColorInterpretation",&obj0)) SWIG_fail;
   13033             154 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13034             154 :   if (!SWIG_IsOK(res1)) {
   13035               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetRasterColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13036                 :   }
   13037             154 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13038                 :   {
   13039             154 :     if ( bUseExceptions ) {
   13040               0 :       CPLErrorReset();
   13041                 :     }
   13042             154 :     result = (GDALColorInterp)GDALRasterBandShadow_GetRasterColorInterpretation(arg1);
   13043             154 :     if ( bUseExceptions ) {
   13044               0 :       CPLErr eclass = CPLGetLastErrorType();
   13045               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13046               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13047                 :       }
   13048                 :     }
   13049                 :   }
   13050             308 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13051             154 :   return resultobj;
   13052                 : fail:
   13053               0 :   return NULL;
   13054                 : }
   13055                 : 
   13056                 : 
   13057              16 : SWIGINTERN PyObject *_wrap_Band_SetColorInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13058              16 :   PyObject *resultobj = 0;
   13059              16 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13060                 :   GDALColorInterp arg2 ;
   13061              16 :   void *argp1 = 0 ;
   13062              16 :   int res1 = 0 ;
   13063                 :   int val2 ;
   13064              16 :   int ecode2 = 0 ;
   13065              16 :   PyObject * obj0 = 0 ;
   13066              16 :   PyObject * obj1 = 0 ;
   13067                 :   CPLErr result;
   13068                 :   
   13069              16 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_SetColorInterpretation",&obj0,&obj1)) SWIG_fail;
   13070              16 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13071              16 :   if (!SWIG_IsOK(res1)) {
   13072               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13073                 :   }
   13074              16 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13075              16 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   13076              16 :   if (!SWIG_IsOK(ecode2)) {
   13077               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetColorInterpretation" "', argument " "2"" of type '" "GDALColorInterp""'");
   13078                 :   } 
   13079              16 :   arg2 = static_cast< GDALColorInterp >(val2);
   13080                 :   {
   13081              16 :     if ( bUseExceptions ) {
   13082               0 :       CPLErrorReset();
   13083                 :     }
   13084              16 :     result = (CPLErr)GDALRasterBandShadow_SetColorInterpretation(arg1,arg2);
   13085              16 :     if ( bUseExceptions ) {
   13086               0 :       CPLErr eclass = CPLGetLastErrorType();
   13087               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13088               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13089                 :       }
   13090                 :     }
   13091                 :   }
   13092              32 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13093                 :   {
   13094                 :     /* %typemap(ret) CPLErr */
   13095              16 :     if ( bUseExceptions == 0 ) {
   13096                 :       /* We're not using exceptions.  And no error has occurred */
   13097              16 :       if ( resultobj == 0 ) {
   13098                 :         /* No other return values set so return ErrorCode */
   13099               0 :         resultobj = PyInt_FromLong(result);
   13100                 :       }
   13101                 :     }
   13102                 :   }
   13103              16 :   return resultobj;
   13104                 : fail:
   13105               0 :   return NULL;
   13106                 : }
   13107                 : 
   13108                 : 
   13109              57 : SWIGINTERN PyObject *_wrap_Band_SetRasterColorInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13110              57 :   PyObject *resultobj = 0;
   13111              57 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13112                 :   GDALColorInterp arg2 ;
   13113              57 :   void *argp1 = 0 ;
   13114              57 :   int res1 = 0 ;
   13115                 :   int val2 ;
   13116              57 :   int ecode2 = 0 ;
   13117              57 :   PyObject * obj0 = 0 ;
   13118              57 :   PyObject * obj1 = 0 ;
   13119                 :   CPLErr result;
   13120                 :   
   13121              57 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_SetRasterColorInterpretation",&obj0,&obj1)) SWIG_fail;
   13122              57 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13123              57 :   if (!SWIG_IsOK(res1)) {
   13124               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetRasterColorInterpretation" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13125                 :   }
   13126              57 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13127              57 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   13128              57 :   if (!SWIG_IsOK(ecode2)) {
   13129               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetRasterColorInterpretation" "', argument " "2"" of type '" "GDALColorInterp""'");
   13130                 :   } 
   13131              57 :   arg2 = static_cast< GDALColorInterp >(val2);
   13132                 :   {
   13133              57 :     if ( bUseExceptions ) {
   13134               0 :       CPLErrorReset();
   13135                 :     }
   13136              57 :     result = (CPLErr)GDALRasterBandShadow_SetRasterColorInterpretation(arg1,arg2);
   13137              57 :     if ( bUseExceptions ) {
   13138               0 :       CPLErr eclass = CPLGetLastErrorType();
   13139               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13140               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13141                 :       }
   13142                 :     }
   13143                 :   }
   13144             114 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13145                 :   {
   13146                 :     /* %typemap(ret) CPLErr */
   13147              57 :     if ( bUseExceptions == 0 ) {
   13148                 :       /* We're not using exceptions.  And no error has occurred */
   13149              57 :       if ( resultobj == 0 ) {
   13150                 :         /* No other return values set so return ErrorCode */
   13151               0 :         resultobj = PyInt_FromLong(result);
   13152                 :       }
   13153                 :     }
   13154                 :   }
   13155              57 :   return resultobj;
   13156                 : fail:
   13157               0 :   return NULL;
   13158                 : }
   13159                 : 
   13160                 : 
   13161             115 : SWIGINTERN PyObject *_wrap_Band_GetNoDataValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13162             115 :   PyObject *resultobj = 0;
   13163             115 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13164             115 :   double *arg2 = (double *) 0 ;
   13165             115 :   int *arg3 = (int *) 0 ;
   13166             115 :   void *argp1 = 0 ;
   13167             115 :   int res1 = 0 ;
   13168                 :   double tmpval2 ;
   13169                 :   int tmphasval2 ;
   13170             115 :   PyObject * obj0 = 0 ;
   13171                 :   
   13172                 :   {
   13173                 :     /* %typemap(python,in,numinputs=0) (double *val, int*hasval) */
   13174             115 :     arg2 = &tmpval2;
   13175             115 :     arg3 = &tmphasval2;
   13176                 :   }
   13177             115 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetNoDataValue",&obj0)) SWIG_fail;
   13178             115 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13179             115 :   if (!SWIG_IsOK(res1)) {
   13180               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetNoDataValue" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13181                 :   }
   13182             115 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13183                 :   {
   13184             115 :     if ( bUseExceptions ) {
   13185               0 :       CPLErrorReset();
   13186                 :     }
   13187                 :     GDALRasterBandShadow_GetNoDataValue(arg1,arg2,arg3);
   13188             115 :     if ( bUseExceptions ) {
   13189               0 :       CPLErr eclass = CPLGetLastErrorType();
   13190               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13191               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13192                 :       }
   13193                 :     }
   13194                 :   }
   13195             115 :   resultobj = SWIG_Py_Void();
   13196                 :   {
   13197                 :     /* %typemap(python,argout) (double *val, int*hasval) */
   13198                 :     PyObject *r;
   13199             115 :     if ( !*arg3 ) {
   13200              20 :       Py_INCREF(Py_None);
   13201              20 :       r = Py_None;
   13202              20 :       resultobj = t_output_helper(resultobj,r);
   13203                 :     }
   13204                 :     else {
   13205              95 :       r = PyFloat_FromDouble( *arg2 );
   13206              95 :       resultobj = t_output_helper(resultobj,r);
   13207                 :     }
   13208                 :   }
   13209             115 :   return resultobj;
   13210                 : fail:
   13211               0 :   return NULL;
   13212                 : }
   13213                 : 
   13214                 : 
   13215              54 : SWIGINTERN PyObject *_wrap_Band_SetNoDataValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13216              54 :   PyObject *resultobj = 0;
   13217              54 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13218                 :   double arg2 ;
   13219              54 :   void *argp1 = 0 ;
   13220              54 :   int res1 = 0 ;
   13221                 :   double val2 ;
   13222              54 :   int ecode2 = 0 ;
   13223              54 :   PyObject * obj0 = 0 ;
   13224              54 :   PyObject * obj1 = 0 ;
   13225                 :   CPLErr result;
   13226                 :   
   13227              54 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_SetNoDataValue",&obj0,&obj1)) SWIG_fail;
   13228              54 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13229              54 :   if (!SWIG_IsOK(res1)) {
   13230               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetNoDataValue" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13231                 :   }
   13232              54 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13233              54 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   13234              54 :   if (!SWIG_IsOK(ecode2)) {
   13235               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetNoDataValue" "', argument " "2"" of type '" "double""'");
   13236                 :   } 
   13237              54 :   arg2 = static_cast< double >(val2);
   13238                 :   {
   13239              54 :     if ( bUseExceptions ) {
   13240               0 :       CPLErrorReset();
   13241                 :     }
   13242              54 :     result = (CPLErr)GDALRasterBandShadow_SetNoDataValue(arg1,arg2);
   13243              54 :     if ( bUseExceptions ) {
   13244               0 :       CPLErr eclass = CPLGetLastErrorType();
   13245               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13246               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13247                 :       }
   13248                 :     }
   13249                 :   }
   13250             108 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13251                 :   {
   13252                 :     /* %typemap(ret) CPLErr */
   13253              54 :     if ( bUseExceptions == 0 ) {
   13254                 :       /* We're not using exceptions.  And no error has occurred */
   13255              54 :       if ( resultobj == 0 ) {
   13256                 :         /* No other return values set so return ErrorCode */
   13257               0 :         resultobj = PyInt_FromLong(result);
   13258                 :       }
   13259                 :     }
   13260                 :   }
   13261              54 :   return resultobj;
   13262                 : fail:
   13263               0 :   return NULL;
   13264                 : }
   13265                 : 
   13266                 : 
   13267              27 : SWIGINTERN PyObject *_wrap_Band_GetUnitType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13268              27 :   PyObject *resultobj = 0;
   13269              27 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13270              27 :   void *argp1 = 0 ;
   13271              27 :   int res1 = 0 ;
   13272              27 :   PyObject * obj0 = 0 ;
   13273              27 :   char *result = 0 ;
   13274                 :   
   13275              27 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetUnitType",&obj0)) SWIG_fail;
   13276              27 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13277              27 :   if (!SWIG_IsOK(res1)) {
   13278               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetUnitType" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13279                 :   }
   13280              27 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13281                 :   {
   13282              27 :     if ( bUseExceptions ) {
   13283               0 :       CPLErrorReset();
   13284                 :     }
   13285              27 :     result = (char *)GDALRasterBandShadow_GetUnitType(arg1);
   13286              27 :     if ( bUseExceptions ) {
   13287               0 :       CPLErr eclass = CPLGetLastErrorType();
   13288               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13289               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13290                 :       }
   13291                 :     }
   13292                 :   }
   13293              27 :   resultobj = SWIG_FromCharPtr((const char *)result);
   13294              27 :   return resultobj;
   13295                 : fail:
   13296               0 :   return NULL;
   13297                 : }
   13298                 : 
   13299                 : 
   13300               5 : SWIGINTERN PyObject *_wrap_Band_SetUnitType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13301               5 :   PyObject *resultobj = 0;
   13302               5 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13303               5 :   char *arg2 = (char *) 0 ;
   13304               5 :   void *argp1 = 0 ;
   13305               5 :   int res1 = 0 ;
   13306                 :   int res2 ;
   13307               5 :   char *buf2 = 0 ;
   13308               5 :   int alloc2 = 0 ;
   13309               5 :   PyObject * obj0 = 0 ;
   13310               5 :   PyObject * obj1 = 0 ;
   13311                 :   CPLErr result;
   13312                 :   
   13313               5 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_SetUnitType",&obj0,&obj1)) SWIG_fail;
   13314               5 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13315               5 :   if (!SWIG_IsOK(res1)) {
   13316               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetUnitType" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13317                 :   }
   13318               5 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13319               5 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   13320               5 :   if (!SWIG_IsOK(res2)) {
   13321               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetUnitType" "', argument " "2"" of type '" "char const *""'");
   13322                 :   }
   13323               5 :   arg2 = reinterpret_cast< char * >(buf2);
   13324                 :   {
   13325               5 :     if ( bUseExceptions ) {
   13326               0 :       CPLErrorReset();
   13327                 :     }
   13328               5 :     result = (CPLErr)GDALRasterBandShadow_SetUnitType(arg1,(char const *)arg2);
   13329               5 :     if ( bUseExceptions ) {
   13330               0 :       CPLErr eclass = CPLGetLastErrorType();
   13331               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13332               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13333                 :       }
   13334                 :     }
   13335                 :   }
   13336              10 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13337               5 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   13338                 :   {
   13339                 :     /* %typemap(ret) CPLErr */
   13340               5 :     if ( bUseExceptions == 0 ) {
   13341                 :       /* We're not using exceptions.  And no error has occurred */
   13342               5 :       if ( resultobj == 0 ) {
   13343                 :         /* No other return values set so return ErrorCode */
   13344               0 :         resultobj = PyInt_FromLong(result);
   13345                 :       }
   13346                 :     }
   13347                 :   }
   13348               5 :   return resultobj;
   13349                 : fail:
   13350               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   13351               0 :   return NULL;
   13352                 : }
   13353                 : 
   13354                 : 
   13355              18 : SWIGINTERN PyObject *_wrap_Band_GetRasterCategoryNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13356              18 :   PyObject *resultobj = 0;
   13357              18 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13358              18 :   void *argp1 = 0 ;
   13359              18 :   int res1 = 0 ;
   13360              18 :   PyObject * obj0 = 0 ;
   13361              18 :   char **result = 0 ;
   13362                 :   
   13363              18 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetRasterCategoryNames",&obj0)) SWIG_fail;
   13364              18 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13365              18 :   if (!SWIG_IsOK(res1)) {
   13366               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetRasterCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13367                 :   }
   13368              18 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13369                 :   {
   13370              18 :     if ( bUseExceptions ) {
   13371               0 :       CPLErrorReset();
   13372                 :     }
   13373              18 :     result = (char **)GDALRasterBandShadow_GetRasterCategoryNames(arg1);
   13374              18 :     if ( bUseExceptions ) {
   13375               0 :       CPLErr eclass = CPLGetLastErrorType();
   13376               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13377               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13378                 :       }
   13379                 :     }
   13380                 :   }
   13381                 :   {
   13382                 :     /* %typemap(out) char **options -> ( string ) */
   13383              18 :     char **stringarray = result;
   13384              18 :     if ( stringarray == NULL ) {
   13385              17 :       resultobj = Py_None;
   13386              17 :       Py_INCREF( resultobj );
   13387                 :     }
   13388                 :     else {
   13389               1 :       int len = CSLCount( stringarray );
   13390               1 :       resultobj = PyList_New( len );
   13391              94 :       for ( int i = 0; i < len; ++i ) {
   13392              93 :         PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
   13393              93 :         PyList_SetItem(resultobj, i, o );
   13394                 :       }
   13395                 :     }
   13396                 :   }
   13397              18 :   return resultobj;
   13398                 : fail:
   13399               0 :   return NULL;
   13400                 : }
   13401                 : 
   13402                 : 
   13403               0 : SWIGINTERN PyObject *_wrap_Band_SetRasterCategoryNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13404               0 :   PyObject *resultobj = 0;
   13405               0 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13406               0 :   char **arg2 = (char **) 0 ;
   13407               0 :   void *argp1 = 0 ;
   13408               0 :   int res1 = 0 ;
   13409               0 :   PyObject * obj0 = 0 ;
   13410               0 :   PyObject * obj1 = 0 ;
   13411                 :   CPLErr result;
   13412                 :   
   13413               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_SetRasterCategoryNames",&obj0,&obj1)) SWIG_fail;
   13414               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13415               0 :   if (!SWIG_IsOK(res1)) {
   13416               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetRasterCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13417                 :   }
   13418               0 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13419                 :   {
   13420                 :     /* %typemap(in) char **options */
   13421                 :     /* Check if is a list */
   13422               0 :     if ( ! PySequence_Check(obj1)) {
   13423               0 :       PyErr_SetString(PyExc_TypeError,"not a sequence");
   13424               0 :       SWIG_fail;
   13425                 :     }
   13426                 :     
   13427               0 :     int size = PySequence_Size(obj1);
   13428               0 :     for (int i = 0; i < size; i++) {
   13429               0 :       PyObject* pyObj = PySequence_GetItem(obj1,i);
   13430               0 :       if (PyUnicode_Check(pyObj))
   13431                 :       {
   13432                 :         char *pszStr;
   13433                 :         Py_ssize_t nLen;
   13434               0 :         PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   13435                 : #if PY_VERSION_HEX >= 0x03000000
   13436                 :         PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   13437                 : #else
   13438               0 :         PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   13439                 : #endif
   13440               0 :         arg2 = CSLAddString( arg2, pszStr );
   13441               0 :         Py_XDECREF(pyUTF8Str);
   13442                 :       }
   13443                 : #if PY_VERSION_HEX >= 0x03000000
   13444                 :       else if (PyBytes_Check(pyObj))
   13445                 :       arg2 = CSLAddString( arg2, PyBytes_AsString(pyObj) );
   13446                 : #else
   13447               0 :       else if (PyString_Check(pyObj))
   13448               0 :       arg2 = CSLAddString( arg2, PyString_AsString(pyObj) );
   13449                 : #endif
   13450                 :       else
   13451                 :       {
   13452               0 :         Py_DECREF(pyObj);
   13453               0 :         PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   13454               0 :         SWIG_fail;
   13455                 :       }
   13456               0 :       Py_DECREF(pyObj);
   13457                 :     }
   13458                 :   }
   13459                 :   {
   13460               0 :     if ( bUseExceptions ) {
   13461               0 :       CPLErrorReset();
   13462                 :     }
   13463               0 :     result = (CPLErr)GDALRasterBandShadow_SetRasterCategoryNames(arg1,arg2);
   13464               0 :     if ( bUseExceptions ) {
   13465               0 :       CPLErr eclass = CPLGetLastErrorType();
   13466               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13467               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13468                 :       }
   13469                 :     }
   13470                 :   }
   13471               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13472                 :   {
   13473                 :     /* %typemap(freearg) char **options */
   13474               0 :     CSLDestroy( arg2 );
   13475                 :   }
   13476                 :   {
   13477                 :     /* %typemap(ret) CPLErr */
   13478               0 :     if ( bUseExceptions == 0 ) {
   13479                 :       /* We're not using exceptions.  And no error has occurred */
   13480               0 :       if ( resultobj == 0 ) {
   13481                 :         /* No other return values set so return ErrorCode */
   13482               0 :         resultobj = PyInt_FromLong(result);
   13483                 :       }
   13484                 :     }
   13485                 :   }
   13486               0 :   return resultobj;
   13487                 : fail:
   13488                 :   {
   13489                 :     /* %typemap(freearg) char **options */
   13490               0 :     CSLDestroy( arg2 );
   13491                 :   }
   13492               0 :   return NULL;
   13493                 : }
   13494                 : 
   13495                 : 
   13496              31 : SWIGINTERN PyObject *_wrap_Band_GetMinimum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13497              31 :   PyObject *resultobj = 0;
   13498              31 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13499              31 :   double *arg2 = (double *) 0 ;
   13500              31 :   int *arg3 = (int *) 0 ;
   13501              31 :   void *argp1 = 0 ;
   13502              31 :   int res1 = 0 ;
   13503                 :   double tmpval2 ;
   13504                 :   int tmphasval2 ;
   13505              31 :   PyObject * obj0 = 0 ;
   13506                 :   
   13507                 :   {
   13508                 :     /* %typemap(python,in,numinputs=0) (double *val, int*hasval) */
   13509              31 :     arg2 = &tmpval2;
   13510              31 :     arg3 = &tmphasval2;
   13511                 :   }
   13512              31 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetMinimum",&obj0)) SWIG_fail;
   13513              31 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13514              31 :   if (!SWIG_IsOK(res1)) {
   13515               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMinimum" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13516                 :   }
   13517              31 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13518                 :   {
   13519              31 :     if ( bUseExceptions ) {
   13520               0 :       CPLErrorReset();
   13521                 :     }
   13522                 :     GDALRasterBandShadow_GetMinimum(arg1,arg2,arg3);
   13523              31 :     if ( bUseExceptions ) {
   13524               0 :       CPLErr eclass = CPLGetLastErrorType();
   13525               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13526               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13527                 :       }
   13528                 :     }
   13529                 :   }
   13530              31 :   resultobj = SWIG_Py_Void();
   13531                 :   {
   13532                 :     /* %typemap(python,argout) (double *val, int*hasval) */
   13533                 :     PyObject *r;
   13534              31 :     if ( !*arg3 ) {
   13535              19 :       Py_INCREF(Py_None);
   13536              19 :       r = Py_None;
   13537              19 :       resultobj = t_output_helper(resultobj,r);
   13538                 :     }
   13539                 :     else {
   13540              12 :       r = PyFloat_FromDouble( *arg2 );
   13541              12 :       resultobj = t_output_helper(resultobj,r);
   13542                 :     }
   13543                 :   }
   13544              31 :   return resultobj;
   13545                 : fail:
   13546               0 :   return NULL;
   13547                 : }
   13548                 : 
   13549                 : 
   13550              28 : SWIGINTERN PyObject *_wrap_Band_GetMaximum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13551              28 :   PyObject *resultobj = 0;
   13552              28 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13553              28 :   double *arg2 = (double *) 0 ;
   13554              28 :   int *arg3 = (int *) 0 ;
   13555              28 :   void *argp1 = 0 ;
   13556              28 :   int res1 = 0 ;
   13557                 :   double tmpval2 ;
   13558                 :   int tmphasval2 ;
   13559              28 :   PyObject * obj0 = 0 ;
   13560                 :   
   13561                 :   {
   13562                 :     /* %typemap(python,in,numinputs=0) (double *val, int*hasval) */
   13563              28 :     arg2 = &tmpval2;
   13564              28 :     arg3 = &tmphasval2;
   13565                 :   }
   13566              28 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetMaximum",&obj0)) SWIG_fail;
   13567              28 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13568              28 :   if (!SWIG_IsOK(res1)) {
   13569               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMaximum" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13570                 :   }
   13571              28 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13572                 :   {
   13573              28 :     if ( bUseExceptions ) {
   13574               0 :       CPLErrorReset();
   13575                 :     }
   13576                 :     GDALRasterBandShadow_GetMaximum(arg1,arg2,arg3);
   13577              28 :     if ( bUseExceptions ) {
   13578               0 :       CPLErr eclass = CPLGetLastErrorType();
   13579               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13580               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13581                 :       }
   13582                 :     }
   13583                 :   }
   13584              28 :   resultobj = SWIG_Py_Void();
   13585                 :   {
   13586                 :     /* %typemap(python,argout) (double *val, int*hasval) */
   13587                 :     PyObject *r;
   13588              28 :     if ( !*arg3 ) {
   13589              18 :       Py_INCREF(Py_None);
   13590              18 :       r = Py_None;
   13591              18 :       resultobj = t_output_helper(resultobj,r);
   13592                 :     }
   13593                 :     else {
   13594              10 :       r = PyFloat_FromDouble( *arg2 );
   13595              10 :       resultobj = t_output_helper(resultobj,r);
   13596                 :     }
   13597                 :   }
   13598              28 :   return resultobj;
   13599                 : fail:
   13600               0 :   return NULL;
   13601                 : }
   13602                 : 
   13603                 : 
   13604              32 : SWIGINTERN PyObject *_wrap_Band_GetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13605              32 :   PyObject *resultobj = 0;
   13606              32 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13607              32 :   double *arg2 = (double *) 0 ;
   13608              32 :   int *arg3 = (int *) 0 ;
   13609              32 :   void *argp1 = 0 ;
   13610              32 :   int res1 = 0 ;
   13611                 :   double tmpval2 ;
   13612                 :   int tmphasval2 ;
   13613              32 :   PyObject * obj0 = 0 ;
   13614                 :   
   13615                 :   {
   13616                 :     /* %typemap(python,in,numinputs=0) (double *val, int*hasval) */
   13617              32 :     arg2 = &tmpval2;
   13618              32 :     arg3 = &tmphasval2;
   13619                 :   }
   13620              32 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetOffset",&obj0)) SWIG_fail;
   13621              32 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13622              32 :   if (!SWIG_IsOK(res1)) {
   13623               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetOffset" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13624                 :   }
   13625              32 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13626                 :   {
   13627              32 :     if ( bUseExceptions ) {
   13628               0 :       CPLErrorReset();
   13629                 :     }
   13630                 :     GDALRasterBandShadow_GetOffset(arg1,arg2,arg3);
   13631              32 :     if ( bUseExceptions ) {
   13632               0 :       CPLErr eclass = CPLGetLastErrorType();
   13633               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13634               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13635                 :       }
   13636                 :     }
   13637                 :   }
   13638              32 :   resultobj = SWIG_Py_Void();
   13639                 :   {
   13640                 :     /* %typemap(python,argout) (double *val, int*hasval) */
   13641                 :     PyObject *r;
   13642              32 :     if ( !*arg3 ) {
   13643               1 :       Py_INCREF(Py_None);
   13644               1 :       r = Py_None;
   13645               1 :       resultobj = t_output_helper(resultobj,r);
   13646                 :     }
   13647                 :     else {
   13648              31 :       r = PyFloat_FromDouble( *arg2 );
   13649              31 :       resultobj = t_output_helper(resultobj,r);
   13650                 :     }
   13651                 :   }
   13652              32 :   return resultobj;
   13653                 : fail:
   13654               0 :   return NULL;
   13655                 : }
   13656                 : 
   13657                 : 
   13658              32 : SWIGINTERN PyObject *_wrap_Band_GetScale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13659              32 :   PyObject *resultobj = 0;
   13660              32 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13661              32 :   double *arg2 = (double *) 0 ;
   13662              32 :   int *arg3 = (int *) 0 ;
   13663              32 :   void *argp1 = 0 ;
   13664              32 :   int res1 = 0 ;
   13665                 :   double tmpval2 ;
   13666                 :   int tmphasval2 ;
   13667              32 :   PyObject * obj0 = 0 ;
   13668                 :   
   13669                 :   {
   13670                 :     /* %typemap(python,in,numinputs=0) (double *val, int*hasval) */
   13671              32 :     arg2 = &tmpval2;
   13672              32 :     arg3 = &tmphasval2;
   13673                 :   }
   13674              32 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetScale",&obj0)) SWIG_fail;
   13675              32 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13676              32 :   if (!SWIG_IsOK(res1)) {
   13677               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetScale" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13678                 :   }
   13679              32 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13680                 :   {
   13681              32 :     if ( bUseExceptions ) {
   13682               0 :       CPLErrorReset();
   13683                 :     }
   13684                 :     GDALRasterBandShadow_GetScale(arg1,arg2,arg3);
   13685              32 :     if ( bUseExceptions ) {
   13686               0 :       CPLErr eclass = CPLGetLastErrorType();
   13687               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13688               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13689                 :       }
   13690                 :     }
   13691                 :   }
   13692              32 :   resultobj = SWIG_Py_Void();
   13693                 :   {
   13694                 :     /* %typemap(python,argout) (double *val, int*hasval) */
   13695                 :     PyObject *r;
   13696              32 :     if ( !*arg3 ) {
   13697               1 :       Py_INCREF(Py_None);
   13698               1 :       r = Py_None;
   13699               1 :       resultobj = t_output_helper(resultobj,r);
   13700                 :     }
   13701                 :     else {
   13702              31 :       r = PyFloat_FromDouble( *arg2 );
   13703              31 :       resultobj = t_output_helper(resultobj,r);
   13704                 :     }
   13705                 :   }
   13706              32 :   return resultobj;
   13707                 : fail:
   13708               0 :   return NULL;
   13709                 : }
   13710                 : 
   13711                 : 
   13712               5 : SWIGINTERN PyObject *_wrap_Band_SetOffset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13713               5 :   PyObject *resultobj = 0;
   13714               5 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13715                 :   double arg2 ;
   13716               5 :   void *argp1 = 0 ;
   13717               5 :   int res1 = 0 ;
   13718                 :   double val2 ;
   13719               5 :   int ecode2 = 0 ;
   13720               5 :   PyObject * obj0 = 0 ;
   13721               5 :   PyObject * obj1 = 0 ;
   13722                 :   CPLErr result;
   13723                 :   
   13724               5 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_SetOffset",&obj0,&obj1)) SWIG_fail;
   13725               5 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13726               5 :   if (!SWIG_IsOK(res1)) {
   13727               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetOffset" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13728                 :   }
   13729               5 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13730               5 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   13731               5 :   if (!SWIG_IsOK(ecode2)) {
   13732               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetOffset" "', argument " "2"" of type '" "double""'");
   13733                 :   } 
   13734               5 :   arg2 = static_cast< double >(val2);
   13735                 :   {
   13736               5 :     if ( bUseExceptions ) {
   13737               0 :       CPLErrorReset();
   13738                 :     }
   13739               5 :     result = (CPLErr)GDALRasterBandShadow_SetOffset(arg1,arg2);
   13740               5 :     if ( bUseExceptions ) {
   13741               0 :       CPLErr eclass = CPLGetLastErrorType();
   13742               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13743               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13744                 :       }
   13745                 :     }
   13746                 :   }
   13747              10 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13748                 :   {
   13749                 :     /* %typemap(ret) CPLErr */
   13750               5 :     if ( bUseExceptions == 0 ) {
   13751                 :       /* We're not using exceptions.  And no error has occurred */
   13752               5 :       if ( resultobj == 0 ) {
   13753                 :         /* No other return values set so return ErrorCode */
   13754               0 :         resultobj = PyInt_FromLong(result);
   13755                 :       }
   13756                 :     }
   13757                 :   }
   13758               5 :   return resultobj;
   13759                 : fail:
   13760               0 :   return NULL;
   13761                 : }
   13762                 : 
   13763                 : 
   13764               5 : SWIGINTERN PyObject *_wrap_Band_SetScale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13765               5 :   PyObject *resultobj = 0;
   13766               5 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13767                 :   double arg2 ;
   13768               5 :   void *argp1 = 0 ;
   13769               5 :   int res1 = 0 ;
   13770                 :   double val2 ;
   13771               5 :   int ecode2 = 0 ;
   13772               5 :   PyObject * obj0 = 0 ;
   13773               5 :   PyObject * obj1 = 0 ;
   13774                 :   CPLErr result;
   13775                 :   
   13776               5 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_SetScale",&obj0,&obj1)) SWIG_fail;
   13777               5 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13778               5 :   if (!SWIG_IsOK(res1)) {
   13779               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetScale" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13780                 :   }
   13781               5 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13782               5 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   13783               5 :   if (!SWIG_IsOK(ecode2)) {
   13784               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetScale" "', argument " "2"" of type '" "double""'");
   13785                 :   } 
   13786               5 :   arg2 = static_cast< double >(val2);
   13787                 :   {
   13788               5 :     if ( bUseExceptions ) {
   13789               0 :       CPLErrorReset();
   13790                 :     }
   13791               5 :     result = (CPLErr)GDALRasterBandShadow_SetScale(arg1,arg2);
   13792               5 :     if ( bUseExceptions ) {
   13793               0 :       CPLErr eclass = CPLGetLastErrorType();
   13794               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13795               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13796                 :       }
   13797                 :     }
   13798                 :   }
   13799              10 :   resultobj = SWIG_From_int(static_cast< int >(result));
   13800                 :   {
   13801                 :     /* %typemap(ret) CPLErr */
   13802               5 :     if ( bUseExceptions == 0 ) {
   13803                 :       /* We're not using exceptions.  And no error has occurred */
   13804               5 :       if ( resultobj == 0 ) {
   13805                 :         /* No other return values set so return ErrorCode */
   13806               0 :         resultobj = PyInt_FromLong(result);
   13807                 :       }
   13808                 :     }
   13809                 :   }
   13810               5 :   return resultobj;
   13811                 : fail:
   13812               0 :   return NULL;
   13813                 : }
   13814                 : 
   13815                 : 
   13816              60 : SWIGINTERN PyObject *_wrap_Band_GetStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13817              60 :   PyObject *resultobj = 0;
   13818              60 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13819                 :   int arg2 ;
   13820                 :   int arg3 ;
   13821              60 :   double *arg4 = (double *) 0 ;
   13822              60 :   double *arg5 = (double *) 0 ;
   13823              60 :   double *arg6 = (double *) 0 ;
   13824              60 :   double *arg7 = (double *) 0 ;
   13825              60 :   void *argp1 = 0 ;
   13826              60 :   int res1 = 0 ;
   13827                 :   int val2 ;
   13828              60 :   int ecode2 = 0 ;
   13829                 :   int val3 ;
   13830              60 :   int ecode3 = 0 ;
   13831                 :   double temp4 ;
   13832              60 :   int res4 = SWIG_TMPOBJ ;
   13833                 :   double temp5 ;
   13834              60 :   int res5 = SWIG_TMPOBJ ;
   13835                 :   double temp6 ;
   13836              60 :   int res6 = SWIG_TMPOBJ ;
   13837                 :   double temp7 ;
   13838              60 :   int res7 = SWIG_TMPOBJ ;
   13839              60 :   PyObject * obj0 = 0 ;
   13840              60 :   PyObject * obj1 = 0 ;
   13841              60 :   PyObject * obj2 = 0 ;
   13842                 :   CPLErr result;
   13843                 :   
   13844              60 :   arg4 = &temp4;
   13845              60 :   arg5 = &temp5;
   13846              60 :   arg6 = &temp6;
   13847              60 :   arg7 = &temp7;
   13848              60 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Band_GetStatistics",&obj0,&obj1,&obj2)) SWIG_fail;
   13849              60 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13850              60 :   if (!SWIG_IsOK(res1)) {
   13851               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetStatistics" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13852                 :   }
   13853              60 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13854              60 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   13855              60 :   if (!SWIG_IsOK(ecode2)) {
   13856               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetStatistics" "', argument " "2"" of type '" "int""'");
   13857                 :   } 
   13858              60 :   arg2 = static_cast< int >(val2);
   13859              60 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   13860              60 :   if (!SWIG_IsOK(ecode3)) {
   13861               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetStatistics" "', argument " "3"" of type '" "int""'");
   13862                 :   } 
   13863              60 :   arg3 = static_cast< int >(val3);
   13864                 :   {
   13865              60 :     if ( bUseExceptions ) {
   13866               0 :       CPLErrorReset();
   13867                 :     }
   13868              60 :     result = (CPLErr)GDALRasterBandShadow_GetStatistics(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   13869              60 :     if ( bUseExceptions ) {
   13870               0 :       CPLErr eclass = CPLGetLastErrorType();
   13871               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   13872               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   13873                 :       }
   13874                 :     }
   13875                 :   }
   13876                 :   {
   13877                 :     /* %typemap(out) IF_ERROR_RETURN_NONE */
   13878                 :   }
   13879             120 :   if (SWIG_IsTmpObj(res4)) {
   13880              60 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
   13881                 :   } else {
   13882               0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   13883               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
   13884                 :   }
   13885             120 :   if (SWIG_IsTmpObj(res5)) {
   13886              60 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
   13887                 :   } else {
   13888               0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   13889               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
   13890                 :   }
   13891             120 :   if (SWIG_IsTmpObj(res6)) {
   13892              60 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
   13893                 :   } else {
   13894               0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   13895               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
   13896                 :   }
   13897             120 :   if (SWIG_IsTmpObj(res7)) {
   13898              60 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7)));
   13899                 :   } else {
   13900               0 :     int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   13901               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags));
   13902                 :   }
   13903                 :   {
   13904                 :     /* %typemap(ret) CPLErr */
   13905              60 :     if ( bUseExceptions == 0 ) {
   13906                 :       /* We're not using exceptions.  And no error has occurred */
   13907              60 :       if ( resultobj == 0 ) {
   13908                 :         /* No other return values set so return ErrorCode */
   13909               0 :         resultobj = PyInt_FromLong(result);
   13910                 :       }
   13911                 :     }
   13912                 :   }
   13913              60 :   return resultobj;
   13914                 : fail:
   13915               0 :   return NULL;
   13916                 : }
   13917                 : 
   13918                 : 
   13919               5 : SWIGINTERN PyObject *_wrap_Band_ComputeStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   13920               5 :   PyObject *resultobj = 0;
   13921               5 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   13922                 :   bool arg2 ;
   13923               5 :   double *arg3 = (double *) NULL ;
   13924               5 :   double *arg4 = (double *) NULL ;
   13925               5 :   double *arg5 = (double *) NULL ;
   13926               5 :   double *arg6 = (double *) NULL ;
   13927               5 :   GDALProgressFunc arg7 = (GDALProgressFunc) NULL ;
   13928               5 :   void *arg8 = (void *) NULL ;
   13929               5 :   void *argp1 = 0 ;
   13930               5 :   int res1 = 0 ;
   13931                 :   bool val2 ;
   13932               5 :   int ecode2 = 0 ;
   13933                 :   double temp3 ;
   13934               5 :   int res3 = SWIG_TMPOBJ ;
   13935                 :   double temp4 ;
   13936               5 :   int res4 = SWIG_TMPOBJ ;
   13937                 :   double temp5 ;
   13938               5 :   int res5 = SWIG_TMPOBJ ;
   13939                 :   double temp6 ;
   13940               5 :   int res6 = SWIG_TMPOBJ ;
   13941               5 :   PyObject * obj0 = 0 ;
   13942               5 :   PyObject * obj1 = 0 ;
   13943               5 :   PyObject * obj2 = 0 ;
   13944               5 :   PyObject * obj3 = 0 ;
   13945                 :   CPLErr result;
   13946                 :   
   13947                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   13948                 :   PyProgressData *psProgressInfo;
   13949               5 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   13950               5 :   psProgressInfo->nLastReported = -1;
   13951               5 :   psProgressInfo->psPyCallback = NULL;
   13952               5 :   psProgressInfo->psPyCallbackData = NULL;
   13953               5 :   arg8 = psProgressInfo;
   13954               5 :   arg3 = &temp3;
   13955               5 :   arg4 = &temp4;
   13956               5 :   arg5 = &temp5;
   13957               5 :   arg6 = &temp6;
   13958               5 :   if (!PyArg_ParseTuple(args,(char *)"OO|OO:Band_ComputeStatistics",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
   13959               5 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   13960               5 :   if (!SWIG_IsOK(res1)) {
   13961               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ComputeStatistics" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   13962                 :   }
   13963               5 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   13964              10 :   ecode2 = SWIG_AsVal_bool(obj1, &val2);
   13965               5 :   if (!SWIG_IsOK(ecode2)) {
   13966               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_ComputeStatistics" "', argument " "2"" of type '" "bool""'");
   13967                 :   } 
   13968               5 :   arg2 = static_cast< bool >(val2);
   13969               5 :   if (obj2) {
   13970                 :     {
   13971                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   13972                 :       /* callback_func typemap */
   13973               0 :       if (obj2 && obj2 != Py_None ) {
   13974               0 :         void* cbfunction = NULL;
   13975                 :         SWIG_ConvertPtr( obj2, 
   13976                 :           (void**)&cbfunction, 
   13977                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int, 
   13978               0 :           SWIG_POINTER_EXCEPTION | 0 );
   13979                 :         
   13980               0 :         if ( cbfunction == GDALTermProgress ) {
   13981               0 :           arg7 = GDALTermProgress;
   13982                 :         } else {
   13983               0 :           if (!PyCallable_Check(obj2)) {
   13984                 :             PyErr_SetString( PyExc_RuntimeError, 
   13985               0 :               "Object given is not a Python function" );
   13986               0 :             SWIG_fail;
   13987                 :           }
   13988               0 :           psProgressInfo->psPyCallback = obj2;
   13989               0 :           arg7 = PyProgressProxy;
   13990                 :         }
   13991                 :         
   13992                 :       }
   13993                 :       
   13994                 :     }
   13995                 :   }
   13996               5 :   if (obj3) {
   13997                 :     {
   13998                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   13999               0 :       psProgressInfo->psPyCallbackData = obj3 ;
   14000                 :     }
   14001                 :   }
   14002                 :   {
   14003               5 :     if ( bUseExceptions ) {
   14004               0 :       CPLErrorReset();
   14005                 :     }
   14006              10 :     result = (CPLErr)GDALRasterBandShadow_ComputeStatistics(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
   14007               5 :     if ( bUseExceptions ) {
   14008               0 :       CPLErr eclass = CPLGetLastErrorType();
   14009               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14010               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14011                 :       }
   14012                 :     }
   14013                 :   }
   14014                 :   {
   14015                 :     /* %typemap(out) IF_ERROR_RETURN_NONE */
   14016                 :   }
   14017              10 :   if (SWIG_IsTmpObj(res3)) {
   14018               5 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
   14019                 :   } else {
   14020               0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   14021               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
   14022                 :   }
   14023              10 :   if (SWIG_IsTmpObj(res4)) {
   14024               5 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
   14025                 :   } else {
   14026               0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   14027               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
   14028                 :   }
   14029              10 :   if (SWIG_IsTmpObj(res5)) {
   14030               5 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
   14031                 :   } else {
   14032               0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   14033               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
   14034                 :   }
   14035              10 :   if (SWIG_IsTmpObj(res6)) {
   14036               5 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
   14037                 :   } else {
   14038               0 :     int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   14039               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
   14040                 :   }
   14041                 :   {
   14042                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   14043                 :     
   14044               5 :     CPLFree(psProgressInfo);
   14045                 :     
   14046                 :   }
   14047               5 :   return resultobj;
   14048                 : fail:
   14049                 :   {
   14050                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   14051                 :     
   14052               0 :     CPLFree(psProgressInfo);
   14053                 :     
   14054                 :   }
   14055               0 :   return NULL;
   14056                 : }
   14057                 : 
   14058                 : 
   14059               0 : SWIGINTERN PyObject *_wrap_Band_SetStatistics(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14060               0 :   PyObject *resultobj = 0;
   14061               0 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14062                 :   double arg2 ;
   14063                 :   double arg3 ;
   14064                 :   double arg4 ;
   14065                 :   double arg5 ;
   14066               0 :   void *argp1 = 0 ;
   14067               0 :   int res1 = 0 ;
   14068                 :   double val2 ;
   14069               0 :   int ecode2 = 0 ;
   14070                 :   double val3 ;
   14071               0 :   int ecode3 = 0 ;
   14072                 :   double val4 ;
   14073               0 :   int ecode4 = 0 ;
   14074                 :   double val5 ;
   14075               0 :   int ecode5 = 0 ;
   14076               0 :   PyObject * obj0 = 0 ;
   14077               0 :   PyObject * obj1 = 0 ;
   14078               0 :   PyObject * obj2 = 0 ;
   14079               0 :   PyObject * obj3 = 0 ;
   14080               0 :   PyObject * obj4 = 0 ;
   14081                 :   CPLErr result;
   14082                 :   
   14083               0 :   if (!PyArg_ParseTuple(args,(char *)"OOOOO:Band_SetStatistics",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   14084               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14085               0 :   if (!SWIG_IsOK(res1)) {
   14086               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetStatistics" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14087                 :   }
   14088               0 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14089               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   14090               0 :   if (!SWIG_IsOK(ecode2)) {
   14091               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetStatistics" "', argument " "2"" of type '" "double""'");
   14092                 :   } 
   14093               0 :   arg2 = static_cast< double >(val2);
   14094               0 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   14095               0 :   if (!SWIG_IsOK(ecode3)) {
   14096               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_SetStatistics" "', argument " "3"" of type '" "double""'");
   14097                 :   } 
   14098               0 :   arg3 = static_cast< double >(val3);
   14099               0 :   ecode4 = SWIG_AsVal_double(obj3, &val4);
   14100               0 :   if (!SWIG_IsOK(ecode4)) {
   14101               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_SetStatistics" "', argument " "4"" of type '" "double""'");
   14102                 :   } 
   14103               0 :   arg4 = static_cast< double >(val4);
   14104               0 :   ecode5 = SWIG_AsVal_double(obj4, &val5);
   14105               0 :   if (!SWIG_IsOK(ecode5)) {
   14106               0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_SetStatistics" "', argument " "5"" of type '" "double""'");
   14107                 :   } 
   14108               0 :   arg5 = static_cast< double >(val5);
   14109                 :   {
   14110               0 :     if ( bUseExceptions ) {
   14111               0 :       CPLErrorReset();
   14112                 :     }
   14113               0 :     result = (CPLErr)GDALRasterBandShadow_SetStatistics(arg1,arg2,arg3,arg4,arg5);
   14114               0 :     if ( bUseExceptions ) {
   14115               0 :       CPLErr eclass = CPLGetLastErrorType();
   14116               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14117               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14118                 :       }
   14119                 :     }
   14120                 :   }
   14121               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14122               0 :   return resultobj;
   14123                 : fail:
   14124               0 :   return NULL;
   14125                 : }
   14126                 : 
   14127                 : 
   14128              86 : SWIGINTERN PyObject *_wrap_Band_GetOverviewCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14129              86 :   PyObject *resultobj = 0;
   14130              86 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14131              86 :   void *argp1 = 0 ;
   14132              86 :   int res1 = 0 ;
   14133              86 :   PyObject * obj0 = 0 ;
   14134                 :   int result;
   14135                 :   
   14136              86 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetOverviewCount",&obj0)) SWIG_fail;
   14137              86 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14138              86 :   if (!SWIG_IsOK(res1)) {
   14139               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetOverviewCount" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14140                 :   }
   14141              86 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14142                 :   {
   14143              86 :     if ( bUseExceptions ) {
   14144               0 :       CPLErrorReset();
   14145                 :     }
   14146              86 :     result = (int)GDALRasterBandShadow_GetOverviewCount(arg1);
   14147              86 :     if ( bUseExceptions ) {
   14148               0 :       CPLErr eclass = CPLGetLastErrorType();
   14149               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14150               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14151                 :       }
   14152                 :     }
   14153                 :   }
   14154              86 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14155              86 :   return resultobj;
   14156                 : fail:
   14157               0 :   return NULL;
   14158                 : }
   14159                 : 
   14160                 : 
   14161             259 : SWIGINTERN PyObject *_wrap_Band_GetOverview(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14162             259 :   PyObject *resultobj = 0;
   14163             259 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14164                 :   int arg2 ;
   14165             259 :   void *argp1 = 0 ;
   14166             259 :   int res1 = 0 ;
   14167                 :   int val2 ;
   14168             259 :   int ecode2 = 0 ;
   14169             259 :   PyObject * obj0 = 0 ;
   14170             259 :   PyObject * obj1 = 0 ;
   14171             259 :   GDALRasterBandShadow *result = 0 ;
   14172                 :   
   14173             259 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_GetOverview",&obj0,&obj1)) SWIG_fail;
   14174             259 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14175             259 :   if (!SWIG_IsOK(res1)) {
   14176               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetOverview" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14177                 :   }
   14178             259 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14179             259 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   14180             259 :   if (!SWIG_IsOK(ecode2)) {
   14181               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetOverview" "', argument " "2"" of type '" "int""'");
   14182                 :   } 
   14183             259 :   arg2 = static_cast< int >(val2);
   14184                 :   {
   14185             259 :     if ( bUseExceptions ) {
   14186               0 :       CPLErrorReset();
   14187                 :     }
   14188             259 :     result = (GDALRasterBandShadow *)GDALRasterBandShadow_GetOverview(arg1,arg2);
   14189             259 :     if ( bUseExceptions ) {
   14190               0 :       CPLErr eclass = CPLGetLastErrorType();
   14191               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14192               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14193                 :       }
   14194                 :     }
   14195                 :   }
   14196             259 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14197             259 :   return resultobj;
   14198                 : fail:
   14199               0 :   return NULL;
   14200                 : }
   14201                 : 
   14202                 : 
   14203            2306 : SWIGINTERN PyObject *_wrap_Band_Checksum(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   14204            2306 :   PyObject *resultobj = 0;
   14205            2306 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14206            2306 :   int arg2 = (int) 0 ;
   14207            2306 :   int arg3 = (int) 0 ;
   14208            2306 :   int *arg4 = (int *) 0 ;
   14209            2306 :   int *arg5 = (int *) 0 ;
   14210            2306 :   void *argp1 = 0 ;
   14211            2306 :   int res1 = 0 ;
   14212                 :   int val2 ;
   14213            2306 :   int ecode2 = 0 ;
   14214                 :   int val3 ;
   14215            2306 :   int ecode3 = 0 ;
   14216                 :   int val4 ;
   14217                 :   int val5 ;
   14218            2306 :   PyObject * obj0 = 0 ;
   14219            2306 :   PyObject * obj1 = 0 ;
   14220            2306 :   PyObject * obj2 = 0 ;
   14221            2306 :   PyObject * obj3 = 0 ;
   14222            2306 :   PyObject * obj4 = 0 ;
   14223                 :   char *  kwnames[] = {
   14224                 :     (char *) "self",(char *) "xoff",(char *) "yoff",(char *) "xsize",(char *) "ysize", NULL 
   14225            2306 :   };
   14226                 :   int result;
   14227                 :   
   14228            2306 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOO:Band_Checksum",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   14229            2306 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14230            2306 :   if (!SWIG_IsOK(res1)) {
   14231               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_Checksum" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14232                 :   }
   14233            2306 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14234            2306 :   if (obj1) {
   14235             358 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   14236             358 :     if (!SWIG_IsOK(ecode2)) {
   14237               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_Checksum" "', argument " "2"" of type '" "int""'");
   14238                 :     } 
   14239             358 :     arg2 = static_cast< int >(val2);
   14240                 :   }
   14241            2306 :   if (obj2) {
   14242             358 :     ecode3 = SWIG_AsVal_int(obj2, &val3);
   14243             358 :     if (!SWIG_IsOK(ecode3)) {
   14244               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_Checksum" "', argument " "3"" of type '" "int""'");
   14245                 :     } 
   14246             358 :     arg3 = static_cast< int >(val3);
   14247                 :   }
   14248            2306 :   if (obj3) {
   14249                 :     {
   14250                 :       /* %typemap(in) (int *optional_##int) */
   14251             358 :       if ( obj3 == Py_None ) {
   14252               0 :         arg4 = 0;
   14253                 :       }
   14254             358 :       else if ( PyArg_Parse( obj3,"i" ,&val4 ) ) {
   14255             358 :         arg4 = (int *) &val4;
   14256                 :       }
   14257                 :       else {
   14258               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   14259               0 :         SWIG_fail;
   14260                 :       }
   14261                 :     }
   14262                 :   }
   14263            2306 :   if (obj4) {
   14264                 :     {
   14265                 :       /* %typemap(in) (int *optional_##int) */
   14266             358 :       if ( obj4 == Py_None ) {
   14267               0 :         arg5 = 0;
   14268                 :       }
   14269             358 :       else if ( PyArg_Parse( obj4,"i" ,&val5 ) ) {
   14270             358 :         arg5 = (int *) &val5;
   14271                 :       }
   14272                 :       else {
   14273               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   14274               0 :         SWIG_fail;
   14275                 :       }
   14276                 :     }
   14277                 :   }
   14278                 :   {
   14279            2306 :     if ( bUseExceptions ) {
   14280               0 :       CPLErrorReset();
   14281                 :     }
   14282            2306 :     result = (int)GDALRasterBandShadow_Checksum(arg1,arg2,arg3,arg4,arg5);
   14283            2306 :     if ( bUseExceptions ) {
   14284               0 :       CPLErr eclass = CPLGetLastErrorType();
   14285               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14286               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14287                 :       }
   14288                 :     }
   14289                 :   }
   14290            2306 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14291            2306 :   return resultobj;
   14292                 : fail:
   14293               0 :   return NULL;
   14294                 : }
   14295                 : 
   14296                 : 
   14297             842 : SWIGINTERN PyObject *_wrap_Band_ComputeRasterMinMax(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14298             842 :   PyObject *resultobj = 0;
   14299             842 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14300                 :   double *arg2 ;
   14301             842 :   int arg3 = (int) 0 ;
   14302             842 :   void *argp1 = 0 ;
   14303             842 :   int res1 = 0 ;
   14304                 :   double argout2[2] ;
   14305                 :   int val3 ;
   14306             842 :   int ecode3 = 0 ;
   14307             842 :   PyObject * obj0 = 0 ;
   14308             842 :   PyObject * obj1 = 0 ;
   14309                 :   
   14310                 :   {
   14311                 :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   14312             842 :     arg2 = argout2;
   14313                 :   }
   14314             842 :   if (!PyArg_ParseTuple(args,(char *)"O|O:Band_ComputeRasterMinMax",&obj0,&obj1)) SWIG_fail;
   14315             842 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14316             842 :   if (!SWIG_IsOK(res1)) {
   14317               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ComputeRasterMinMax" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14318                 :   }
   14319             842 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14320             842 :   if (obj1) {
   14321               1 :     ecode3 = SWIG_AsVal_int(obj1, &val3);
   14322               1 :     if (!SWIG_IsOK(ecode3)) {
   14323               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_ComputeRasterMinMax" "', argument " "3"" of type '" "int""'");
   14324                 :     } 
   14325               1 :     arg3 = static_cast< int >(val3);
   14326                 :   }
   14327                 :   {
   14328             842 :     if ( bUseExceptions ) {
   14329               0 :       CPLErrorReset();
   14330                 :     }
   14331                 :     GDALRasterBandShadow_ComputeRasterMinMax(arg1,arg2,arg3);
   14332             842 :     if ( bUseExceptions ) {
   14333               0 :       CPLErr eclass = CPLGetLastErrorType();
   14334               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14335               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14336                 :       }
   14337                 :     }
   14338                 :   }
   14339             842 :   resultobj = SWIG_Py_Void();
   14340                 :   {
   14341                 :     /* %typemap(argout) (double argout[ANY]) */
   14342             842 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 2 );
   14343             842 :     resultobj = t_output_helper(resultobj,out);
   14344                 :   }
   14345             842 :   return resultobj;
   14346                 : fail:
   14347               0 :   return NULL;
   14348                 : }
   14349                 : 
   14350                 : 
   14351              12 : SWIGINTERN PyObject *_wrap_Band_ComputeBandStats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14352              12 :   PyObject *resultobj = 0;
   14353              12 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14354                 :   double *arg2 ;
   14355              12 :   int arg3 = (int) 1 ;
   14356              12 :   void *argp1 = 0 ;
   14357              12 :   int res1 = 0 ;
   14358                 :   double argout2[2] ;
   14359                 :   int val3 ;
   14360              12 :   int ecode3 = 0 ;
   14361              12 :   PyObject * obj0 = 0 ;
   14362              12 :   PyObject * obj1 = 0 ;
   14363                 :   
   14364                 :   {
   14365                 :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   14366              12 :     arg2 = argout2;
   14367                 :   }
   14368              12 :   if (!PyArg_ParseTuple(args,(char *)"O|O:Band_ComputeBandStats",&obj0,&obj1)) SWIG_fail;
   14369              12 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14370              12 :   if (!SWIG_IsOK(res1)) {
   14371               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ComputeBandStats" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14372                 :   }
   14373              12 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14374              12 :   if (obj1) {
   14375               0 :     ecode3 = SWIG_AsVal_int(obj1, &val3);
   14376               0 :     if (!SWIG_IsOK(ecode3)) {
   14377               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_ComputeBandStats" "', argument " "3"" of type '" "int""'");
   14378                 :     } 
   14379               0 :     arg3 = static_cast< int >(val3);
   14380                 :   }
   14381                 :   {
   14382              12 :     if ( bUseExceptions ) {
   14383               0 :       CPLErrorReset();
   14384                 :     }
   14385                 :     GDALRasterBandShadow_ComputeBandStats(arg1,arg2,arg3);
   14386              12 :     if ( bUseExceptions ) {
   14387               0 :       CPLErr eclass = CPLGetLastErrorType();
   14388               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14389               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14390                 :       }
   14391                 :     }
   14392                 :   }
   14393              12 :   resultobj = SWIG_Py_Void();
   14394                 :   {
   14395                 :     /* %typemap(argout) (double argout[ANY]) */
   14396              12 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 2 );
   14397              12 :     resultobj = t_output_helper(resultobj,out);
   14398                 :   }
   14399              12 :   return resultobj;
   14400                 : fail:
   14401               0 :   return NULL;
   14402                 : }
   14403                 : 
   14404                 : 
   14405          168012 : SWIGINTERN PyObject *_wrap_Band_Fill(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14406          168012 :   PyObject *resultobj = 0;
   14407          168012 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14408                 :   double arg2 ;
   14409          168012 :   double arg3 = (double) 0.0 ;
   14410          168012 :   void *argp1 = 0 ;
   14411          168012 :   int res1 = 0 ;
   14412                 :   double val2 ;
   14413          168012 :   int ecode2 = 0 ;
   14414                 :   double val3 ;
   14415          168012 :   int ecode3 = 0 ;
   14416          168012 :   PyObject * obj0 = 0 ;
   14417          168012 :   PyObject * obj1 = 0 ;
   14418          168012 :   PyObject * obj2 = 0 ;
   14419                 :   CPLErr result;
   14420                 :   
   14421          168012 :   if (!PyArg_ParseTuple(args,(char *)"OO|O:Band_Fill",&obj0,&obj1,&obj2)) SWIG_fail;
   14422          168012 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14423          168012 :   if (!SWIG_IsOK(res1)) {
   14424               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_Fill" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14425                 :   }
   14426          168012 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14427          168012 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   14428          168012 :   if (!SWIG_IsOK(ecode2)) {
   14429               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_Fill" "', argument " "2"" of type '" "double""'");
   14430                 :   } 
   14431          168012 :   arg2 = static_cast< double >(val2);
   14432          168012 :   if (obj2) {
   14433             220 :     ecode3 = SWIG_AsVal_double(obj2, &val3);
   14434             220 :     if (!SWIG_IsOK(ecode3)) {
   14435               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_Fill" "', argument " "3"" of type '" "double""'");
   14436                 :     } 
   14437             220 :     arg3 = static_cast< double >(val3);
   14438                 :   }
   14439                 :   {
   14440          168012 :     if ( bUseExceptions ) {
   14441               0 :       CPLErrorReset();
   14442                 :     }
   14443          168012 :     result = (CPLErr)GDALRasterBandShadow_Fill(arg1,arg2,arg3);
   14444          168012 :     if ( bUseExceptions ) {
   14445               0 :       CPLErr eclass = CPLGetLastErrorType();
   14446               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14447               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14448                 :       }
   14449                 :     }
   14450                 :   }
   14451          336024 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14452          168012 :   return resultobj;
   14453                 : fail:
   14454               0 :   return NULL;
   14455                 : }
   14456                 : 
   14457                 : 
   14458            1375 : SWIGINTERN PyObject *_wrap_Band_WriteRaster(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   14459            1375 :   PyObject *resultobj = 0;
   14460            1375 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14461                 :   int arg2 ;
   14462                 :   int arg3 ;
   14463                 :   int arg4 ;
   14464                 :   int arg5 ;
   14465                 :   GIntBig arg6 ;
   14466            1375 :   char *arg7 = (char *) 0 ;
   14467            1375 :   int *arg8 = (int *) 0 ;
   14468            1375 :   int *arg9 = (int *) 0 ;
   14469            1375 :   int *arg10 = (int *) 0 ;
   14470            1375 :   int *arg11 = (int *) 0 ;
   14471            1375 :   int *arg12 = (int *) 0 ;
   14472            1375 :   void *argp1 = 0 ;
   14473            1375 :   int res1 = 0 ;
   14474                 :   int val2 ;
   14475            1375 :   int ecode2 = 0 ;
   14476                 :   int val3 ;
   14477            1375 :   int ecode3 = 0 ;
   14478                 :   int val4 ;
   14479            1375 :   int ecode4 = 0 ;
   14480                 :   int val5 ;
   14481            1375 :   int ecode5 = 0 ;
   14482            1375 :   int alloc6 = 0 ;
   14483                 :   int val8 ;
   14484                 :   int val9 ;
   14485                 :   int val10 ;
   14486                 :   int val11 ;
   14487                 :   int val12 ;
   14488            1375 :   PyObject * obj0 = 0 ;
   14489            1375 :   PyObject * obj1 = 0 ;
   14490            1375 :   PyObject * obj2 = 0 ;
   14491            1375 :   PyObject * obj3 = 0 ;
   14492            1375 :   PyObject * obj4 = 0 ;
   14493            1375 :   PyObject * obj5 = 0 ;
   14494            1375 :   PyObject * obj6 = 0 ;
   14495            1375 :   PyObject * obj7 = 0 ;
   14496            1375 :   PyObject * obj8 = 0 ;
   14497            1375 :   PyObject * obj9 = 0 ;
   14498            1375 :   PyObject * obj10 = 0 ;
   14499                 :   char *  kwnames[] = {
   14500                 :     (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 
   14501            1375 :   };
   14502                 :   CPLErr result;
   14503                 :   
   14504            1375 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO|OOOOO:Band_WriteRaster",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail;
   14505            1375 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14506            1375 :   if (!SWIG_IsOK(res1)) {
   14507               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_WriteRaster" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14508                 :   }
   14509            1375 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14510            1375 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   14511            1375 :   if (!SWIG_IsOK(ecode2)) {
   14512               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_WriteRaster" "', argument " "2"" of type '" "int""'");
   14513                 :   } 
   14514            1375 :   arg2 = static_cast< int >(val2);
   14515            1375 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   14516            1375 :   if (!SWIG_IsOK(ecode3)) {
   14517               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_WriteRaster" "', argument " "3"" of type '" "int""'");
   14518                 :   } 
   14519            1375 :   arg3 = static_cast< int >(val3);
   14520            1375 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   14521            1375 :   if (!SWIG_IsOK(ecode4)) {
   14522               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_WriteRaster" "', argument " "4"" of type '" "int""'");
   14523                 :   } 
   14524            1375 :   arg4 = static_cast< int >(val4);
   14525            1375 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   14526            1375 :   if (!SWIG_IsOK(ecode5)) {
   14527               0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_WriteRaster" "', argument " "5"" of type '" "int""'");
   14528                 :   } 
   14529            1375 :   arg5 = static_cast< int >(val5);
   14530                 :   {
   14531                 :     /* %typemap(in,numinputs=1) (GIntBig nLen, char *pBuf ) */
   14532                 : #if PY_VERSION_HEX>=0x03000000
   14533                 :     if (PyUnicode_Check(obj5))
   14534                 :     {
   14535                 :       size_t safeLen = 0;
   14536                 :       int ret = SWIG_AsCharPtrAndSize(obj5, (char**) &arg7, &safeLen, &alloc6);
   14537                 :       if (!SWIG_IsOK(ret)) {
   14538                 :         SWIG_exception( SWIG_RuntimeError, "invalid Unicode string" );
   14539                 :       }
   14540                 :       
   14541                 :       if (safeLen) safeLen--;
   14542                 :       arg6 = (GIntBig) safeLen;
   14543                 :     }
   14544                 :     else if (PyBytes_Check(obj5))
   14545                 :     {
   14546                 :       Py_ssize_t safeLen = 0;
   14547                 :       PyBytes_AsStringAndSize(obj5, (char**) &arg7, &safeLen);
   14548                 :       arg6 = (GIntBig) safeLen;
   14549                 :     }
   14550                 :     else
   14551                 :     {
   14552                 :       PyErr_SetString(PyExc_TypeError, "not a unicode string or a bytes");
   14553                 :       SWIG_fail;
   14554                 :     }
   14555                 : #else
   14556            1375 :     if (PyString_Check(obj5))
   14557                 :     {
   14558            1374 :       Py_ssize_t safeLen = 0;
   14559            1374 :       PyString_AsStringAndSize(obj5, (char**) &arg7, &safeLen);
   14560            1374 :       arg6 = (GIntBig) safeLen;
   14561                 :     }
   14562                 :     else
   14563                 :     {
   14564               1 :       PyErr_SetString(PyExc_TypeError, "not a string");
   14565               1 :       SWIG_fail;
   14566                 :     }
   14567                 : #endif
   14568                 :   }
   14569            1374 :   if (obj6) {
   14570                 :     {
   14571                 :       /* %typemap(in) (int *optional_##int) */
   14572              29 :       if ( obj6 == Py_None ) {
   14573               0 :         arg8 = 0;
   14574                 :       }
   14575              29 :       else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
   14576              29 :         arg8 = (int *) &val8;
   14577                 :       }
   14578                 :       else {
   14579               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   14580               0 :         SWIG_fail;
   14581                 :       }
   14582                 :     }
   14583                 :   }
   14584            1374 :   if (obj7) {
   14585                 :     {
   14586                 :       /* %typemap(in) (int *optional_##int) */
   14587              29 :       if ( obj7 == Py_None ) {
   14588               0 :         arg9 = 0;
   14589                 :       }
   14590              29 :       else if ( PyArg_Parse( obj7,"i" ,&val9 ) ) {
   14591              29 :         arg9 = (int *) &val9;
   14592                 :       }
   14593                 :       else {
   14594               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   14595               0 :         SWIG_fail;
   14596                 :       }
   14597                 :     }
   14598                 :   }
   14599            1374 :   if (obj8) {
   14600                 :     {
   14601                 :       /* %typemap(in) (int *optional_##int) */
   14602              50 :       if ( obj8 == Py_None ) {
   14603               0 :         arg10 = 0;
   14604                 :       }
   14605              50 :       else if ( PyArg_Parse( obj8,"i" ,&val10 ) ) {
   14606              50 :         arg10 = (int *) &val10;
   14607                 :       }
   14608                 :       else {
   14609               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   14610               0 :         SWIG_fail;
   14611                 :       }
   14612                 :     }
   14613                 :   }
   14614            1374 :   if (obj9) {
   14615                 :     {
   14616                 :       /* %typemap(in) (int *optional_##int) */
   14617               0 :       if ( obj9 == Py_None ) {
   14618               0 :         arg11 = 0;
   14619                 :       }
   14620               0 :       else if ( PyArg_Parse( obj9,"i" ,&val11 ) ) {
   14621               0 :         arg11 = (int *) &val11;
   14622                 :       }
   14623                 :       else {
   14624               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   14625               0 :         SWIG_fail;
   14626                 :       }
   14627                 :     }
   14628                 :   }
   14629            1374 :   if (obj10) {
   14630                 :     {
   14631                 :       /* %typemap(in) (int *optional_##int) */
   14632               0 :       if ( obj10 == Py_None ) {
   14633               0 :         arg12 = 0;
   14634                 :       }
   14635               0 :       else if ( PyArg_Parse( obj10,"i" ,&val12 ) ) {
   14636               0 :         arg12 = (int *) &val12;
   14637                 :       }
   14638                 :       else {
   14639               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   14640               0 :         SWIG_fail;
   14641                 :       }
   14642                 :     }
   14643                 :   }
   14644                 :   {
   14645            1374 :     if ( bUseExceptions ) {
   14646               0 :       CPLErrorReset();
   14647                 :     }
   14648            1374 :     result = (CPLErr)GDALRasterBandShadow_WriteRaster(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
   14649            1374 :     if ( bUseExceptions ) {
   14650               0 :       CPLErr eclass = CPLGetLastErrorType();
   14651               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14652               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14653                 :       }
   14654                 :     }
   14655                 :   }
   14656            2748 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14657                 :   {
   14658                 :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   14659            1374 :     if( alloc6 == SWIG_NEWOBJ ) {
   14660               0 :       delete[] arg7;
   14661                 :     }
   14662                 :   }
   14663            1374 :   return resultobj;
   14664                 : fail:
   14665                 :   {
   14666                 :     /* %typemap(freearg) (GIntBig *nLen, char *pBuf ) */
   14667               1 :     if( alloc6 == SWIG_NEWOBJ ) {
   14668               0 :       delete[] arg7;
   14669                 :     }
   14670                 :   }
   14671               1 :   return NULL;
   14672                 : }
   14673                 : 
   14674                 : 
   14675               8 : SWIGINTERN PyObject *_wrap_Band_FlushCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14676               8 :   PyObject *resultobj = 0;
   14677               8 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14678               8 :   void *argp1 = 0 ;
   14679               8 :   int res1 = 0 ;
   14680               8 :   PyObject * obj0 = 0 ;
   14681                 :   
   14682               8 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_FlushCache",&obj0)) SWIG_fail;
   14683               8 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14684               8 :   if (!SWIG_IsOK(res1)) {
   14685               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_FlushCache" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14686                 :   }
   14687               8 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14688                 :   {
   14689               8 :     if ( bUseExceptions ) {
   14690               0 :       CPLErrorReset();
   14691                 :     }
   14692                 :     GDALRasterBandShadow_FlushCache(arg1);
   14693               8 :     if ( bUseExceptions ) {
   14694               0 :       CPLErr eclass = CPLGetLastErrorType();
   14695               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14696               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14697                 :       }
   14698                 :     }
   14699                 :   }
   14700               8 :   resultobj = SWIG_Py_Void();
   14701               8 :   return resultobj;
   14702                 : fail:
   14703               0 :   return NULL;
   14704                 : }
   14705                 : 
   14706                 : 
   14707              62 : SWIGINTERN PyObject *_wrap_Band_GetRasterColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14708              62 :   PyObject *resultobj = 0;
   14709              62 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14710              62 :   void *argp1 = 0 ;
   14711              62 :   int res1 = 0 ;
   14712              62 :   PyObject * obj0 = 0 ;
   14713              62 :   GDALColorTableShadow *result = 0 ;
   14714                 :   
   14715              62 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetRasterColorTable",&obj0)) SWIG_fail;
   14716              62 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14717              62 :   if (!SWIG_IsOK(res1)) {
   14718               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetRasterColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14719                 :   }
   14720              62 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14721                 :   {
   14722              62 :     if ( bUseExceptions ) {
   14723               0 :       CPLErrorReset();
   14724                 :     }
   14725              62 :     result = (GDALColorTableShadow *)GDALRasterBandShadow_GetRasterColorTable(arg1);
   14726              62 :     if ( bUseExceptions ) {
   14727               0 :       CPLErr eclass = CPLGetLastErrorType();
   14728               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14729               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14730                 :       }
   14731                 :     }
   14732                 :   }
   14733              62 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   14734              62 :   return resultobj;
   14735                 : fail:
   14736               0 :   return NULL;
   14737                 : }
   14738                 : 
   14739                 : 
   14740              10 : SWIGINTERN PyObject *_wrap_Band_GetColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14741              10 :   PyObject *resultobj = 0;
   14742              10 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14743              10 :   void *argp1 = 0 ;
   14744              10 :   int res1 = 0 ;
   14745              10 :   PyObject * obj0 = 0 ;
   14746              10 :   GDALColorTableShadow *result = 0 ;
   14747                 :   
   14748              10 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetColorTable",&obj0)) SWIG_fail;
   14749              10 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14750              10 :   if (!SWIG_IsOK(res1)) {
   14751               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14752                 :   }
   14753              10 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14754                 :   {
   14755              10 :     if ( bUseExceptions ) {
   14756               0 :       CPLErrorReset();
   14757                 :     }
   14758              10 :     result = (GDALColorTableShadow *)GDALRasterBandShadow_GetColorTable(arg1);
   14759              10 :     if ( bUseExceptions ) {
   14760               0 :       CPLErr eclass = CPLGetLastErrorType();
   14761               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14762               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14763                 :       }
   14764                 :     }
   14765                 :   }
   14766              10 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   14767              10 :   return resultobj;
   14768                 : fail:
   14769               0 :   return NULL;
   14770                 : }
   14771                 : 
   14772                 : 
   14773              17 : SWIGINTERN PyObject *_wrap_Band_SetRasterColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14774              17 :   PyObject *resultobj = 0;
   14775              17 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14776              17 :   GDALColorTableShadow *arg2 = (GDALColorTableShadow *) 0 ;
   14777              17 :   void *argp1 = 0 ;
   14778              17 :   int res1 = 0 ;
   14779              17 :   void *argp2 = 0 ;
   14780              17 :   int res2 = 0 ;
   14781              17 :   PyObject * obj0 = 0 ;
   14782              17 :   PyObject * obj1 = 0 ;
   14783                 :   int result;
   14784                 :   
   14785              17 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_SetRasterColorTable",&obj0,&obj1)) SWIG_fail;
   14786              17 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14787              17 :   if (!SWIG_IsOK(res1)) {
   14788               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetRasterColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14789                 :   }
   14790              17 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14791              17 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   14792              17 :   if (!SWIG_IsOK(res2)) {
   14793               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetRasterColorTable" "', argument " "2"" of type '" "GDALColorTableShadow *""'"); 
   14794                 :   }
   14795              17 :   arg2 = reinterpret_cast< GDALColorTableShadow * >(argp2);
   14796                 :   {
   14797              17 :     if ( bUseExceptions ) {
   14798               0 :       CPLErrorReset();
   14799                 :     }
   14800              17 :     result = (int)GDALRasterBandShadow_SetRasterColorTable(arg1,arg2);
   14801              17 :     if ( bUseExceptions ) {
   14802               0 :       CPLErr eclass = CPLGetLastErrorType();
   14803               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14804               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14805                 :       }
   14806                 :     }
   14807                 :   }
   14808              17 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14809              17 :   return resultobj;
   14810                 : fail:
   14811               0 :   return NULL;
   14812                 : }
   14813                 : 
   14814                 : 
   14815               4 : SWIGINTERN PyObject *_wrap_Band_SetColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14816               4 :   PyObject *resultobj = 0;
   14817               4 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14818               4 :   GDALColorTableShadow *arg2 = (GDALColorTableShadow *) 0 ;
   14819               4 :   void *argp1 = 0 ;
   14820               4 :   int res1 = 0 ;
   14821               4 :   void *argp2 = 0 ;
   14822               4 :   int res2 = 0 ;
   14823               4 :   PyObject * obj0 = 0 ;
   14824               4 :   PyObject * obj1 = 0 ;
   14825                 :   int result;
   14826                 :   
   14827               4 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_SetColorTable",&obj0,&obj1)) SWIG_fail;
   14828               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14829               4 :   if (!SWIG_IsOK(res1)) {
   14830               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetColorTable" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14831                 :   }
   14832               4 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14833               4 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   14834               4 :   if (!SWIG_IsOK(res2)) {
   14835               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetColorTable" "', argument " "2"" of type '" "GDALColorTableShadow *""'"); 
   14836                 :   }
   14837               4 :   arg2 = reinterpret_cast< GDALColorTableShadow * >(argp2);
   14838                 :   {
   14839               4 :     if ( bUseExceptions ) {
   14840               0 :       CPLErrorReset();
   14841                 :     }
   14842               4 :     result = (int)GDALRasterBandShadow_SetColorTable(arg1,arg2);
   14843               4 :     if ( bUseExceptions ) {
   14844               0 :       CPLErr eclass = CPLGetLastErrorType();
   14845               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14846               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14847                 :       }
   14848                 :     }
   14849                 :   }
   14850               4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14851               4 :   return resultobj;
   14852                 : fail:
   14853               0 :   return NULL;
   14854                 : }
   14855                 : 
   14856                 : 
   14857              22 : SWIGINTERN PyObject *_wrap_Band_GetDefaultRAT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14858              22 :   PyObject *resultobj = 0;
   14859              22 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14860              22 :   void *argp1 = 0 ;
   14861              22 :   int res1 = 0 ;
   14862              22 :   PyObject * obj0 = 0 ;
   14863              22 :   GDALRasterAttributeTableShadow *result = 0 ;
   14864                 :   
   14865              22 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetDefaultRAT",&obj0)) SWIG_fail;
   14866              22 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14867              22 :   if (!SWIG_IsOK(res1)) {
   14868               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetDefaultRAT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14869                 :   }
   14870              22 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14871                 :   {
   14872              22 :     if ( bUseExceptions ) {
   14873               0 :       CPLErrorReset();
   14874                 :     }
   14875              22 :     result = (GDALRasterAttributeTableShadow *)GDALRasterBandShadow_GetDefaultRAT(arg1);
   14876              22 :     if ( bUseExceptions ) {
   14877               0 :       CPLErr eclass = CPLGetLastErrorType();
   14878               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14879               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14880                 :       }
   14881                 :     }
   14882                 :   }
   14883              22 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   14884              22 :   return resultobj;
   14885                 : fail:
   14886               0 :   return NULL;
   14887                 : }
   14888                 : 
   14889                 : 
   14890               2 : SWIGINTERN PyObject *_wrap_Band_SetDefaultRAT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14891               2 :   PyObject *resultobj = 0;
   14892               2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14893               2 :   GDALRasterAttributeTableShadow *arg2 = (GDALRasterAttributeTableShadow *) 0 ;
   14894               2 :   void *argp1 = 0 ;
   14895               2 :   int res1 = 0 ;
   14896               2 :   void *argp2 = 0 ;
   14897               2 :   int res2 = 0 ;
   14898               2 :   PyObject * obj0 = 0 ;
   14899               2 :   PyObject * obj1 = 0 ;
   14900                 :   int result;
   14901                 :   
   14902               2 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_SetDefaultRAT",&obj0,&obj1)) SWIG_fail;
   14903               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14904               2 :   if (!SWIG_IsOK(res1)) {
   14905               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetDefaultRAT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14906                 :   }
   14907               2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14908               2 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   14909               2 :   if (!SWIG_IsOK(res2)) {
   14910               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_SetDefaultRAT" "', argument " "2"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   14911                 :   }
   14912               2 :   arg2 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp2);
   14913                 :   {
   14914               2 :     if ( bUseExceptions ) {
   14915               0 :       CPLErrorReset();
   14916                 :     }
   14917               2 :     result = (int)GDALRasterBandShadow_SetDefaultRAT(arg1,arg2);
   14918               2 :     if ( bUseExceptions ) {
   14919               0 :       CPLErr eclass = CPLGetLastErrorType();
   14920               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14921               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14922                 :       }
   14923                 :     }
   14924                 :   }
   14925               2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14926               2 :   return resultobj;
   14927                 : fail:
   14928               0 :   return NULL;
   14929                 : }
   14930                 : 
   14931                 : 
   14932             126 : SWIGINTERN PyObject *_wrap_Band_GetMaskBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14933             126 :   PyObject *resultobj = 0;
   14934             126 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14935             126 :   void *argp1 = 0 ;
   14936             126 :   int res1 = 0 ;
   14937             126 :   PyObject * obj0 = 0 ;
   14938             126 :   GDALRasterBandShadow *result = 0 ;
   14939                 :   
   14940             126 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetMaskBand",&obj0)) SWIG_fail;
   14941             126 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14942             126 :   if (!SWIG_IsOK(res1)) {
   14943               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMaskBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14944                 :   }
   14945             126 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14946                 :   {
   14947             126 :     if ( bUseExceptions ) {
   14948               0 :       CPLErrorReset();
   14949                 :     }
   14950             126 :     result = (GDALRasterBandShadow *)GDALRasterBandShadow_GetMaskBand(arg1);
   14951             126 :     if ( bUseExceptions ) {
   14952               0 :       CPLErr eclass = CPLGetLastErrorType();
   14953               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14954               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14955                 :       }
   14956                 :     }
   14957                 :   }
   14958             126 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14959             126 :   return resultobj;
   14960                 : fail:
   14961               0 :   return NULL;
   14962                 : }
   14963                 : 
   14964                 : 
   14965              84 : SWIGINTERN PyObject *_wrap_Band_GetMaskFlags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14966              84 :   PyObject *resultobj = 0;
   14967              84 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   14968              84 :   void *argp1 = 0 ;
   14969              84 :   int res1 = 0 ;
   14970              84 :   PyObject * obj0 = 0 ;
   14971                 :   int result;
   14972                 :   
   14973              84 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetMaskFlags",&obj0)) SWIG_fail;
   14974              84 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   14975              84 :   if (!SWIG_IsOK(res1)) {
   14976               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetMaskFlags" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   14977                 :   }
   14978              84 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   14979                 :   {
   14980              84 :     if ( bUseExceptions ) {
   14981               0 :       CPLErrorReset();
   14982                 :     }
   14983              84 :     result = (int)GDALRasterBandShadow_GetMaskFlags(arg1);
   14984              84 :     if ( bUseExceptions ) {
   14985               0 :       CPLErr eclass = CPLGetLastErrorType();
   14986               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   14987               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   14988                 :       }
   14989                 :     }
   14990                 :   }
   14991              84 :   resultobj = SWIG_From_int(static_cast< int >(result));
   14992              84 :   return resultobj;
   14993                 : fail:
   14994               0 :   return NULL;
   14995                 : }
   14996                 : 
   14997                 : 
   14998              12 : SWIGINTERN PyObject *_wrap_Band_CreateMaskBand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   14999              12 :   PyObject *resultobj = 0;
   15000              12 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15001                 :   int arg2 ;
   15002              12 :   void *argp1 = 0 ;
   15003              12 :   int res1 = 0 ;
   15004                 :   int val2 ;
   15005              12 :   int ecode2 = 0 ;
   15006              12 :   PyObject * obj0 = 0 ;
   15007              12 :   PyObject * obj1 = 0 ;
   15008                 :   CPLErr result;
   15009                 :   
   15010              12 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_CreateMaskBand",&obj0,&obj1)) SWIG_fail;
   15011              12 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15012              12 :   if (!SWIG_IsOK(res1)) {
   15013               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_CreateMaskBand" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15014                 :   }
   15015              12 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15016              12 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   15017              12 :   if (!SWIG_IsOK(ecode2)) {
   15018               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_CreateMaskBand" "', argument " "2"" of type '" "int""'");
   15019                 :   } 
   15020              12 :   arg2 = static_cast< int >(val2);
   15021                 :   {
   15022              12 :     if ( bUseExceptions ) {
   15023               0 :       CPLErrorReset();
   15024                 :     }
   15025              12 :     result = (CPLErr)GDALRasterBandShadow_CreateMaskBand(arg1,arg2);
   15026              12 :     if ( bUseExceptions ) {
   15027               0 :       CPLErr eclass = CPLGetLastErrorType();
   15028               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15029               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15030                 :       }
   15031                 :     }
   15032                 :   }
   15033              24 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15034              12 :   return resultobj;
   15035                 : fail:
   15036               0 :   return NULL;
   15037                 : }
   15038                 : 
   15039                 : 
   15040               4 : SWIGINTERN PyObject *_wrap_Band_GetHistogram(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   15041               4 :   PyObject *resultobj = 0;
   15042               4 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15043               4 :   double arg2 = (double) -0.5 ;
   15044               4 :   double arg3 = (double) 255.5 ;
   15045               4 :   int arg4 = (int) 256 ;
   15046               4 :   int *arg5 = (int *) NULL ;
   15047               4 :   int arg6 = (int) 0 ;
   15048               4 :   int arg7 = (int) 1 ;
   15049               4 :   GDALProgressFunc arg8 = (GDALProgressFunc) NULL ;
   15050               4 :   void *arg9 = (void *) NULL ;
   15051               4 :   void *argp1 = 0 ;
   15052               4 :   int res1 = 0 ;
   15053                 :   double val2 ;
   15054               4 :   int ecode2 = 0 ;
   15055                 :   double val3 ;
   15056               4 :   int ecode3 = 0 ;
   15057                 :   int val6 ;
   15058               4 :   int ecode6 = 0 ;
   15059                 :   int val7 ;
   15060               4 :   int ecode7 = 0 ;
   15061               4 :   PyObject * obj0 = 0 ;
   15062               4 :   PyObject * obj1 = 0 ;
   15063               4 :   PyObject * obj2 = 0 ;
   15064               4 :   PyObject * obj3 = 0 ;
   15065               4 :   PyObject * obj4 = 0 ;
   15066               4 :   PyObject * obj5 = 0 ;
   15067               4 :   PyObject * obj6 = 0 ;
   15068               4 :   PyObject * obj7 = 0 ;
   15069                 :   char *  kwnames[] = {
   15070                 :     (char *) "self",(char *) "min",(char *) "max",(char *) "buckets",(char *) "include_out_of_range",(char *) "approx_ok",(char *) "callback",(char *) "callback_data", NULL 
   15071               4 :   };
   15072                 :   CPLErr result;
   15073                 :   
   15074                 :   {
   15075                 :     /* %typemap(in) int buckets, int* panHistogram -> list */
   15076               4 :     arg5 = (int *) VSICalloc(sizeof(int),arg4);
   15077                 :   }
   15078                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   15079                 :   PyProgressData *psProgressInfo;
   15080               4 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   15081               4 :   psProgressInfo->nLastReported = -1;
   15082               4 :   psProgressInfo->psPyCallback = NULL;
   15083               4 :   psProgressInfo->psPyCallbackData = NULL;
   15084               4 :   arg9 = psProgressInfo;
   15085               4 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOOO:Band_GetHistogram",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
   15086               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15087               4 :   if (!SWIG_IsOK(res1)) {
   15088               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetHistogram" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15089                 :   }
   15090               4 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15091               4 :   if (obj1) {
   15092               3 :     ecode2 = SWIG_AsVal_double(obj1, &val2);
   15093               3 :     if (!SWIG_IsOK(ecode2)) {
   15094               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_GetHistogram" "', argument " "2"" of type '" "double""'");
   15095                 :     } 
   15096               3 :     arg2 = static_cast< double >(val2);
   15097                 :   }
   15098               4 :   if (obj2) {
   15099               3 :     ecode3 = SWIG_AsVal_double(obj2, &val3);
   15100               3 :     if (!SWIG_IsOK(ecode3)) {
   15101               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_GetHistogram" "', argument " "3"" of type '" "double""'");
   15102                 :     } 
   15103               3 :     arg3 = static_cast< double >(val3);
   15104                 :   }
   15105               4 :   if (obj3) {
   15106                 :     {
   15107                 :       /* %typemap(in) int buckets, int* panHistogram -> list */
   15108               3 :       int requested_buckets = 0;
   15109               3 :       SWIG_AsVal_int(obj3, &requested_buckets);
   15110               3 :       if( requested_buckets != arg4 )
   15111                 :       {
   15112               3 :         arg4 = requested_buckets;
   15113               3 :         if (requested_buckets <= 0 || requested_buckets > (int)(INT_MAX / sizeof(int)))
   15114                 :         {
   15115               0 :           PyErr_SetString( PyExc_RuntimeError, "Bad value for buckets" );
   15116               0 :           SWIG_fail;
   15117                 :         }
   15118               3 :         arg5 = (int *) VSIRealloc(arg5, sizeof(int) * requested_buckets);
   15119                 :       }
   15120               3 :       if (arg5 == NULL)
   15121                 :       {
   15122               0 :         PyErr_SetString( PyExc_RuntimeError, "Cannot allocate buckets" );
   15123               0 :         SWIG_fail;
   15124                 :       }
   15125                 :     }
   15126                 :   }
   15127               4 :   if (obj4) {
   15128               2 :     ecode6 = SWIG_AsVal_int(obj4, &val6);
   15129               2 :     if (!SWIG_IsOK(ecode6)) {
   15130               0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetHistogram" "', argument " "6"" of type '" "int""'");
   15131                 :     } 
   15132               2 :     arg6 = static_cast< int >(val6);
   15133                 :   }
   15134               4 :   if (obj5) {
   15135               2 :     ecode7 = SWIG_AsVal_int(obj5, &val7);
   15136               2 :     if (!SWIG_IsOK(ecode7)) {
   15137               0 :       SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Band_GetHistogram" "', argument " "7"" of type '" "int""'");
   15138                 :     } 
   15139               2 :     arg7 = static_cast< int >(val7);
   15140                 :   }
   15141               4 :   if (obj6) {
   15142                 :     {
   15143                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   15144                 :       /* callback_func typemap */
   15145               0 :       if (obj6 && obj6 != Py_None ) {
   15146               0 :         void* cbfunction = NULL;
   15147                 :         SWIG_ConvertPtr( obj6, 
   15148                 :           (void**)&cbfunction, 
   15149                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int, 
   15150               0 :           SWIG_POINTER_EXCEPTION | 0 );
   15151                 :         
   15152               0 :         if ( cbfunction == GDALTermProgress ) {
   15153               0 :           arg8 = GDALTermProgress;
   15154                 :         } else {
   15155               0 :           if (!PyCallable_Check(obj6)) {
   15156                 :             PyErr_SetString( PyExc_RuntimeError, 
   15157               0 :               "Object given is not a Python function" );
   15158               0 :             SWIG_fail;
   15159                 :           }
   15160               0 :           psProgressInfo->psPyCallback = obj6;
   15161               0 :           arg8 = PyProgressProxy;
   15162                 :         }
   15163                 :         
   15164                 :       }
   15165                 :       
   15166                 :     }
   15167                 :   }
   15168               4 :   if (obj7) {
   15169                 :     {
   15170                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   15171               0 :       psProgressInfo->psPyCallbackData = obj7 ;
   15172                 :     }
   15173                 :   }
   15174                 :   {
   15175               4 :     if ( bUseExceptions ) {
   15176               0 :       CPLErrorReset();
   15177                 :     }
   15178               4 :     result = (CPLErr)GDALRasterBandShadow_GetHistogram(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
   15179               4 :     if ( bUseExceptions ) {
   15180               0 :       CPLErr eclass = CPLGetLastErrorType();
   15181               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15182               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15183                 :       }
   15184                 :     }
   15185                 :   }
   15186               8 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15187                 :   {
   15188                 :     /* %typemap(out) int buckets, int* panHistogram -> list */
   15189               4 :     int *integerarray = arg5;
   15190               4 :     if ( integerarray == NULL ) {
   15191               0 :       resultobj = Py_None;
   15192               0 :       Py_INCREF( resultobj );
   15193                 :     }
   15194                 :     else {
   15195               4 :       resultobj = PyList_New( arg4 );
   15196             318 :       for ( int i = 0; i < arg4; ++i ) {
   15197             314 :         PyObject *o =  PyInt_FromLong( integerarray[i] );
   15198             314 :         PyList_SetItem(resultobj, i, o );
   15199                 :       }
   15200                 :     }
   15201                 :   }
   15202                 :   {
   15203                 :     /* %typemap(freearg) (int buckets, int* panHistogram)*/
   15204               4 :     if ( arg5 ) {
   15205               4 :       VSIFree( arg5 );
   15206                 :     }
   15207                 :   }
   15208                 :   {
   15209                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   15210                 :     
   15211               4 :     CPLFree(psProgressInfo);
   15212                 :     
   15213                 :   }
   15214               4 :   return resultobj;
   15215                 : fail:
   15216                 :   {
   15217                 :     /* %typemap(freearg) (int buckets, int* panHistogram)*/
   15218               0 :     if ( arg5 ) {
   15219               0 :       VSIFree( arg5 );
   15220                 :     }
   15221                 :   }
   15222                 :   {
   15223                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   15224                 :     
   15225               0 :     CPLFree(psProgressInfo);
   15226                 :     
   15227                 :   }
   15228               0 :   return NULL;
   15229                 : }
   15230                 : 
   15231                 : 
   15232               3 : SWIGINTERN PyObject *_wrap_Band_GetDefaultHistogram(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   15233               3 :   PyObject *resultobj = 0;
   15234               3 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15235               3 :   double *arg2 = (double *) NULL ;
   15236               3 :   double *arg3 = (double *) NULL ;
   15237               3 :   int *arg4 = (int *) NULL ;
   15238               3 :   int **arg5 = (int **) NULL ;
   15239               3 :   int arg6 = (int) 1 ;
   15240               3 :   GDALProgressFunc arg7 = (GDALProgressFunc) NULL ;
   15241               3 :   void *arg8 = (void *) NULL ;
   15242               3 :   void *argp1 = 0 ;
   15243               3 :   int res1 = 0 ;
   15244               3 :   void *argp2 = 0 ;
   15245               3 :   int res2 = 0 ;
   15246               3 :   void *argp3 = 0 ;
   15247               3 :   int res3 = 0 ;
   15248               3 :   void *argp4 = 0 ;
   15249               3 :   int res4 = 0 ;
   15250               3 :   void *argp5 = 0 ;
   15251               3 :   int res5 = 0 ;
   15252                 :   int val6 ;
   15253               3 :   int ecode6 = 0 ;
   15254               3 :   PyObject * obj0 = 0 ;
   15255               3 :   PyObject * obj1 = 0 ;
   15256               3 :   PyObject * obj2 = 0 ;
   15257               3 :   PyObject * obj3 = 0 ;
   15258               3 :   PyObject * obj4 = 0 ;
   15259               3 :   PyObject * obj5 = 0 ;
   15260               3 :   PyObject * obj6 = 0 ;
   15261               3 :   PyObject * obj7 = 0 ;
   15262                 :   char *  kwnames[] = {
   15263                 :     (char *) "self",(char *) "min_ret",(char *) "max_ret",(char *) "buckets_ret",(char *) "ppanHistogram",(char *) "force",(char *) "callback",(char *) "callback_data", NULL 
   15264               3 :   };
   15265                 :   CPLErr result;
   15266                 :   
   15267                 :   double min_val, max_val;
   15268                 :   int buckets_val;
   15269                 :   int *panHistogram;
   15270                 :   
   15271               3 :   arg2 = &min_val;
   15272               3 :   arg3 = &max_val;
   15273               3 :   arg4 = &buckets_val;
   15274               3 :   arg5 = &panHistogram;
   15275                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   15276                 :   PyProgressData *psProgressInfo;
   15277               3 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   15278               3 :   psProgressInfo->nLastReported = -1;
   15279               3 :   psProgressInfo->psPyCallback = NULL;
   15280               3 :   psProgressInfo->psPyCallbackData = NULL;
   15281               3 :   arg8 = psProgressInfo;
   15282               3 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOOO:Band_GetDefaultHistogram",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
   15283               3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15284               3 :   if (!SWIG_IsOK(res1)) {
   15285               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetDefaultHistogram" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15286                 :   }
   15287               3 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15288               3 :   if (obj1) {
   15289               0 :     res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 |  0 );
   15290               0 :     if (!SWIG_IsOK(res2)) {
   15291               0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Band_GetDefaultHistogram" "', argument " "2"" of type '" "double *""'"); 
   15292                 :     }
   15293               0 :     arg2 = reinterpret_cast< double * >(argp2);
   15294                 :   }
   15295               3 :   if (obj2) {
   15296               0 :     res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 |  0 );
   15297               0 :     if (!SWIG_IsOK(res3)) {
   15298               0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Band_GetDefaultHistogram" "', argument " "3"" of type '" "double *""'"); 
   15299                 :     }
   15300               0 :     arg3 = reinterpret_cast< double * >(argp3);
   15301                 :   }
   15302               3 :   if (obj3) {
   15303               0 :     res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_int, 0 |  0 );
   15304               0 :     if (!SWIG_IsOK(res4)) {
   15305               0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Band_GetDefaultHistogram" "', argument " "4"" of type '" "int *""'"); 
   15306                 :     }
   15307               0 :     arg4 = reinterpret_cast< int * >(argp4);
   15308                 :   }
   15309               3 :   if (obj4) {
   15310               0 :     res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_p_int, 0 |  0 );
   15311               0 :     if (!SWIG_IsOK(res5)) {
   15312               0 :       SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Band_GetDefaultHistogram" "', argument " "5"" of type '" "int **""'"); 
   15313                 :     }
   15314               0 :     arg5 = reinterpret_cast< int ** >(argp5);
   15315                 :   }
   15316               3 :   if (obj5) {
   15317               3 :     ecode6 = SWIG_AsVal_int(obj5, &val6);
   15318               3 :     if (!SWIG_IsOK(ecode6)) {
   15319               0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Band_GetDefaultHistogram" "', argument " "6"" of type '" "int""'");
   15320                 :     } 
   15321               3 :     arg6 = static_cast< int >(val6);
   15322                 :   }
   15323               3 :   if (obj6) {
   15324                 :     {
   15325                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   15326                 :       /* callback_func typemap */
   15327               1 :       if (obj6 && obj6 != Py_None ) {
   15328               1 :         void* cbfunction = NULL;
   15329                 :         SWIG_ConvertPtr( obj6, 
   15330                 :           (void**)&cbfunction, 
   15331                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int, 
   15332               1 :           SWIG_POINTER_EXCEPTION | 0 );
   15333                 :         
   15334               1 :         if ( cbfunction == GDALTermProgress ) {
   15335               1 :           arg7 = GDALTermProgress;
   15336                 :         } else {
   15337               0 :           if (!PyCallable_Check(obj6)) {
   15338                 :             PyErr_SetString( PyExc_RuntimeError, 
   15339               0 :               "Object given is not a Python function" );
   15340               0 :             SWIG_fail;
   15341                 :           }
   15342               0 :           psProgressInfo->psPyCallback = obj6;
   15343               0 :           arg7 = PyProgressProxy;
   15344                 :         }
   15345                 :         
   15346                 :       }
   15347                 :       
   15348                 :     }
   15349                 :   }
   15350               3 :   if (obj7) {
   15351                 :     {
   15352                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   15353               0 :       psProgressInfo->psPyCallbackData = obj7 ;
   15354                 :     }
   15355                 :   }
   15356                 :   {
   15357               3 :     if ( bUseExceptions ) {
   15358               0 :       CPLErrorReset();
   15359                 :     }
   15360               3 :     result = (CPLErr)GDALRasterBandShadow_GetDefaultHistogram(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
   15361               3 :     if ( bUseExceptions ) {
   15362               0 :       CPLErr eclass = CPLGetLastErrorType();
   15363               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15364               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15365                 :       }
   15366                 :     }
   15367                 :   }
   15368               6 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15369                 :   {
   15370                 :     int i;
   15371               3 :     PyObject *psList = NULL;
   15372                 :     
   15373               3 :     Py_XDECREF(resultobj);
   15374                 :     
   15375               3 :     if (panHistogram)
   15376                 :     {
   15377               2 :       psList = PyList_New(buckets_val);
   15378             514 :       for( i = 0; i < buckets_val; i++ )
   15379             512 :       PyList_SetItem(psList, i, Py_BuildValue("i", panHistogram[i] ));
   15380                 :       
   15381               2 :       CPLFree( panHistogram );
   15382                 :       
   15383               2 :       resultobj = Py_BuildValue( "(ddiO)", min_val, max_val, buckets_val, psList );
   15384               2 :       Py_XDECREF(psList);
   15385                 :     }
   15386                 :     else
   15387                 :     {
   15388               1 :       resultobj = Py_None;
   15389               1 :       Py_INCREF(resultobj);
   15390                 :     }
   15391                 :   }
   15392                 :   {
   15393                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   15394                 :     
   15395               3 :     CPLFree(psProgressInfo);
   15396                 :     
   15397                 :   }
   15398               3 :   return resultobj;
   15399                 : fail:
   15400                 :   {
   15401                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   15402                 :     
   15403               0 :     CPLFree(psProgressInfo);
   15404                 :     
   15405                 :   }
   15406               0 :   return NULL;
   15407                 : }
   15408                 : 
   15409                 : 
   15410               0 : SWIGINTERN PyObject *_wrap_Band_SetDefaultHistogram(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15411               0 :   PyObject *resultobj = 0;
   15412               0 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15413                 :   double arg2 ;
   15414                 :   double arg3 ;
   15415                 :   int arg4 ;
   15416               0 :   int *arg5 = (int *) 0 ;
   15417               0 :   void *argp1 = 0 ;
   15418               0 :   int res1 = 0 ;
   15419                 :   double val2 ;
   15420               0 :   int ecode2 = 0 ;
   15421                 :   double val3 ;
   15422               0 :   int ecode3 = 0 ;
   15423               0 :   PyObject * obj0 = 0 ;
   15424               0 :   PyObject * obj1 = 0 ;
   15425               0 :   PyObject * obj2 = 0 ;
   15426               0 :   PyObject * obj3 = 0 ;
   15427                 :   CPLErr result;
   15428                 :   
   15429               0 :   if (!PyArg_ParseTuple(args,(char *)"OOOO:Band_SetDefaultHistogram",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
   15430               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15431               0 :   if (!SWIG_IsOK(res1)) {
   15432               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetDefaultHistogram" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15433                 :   }
   15434               0 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15435               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   15436               0 :   if (!SWIG_IsOK(ecode2)) {
   15437               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_SetDefaultHistogram" "', argument " "2"" of type '" "double""'");
   15438                 :   } 
   15439               0 :   arg2 = static_cast< double >(val2);
   15440               0 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   15441               0 :   if (!SWIG_IsOK(ecode3)) {
   15442               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_SetDefaultHistogram" "', argument " "3"" of type '" "double""'");
   15443                 :   } 
   15444               0 :   arg3 = static_cast< double >(val3);
   15445                 :   {
   15446                 :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   15447                 :     /* check if is List */
   15448               0 :     if ( !PySequence_Check(obj3) ) {
   15449               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   15450               0 :       SWIG_fail;
   15451                 :     }
   15452               0 :     arg4 = PySequence_Size(obj3);
   15453               0 :     arg5 = (int*) malloc(arg4*sizeof(int));
   15454               0 :     for( int i = 0; i<arg4; i++ ) {
   15455               0 :       PyObject *o = PySequence_GetItem(obj3,i);
   15456               0 :       if ( !PyArg_Parse(o,"i",&arg5[i]) ) {
   15457               0 :         PyErr_SetString(PyExc_TypeError, "not an integer");
   15458               0 :         Py_DECREF(o);
   15459                 :         SWIG_fail;
   15460                 :       }
   15461               0 :       Py_DECREF(o);
   15462                 :     }
   15463                 :   }
   15464                 :   {
   15465               0 :     if ( bUseExceptions ) {
   15466               0 :       CPLErrorReset();
   15467                 :     }
   15468               0 :     result = (CPLErr)GDALRasterBandShadow_SetDefaultHistogram(arg1,arg2,arg3,arg4,arg5);
   15469               0 :     if ( bUseExceptions ) {
   15470               0 :       CPLErr eclass = CPLGetLastErrorType();
   15471               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15472               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15473                 :       }
   15474                 :     }
   15475                 :   }
   15476               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15477                 :   {
   15478                 :     /* %typemap(freearg) (int nList, int* pList) */
   15479               0 :     if (arg5) {
   15480               0 :       free((void*) arg5);
   15481                 :     }
   15482                 :   }
   15483               0 :   return resultobj;
   15484                 : fail:
   15485                 :   {
   15486                 :     /* %typemap(freearg) (int nList, int* pList) */
   15487               0 :     if (arg5) {
   15488               0 :       free((void*) arg5);
   15489                 :     }
   15490                 :   }
   15491               0 :   return NULL;
   15492                 : }
   15493                 : 
   15494                 : 
   15495              17 : SWIGINTERN PyObject *_wrap_Band_HasArbitraryOverviews(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15496              17 :   PyObject *resultobj = 0;
   15497              17 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15498              17 :   void *argp1 = 0 ;
   15499              17 :   int res1 = 0 ;
   15500              17 :   PyObject * obj0 = 0 ;
   15501                 :   bool result;
   15502                 :   
   15503              17 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_HasArbitraryOverviews",&obj0)) SWIG_fail;
   15504              17 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15505              17 :   if (!SWIG_IsOK(res1)) {
   15506               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_HasArbitraryOverviews" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15507                 :   }
   15508              17 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15509                 :   {
   15510              17 :     if ( bUseExceptions ) {
   15511               0 :       CPLErrorReset();
   15512                 :     }
   15513              17 :     result = (bool)GDALRasterBandShadow_HasArbitraryOverviews(arg1);
   15514              17 :     if ( bUseExceptions ) {
   15515               0 :       CPLErr eclass = CPLGetLastErrorType();
   15516               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15517               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15518                 :       }
   15519                 :     }
   15520                 :   }
   15521              34 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   15522              17 :   return resultobj;
   15523                 : fail:
   15524               0 :   return NULL;
   15525                 : }
   15526                 : 
   15527                 : 
   15528               6 : SWIGINTERN PyObject *_wrap_Band_GetCategoryNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15529               6 :   PyObject *resultobj = 0;
   15530               6 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15531               6 :   void *argp1 = 0 ;
   15532               6 :   int res1 = 0 ;
   15533               6 :   PyObject * obj0 = 0 ;
   15534               6 :   char **result = 0 ;
   15535                 :   
   15536               6 :   if (!PyArg_ParseTuple(args,(char *)"O:Band_GetCategoryNames",&obj0)) SWIG_fail;
   15537               6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15538               6 :   if (!SWIG_IsOK(res1)) {
   15539               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_GetCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15540                 :   }
   15541               6 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15542                 :   {
   15543               6 :     if ( bUseExceptions ) {
   15544               0 :       CPLErrorReset();
   15545                 :     }
   15546               6 :     result = (char **)GDALRasterBandShadow_GetCategoryNames(arg1);
   15547               6 :     if ( bUseExceptions ) {
   15548               0 :       CPLErr eclass = CPLGetLastErrorType();
   15549               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15550               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15551                 :       }
   15552                 :     }
   15553                 :   }
   15554                 :   {
   15555                 :     /* %typemap(out) char **options -> ( string ) */
   15556               6 :     char **stringarray = result;
   15557               6 :     if ( stringarray == NULL ) {
   15558               1 :       resultobj = Py_None;
   15559               1 :       Py_INCREF( resultobj );
   15560                 :     }
   15561                 :     else {
   15562               5 :       int len = CSLCount( stringarray );
   15563               5 :       resultobj = PyList_New( len );
   15564             106 :       for ( int i = 0; i < len; ++i ) {
   15565             101 :         PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
   15566             101 :         PyList_SetItem(resultobj, i, o );
   15567                 :       }
   15568                 :     }
   15569                 :   }
   15570               6 :   return resultobj;
   15571                 : fail:
   15572               0 :   return NULL;
   15573                 : }
   15574                 : 
   15575                 : 
   15576               1 : SWIGINTERN PyObject *_wrap_Band_SetCategoryNames(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15577               1 :   PyObject *resultobj = 0;
   15578               1 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15579               1 :   char **arg2 = (char **) 0 ;
   15580               1 :   void *argp1 = 0 ;
   15581               1 :   int res1 = 0 ;
   15582               1 :   PyObject * obj0 = 0 ;
   15583               1 :   PyObject * obj1 = 0 ;
   15584                 :   CPLErr result;
   15585                 :   
   15586               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:Band_SetCategoryNames",&obj0,&obj1)) SWIG_fail;
   15587               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15588               1 :   if (!SWIG_IsOK(res1)) {
   15589               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_SetCategoryNames" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15590                 :   }
   15591               1 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15592                 :   {
   15593                 :     /* %typemap(in) char **options */
   15594                 :     /* Check if is a list */
   15595               1 :     if ( ! PySequence_Check(obj1)) {
   15596               0 :       PyErr_SetString(PyExc_TypeError,"not a sequence");
   15597               0 :       SWIG_fail;
   15598                 :     }
   15599                 :     
   15600               1 :     int size = PySequence_Size(obj1);
   15601               3 :     for (int i = 0; i < size; i++) {
   15602               2 :       PyObject* pyObj = PySequence_GetItem(obj1,i);
   15603               2 :       if (PyUnicode_Check(pyObj))
   15604                 :       {
   15605                 :         char *pszStr;
   15606                 :         Py_ssize_t nLen;
   15607               0 :         PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   15608                 : #if PY_VERSION_HEX >= 0x03000000
   15609                 :         PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   15610                 : #else
   15611               0 :         PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   15612                 : #endif
   15613               0 :         arg2 = CSLAddString( arg2, pszStr );
   15614               0 :         Py_XDECREF(pyUTF8Str);
   15615                 :       }
   15616                 : #if PY_VERSION_HEX >= 0x03000000
   15617                 :       else if (PyBytes_Check(pyObj))
   15618                 :       arg2 = CSLAddString( arg2, PyBytes_AsString(pyObj) );
   15619                 : #else
   15620               2 :       else if (PyString_Check(pyObj))
   15621               2 :       arg2 = CSLAddString( arg2, PyString_AsString(pyObj) );
   15622                 : #endif
   15623                 :       else
   15624                 :       {
   15625               0 :         Py_DECREF(pyObj);
   15626               0 :         PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   15627               0 :         SWIG_fail;
   15628                 :       }
   15629               2 :       Py_DECREF(pyObj);
   15630                 :     }
   15631                 :   }
   15632                 :   {
   15633               1 :     if ( bUseExceptions ) {
   15634               0 :       CPLErrorReset();
   15635                 :     }
   15636               1 :     result = (CPLErr)GDALRasterBandShadow_SetCategoryNames(arg1,arg2);
   15637               1 :     if ( bUseExceptions ) {
   15638               0 :       CPLErr eclass = CPLGetLastErrorType();
   15639               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15640               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15641                 :       }
   15642                 :     }
   15643                 :   }
   15644               2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15645                 :   {
   15646                 :     /* %typemap(freearg) char **options */
   15647               1 :     CSLDestroy( arg2 );
   15648                 :   }
   15649               1 :   return resultobj;
   15650                 : fail:
   15651                 :   {
   15652                 :     /* %typemap(freearg) char **options */
   15653               0 :     CSLDestroy( arg2 );
   15654                 :   }
   15655               0 :   return NULL;
   15656                 : }
   15657                 : 
   15658                 : 
   15659             347 : SWIGINTERN PyObject *_wrap_Band_ReadRaster1(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   15660             347 :   PyObject *resultobj = 0;
   15661             347 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   15662                 :   int arg2 ;
   15663                 :   int arg3 ;
   15664                 :   int arg4 ;
   15665                 :   int arg5 ;
   15666             347 :   void **arg6 = (void **) 0 ;
   15667             347 :   int *arg7 = (int *) 0 ;
   15668             347 :   int *arg8 = (int *) 0 ;
   15669             347 :   int *arg9 = (int *) 0 ;
   15670             347 :   int *arg10 = (int *) 0 ;
   15671             347 :   int *arg11 = (int *) 0 ;
   15672             347 :   void *argp1 = 0 ;
   15673             347 :   int res1 = 0 ;
   15674                 :   int val2 ;
   15675             347 :   int ecode2 = 0 ;
   15676                 :   int val3 ;
   15677             347 :   int ecode3 = 0 ;
   15678                 :   int val4 ;
   15679             347 :   int ecode4 = 0 ;
   15680                 :   int val5 ;
   15681             347 :   int ecode5 = 0 ;
   15682             347 :   void *pyObject6 = NULL ;
   15683                 :   int val7 ;
   15684                 :   int val8 ;
   15685                 :   int val9 ;
   15686                 :   int val10 ;
   15687                 :   int val11 ;
   15688             347 :   PyObject * obj0 = 0 ;
   15689             347 :   PyObject * obj1 = 0 ;
   15690             347 :   PyObject * obj2 = 0 ;
   15691             347 :   PyObject * obj3 = 0 ;
   15692             347 :   PyObject * obj4 = 0 ;
   15693             347 :   PyObject * obj5 = 0 ;
   15694             347 :   PyObject * obj6 = 0 ;
   15695             347 :   PyObject * obj7 = 0 ;
   15696             347 :   PyObject * obj8 = 0 ;
   15697             347 :   PyObject * obj9 = 0 ;
   15698                 :   char *  kwnames[] = {
   15699                 :     (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", NULL 
   15700             347 :   };
   15701                 :   CPLErr result;
   15702                 :   
   15703                 :   {
   15704                 :     /* %typemap(in,numinputs=0) ( void **outPythonObject ) ( void *pyObject6 = NULL ) */
   15705             347 :     arg6 = &pyObject6;
   15706                 :   }
   15707             347 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO|OOOOO:Band_ReadRaster1",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail;
   15708             347 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   15709             347 :   if (!SWIG_IsOK(res1)) {
   15710               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Band_ReadRaster1" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   15711                 :   }
   15712             347 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   15713             347 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   15714             347 :   if (!SWIG_IsOK(ecode2)) {
   15715               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Band_ReadRaster1" "', argument " "2"" of type '" "int""'");
   15716                 :   } 
   15717             347 :   arg2 = static_cast< int >(val2);
   15718             347 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   15719             347 :   if (!SWIG_IsOK(ecode3)) {
   15720               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Band_ReadRaster1" "', argument " "3"" of type '" "int""'");
   15721                 :   } 
   15722             347 :   arg3 = static_cast< int >(val3);
   15723             347 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   15724             347 :   if (!SWIG_IsOK(ecode4)) {
   15725               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Band_ReadRaster1" "', argument " "4"" of type '" "int""'");
   15726                 :   } 
   15727             347 :   arg4 = static_cast< int >(val4);
   15728             347 :   ecode5 = SWIG_AsVal_int(obj4, &val5);
   15729             347 :   if (!SWIG_IsOK(ecode5)) {
   15730               0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Band_ReadRaster1" "', argument " "5"" of type '" "int""'");
   15731                 :   } 
   15732             347 :   arg5 = static_cast< int >(val5);
   15733             347 :   if (obj5) {
   15734                 :     {
   15735                 :       /* %typemap(in) (int *optional_##int) */
   15736             347 :       if ( obj5 == Py_None ) {
   15737             296 :         arg7 = 0;
   15738                 :       }
   15739              51 :       else if ( PyArg_Parse( obj5,"i" ,&val7 ) ) {
   15740              51 :         arg7 = (int *) &val7;
   15741                 :       }
   15742                 :       else {
   15743               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   15744               0 :         SWIG_fail;
   15745                 :       }
   15746                 :     }
   15747                 :   }
   15748             347 :   if (obj6) {
   15749                 :     {
   15750                 :       /* %typemap(in) (int *optional_##int) */
   15751             347 :       if ( obj6 == Py_None ) {
   15752             296 :         arg8 = 0;
   15753                 :       }
   15754              51 :       else if ( PyArg_Parse( obj6,"i" ,&val8 ) ) {
   15755              51 :         arg8 = (int *) &val8;
   15756                 :       }
   15757                 :       else {
   15758               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   15759               0 :         SWIG_fail;
   15760                 :       }
   15761                 :     }
   15762                 :   }
   15763             347 :   if (obj7) {
   15764                 :     {
   15765                 :       /* %typemap(in) (int *optional_##int) */
   15766             347 :       if ( obj7 == Py_None ) {
   15767             299 :         arg9 = 0;
   15768                 :       }
   15769              48 :       else if ( PyArg_Parse( obj7,"i" ,&val9 ) ) {
   15770              48 :         arg9 = (int *) &val9;
   15771                 :       }
   15772                 :       else {
   15773               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   15774               0 :         SWIG_fail;
   15775                 :       }
   15776                 :     }
   15777                 :   }
   15778             347 :   if (obj8) {
   15779                 :     {
   15780                 :       /* %typemap(in) (int *optional_##int) */
   15781             347 :       if ( obj8 == Py_None ) {
   15782             347 :         arg10 = 0;
   15783                 :       }
   15784               0 :       else if ( PyArg_Parse( obj8,"i" ,&val10 ) ) {
   15785               0 :         arg10 = (int *) &val10;
   15786                 :       }
   15787                 :       else {
   15788               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   15789               0 :         SWIG_fail;
   15790                 :       }
   15791                 :     }
   15792                 :   }
   15793             347 :   if (obj9) {
   15794                 :     {
   15795                 :       /* %typemap(in) (int *optional_##int) */
   15796             347 :       if ( obj9 == Py_None ) {
   15797             347 :         arg11 = 0;
   15798                 :       }
   15799               0 :       else if ( PyArg_Parse( obj9,"i" ,&val11 ) ) {
   15800               0 :         arg11 = (int *) &val11;
   15801                 :       }
   15802                 :       else {
   15803               0 :         PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
   15804               0 :         SWIG_fail;
   15805                 :       }
   15806                 :     }
   15807                 :   }
   15808                 :   {
   15809             347 :     if ( bUseExceptions ) {
   15810               0 :       CPLErrorReset();
   15811                 :     }
   15812             347 :     result = (CPLErr)GDALRasterBandShadow_ReadRaster1(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
   15813             347 :     if ( bUseExceptions ) {
   15814               0 :       CPLErr eclass = CPLGetLastErrorType();
   15815               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15816               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15817                 :       }
   15818                 :     }
   15819                 :   }
   15820             694 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15821                 :   {
   15822                 :     /* %typemap(argout) ( void **outPythonObject ) */
   15823             347 :     Py_XDECREF(resultobj);
   15824             347 :     if (*arg6)
   15825                 :     {
   15826             345 :       resultobj = (PyObject*)*arg6;
   15827                 :     }
   15828                 :     else
   15829                 :     {
   15830               2 :       resultobj = Py_None;
   15831               2 :       Py_INCREF(resultobj);
   15832                 :     }
   15833                 :   }
   15834             347 :   return resultobj;
   15835                 : fail:
   15836               0 :   return NULL;
   15837                 : }
   15838                 : 
   15839                 : 
   15840               6 : SWIGINTERN PyObject *Band_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15841                 :   PyObject *obj;
   15842               6 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   15843               6 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALRasterBandShadow, SWIG_NewClientData(obj));
   15844               6 :   return SWIG_Py_Void();
   15845                 : }
   15846                 : 
   15847              21 : SWIGINTERN PyObject *_wrap_new_ColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   15848              21 :   PyObject *resultobj = 0;
   15849              21 :   GDALPaletteInterp arg1 = (GDALPaletteInterp) GPI_RGB ;
   15850                 :   int val1 ;
   15851              21 :   int ecode1 = 0 ;
   15852              21 :   PyObject * obj0 = 0 ;
   15853                 :   char *  kwnames[] = {
   15854                 :     (char *) "palette", NULL 
   15855              21 :   };
   15856              21 :   GDALColorTableShadow *result = 0 ;
   15857                 :   
   15858              21 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:new_ColorTable",kwnames,&obj0)) SWIG_fail;
   15859              21 :   if (obj0) {
   15860               0 :     ecode1 = SWIG_AsVal_int(obj0, &val1);
   15861               0 :     if (!SWIG_IsOK(ecode1)) {
   15862               0 :       SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ColorTable" "', argument " "1"" of type '" "GDALPaletteInterp""'");
   15863                 :     } 
   15864               0 :     arg1 = static_cast< GDALPaletteInterp >(val1);
   15865                 :   }
   15866                 :   {
   15867              21 :     if ( bUseExceptions ) {
   15868               0 :       CPLErrorReset();
   15869                 :     }
   15870              21 :     result = (GDALColorTableShadow *)new_GDALColorTableShadow(arg1);
   15871              21 :     if ( bUseExceptions ) {
   15872               0 :       CPLErr eclass = CPLGetLastErrorType();
   15873               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15874               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15875                 :       }
   15876                 :     }
   15877                 :   }
   15878              21 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, SWIG_POINTER_NEW |  0 );
   15879              21 :   return resultobj;
   15880                 : fail:
   15881               0 :   return NULL;
   15882                 : }
   15883                 : 
   15884                 : 
   15885              22 : SWIGINTERN PyObject *_wrap_delete_ColorTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15886              22 :   PyObject *resultobj = 0;
   15887              22 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   15888              22 :   void *argp1 = 0 ;
   15889              22 :   int res1 = 0 ;
   15890              22 :   PyObject * obj0 = 0 ;
   15891                 :   
   15892              22 :   if (!PyArg_ParseTuple(args,(char *)"O:delete_ColorTable",&obj0)) SWIG_fail;
   15893              22 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALColorTableShadow, SWIG_POINTER_DISOWN |  0 );
   15894              22 :   if (!SWIG_IsOK(res1)) {
   15895               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ColorTable" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   15896                 :   }
   15897              22 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   15898                 :   {
   15899              22 :     if ( bUseExceptions ) {
   15900               0 :       CPLErrorReset();
   15901                 :     }
   15902                 :     delete_GDALColorTableShadow(arg1);
   15903              22 :     if ( bUseExceptions ) {
   15904               0 :       CPLErr eclass = CPLGetLastErrorType();
   15905               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15906               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15907                 :       }
   15908                 :     }
   15909                 :   }
   15910              22 :   resultobj = SWIG_Py_Void();
   15911              22 :   return resultobj;
   15912                 : fail:
   15913               0 :   return NULL;
   15914                 : }
   15915                 : 
   15916                 : 
   15917               1 : SWIGINTERN PyObject *_wrap_ColorTable_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15918               1 :   PyObject *resultobj = 0;
   15919               1 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   15920               1 :   void *argp1 = 0 ;
   15921               1 :   int res1 = 0 ;
   15922               1 :   PyObject * obj0 = 0 ;
   15923               1 :   GDALColorTableShadow *result = 0 ;
   15924                 :   
   15925               1 :   if (!PyArg_ParseTuple(args,(char *)"O:ColorTable_Clone",&obj0)) SWIG_fail;
   15926               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   15927               1 :   if (!SWIG_IsOK(res1)) {
   15928               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_Clone" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   15929                 :   }
   15930               1 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   15931                 :   {
   15932               1 :     if ( bUseExceptions ) {
   15933               0 :       CPLErrorReset();
   15934                 :     }
   15935               1 :     result = (GDALColorTableShadow *)GDALColorTableShadow_Clone(arg1);
   15936               1 :     if ( bUseExceptions ) {
   15937               0 :       CPLErr eclass = CPLGetLastErrorType();
   15938               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15939               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15940                 :       }
   15941                 :     }
   15942                 :   }
   15943               1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALColorTableShadow, SWIG_POINTER_OWN |  0 );
   15944               1 :   return resultobj;
   15945                 : fail:
   15946               0 :   return NULL;
   15947                 : }
   15948                 : 
   15949                 : 
   15950               2 : SWIGINTERN PyObject *_wrap_ColorTable_GetPaletteInterpretation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15951               2 :   PyObject *resultobj = 0;
   15952               2 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   15953               2 :   void *argp1 = 0 ;
   15954               2 :   int res1 = 0 ;
   15955               2 :   PyObject * obj0 = 0 ;
   15956                 :   GDALPaletteInterp result;
   15957                 :   
   15958               2 :   if (!PyArg_ParseTuple(args,(char *)"O:ColorTable_GetPaletteInterpretation",&obj0)) SWIG_fail;
   15959               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   15960               2 :   if (!SWIG_IsOK(res1)) {
   15961               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetPaletteInterpretation" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   15962                 :   }
   15963               2 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   15964                 :   {
   15965               2 :     if ( bUseExceptions ) {
   15966               0 :       CPLErrorReset();
   15967                 :     }
   15968               2 :     result = (GDALPaletteInterp)GDALColorTableShadow_GetPaletteInterpretation(arg1);
   15969               2 :     if ( bUseExceptions ) {
   15970               0 :       CPLErr eclass = CPLGetLastErrorType();
   15971               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   15972               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   15973                 :       }
   15974                 :     }
   15975                 :   }
   15976               4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   15977               2 :   return resultobj;
   15978                 : fail:
   15979               0 :   return NULL;
   15980                 : }
   15981                 : 
   15982                 : 
   15983              19 : SWIGINTERN PyObject *_wrap_ColorTable_GetCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   15984              19 :   PyObject *resultobj = 0;
   15985              19 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   15986              19 :   void *argp1 = 0 ;
   15987              19 :   int res1 = 0 ;
   15988              19 :   PyObject * obj0 = 0 ;
   15989                 :   int result;
   15990                 :   
   15991              19 :   if (!PyArg_ParseTuple(args,(char *)"O:ColorTable_GetCount",&obj0)) SWIG_fail;
   15992              19 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   15993              19 :   if (!SWIG_IsOK(res1)) {
   15994               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetCount" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   15995                 :   }
   15996              19 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   15997                 :   {
   15998              19 :     if ( bUseExceptions ) {
   15999               0 :       CPLErrorReset();
   16000                 :     }
   16001              19 :     result = (int)GDALColorTableShadow_GetColorEntryCount(arg1);
   16002              19 :     if ( bUseExceptions ) {
   16003               0 :       CPLErr eclass = CPLGetLastErrorType();
   16004               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16005               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16006                 :       }
   16007                 :     }
   16008                 :   }
   16009              19 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16010              19 :   return resultobj;
   16011                 : fail:
   16012               0 :   return NULL;
   16013                 : }
   16014                 : 
   16015                 : 
   16016             812 : SWIGINTERN PyObject *_wrap_ColorTable_GetColorEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16017             812 :   PyObject *resultobj = 0;
   16018             812 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   16019                 :   int arg2 ;
   16020             812 :   void *argp1 = 0 ;
   16021             812 :   int res1 = 0 ;
   16022                 :   int val2 ;
   16023             812 :   int ecode2 = 0 ;
   16024             812 :   PyObject * obj0 = 0 ;
   16025             812 :   PyObject * obj1 = 0 ;
   16026             812 :   GDALColorEntry *result = 0 ;
   16027                 :   
   16028             812 :   if (!PyArg_ParseTuple(args,(char *)"OO:ColorTable_GetColorEntry",&obj0,&obj1)) SWIG_fail;
   16029             812 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   16030             812 :   if (!SWIG_IsOK(res1)) {
   16031               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetColorEntry" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   16032                 :   }
   16033             812 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   16034             812 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16035             812 :   if (!SWIG_IsOK(ecode2)) {
   16036               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_GetColorEntry" "', argument " "2"" of type '" "int""'");
   16037                 :   } 
   16038             812 :   arg2 = static_cast< int >(val2);
   16039                 :   {
   16040             812 :     if ( bUseExceptions ) {
   16041               0 :       CPLErrorReset();
   16042                 :     }
   16043             812 :     result = (GDALColorEntry *)GDALColorTableShadow_GetColorEntry(arg1,arg2);
   16044             812 :     if ( bUseExceptions ) {
   16045               0 :       CPLErr eclass = CPLGetLastErrorType();
   16046               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16047               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16048                 :       }
   16049                 :     }
   16050                 :   }
   16051                 :   {
   16052                 :     /* %typemap(out) GDALColorEntry* */
   16053             812 :     if ( result != NULL )
   16054             812 :     resultobj = Py_BuildValue( "(hhhh)", (*result).c1,(*result).c2,(*result).c3,(*result).c4);
   16055                 :     else
   16056               0 :     resultobj = NULL;
   16057                 :   }
   16058             812 :   return resultobj;
   16059                 : fail:
   16060               0 :   return NULL;
   16061                 : }
   16062                 : 
   16063                 : 
   16064               0 : SWIGINTERN PyObject *_wrap_ColorTable_GetColorEntryAsRGB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16065               0 :   PyObject *resultobj = 0;
   16066               0 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   16067                 :   int arg2 ;
   16068               0 :   GDALColorEntry *arg3 = (GDALColorEntry *) 0 ;
   16069               0 :   void *argp1 = 0 ;
   16070               0 :   int res1 = 0 ;
   16071                 :   int val2 ;
   16072               0 :   int ecode2 = 0 ;
   16073                 :   GDALColorEntry ce3 ;
   16074               0 :   PyObject * obj0 = 0 ;
   16075               0 :   PyObject * obj1 = 0 ;
   16076               0 :   PyObject * obj2 = 0 ;
   16077                 :   int result;
   16078                 :   
   16079               0 :   if (!PyArg_ParseTuple(args,(char *)"OOO:ColorTable_GetColorEntryAsRGB",&obj0,&obj1,&obj2)) SWIG_fail;
   16080               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   16081               0 :   if (!SWIG_IsOK(res1)) {
   16082               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_GetColorEntryAsRGB" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   16083                 :   }
   16084               0 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   16085               0 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16086               0 :   if (!SWIG_IsOK(ecode2)) {
   16087               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_GetColorEntryAsRGB" "', argument " "2"" of type '" "int""'");
   16088                 :   } 
   16089               0 :   arg2 = static_cast< int >(val2);
   16090                 :   {
   16091                 :     /* %typemap(in) GDALColorEntry* */
   16092               0 :     ce3.c4 = 255;
   16093               0 :     if (! PySequence_Check(obj2) ) {
   16094               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   16095               0 :       SWIG_fail;
   16096                 :     }
   16097               0 :     int size = PySequence_Size(obj2);
   16098               0 :     if ( size > 4 ) {
   16099               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   16100               0 :       SWIG_fail;
   16101                 :     }
   16102               0 :     if ( size < 3 ) {
   16103               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   16104               0 :       SWIG_fail;
   16105                 :     }
   16106               0 :     if ( !PyArg_ParseTuple( obj2,"hhh|h", &ce3.c1, &ce3.c2, &ce3.c3, &ce3.c4 ) ) {
   16107               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   16108               0 :       SWIG_fail;
   16109                 :     }
   16110               0 :     arg3 = &ce3;
   16111                 :   }
   16112                 :   {
   16113               0 :     if ( bUseExceptions ) {
   16114               0 :       CPLErrorReset();
   16115                 :     }
   16116               0 :     result = (int)GDALColorTableShadow_GetColorEntryAsRGB(arg1,arg2,arg3);
   16117               0 :     if ( bUseExceptions ) {
   16118               0 :       CPLErr eclass = CPLGetLastErrorType();
   16119               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16120               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16121                 :       }
   16122                 :     }
   16123                 :   }
   16124               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16125               0 :   return resultobj;
   16126                 : fail:
   16127               0 :   return NULL;
   16128                 : }
   16129                 : 
   16130                 : 
   16131              53 : SWIGINTERN PyObject *_wrap_ColorTable_SetColorEntry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16132              53 :   PyObject *resultobj = 0;
   16133              53 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   16134                 :   int arg2 ;
   16135              53 :   GDALColorEntry *arg3 = (GDALColorEntry *) 0 ;
   16136              53 :   void *argp1 = 0 ;
   16137              53 :   int res1 = 0 ;
   16138                 :   int val2 ;
   16139              53 :   int ecode2 = 0 ;
   16140                 :   GDALColorEntry ce3 ;
   16141              53 :   PyObject * obj0 = 0 ;
   16142              53 :   PyObject * obj1 = 0 ;
   16143              53 :   PyObject * obj2 = 0 ;
   16144                 :   
   16145              53 :   if (!PyArg_ParseTuple(args,(char *)"OOO:ColorTable_SetColorEntry",&obj0,&obj1,&obj2)) SWIG_fail;
   16146              53 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   16147              53 :   if (!SWIG_IsOK(res1)) {
   16148               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_SetColorEntry" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   16149                 :   }
   16150              53 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   16151              53 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16152              53 :   if (!SWIG_IsOK(ecode2)) {
   16153               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_SetColorEntry" "', argument " "2"" of type '" "int""'");
   16154                 :   } 
   16155              53 :   arg2 = static_cast< int >(val2);
   16156                 :   {
   16157                 :     /* %typemap(in) GDALColorEntry* */
   16158              53 :     ce3.c4 = 255;
   16159              53 :     if (! PySequence_Check(obj2) ) {
   16160               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   16161               0 :       SWIG_fail;
   16162                 :     }
   16163              53 :     int size = PySequence_Size(obj2);
   16164              53 :     if ( size > 4 ) {
   16165               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   16166               0 :       SWIG_fail;
   16167                 :     }
   16168              53 :     if ( size < 3 ) {
   16169               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   16170               0 :       SWIG_fail;
   16171                 :     }
   16172              53 :     if ( !PyArg_ParseTuple( obj2,"hhh|h", &ce3.c1, &ce3.c2, &ce3.c3, &ce3.c4 ) ) {
   16173               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   16174               0 :       SWIG_fail;
   16175                 :     }
   16176              53 :     arg3 = &ce3;
   16177                 :   }
   16178                 :   {
   16179              53 :     if ( bUseExceptions ) {
   16180               0 :       CPLErrorReset();
   16181                 :     }
   16182                 :     GDALColorTableShadow_SetColorEntry(arg1,arg2,(GDALColorEntry const *)arg3);
   16183              53 :     if ( bUseExceptions ) {
   16184               0 :       CPLErr eclass = CPLGetLastErrorType();
   16185               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16186               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16187                 :       }
   16188                 :     }
   16189                 :   }
   16190              53 :   resultobj = SWIG_Py_Void();
   16191              53 :   return resultobj;
   16192                 : fail:
   16193               0 :   return NULL;
   16194                 : }
   16195                 : 
   16196                 : 
   16197               1 : SWIGINTERN PyObject *_wrap_ColorTable_CreateColorRamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16198               1 :   PyObject *resultobj = 0;
   16199               1 :   GDALColorTableShadow *arg1 = (GDALColorTableShadow *) 0 ;
   16200                 :   int arg2 ;
   16201               1 :   GDALColorEntry *arg3 = (GDALColorEntry *) 0 ;
   16202                 :   int arg4 ;
   16203               1 :   GDALColorEntry *arg5 = (GDALColorEntry *) 0 ;
   16204               1 :   void *argp1 = 0 ;
   16205               1 :   int res1 = 0 ;
   16206                 :   int val2 ;
   16207               1 :   int ecode2 = 0 ;
   16208                 :   GDALColorEntry ce3 ;
   16209                 :   int val4 ;
   16210               1 :   int ecode4 = 0 ;
   16211                 :   GDALColorEntry ce5 ;
   16212               1 :   PyObject * obj0 = 0 ;
   16213               1 :   PyObject * obj1 = 0 ;
   16214               1 :   PyObject * obj2 = 0 ;
   16215               1 :   PyObject * obj3 = 0 ;
   16216               1 :   PyObject * obj4 = 0 ;
   16217                 :   
   16218               1 :   if (!PyArg_ParseTuple(args,(char *)"OOOOO:ColorTable_CreateColorRamp",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   16219               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   16220               1 :   if (!SWIG_IsOK(res1)) {
   16221               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorTable_CreateColorRamp" "', argument " "1"" of type '" "GDALColorTableShadow *""'"); 
   16222                 :   }
   16223               1 :   arg1 = reinterpret_cast< GDALColorTableShadow * >(argp1);
   16224               1 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16225               1 :   if (!SWIG_IsOK(ecode2)) {
   16226               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ColorTable_CreateColorRamp" "', argument " "2"" of type '" "int""'");
   16227                 :   } 
   16228               1 :   arg2 = static_cast< int >(val2);
   16229                 :   {
   16230                 :     /* %typemap(in) GDALColorEntry* */
   16231               1 :     ce3.c4 = 255;
   16232               1 :     if (! PySequence_Check(obj2) ) {
   16233               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   16234               0 :       SWIG_fail;
   16235                 :     }
   16236               1 :     int size = PySequence_Size(obj2);
   16237               1 :     if ( size > 4 ) {
   16238               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   16239               0 :       SWIG_fail;
   16240                 :     }
   16241               1 :     if ( size < 3 ) {
   16242               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   16243               0 :       SWIG_fail;
   16244                 :     }
   16245               1 :     if ( !PyArg_ParseTuple( obj2,"hhh|h", &ce3.c1, &ce3.c2, &ce3.c3, &ce3.c4 ) ) {
   16246               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   16247               0 :       SWIG_fail;
   16248                 :     }
   16249               1 :     arg3 = &ce3;
   16250                 :   }
   16251               1 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   16252               1 :   if (!SWIG_IsOK(ecode4)) {
   16253               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ColorTable_CreateColorRamp" "', argument " "4"" of type '" "int""'");
   16254                 :   } 
   16255               1 :   arg4 = static_cast< int >(val4);
   16256                 :   {
   16257                 :     /* %typemap(in) GDALColorEntry* */
   16258               1 :     ce5.c4 = 255;
   16259               1 :     if (! PySequence_Check(obj4) ) {
   16260               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   16261               0 :       SWIG_fail;
   16262                 :     }
   16263               1 :     int size = PySequence_Size(obj4);
   16264               1 :     if ( size > 4 ) {
   16265               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too long");
   16266               0 :       SWIG_fail;
   16267                 :     }
   16268               1 :     if ( size < 3 ) {
   16269               0 :       PyErr_SetString(PyExc_TypeError, "ColorEntry sequence too short");
   16270               0 :       SWIG_fail;
   16271                 :     }
   16272               1 :     if ( !PyArg_ParseTuple( obj4,"hhh|h", &ce5.c1, &ce5.c2, &ce5.c3, &ce5.c4 ) ) {
   16273               0 :       PyErr_SetString(PyExc_TypeError, "Invalid values in ColorEntry sequence ");
   16274               0 :       SWIG_fail;
   16275                 :     }
   16276               1 :     arg5 = &ce5;
   16277                 :   }
   16278                 :   {
   16279               1 :     if ( bUseExceptions ) {
   16280               0 :       CPLErrorReset();
   16281                 :     }
   16282                 :     GDALColorTableShadow_CreateColorRamp(arg1,arg2,(GDALColorEntry const *)arg3,arg4,(GDALColorEntry const *)arg5);
   16283               1 :     if ( bUseExceptions ) {
   16284               0 :       CPLErr eclass = CPLGetLastErrorType();
   16285               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16286               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16287                 :       }
   16288                 :     }
   16289                 :   }
   16290               1 :   resultobj = SWIG_Py_Void();
   16291               1 :   return resultobj;
   16292                 : fail:
   16293               0 :   return NULL;
   16294                 : }
   16295                 : 
   16296                 : 
   16297               6 : SWIGINTERN PyObject *ColorTable_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16298                 :   PyObject *obj;
   16299               6 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   16300               6 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALColorTableShadow, SWIG_NewClientData(obj));
   16301               6 :   return SWIG_Py_Void();
   16302                 : }
   16303                 : 
   16304               2 : SWIGINTERN PyObject *_wrap_new_RasterAttributeTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16305               2 :   PyObject *resultobj = 0;
   16306               2 :   GDALRasterAttributeTableShadow *result = 0 ;
   16307                 :   
   16308               2 :   if (!PyArg_ParseTuple(args,(char *)":new_RasterAttributeTable")) SWIG_fail;
   16309                 :   {
   16310               2 :     if ( bUseExceptions ) {
   16311               0 :       CPLErrorReset();
   16312                 :     }
   16313               2 :     result = (GDALRasterAttributeTableShadow *)new_GDALRasterAttributeTableShadow();
   16314               2 :     if ( bUseExceptions ) {
   16315               0 :       CPLErr eclass = CPLGetLastErrorType();
   16316               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16317               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16318                 :       }
   16319                 :     }
   16320                 :   }
   16321               2 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_POINTER_NEW |  0 );
   16322               2 :   return resultobj;
   16323                 : fail:
   16324               0 :   return NULL;
   16325                 : }
   16326                 : 
   16327                 : 
   16328               3 : SWIGINTERN PyObject *_wrap_delete_RasterAttributeTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16329               3 :   PyObject *resultobj = 0;
   16330               3 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16331               3 :   void *argp1 = 0 ;
   16332               3 :   int res1 = 0 ;
   16333               3 :   PyObject * obj0 = 0 ;
   16334                 :   
   16335               3 :   if (!PyArg_ParseTuple(args,(char *)"O:delete_RasterAttributeTable",&obj0)) SWIG_fail;
   16336               3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_POINTER_DISOWN |  0 );
   16337               3 :   if (!SWIG_IsOK(res1)) {
   16338               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RasterAttributeTable" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   16339                 :   }
   16340               3 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   16341                 :   {
   16342               3 :     if ( bUseExceptions ) {
   16343               0 :       CPLErrorReset();
   16344                 :     }
   16345                 :     delete_GDALRasterAttributeTableShadow(arg1);
   16346               3 :     if ( bUseExceptions ) {
   16347               0 :       CPLErr eclass = CPLGetLastErrorType();
   16348               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16349               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16350                 :       }
   16351                 :     }
   16352                 :   }
   16353               3 :   resultobj = SWIG_Py_Void();
   16354               3 :   return resultobj;
   16355                 : fail:
   16356               0 :   return NULL;
   16357                 : }
   16358                 : 
   16359                 : 
   16360               1 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16361               1 :   PyObject *resultobj = 0;
   16362               1 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16363               1 :   void *argp1 = 0 ;
   16364               1 :   int res1 = 0 ;
   16365               1 :   PyObject * obj0 = 0 ;
   16366               1 :   GDALRasterAttributeTableShadow *result = 0 ;
   16367                 :   
   16368               1 :   if (!PyArg_ParseTuple(args,(char *)"O:RasterAttributeTable_Clone",&obj0)) SWIG_fail;
   16369               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   16370               1 :   if (!SWIG_IsOK(res1)) {
   16371               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_Clone" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   16372                 :   }
   16373               1 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   16374                 :   {
   16375               1 :     if ( bUseExceptions ) {
   16376               0 :       CPLErrorReset();
   16377                 :     }
   16378               1 :     result = (GDALRasterAttributeTableShadow *)GDALRasterAttributeTableShadow_Clone(arg1);
   16379               1 :     if ( bUseExceptions ) {
   16380               0 :       CPLErr eclass = CPLGetLastErrorType();
   16381               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16382               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16383                 :       }
   16384                 :     }
   16385                 :   }
   16386               1 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_POINTER_OWN |  0 );
   16387               1 :   return resultobj;
   16388                 : fail:
   16389               0 :   return NULL;
   16390                 : }
   16391                 : 
   16392                 : 
   16393               5 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetColumnCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16394               5 :   PyObject *resultobj = 0;
   16395               5 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16396               5 :   void *argp1 = 0 ;
   16397               5 :   int res1 = 0 ;
   16398               5 :   PyObject * obj0 = 0 ;
   16399                 :   int result;
   16400                 :   
   16401               5 :   if (!PyArg_ParseTuple(args,(char *)"O:RasterAttributeTable_GetColumnCount",&obj0)) SWIG_fail;
   16402               5 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   16403               5 :   if (!SWIG_IsOK(res1)) {
   16404               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetColumnCount" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   16405                 :   }
   16406               5 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   16407                 :   {
   16408               5 :     if ( bUseExceptions ) {
   16409               0 :       CPLErrorReset();
   16410                 :     }
   16411               5 :     result = (int)GDALRasterAttributeTableShadow_GetColumnCount(arg1);
   16412               5 :     if ( bUseExceptions ) {
   16413               0 :       CPLErr eclass = CPLGetLastErrorType();
   16414               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16415               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16416                 :       }
   16417                 :     }
   16418                 :   }
   16419               5 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16420               5 :   return resultobj;
   16421                 : fail:
   16422               0 :   return NULL;
   16423                 : }
   16424                 : 
   16425                 : 
   16426               4 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetNameOfCol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16427               4 :   PyObject *resultobj = 0;
   16428               4 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16429                 :   int arg2 ;
   16430               4 :   void *argp1 = 0 ;
   16431               4 :   int res1 = 0 ;
   16432                 :   int val2 ;
   16433               4 :   int ecode2 = 0 ;
   16434               4 :   PyObject * obj0 = 0 ;
   16435               4 :   PyObject * obj1 = 0 ;
   16436               4 :   char *result = 0 ;
   16437                 :   
   16438               4 :   if (!PyArg_ParseTuple(args,(char *)"OO:RasterAttributeTable_GetNameOfCol",&obj0,&obj1)) SWIG_fail;
   16439               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   16440               4 :   if (!SWIG_IsOK(res1)) {
   16441               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetNameOfCol" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   16442                 :   }
   16443               4 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   16444               4 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16445               4 :   if (!SWIG_IsOK(ecode2)) {
   16446               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetNameOfCol" "', argument " "2"" of type '" "int""'");
   16447                 :   } 
   16448               4 :   arg2 = static_cast< int >(val2);
   16449                 :   {
   16450               4 :     if ( bUseExceptions ) {
   16451               0 :       CPLErrorReset();
   16452                 :     }
   16453               4 :     result = (char *)GDALRasterAttributeTableShadow_GetNameOfCol(arg1,arg2);
   16454               4 :     if ( bUseExceptions ) {
   16455               0 :       CPLErr eclass = CPLGetLastErrorType();
   16456               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16457               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16458                 :       }
   16459                 :     }
   16460                 :   }
   16461               4 :   resultobj = SWIG_FromCharPtr((const char *)result);
   16462               4 :   return resultobj;
   16463                 : fail:
   16464               0 :   return NULL;
   16465                 : }
   16466                 : 
   16467                 : 
   16468               6 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetUsageOfCol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16469               6 :   PyObject *resultobj = 0;
   16470               6 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16471                 :   int arg2 ;
   16472               6 :   void *argp1 = 0 ;
   16473               6 :   int res1 = 0 ;
   16474                 :   int val2 ;
   16475               6 :   int ecode2 = 0 ;
   16476               6 :   PyObject * obj0 = 0 ;
   16477               6 :   PyObject * obj1 = 0 ;
   16478                 :   GDALRATFieldUsage result;
   16479                 :   
   16480               6 :   if (!PyArg_ParseTuple(args,(char *)"OO:RasterAttributeTable_GetUsageOfCol",&obj0,&obj1)) SWIG_fail;
   16481               6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   16482               6 :   if (!SWIG_IsOK(res1)) {
   16483               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetUsageOfCol" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   16484                 :   }
   16485               6 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   16486               6 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16487               6 :   if (!SWIG_IsOK(ecode2)) {
   16488               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetUsageOfCol" "', argument " "2"" of type '" "int""'");
   16489                 :   } 
   16490               6 :   arg2 = static_cast< int >(val2);
   16491                 :   {
   16492               6 :     if ( bUseExceptions ) {
   16493               0 :       CPLErrorReset();
   16494                 :     }
   16495               6 :     result = (GDALRATFieldUsage)GDALRasterAttributeTableShadow_GetUsageOfCol(arg1,arg2);
   16496               6 :     if ( bUseExceptions ) {
   16497               0 :       CPLErr eclass = CPLGetLastErrorType();
   16498               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16499               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16500                 :       }
   16501                 :     }
   16502                 :   }
   16503              12 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16504               6 :   return resultobj;
   16505                 : fail:
   16506               0 :   return NULL;
   16507                 : }
   16508                 : 
   16509                 : 
   16510               6 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetTypeOfCol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16511               6 :   PyObject *resultobj = 0;
   16512               6 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16513                 :   int arg2 ;
   16514               6 :   void *argp1 = 0 ;
   16515               6 :   int res1 = 0 ;
   16516                 :   int val2 ;
   16517               6 :   int ecode2 = 0 ;
   16518               6 :   PyObject * obj0 = 0 ;
   16519               6 :   PyObject * obj1 = 0 ;
   16520                 :   GDALRATFieldType result;
   16521                 :   
   16522               6 :   if (!PyArg_ParseTuple(args,(char *)"OO:RasterAttributeTable_GetTypeOfCol",&obj0,&obj1)) SWIG_fail;
   16523               6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   16524               6 :   if (!SWIG_IsOK(res1)) {
   16525               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetTypeOfCol" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   16526                 :   }
   16527               6 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   16528               6 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16529               6 :   if (!SWIG_IsOK(ecode2)) {
   16530               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetTypeOfCol" "', argument " "2"" of type '" "int""'");
   16531                 :   } 
   16532               6 :   arg2 = static_cast< int >(val2);
   16533                 :   {
   16534               6 :     if ( bUseExceptions ) {
   16535               0 :       CPLErrorReset();
   16536                 :     }
   16537               6 :     result = (GDALRATFieldType)GDALRasterAttributeTableShadow_GetTypeOfCol(arg1,arg2);
   16538               6 :     if ( bUseExceptions ) {
   16539               0 :       CPLErr eclass = CPLGetLastErrorType();
   16540               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16541               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16542                 :       }
   16543                 :     }
   16544                 :   }
   16545              12 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16546               6 :   return resultobj;
   16547                 : fail:
   16548               0 :   return NULL;
   16549                 : }
   16550                 : 
   16551                 : 
   16552               0 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetColOfUsage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16553               0 :   PyObject *resultobj = 0;
   16554               0 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16555                 :   GDALRATFieldUsage arg2 ;
   16556               0 :   void *argp1 = 0 ;
   16557               0 :   int res1 = 0 ;
   16558                 :   int val2 ;
   16559               0 :   int ecode2 = 0 ;
   16560               0 :   PyObject * obj0 = 0 ;
   16561               0 :   PyObject * obj1 = 0 ;
   16562                 :   int result;
   16563                 :   
   16564               0 :   if (!PyArg_ParseTuple(args,(char *)"OO:RasterAttributeTable_GetColOfUsage",&obj0,&obj1)) SWIG_fail;
   16565               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   16566               0 :   if (!SWIG_IsOK(res1)) {
   16567               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetColOfUsage" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   16568                 :   }
   16569               0 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   16570               0 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16571               0 :   if (!SWIG_IsOK(ecode2)) {
   16572               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetColOfUsage" "', argument " "2"" of type '" "GDALRATFieldUsage""'");
   16573                 :   } 
   16574               0 :   arg2 = static_cast< GDALRATFieldUsage >(val2);
   16575                 :   {
   16576               0 :     if ( bUseExceptions ) {
   16577               0 :       CPLErrorReset();
   16578                 :     }
   16579               0 :     result = (int)GDALRasterAttributeTableShadow_GetColOfUsage(arg1,arg2);
   16580               0 :     if ( bUseExceptions ) {
   16581               0 :       CPLErr eclass = CPLGetLastErrorType();
   16582               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16583               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16584                 :       }
   16585                 :     }
   16586                 :   }
   16587               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16588               0 :   return resultobj;
   16589                 : fail:
   16590               0 :   return NULL;
   16591                 : }
   16592                 : 
   16593                 : 
   16594               3 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetRowCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16595               3 :   PyObject *resultobj = 0;
   16596               3 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16597               3 :   void *argp1 = 0 ;
   16598               3 :   int res1 = 0 ;
   16599               3 :   PyObject * obj0 = 0 ;
   16600                 :   int result;
   16601                 :   
   16602               3 :   if (!PyArg_ParseTuple(args,(char *)"O:RasterAttributeTable_GetRowCount",&obj0)) SWIG_fail;
   16603               3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   16604               3 :   if (!SWIG_IsOK(res1)) {
   16605               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetRowCount" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   16606                 :   }
   16607               3 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   16608                 :   {
   16609               3 :     if ( bUseExceptions ) {
   16610               0 :       CPLErrorReset();
   16611                 :     }
   16612               3 :     result = (int)GDALRasterAttributeTableShadow_GetRowCount(arg1);
   16613               3 :     if ( bUseExceptions ) {
   16614               0 :       CPLErr eclass = CPLGetLastErrorType();
   16615               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16616               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16617                 :       }
   16618                 :     }
   16619                 :   }
   16620               3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16621               3 :   return resultobj;
   16622                 : fail:
   16623               0 :   return NULL;
   16624                 : }
   16625                 : 
   16626                 : 
   16627               0 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetValueAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16628               0 :   PyObject *resultobj = 0;
   16629               0 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16630                 :   int arg2 ;
   16631                 :   int arg3 ;
   16632               0 :   void *argp1 = 0 ;
   16633               0 :   int res1 = 0 ;
   16634                 :   int val2 ;
   16635               0 :   int ecode2 = 0 ;
   16636                 :   int val3 ;
   16637               0 :   int ecode3 = 0 ;
   16638               0 :   PyObject * obj0 = 0 ;
   16639               0 :   PyObject * obj1 = 0 ;
   16640               0 :   PyObject * obj2 = 0 ;
   16641               0 :   char *result = 0 ;
   16642                 :   
   16643               0 :   if (!PyArg_ParseTuple(args,(char *)"OOO:RasterAttributeTable_GetValueAsString",&obj0,&obj1,&obj2)) SWIG_fail;
   16644               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   16645               0 :   if (!SWIG_IsOK(res1)) {
   16646               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetValueAsString" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   16647                 :   }
   16648               0 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   16649               0 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16650               0 :   if (!SWIG_IsOK(ecode2)) {
   16651               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetValueAsString" "', argument " "2"" of type '" "int""'");
   16652                 :   } 
   16653               0 :   arg2 = static_cast< int >(val2);
   16654               0 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   16655               0 :   if (!SWIG_IsOK(ecode3)) {
   16656               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_GetValueAsString" "', argument " "3"" of type '" "int""'");
   16657                 :   } 
   16658               0 :   arg3 = static_cast< int >(val3);
   16659                 :   {
   16660               0 :     if ( bUseExceptions ) {
   16661               0 :       CPLErrorReset();
   16662                 :     }
   16663               0 :     result = (char *)GDALRasterAttributeTableShadow_GetValueAsString(arg1,arg2,arg3);
   16664               0 :     if ( bUseExceptions ) {
   16665               0 :       CPLErr eclass = CPLGetLastErrorType();
   16666               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16667               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16668                 :       }
   16669                 :     }
   16670                 :   }
   16671               0 :   resultobj = SWIG_FromCharPtr((const char *)result);
   16672               0 :   return resultobj;
   16673                 : fail:
   16674               0 :   return NULL;
   16675                 : }
   16676                 : 
   16677                 : 
   16678               6 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetValueAsInt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16679               6 :   PyObject *resultobj = 0;
   16680               6 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16681                 :   int arg2 ;
   16682                 :   int arg3 ;
   16683               6 :   void *argp1 = 0 ;
   16684               6 :   int res1 = 0 ;
   16685                 :   int val2 ;
   16686               6 :   int ecode2 = 0 ;
   16687                 :   int val3 ;
   16688               6 :   int ecode3 = 0 ;
   16689               6 :   PyObject * obj0 = 0 ;
   16690               6 :   PyObject * obj1 = 0 ;
   16691               6 :   PyObject * obj2 = 0 ;
   16692                 :   int result;
   16693                 :   
   16694               6 :   if (!PyArg_ParseTuple(args,(char *)"OOO:RasterAttributeTable_GetValueAsInt",&obj0,&obj1,&obj2)) SWIG_fail;
   16695               6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   16696               6 :   if (!SWIG_IsOK(res1)) {
   16697               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetValueAsInt" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   16698                 :   }
   16699               6 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   16700               6 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16701               6 :   if (!SWIG_IsOK(ecode2)) {
   16702               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetValueAsInt" "', argument " "2"" of type '" "int""'");
   16703                 :   } 
   16704               6 :   arg2 = static_cast< int >(val2);
   16705               6 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   16706               6 :   if (!SWIG_IsOK(ecode3)) {
   16707               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_GetValueAsInt" "', argument " "3"" of type '" "int""'");
   16708                 :   } 
   16709               6 :   arg3 = static_cast< int >(val3);
   16710                 :   {
   16711               6 :     if ( bUseExceptions ) {
   16712               0 :       CPLErrorReset();
   16713                 :     }
   16714               6 :     result = (int)GDALRasterAttributeTableShadow_GetValueAsInt(arg1,arg2,arg3);
   16715               6 :     if ( bUseExceptions ) {
   16716               0 :       CPLErr eclass = CPLGetLastErrorType();
   16717               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16718               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16719                 :       }
   16720                 :     }
   16721                 :   }
   16722               6 :   resultobj = SWIG_From_int(static_cast< int >(result));
   16723               6 :   return resultobj;
   16724                 : fail:
   16725               0 :   return NULL;
   16726                 : }
   16727                 : 
   16728                 : 
   16729               0 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetValueAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16730               0 :   PyObject *resultobj = 0;
   16731               0 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16732                 :   int arg2 ;
   16733                 :   int arg3 ;
   16734               0 :   void *argp1 = 0 ;
   16735               0 :   int res1 = 0 ;
   16736                 :   int val2 ;
   16737               0 :   int ecode2 = 0 ;
   16738                 :   int val3 ;
   16739               0 :   int ecode3 = 0 ;
   16740               0 :   PyObject * obj0 = 0 ;
   16741               0 :   PyObject * obj1 = 0 ;
   16742               0 :   PyObject * obj2 = 0 ;
   16743                 :   double result;
   16744                 :   
   16745               0 :   if (!PyArg_ParseTuple(args,(char *)"OOO:RasterAttributeTable_GetValueAsDouble",&obj0,&obj1,&obj2)) SWIG_fail;
   16746               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   16747               0 :   if (!SWIG_IsOK(res1)) {
   16748               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetValueAsDouble" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   16749                 :   }
   16750               0 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   16751               0 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16752               0 :   if (!SWIG_IsOK(ecode2)) {
   16753               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetValueAsDouble" "', argument " "2"" of type '" "int""'");
   16754                 :   } 
   16755               0 :   arg2 = static_cast< int >(val2);
   16756               0 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   16757               0 :   if (!SWIG_IsOK(ecode3)) {
   16758               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_GetValueAsDouble" "', argument " "3"" of type '" "int""'");
   16759                 :   } 
   16760               0 :   arg3 = static_cast< int >(val3);
   16761                 :   {
   16762               0 :     if ( bUseExceptions ) {
   16763               0 :       CPLErrorReset();
   16764                 :     }
   16765               0 :     result = (double)GDALRasterAttributeTableShadow_GetValueAsDouble(arg1,arg2,arg3);
   16766               0 :     if ( bUseExceptions ) {
   16767               0 :       CPLErr eclass = CPLGetLastErrorType();
   16768               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16769               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16770                 :       }
   16771                 :     }
   16772                 :   }
   16773               0 :   resultobj = SWIG_From_double(static_cast< double >(result));
   16774               0 :   return resultobj;
   16775                 : fail:
   16776               0 :   return NULL;
   16777                 : }
   16778                 : 
   16779                 : 
   16780               0 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetValueAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16781               0 :   PyObject *resultobj = 0;
   16782               0 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16783                 :   int arg2 ;
   16784                 :   int arg3 ;
   16785               0 :   char *arg4 = (char *) 0 ;
   16786               0 :   void *argp1 = 0 ;
   16787               0 :   int res1 = 0 ;
   16788                 :   int val2 ;
   16789               0 :   int ecode2 = 0 ;
   16790                 :   int val3 ;
   16791               0 :   int ecode3 = 0 ;
   16792               0 :   PyObject *str4 = 0 ;
   16793               0 :   int bToFree4 = 0 ;
   16794               0 :   PyObject * obj0 = 0 ;
   16795               0 :   PyObject * obj1 = 0 ;
   16796               0 :   PyObject * obj2 = 0 ;
   16797               0 :   PyObject * obj3 = 0 ;
   16798                 :   
   16799               0 :   if (!PyArg_ParseTuple(args,(char *)"OOOO:RasterAttributeTable_SetValueAsString",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
   16800               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   16801               0 :   if (!SWIG_IsOK(res1)) {
   16802               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetValueAsString" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   16803                 :   }
   16804               0 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   16805               0 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16806               0 :   if (!SWIG_IsOK(ecode2)) {
   16807               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetValueAsString" "', argument " "2"" of type '" "int""'");
   16808                 :   } 
   16809               0 :   arg2 = static_cast< int >(val2);
   16810               0 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   16811               0 :   if (!SWIG_IsOK(ecode3)) {
   16812               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetValueAsString" "', argument " "3"" of type '" "int""'");
   16813                 :   } 
   16814               0 :   arg3 = static_cast< int >(val3);
   16815                 :   {
   16816                 :     /* %typemap(in) (tostring argin) */
   16817               0 :     str4 = PyObject_Str( obj3 );
   16818               0 :     if ( str4 == 0 ) {
   16819               0 :       PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
   16820               0 :       SWIG_fail;
   16821                 :     }
   16822                 :     
   16823               0 :     arg4 = GDALPythonObjectToCStr(str4, &bToFree4); 
   16824                 :   }
   16825                 :   {
   16826               0 :     if ( bUseExceptions ) {
   16827               0 :       CPLErrorReset();
   16828                 :     }
   16829                 :     GDALRasterAttributeTableShadow_SetValueAsString(arg1,arg2,arg3,(char const *)arg4);
   16830               0 :     if ( bUseExceptions ) {
   16831               0 :       CPLErr eclass = CPLGetLastErrorType();
   16832               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16833               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16834                 :       }
   16835                 :     }
   16836                 :   }
   16837               0 :   resultobj = SWIG_Py_Void();
   16838                 :   {
   16839                 :     /* %typemap(freearg) (tostring argin) */
   16840               0 :     if ( str4 != NULL)
   16841                 :     {
   16842               0 :       Py_DECREF(str4);
   16843                 :     }
   16844               0 :     GDALPythonFreeCStr(arg4, bToFree4);
   16845                 :   }
   16846               0 :   return resultobj;
   16847                 : fail:
   16848                 :   {
   16849                 :     /* %typemap(freearg) (tostring argin) */
   16850               0 :     if ( str4 != NULL)
   16851                 :     {
   16852               0 :       Py_DECREF(str4);
   16853                 :     }
   16854               0 :     GDALPythonFreeCStr(arg4, bToFree4);
   16855                 :   }
   16856               0 :   return NULL;
   16857                 : }
   16858                 : 
   16859                 : 
   16860               6 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetValueAsInt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16861               6 :   PyObject *resultobj = 0;
   16862               6 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16863                 :   int arg2 ;
   16864                 :   int arg3 ;
   16865                 :   int arg4 ;
   16866               6 :   void *argp1 = 0 ;
   16867               6 :   int res1 = 0 ;
   16868                 :   int val2 ;
   16869               6 :   int ecode2 = 0 ;
   16870                 :   int val3 ;
   16871               6 :   int ecode3 = 0 ;
   16872                 :   int val4 ;
   16873               6 :   int ecode4 = 0 ;
   16874               6 :   PyObject * obj0 = 0 ;
   16875               6 :   PyObject * obj1 = 0 ;
   16876               6 :   PyObject * obj2 = 0 ;
   16877               6 :   PyObject * obj3 = 0 ;
   16878                 :   
   16879               6 :   if (!PyArg_ParseTuple(args,(char *)"OOOO:RasterAttributeTable_SetValueAsInt",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
   16880               6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   16881               6 :   if (!SWIG_IsOK(res1)) {
   16882               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   16883                 :   }
   16884               6 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   16885               6 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16886               6 :   if (!SWIG_IsOK(ecode2)) {
   16887               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "2"" of type '" "int""'");
   16888                 :   } 
   16889               6 :   arg2 = static_cast< int >(val2);
   16890               6 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   16891               6 :   if (!SWIG_IsOK(ecode3)) {
   16892               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "3"" of type '" "int""'");
   16893                 :   } 
   16894               6 :   arg3 = static_cast< int >(val3);
   16895               6 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   16896               6 :   if (!SWIG_IsOK(ecode4)) {
   16897               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RasterAttributeTable_SetValueAsInt" "', argument " "4"" of type '" "int""'");
   16898                 :   } 
   16899               6 :   arg4 = static_cast< int >(val4);
   16900                 :   {
   16901               6 :     if ( bUseExceptions ) {
   16902               0 :       CPLErrorReset();
   16903                 :     }
   16904                 :     GDALRasterAttributeTableShadow_SetValueAsInt(arg1,arg2,arg3,arg4);
   16905               6 :     if ( bUseExceptions ) {
   16906               0 :       CPLErr eclass = CPLGetLastErrorType();
   16907               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16908               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16909                 :       }
   16910                 :     }
   16911                 :   }
   16912               6 :   resultobj = SWIG_Py_Void();
   16913               6 :   return resultobj;
   16914                 : fail:
   16915               0 :   return NULL;
   16916                 : }
   16917                 : 
   16918                 : 
   16919               0 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetValueAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16920               0 :   PyObject *resultobj = 0;
   16921               0 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16922                 :   int arg2 ;
   16923                 :   int arg3 ;
   16924                 :   double arg4 ;
   16925               0 :   void *argp1 = 0 ;
   16926               0 :   int res1 = 0 ;
   16927                 :   int val2 ;
   16928               0 :   int ecode2 = 0 ;
   16929                 :   int val3 ;
   16930               0 :   int ecode3 = 0 ;
   16931                 :   double val4 ;
   16932               0 :   int ecode4 = 0 ;
   16933               0 :   PyObject * obj0 = 0 ;
   16934               0 :   PyObject * obj1 = 0 ;
   16935               0 :   PyObject * obj2 = 0 ;
   16936               0 :   PyObject * obj3 = 0 ;
   16937                 :   
   16938               0 :   if (!PyArg_ParseTuple(args,(char *)"OOOO:RasterAttributeTable_SetValueAsDouble",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
   16939               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   16940               0 :   if (!SWIG_IsOK(res1)) {
   16941               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   16942                 :   }
   16943               0 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   16944               0 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16945               0 :   if (!SWIG_IsOK(ecode2)) {
   16946               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "2"" of type '" "int""'");
   16947                 :   } 
   16948               0 :   arg2 = static_cast< int >(val2);
   16949               0 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   16950               0 :   if (!SWIG_IsOK(ecode3)) {
   16951               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "3"" of type '" "int""'");
   16952                 :   } 
   16953               0 :   arg3 = static_cast< int >(val3);
   16954               0 :   ecode4 = SWIG_AsVal_double(obj3, &val4);
   16955               0 :   if (!SWIG_IsOK(ecode4)) {
   16956               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RasterAttributeTable_SetValueAsDouble" "', argument " "4"" of type '" "double""'");
   16957                 :   } 
   16958               0 :   arg4 = static_cast< double >(val4);
   16959                 :   {
   16960               0 :     if ( bUseExceptions ) {
   16961               0 :       CPLErrorReset();
   16962                 :     }
   16963                 :     GDALRasterAttributeTableShadow_SetValueAsDouble(arg1,arg2,arg3,arg4);
   16964               0 :     if ( bUseExceptions ) {
   16965               0 :       CPLErr eclass = CPLGetLastErrorType();
   16966               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   16967               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   16968                 :       }
   16969                 :     }
   16970                 :   }
   16971               0 :   resultobj = SWIG_Py_Void();
   16972               0 :   return resultobj;
   16973                 : fail:
   16974               0 :   return NULL;
   16975                 : }
   16976                 : 
   16977                 : 
   16978               1 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetRowCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   16979               1 :   PyObject *resultobj = 0;
   16980               1 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   16981                 :   int arg2 ;
   16982               1 :   void *argp1 = 0 ;
   16983               1 :   int res1 = 0 ;
   16984                 :   int val2 ;
   16985               1 :   int ecode2 = 0 ;
   16986               1 :   PyObject * obj0 = 0 ;
   16987               1 :   PyObject * obj1 = 0 ;
   16988                 :   
   16989               1 :   if (!PyArg_ParseTuple(args,(char *)"OO:RasterAttributeTable_SetRowCount",&obj0,&obj1)) SWIG_fail;
   16990               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   16991               1 :   if (!SWIG_IsOK(res1)) {
   16992               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetRowCount" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   16993                 :   }
   16994               1 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   16995               1 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   16996               1 :   if (!SWIG_IsOK(ecode2)) {
   16997               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetRowCount" "', argument " "2"" of type '" "int""'");
   16998                 :   } 
   16999               1 :   arg2 = static_cast< int >(val2);
   17000                 :   {
   17001               1 :     if ( bUseExceptions ) {
   17002               0 :       CPLErrorReset();
   17003                 :     }
   17004                 :     GDALRasterAttributeTableShadow_SetRowCount(arg1,arg2);
   17005               1 :     if ( bUseExceptions ) {
   17006               0 :       CPLErr eclass = CPLGetLastErrorType();
   17007               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17008               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17009                 :       }
   17010                 :     }
   17011                 :   }
   17012               1 :   resultobj = SWIG_Py_Void();
   17013               1 :   return resultobj;
   17014                 : fail:
   17015               0 :   return NULL;
   17016                 : }
   17017                 : 
   17018                 : 
   17019               2 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_CreateColumn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17020               2 :   PyObject *resultobj = 0;
   17021               2 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   17022               2 :   char *arg2 = (char *) 0 ;
   17023                 :   GDALRATFieldType arg3 ;
   17024                 :   GDALRATFieldUsage arg4 ;
   17025               2 :   void *argp1 = 0 ;
   17026               2 :   int res1 = 0 ;
   17027                 :   int res2 ;
   17028               2 :   char *buf2 = 0 ;
   17029               2 :   int alloc2 = 0 ;
   17030                 :   int val3 ;
   17031               2 :   int ecode3 = 0 ;
   17032                 :   int val4 ;
   17033               2 :   int ecode4 = 0 ;
   17034               2 :   PyObject * obj0 = 0 ;
   17035               2 :   PyObject * obj1 = 0 ;
   17036               2 :   PyObject * obj2 = 0 ;
   17037               2 :   PyObject * obj3 = 0 ;
   17038                 :   int result;
   17039                 :   
   17040               2 :   if (!PyArg_ParseTuple(args,(char *)"OOOO:RasterAttributeTable_CreateColumn",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
   17041               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   17042               2 :   if (!SWIG_IsOK(res1)) {
   17043               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   17044                 :   }
   17045               2 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   17046               2 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   17047               2 :   if (!SWIG_IsOK(res2)) {
   17048               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "2"" of type '" "char const *""'");
   17049                 :   }
   17050               2 :   arg2 = reinterpret_cast< char * >(buf2);
   17051               2 :   ecode3 = SWIG_AsVal_int(obj2, &val3);
   17052               2 :   if (!SWIG_IsOK(ecode3)) {
   17053               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "3"" of type '" "GDALRATFieldType""'");
   17054                 :   } 
   17055               2 :   arg3 = static_cast< GDALRATFieldType >(val3);
   17056               2 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   17057               2 :   if (!SWIG_IsOK(ecode4)) {
   17058               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "RasterAttributeTable_CreateColumn" "', argument " "4"" of type '" "GDALRATFieldUsage""'");
   17059                 :   } 
   17060               2 :   arg4 = static_cast< GDALRATFieldUsage >(val4);
   17061                 :   {
   17062               2 :     if ( bUseExceptions ) {
   17063               0 :       CPLErrorReset();
   17064                 :     }
   17065               2 :     result = (int)GDALRasterAttributeTableShadow_CreateColumn(arg1,(char const *)arg2,arg3,arg4);
   17066               2 :     if ( bUseExceptions ) {
   17067               0 :       CPLErr eclass = CPLGetLastErrorType();
   17068               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17069               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17070                 :       }
   17071                 :     }
   17072                 :   }
   17073               2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   17074               2 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17075               2 :   return resultobj;
   17076                 : fail:
   17077               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17078               0 :   return NULL;
   17079                 : }
   17080                 : 
   17081                 : 
   17082               0 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetLinearBinning(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17083               0 :   PyObject *resultobj = 0;
   17084               0 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   17085               0 :   double *arg2 = (double *) 0 ;
   17086               0 :   double *arg3 = (double *) 0 ;
   17087               0 :   void *argp1 = 0 ;
   17088               0 :   int res1 = 0 ;
   17089                 :   double temp2 ;
   17090               0 :   int res2 = SWIG_TMPOBJ ;
   17091                 :   double temp3 ;
   17092               0 :   int res3 = SWIG_TMPOBJ ;
   17093               0 :   PyObject * obj0 = 0 ;
   17094                 :   bool result;
   17095                 :   
   17096               0 :   arg2 = &temp2;
   17097               0 :   arg3 = &temp3;
   17098               0 :   if (!PyArg_ParseTuple(args,(char *)"O:RasterAttributeTable_GetLinearBinning",&obj0)) SWIG_fail;
   17099               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   17100               0 :   if (!SWIG_IsOK(res1)) {
   17101               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetLinearBinning" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   17102                 :   }
   17103               0 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   17104                 :   {
   17105               0 :     if ( bUseExceptions ) {
   17106               0 :       CPLErrorReset();
   17107                 :     }
   17108               0 :     result = (bool)GDALRasterAttributeTableShadow_GetLinearBinning(arg1,arg2,arg3);
   17109               0 :     if ( bUseExceptions ) {
   17110               0 :       CPLErr eclass = CPLGetLastErrorType();
   17111               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17112               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17113                 :       }
   17114                 :     }
   17115                 :   }
   17116               0 :   resultobj = SWIG_From_bool(static_cast< bool >(result));
   17117               0 :   if (SWIG_IsTmpObj(res2)) {
   17118               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2)));
   17119                 :   } else {
   17120               0 :     int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   17121               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags));
   17122                 :   }
   17123               0 :   if (SWIG_IsTmpObj(res3)) {
   17124               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
   17125                 :   } else {
   17126               0 :     int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   17127               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
   17128                 :   }
   17129               0 :   return resultobj;
   17130                 : fail:
   17131               0 :   return NULL;
   17132                 : }
   17133                 : 
   17134                 : 
   17135               0 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_SetLinearBinning(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17136               0 :   PyObject *resultobj = 0;
   17137               0 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   17138                 :   double arg2 ;
   17139                 :   double arg3 ;
   17140               0 :   void *argp1 = 0 ;
   17141               0 :   int res1 = 0 ;
   17142                 :   double val2 ;
   17143               0 :   int ecode2 = 0 ;
   17144                 :   double val3 ;
   17145               0 :   int ecode3 = 0 ;
   17146               0 :   PyObject * obj0 = 0 ;
   17147               0 :   PyObject * obj1 = 0 ;
   17148               0 :   PyObject * obj2 = 0 ;
   17149                 :   int result;
   17150                 :   
   17151               0 :   if (!PyArg_ParseTuple(args,(char *)"OOO:RasterAttributeTable_SetLinearBinning",&obj0,&obj1,&obj2)) SWIG_fail;
   17152               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   17153               0 :   if (!SWIG_IsOK(res1)) {
   17154               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_SetLinearBinning" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   17155                 :   }
   17156               0 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   17157               0 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   17158               0 :   if (!SWIG_IsOK(ecode2)) {
   17159               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_SetLinearBinning" "', argument " "2"" of type '" "double""'");
   17160                 :   } 
   17161               0 :   arg2 = static_cast< double >(val2);
   17162               0 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   17163               0 :   if (!SWIG_IsOK(ecode3)) {
   17164               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RasterAttributeTable_SetLinearBinning" "', argument " "3"" of type '" "double""'");
   17165                 :   } 
   17166               0 :   arg3 = static_cast< double >(val3);
   17167                 :   {
   17168               0 :     if ( bUseExceptions ) {
   17169               0 :       CPLErrorReset();
   17170                 :     }
   17171               0 :     result = (int)GDALRasterAttributeTableShadow_SetLinearBinning(arg1,arg2,arg3);
   17172               0 :     if ( bUseExceptions ) {
   17173               0 :       CPLErr eclass = CPLGetLastErrorType();
   17174               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17175               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17176                 :       }
   17177                 :     }
   17178                 :   }
   17179               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   17180               0 :   return resultobj;
   17181                 : fail:
   17182               0 :   return NULL;
   17183                 : }
   17184                 : 
   17185                 : 
   17186               2 : SWIGINTERN PyObject *_wrap_RasterAttributeTable_GetRowOfValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17187               2 :   PyObject *resultobj = 0;
   17188               2 :   GDALRasterAttributeTableShadow *arg1 = (GDALRasterAttributeTableShadow *) 0 ;
   17189                 :   double arg2 ;
   17190               2 :   void *argp1 = 0 ;
   17191               2 :   int res1 = 0 ;
   17192                 :   double val2 ;
   17193               2 :   int ecode2 = 0 ;
   17194               2 :   PyObject * obj0 = 0 ;
   17195               2 :   PyObject * obj1 = 0 ;
   17196                 :   int result;
   17197                 :   
   17198               2 :   if (!PyArg_ParseTuple(args,(char *)"OO:RasterAttributeTable_GetRowOfValue",&obj0,&obj1)) SWIG_fail;
   17199               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterAttributeTableShadow, 0 |  0 );
   17200               2 :   if (!SWIG_IsOK(res1)) {
   17201               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterAttributeTable_GetRowOfValue" "', argument " "1"" of type '" "GDALRasterAttributeTableShadow *""'"); 
   17202                 :   }
   17203               2 :   arg1 = reinterpret_cast< GDALRasterAttributeTableShadow * >(argp1);
   17204               2 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   17205               2 :   if (!SWIG_IsOK(ecode2)) {
   17206               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RasterAttributeTable_GetRowOfValue" "', argument " "2"" of type '" "double""'");
   17207                 :   } 
   17208               2 :   arg2 = static_cast< double >(val2);
   17209                 :   {
   17210               2 :     if ( bUseExceptions ) {
   17211               0 :       CPLErrorReset();
   17212                 :     }
   17213               2 :     result = (int)GDALRasterAttributeTableShadow_GetRowOfValue(arg1,arg2);
   17214               2 :     if ( bUseExceptions ) {
   17215               0 :       CPLErr eclass = CPLGetLastErrorType();
   17216               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17217               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17218                 :       }
   17219                 :     }
   17220                 :   }
   17221               2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   17222               2 :   return resultobj;
   17223                 : fail:
   17224               0 :   return NULL;
   17225                 : }
   17226                 : 
   17227                 : 
   17228               6 : SWIGINTERN PyObject *RasterAttributeTable_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17229                 :   PyObject *obj;
   17230               6 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   17231               6 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALRasterAttributeTableShadow, SWIG_NewClientData(obj));
   17232               6 :   return SWIG_Py_Void();
   17233                 : }
   17234                 : 
   17235              61 : SWIGINTERN PyObject *_wrap_TermProgress_nocb(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   17236              61 :   PyObject *resultobj = 0;
   17237                 :   double arg1 ;
   17238              61 :   char *arg2 = (char *) NULL ;
   17239              61 :   void *arg3 = (void *) NULL ;
   17240                 :   double val1 ;
   17241              61 :   int ecode1 = 0 ;
   17242                 :   int res2 ;
   17243              61 :   char *buf2 = 0 ;
   17244              61 :   int alloc2 = 0 ;
   17245                 :   int res3 ;
   17246              61 :   PyObject * obj0 = 0 ;
   17247              61 :   PyObject * obj1 = 0 ;
   17248              61 :   PyObject * obj2 = 0 ;
   17249                 :   char *  kwnames[] = {
   17250                 :     (char *) "dfProgress",(char *) "pszMessage",(char *) "pData", NULL 
   17251              61 :   };
   17252                 :   int result;
   17253                 :   
   17254              61 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:TermProgress_nocb",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
   17255              61 :   ecode1 = SWIG_AsVal_double(obj0, &val1);
   17256              61 :   if (!SWIG_IsOK(ecode1)) {
   17257               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "TermProgress_nocb" "', argument " "1"" of type '" "double""'");
   17258                 :   } 
   17259              61 :   arg1 = static_cast< double >(val1);
   17260              61 :   if (obj1) {
   17261               0 :     res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   17262               0 :     if (!SWIG_IsOK(res2)) {
   17263               0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermProgress_nocb" "', argument " "2"" of type '" "char const *""'");
   17264                 :     }
   17265               0 :     arg2 = reinterpret_cast< char * >(buf2);
   17266                 :   }
   17267              61 :   if (obj2) {
   17268               0 :     res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
   17269               0 :     if (!SWIG_IsOK(res3)) {
   17270               0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "TermProgress_nocb" "', argument " "3"" of type '" "void *""'"); 
   17271                 :     }
   17272                 :   }
   17273                 :   {
   17274              61 :     if ( bUseExceptions ) {
   17275               0 :       CPLErrorReset();
   17276                 :     }
   17277              61 :     result = (int)GDALTermProgress_nocb(arg1,(char const *)arg2,arg3);
   17278              61 :     if ( bUseExceptions ) {
   17279               0 :       CPLErr eclass = CPLGetLastErrorType();
   17280               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17281               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17282                 :       }
   17283                 :     }
   17284                 :   }
   17285              61 :   resultobj = SWIG_From_int(static_cast< int >(result));
   17286              61 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17287              61 :   return resultobj;
   17288                 : fail:
   17289               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   17290               0 :   return NULL;
   17291                 : }
   17292                 : 
   17293                 : 
   17294               3 : SWIGINTERN PyObject *_wrap_ComputeMedianCutPCT(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   17295               3 :   PyObject *resultobj = 0;
   17296               3 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   17297               3 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   17298               3 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   17299                 :   int arg4 ;
   17300               3 :   GDALColorTableShadow *arg5 = (GDALColorTableShadow *) 0 ;
   17301               3 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   17302               3 :   void *arg7 = (void *) NULL ;
   17303               3 :   void *argp1 = 0 ;
   17304               3 :   int res1 = 0 ;
   17305               3 :   void *argp2 = 0 ;
   17306               3 :   int res2 = 0 ;
   17307               3 :   void *argp3 = 0 ;
   17308               3 :   int res3 = 0 ;
   17309                 :   int val4 ;
   17310               3 :   int ecode4 = 0 ;
   17311               3 :   void *argp5 = 0 ;
   17312               3 :   int res5 = 0 ;
   17313               3 :   PyObject * obj0 = 0 ;
   17314               3 :   PyObject * obj1 = 0 ;
   17315               3 :   PyObject * obj2 = 0 ;
   17316               3 :   PyObject * obj3 = 0 ;
   17317               3 :   PyObject * obj4 = 0 ;
   17318               3 :   PyObject * obj5 = 0 ;
   17319               3 :   PyObject * obj6 = 0 ;
   17320                 :   char *  kwnames[] = {
   17321                 :     (char *) "red",(char *) "green",(char *) "blue",(char *) "num_colors",(char *) "colors",(char *) "callback",(char *) "callback_data", NULL 
   17322               3 :   };
   17323                 :   int result;
   17324                 :   
   17325                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   17326                 :   PyProgressData *psProgressInfo;
   17327               3 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   17328               3 :   psProgressInfo->nLastReported = -1;
   17329               3 :   psProgressInfo->psPyCallback = NULL;
   17330               3 :   psProgressInfo->psPyCallbackData = NULL;
   17331               3 :   arg7 = psProgressInfo;
   17332               3 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO|OO:ComputeMedianCutPCT",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
   17333               3 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   17334               3 :   if (!SWIG_IsOK(res1)) {
   17335               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComputeMedianCutPCT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   17336                 :   }
   17337               3 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   17338               3 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   17339               3 :   if (!SWIG_IsOK(res2)) {
   17340               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ComputeMedianCutPCT" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   17341                 :   }
   17342               3 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   17343               3 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   17344               3 :   if (!SWIG_IsOK(res3)) {
   17345               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ComputeMedianCutPCT" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   17346                 :   }
   17347               3 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   17348               3 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   17349               3 :   if (!SWIG_IsOK(ecode4)) {
   17350               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ComputeMedianCutPCT" "', argument " "4"" of type '" "int""'");
   17351                 :   } 
   17352               3 :   arg4 = static_cast< int >(val4);
   17353               3 :   res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   17354               3 :   if (!SWIG_IsOK(res5)) {
   17355               0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ComputeMedianCutPCT" "', argument " "5"" of type '" "GDALColorTableShadow *""'"); 
   17356                 :   }
   17357               3 :   arg5 = reinterpret_cast< GDALColorTableShadow * >(argp5);
   17358               3 :   if (obj5) {
   17359                 :     {
   17360                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   17361                 :       /* callback_func typemap */
   17362               2 :       if (obj5 && obj5 != Py_None ) {
   17363               2 :         void* cbfunction = NULL;
   17364                 :         SWIG_ConvertPtr( obj5, 
   17365                 :           (void**)&cbfunction, 
   17366                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int, 
   17367               2 :           SWIG_POINTER_EXCEPTION | 0 );
   17368                 :         
   17369               2 :         if ( cbfunction == GDALTermProgress ) {
   17370               2 :           arg6 = GDALTermProgress;
   17371                 :         } else {
   17372               0 :           if (!PyCallable_Check(obj5)) {
   17373                 :             PyErr_SetString( PyExc_RuntimeError, 
   17374               0 :               "Object given is not a Python function" );
   17375               0 :             SWIG_fail;
   17376                 :           }
   17377               0 :           psProgressInfo->psPyCallback = obj5;
   17378               0 :           arg6 = PyProgressProxy;
   17379                 :         }
   17380                 :         
   17381                 :       }
   17382                 :       
   17383                 :     }
   17384                 :   }
   17385               3 :   if (obj6) {
   17386                 :     {
   17387                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   17388               2 :       psProgressInfo->psPyCallbackData = obj6 ;
   17389                 :     }
   17390                 :   }
   17391                 :   {
   17392               3 :     if (!arg1) {
   17393               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17394                 :     }
   17395                 :   }
   17396                 :   {
   17397               3 :     if (!arg2) {
   17398               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17399                 :     }
   17400                 :   }
   17401                 :   {
   17402               3 :     if (!arg3) {
   17403               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17404                 :     }
   17405                 :   }
   17406                 :   {
   17407               3 :     if (!arg5) {
   17408               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17409                 :     }
   17410                 :   }
   17411                 :   {
   17412               3 :     if ( bUseExceptions ) {
   17413               0 :       CPLErrorReset();
   17414                 :     }
   17415               3 :     result = (int)ComputeMedianCutPCT(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   17416               3 :     if ( bUseExceptions ) {
   17417               0 :       CPLErr eclass = CPLGetLastErrorType();
   17418               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17419               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17420                 :       }
   17421                 :     }
   17422                 :   }
   17423               3 :   resultobj = SWIG_From_int(static_cast< int >(result));
   17424                 :   {
   17425                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   17426                 :     
   17427               3 :     CPLFree(psProgressInfo);
   17428                 :     
   17429                 :   }
   17430               3 :   return resultobj;
   17431                 : fail:
   17432                 :   {
   17433                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   17434                 :     
   17435               0 :     CPLFree(psProgressInfo);
   17436                 :     
   17437                 :   }
   17438               0 :   return NULL;
   17439                 : }
   17440                 : 
   17441                 : 
   17442               4 : SWIGINTERN PyObject *_wrap_DitherRGB2PCT(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   17443               4 :   PyObject *resultobj = 0;
   17444               4 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   17445               4 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   17446               4 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   17447               4 :   GDALRasterBandShadow *arg4 = (GDALRasterBandShadow *) 0 ;
   17448               4 :   GDALColorTableShadow *arg5 = (GDALColorTableShadow *) 0 ;
   17449               4 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   17450               4 :   void *arg7 = (void *) NULL ;
   17451               4 :   void *argp1 = 0 ;
   17452               4 :   int res1 = 0 ;
   17453               4 :   void *argp2 = 0 ;
   17454               4 :   int res2 = 0 ;
   17455               4 :   void *argp3 = 0 ;
   17456               4 :   int res3 = 0 ;
   17457               4 :   void *argp4 = 0 ;
   17458               4 :   int res4 = 0 ;
   17459               4 :   void *argp5 = 0 ;
   17460               4 :   int res5 = 0 ;
   17461               4 :   PyObject * obj0 = 0 ;
   17462               4 :   PyObject * obj1 = 0 ;
   17463               4 :   PyObject * obj2 = 0 ;
   17464               4 :   PyObject * obj3 = 0 ;
   17465               4 :   PyObject * obj4 = 0 ;
   17466               4 :   PyObject * obj5 = 0 ;
   17467               4 :   PyObject * obj6 = 0 ;
   17468                 :   char *  kwnames[] = {
   17469                 :     (char *) "red",(char *) "green",(char *) "blue",(char *) "target",(char *) "colors",(char *) "callback",(char *) "callback_data", NULL 
   17470               4 :   };
   17471                 :   int result;
   17472                 :   
   17473                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   17474                 :   PyProgressData *psProgressInfo;
   17475               4 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   17476               4 :   psProgressInfo->nLastReported = -1;
   17477               4 :   psProgressInfo->psPyCallback = NULL;
   17478               4 :   psProgressInfo->psPyCallbackData = NULL;
   17479               4 :   arg7 = psProgressInfo;
   17480               4 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO|OO:DitherRGB2PCT",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
   17481               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   17482               4 :   if (!SWIG_IsOK(res1)) {
   17483               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DitherRGB2PCT" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   17484                 :   }
   17485               4 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   17486               4 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   17487               4 :   if (!SWIG_IsOK(res2)) {
   17488               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DitherRGB2PCT" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   17489                 :   }
   17490               4 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   17491               4 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   17492               4 :   if (!SWIG_IsOK(res3)) {
   17493               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DitherRGB2PCT" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   17494                 :   }
   17495               4 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   17496               4 :   res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   17497               4 :   if (!SWIG_IsOK(res4)) {
   17498               0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DitherRGB2PCT" "', argument " "4"" of type '" "GDALRasterBandShadow *""'"); 
   17499                 :   }
   17500               4 :   arg4 = reinterpret_cast< GDALRasterBandShadow * >(argp4);
   17501               4 :   res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_GDALColorTableShadow, 0 |  0 );
   17502               4 :   if (!SWIG_IsOK(res5)) {
   17503               0 :     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "DitherRGB2PCT" "', argument " "5"" of type '" "GDALColorTableShadow *""'"); 
   17504                 :   }
   17505               4 :   arg5 = reinterpret_cast< GDALColorTableShadow * >(argp5);
   17506               4 :   if (obj5) {
   17507                 :     {
   17508                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   17509                 :       /* callback_func typemap */
   17510               3 :       if (obj5 && obj5 != Py_None ) {
   17511               3 :         void* cbfunction = NULL;
   17512                 :         SWIG_ConvertPtr( obj5, 
   17513                 :           (void**)&cbfunction, 
   17514                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int, 
   17515               3 :           SWIG_POINTER_EXCEPTION | 0 );
   17516                 :         
   17517               3 :         if ( cbfunction == GDALTermProgress ) {
   17518               3 :           arg6 = GDALTermProgress;
   17519                 :         } else {
   17520               0 :           if (!PyCallable_Check(obj5)) {
   17521                 :             PyErr_SetString( PyExc_RuntimeError, 
   17522               0 :               "Object given is not a Python function" );
   17523               0 :             SWIG_fail;
   17524                 :           }
   17525               0 :           psProgressInfo->psPyCallback = obj5;
   17526               0 :           arg6 = PyProgressProxy;
   17527                 :         }
   17528                 :         
   17529                 :       }
   17530                 :       
   17531                 :     }
   17532                 :   }
   17533               4 :   if (obj6) {
   17534                 :     {
   17535                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   17536               3 :       psProgressInfo->psPyCallbackData = obj6 ;
   17537                 :     }
   17538                 :   }
   17539                 :   {
   17540               4 :     if (!arg1) {
   17541               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17542                 :     }
   17543                 :   }
   17544                 :   {
   17545               4 :     if (!arg2) {
   17546               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17547                 :     }
   17548                 :   }
   17549                 :   {
   17550               4 :     if (!arg3) {
   17551               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17552                 :     }
   17553                 :   }
   17554                 :   {
   17555               4 :     if (!arg4) {
   17556               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17557                 :     }
   17558                 :   }
   17559                 :   {
   17560               4 :     if (!arg5) {
   17561               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17562                 :     }
   17563                 :   }
   17564                 :   {
   17565               4 :     if ( bUseExceptions ) {
   17566               0 :       CPLErrorReset();
   17567                 :     }
   17568               4 :     result = (int)DitherRGB2PCT(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   17569               4 :     if ( bUseExceptions ) {
   17570               0 :       CPLErr eclass = CPLGetLastErrorType();
   17571               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17572               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17573                 :       }
   17574                 :     }
   17575                 :   }
   17576               4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   17577                 :   {
   17578                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   17579                 :     
   17580               4 :     CPLFree(psProgressInfo);
   17581                 :     
   17582                 :   }
   17583               4 :   return resultobj;
   17584                 : fail:
   17585                 :   {
   17586                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   17587                 :     
   17588               0 :     CPLFree(psProgressInfo);
   17589                 :     
   17590                 :   }
   17591               0 :   return NULL;
   17592                 : }
   17593                 : 
   17594                 : 
   17595               7 : SWIGINTERN PyObject *_wrap_ReprojectImage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   17596               7 :   PyObject *resultobj = 0;
   17597               7 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   17598               7 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   17599               7 :   char *arg3 = (char *) NULL ;
   17600               7 :   char *arg4 = (char *) NULL ;
   17601               7 :   GDALResampleAlg arg5 = (GDALResampleAlg) GRA_NearestNeighbour ;
   17602               7 :   double arg6 = (double) 0.0 ;
   17603               7 :   double arg7 = (double) 0.0 ;
   17604               7 :   GDALProgressFunc arg8 = (GDALProgressFunc) NULL ;
   17605               7 :   void *arg9 = (void *) NULL ;
   17606               7 :   void *argp1 = 0 ;
   17607               7 :   int res1 = 0 ;
   17608               7 :   void *argp2 = 0 ;
   17609               7 :   int res2 = 0 ;
   17610                 :   int res3 ;
   17611               7 :   char *buf3 = 0 ;
   17612               7 :   int alloc3 = 0 ;
   17613                 :   int res4 ;
   17614               7 :   char *buf4 = 0 ;
   17615               7 :   int alloc4 = 0 ;
   17616                 :   int val5 ;
   17617               7 :   int ecode5 = 0 ;
   17618                 :   double val6 ;
   17619               7 :   int ecode6 = 0 ;
   17620                 :   double val7 ;
   17621               7 :   int ecode7 = 0 ;
   17622               7 :   PyObject * obj0 = 0 ;
   17623               7 :   PyObject * obj1 = 0 ;
   17624               7 :   PyObject * obj2 = 0 ;
   17625               7 :   PyObject * obj3 = 0 ;
   17626               7 :   PyObject * obj4 = 0 ;
   17627               7 :   PyObject * obj5 = 0 ;
   17628               7 :   PyObject * obj6 = 0 ;
   17629               7 :   PyObject * obj7 = 0 ;
   17630               7 :   PyObject * obj8 = 0 ;
   17631                 :   CPLErr result;
   17632                 :   
   17633                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   17634                 :   PyProgressData *psProgressInfo;
   17635               7 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   17636               7 :   psProgressInfo->nLastReported = -1;
   17637               7 :   psProgressInfo->psPyCallback = NULL;
   17638               7 :   psProgressInfo->psPyCallbackData = NULL;
   17639               7 :   arg9 = psProgressInfo;
   17640               7 :   if (!PyArg_ParseTuple(args,(char *)"OO|OOOOOOO:ReprojectImage",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
   17641               7 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   17642               7 :   if (!SWIG_IsOK(res1)) {
   17643               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReprojectImage" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   17644                 :   }
   17645               7 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   17646               7 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   17647               7 :   if (!SWIG_IsOK(res2)) {
   17648               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ReprojectImage" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   17649                 :   }
   17650               7 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   17651               7 :   if (obj2) {
   17652               6 :     res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   17653               6 :     if (!SWIG_IsOK(res3)) {
   17654               0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ReprojectImage" "', argument " "3"" of type '" "char const *""'");
   17655                 :     }
   17656               6 :     arg3 = reinterpret_cast< char * >(buf3);
   17657                 :   }
   17658               7 :   if (obj3) {
   17659               6 :     res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
   17660               6 :     if (!SWIG_IsOK(res4)) {
   17661               0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ReprojectImage" "', argument " "4"" of type '" "char const *""'");
   17662                 :     }
   17663               6 :     arg4 = reinterpret_cast< char * >(buf4);
   17664                 :   }
   17665               7 :   if (obj4) {
   17666               5 :     ecode5 = SWIG_AsVal_int(obj4, &val5);
   17667               5 :     if (!SWIG_IsOK(ecode5)) {
   17668               0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ReprojectImage" "', argument " "5"" of type '" "GDALResampleAlg""'");
   17669                 :     } 
   17670               5 :     arg5 = static_cast< GDALResampleAlg >(val5);
   17671                 :   }
   17672               7 :   if (obj5) {
   17673               1 :     ecode6 = SWIG_AsVal_double(obj5, &val6);
   17674               1 :     if (!SWIG_IsOK(ecode6)) {
   17675               0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "ReprojectImage" "', argument " "6"" of type '" "double""'");
   17676                 :     } 
   17677               1 :     arg6 = static_cast< double >(val6);
   17678                 :   }
   17679               7 :   if (obj6) {
   17680               1 :     ecode7 = SWIG_AsVal_double(obj6, &val7);
   17681               1 :     if (!SWIG_IsOK(ecode7)) {
   17682               0 :       SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ReprojectImage" "', argument " "7"" of type '" "double""'");
   17683                 :     } 
   17684               1 :     arg7 = static_cast< double >(val7);
   17685                 :   }
   17686               7 :   if (obj7) {
   17687                 :     {
   17688                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   17689                 :       /* callback_func typemap */
   17690               1 :       if (obj7 && obj7 != Py_None ) {
   17691               1 :         void* cbfunction = NULL;
   17692                 :         SWIG_ConvertPtr( obj7, 
   17693                 :           (void**)&cbfunction, 
   17694                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int, 
   17695               1 :           SWIG_POINTER_EXCEPTION | 0 );
   17696                 :         
   17697               1 :         if ( cbfunction == GDALTermProgress ) {
   17698               0 :           arg8 = GDALTermProgress;
   17699                 :         } else {
   17700               1 :           if (!PyCallable_Check(obj7)) {
   17701                 :             PyErr_SetString( PyExc_RuntimeError, 
   17702               0 :               "Object given is not a Python function" );
   17703               0 :             SWIG_fail;
   17704                 :           }
   17705               1 :           psProgressInfo->psPyCallback = obj7;
   17706               1 :           arg8 = PyProgressProxy;
   17707                 :         }
   17708                 :         
   17709                 :       }
   17710                 :       
   17711                 :     }
   17712                 :   }
   17713               7 :   if (obj8) {
   17714                 :     {
   17715                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   17716               1 :       psProgressInfo->psPyCallbackData = obj8 ;
   17717                 :     }
   17718                 :   }
   17719                 :   {
   17720               7 :     if (!arg1) {
   17721               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17722                 :     }
   17723                 :   }
   17724                 :   {
   17725               7 :     if (!arg2) {
   17726               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17727                 :     }
   17728                 :   }
   17729                 :   {
   17730               7 :     if ( bUseExceptions ) {
   17731               0 :       CPLErrorReset();
   17732                 :     }
   17733               7 :     result = (CPLErr)ReprojectImage(arg1,arg2,(char const *)arg3,(char const *)arg4,arg5,arg6,arg7,arg8,arg9);
   17734               7 :     if ( bUseExceptions ) {
   17735               0 :       CPLErr eclass = CPLGetLastErrorType();
   17736               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17737               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17738                 :       }
   17739                 :     }
   17740                 :   }
   17741              14 :   resultobj = SWIG_From_int(static_cast< int >(result));
   17742               7 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   17743               7 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   17744                 :   {
   17745                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   17746                 :     
   17747               7 :     CPLFree(psProgressInfo);
   17748                 :     
   17749                 :   }
   17750               7 :   return resultobj;
   17751                 : fail:
   17752               0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   17753               0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   17754                 :   {
   17755                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   17756                 :     
   17757               0 :     CPLFree(psProgressInfo);
   17758                 :     
   17759                 :   }
   17760               0 :   return NULL;
   17761                 : }
   17762                 : 
   17763                 : 
   17764               4 : SWIGINTERN PyObject *_wrap_ComputeProximity(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   17765               4 :   PyObject *resultobj = 0;
   17766               4 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   17767               4 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   17768               4 :   char **arg3 = (char **) NULL ;
   17769               4 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   17770               4 :   void *arg5 = (void *) NULL ;
   17771               4 :   void *argp1 = 0 ;
   17772               4 :   int res1 = 0 ;
   17773               4 :   void *argp2 = 0 ;
   17774               4 :   int res2 = 0 ;
   17775               4 :   PyObject * obj0 = 0 ;
   17776               4 :   PyObject * obj1 = 0 ;
   17777               4 :   PyObject * obj2 = 0 ;
   17778               4 :   PyObject * obj3 = 0 ;
   17779               4 :   PyObject * obj4 = 0 ;
   17780                 :   char *  kwnames[] = {
   17781                 :     (char *) "srcBand",(char *) "proximityBand",(char *) "options",(char *) "callback",(char *) "callback_data", NULL 
   17782               4 :   };
   17783                 :   int result;
   17784                 :   
   17785                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   17786                 :   PyProgressData *psProgressInfo;
   17787               4 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   17788               4 :   psProgressInfo->nLastReported = -1;
   17789               4 :   psProgressInfo->psPyCallback = NULL;
   17790               4 :   psProgressInfo->psPyCallbackData = NULL;
   17791               4 :   arg5 = psProgressInfo;
   17792               4 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOO:ComputeProximity",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   17793               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   17794               4 :   if (!SWIG_IsOK(res1)) {
   17795               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComputeProximity" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   17796                 :   }
   17797               4 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   17798               4 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   17799               4 :   if (!SWIG_IsOK(res2)) {
   17800               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ComputeProximity" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   17801                 :   }
   17802               4 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   17803               4 :   if (obj2) {
   17804                 :     {
   17805                 :       /* %typemap(in) char **options */
   17806                 :       /* Check if is a list */
   17807               3 :       if ( ! PySequence_Check(obj2)) {
   17808               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
   17809               0 :         SWIG_fail;
   17810                 :       }
   17811                 :       
   17812               3 :       int size = PySequence_Size(obj2);
   17813              11 :       for (int i = 0; i < size; i++) {
   17814               8 :         PyObject* pyObj = PySequence_GetItem(obj2,i);
   17815               8 :         if (PyUnicode_Check(pyObj))
   17816                 :         {
   17817                 :           char *pszStr;
   17818                 :           Py_ssize_t nLen;
   17819               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   17820                 : #if PY_VERSION_HEX >= 0x03000000
   17821                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   17822                 : #else
   17823               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   17824                 : #endif
   17825               0 :           arg3 = CSLAddString( arg3, pszStr );
   17826               0 :           Py_XDECREF(pyUTF8Str);
   17827                 :         }
   17828                 : #if PY_VERSION_HEX >= 0x03000000
   17829                 :         else if (PyBytes_Check(pyObj))
   17830                 :         arg3 = CSLAddString( arg3, PyBytes_AsString(pyObj) );
   17831                 : #else
   17832               8 :         else if (PyString_Check(pyObj))
   17833               8 :         arg3 = CSLAddString( arg3, PyString_AsString(pyObj) );
   17834                 : #endif
   17835                 :         else
   17836                 :         {
   17837               0 :           Py_DECREF(pyObj);
   17838               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   17839               0 :           SWIG_fail;
   17840                 :         }
   17841               8 :         Py_DECREF(pyObj);
   17842                 :       }
   17843                 :     }
   17844                 :   }
   17845               4 :   if (obj3) {
   17846                 :     {
   17847                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   17848                 :       /* callback_func typemap */
   17849               2 :       if (obj3 && obj3 != Py_None ) {
   17850               1 :         void* cbfunction = NULL;
   17851                 :         SWIG_ConvertPtr( obj3, 
   17852                 :           (void**)&cbfunction, 
   17853                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int, 
   17854               1 :           SWIG_POINTER_EXCEPTION | 0 );
   17855                 :         
   17856               1 :         if ( cbfunction == GDALTermProgress ) {
   17857               1 :           arg4 = GDALTermProgress;
   17858                 :         } else {
   17859               0 :           if (!PyCallable_Check(obj3)) {
   17860                 :             PyErr_SetString( PyExc_RuntimeError, 
   17861               0 :               "Object given is not a Python function" );
   17862               0 :             SWIG_fail;
   17863                 :           }
   17864               0 :           psProgressInfo->psPyCallback = obj3;
   17865               0 :           arg4 = PyProgressProxy;
   17866                 :         }
   17867                 :         
   17868                 :       }
   17869                 :       
   17870                 :     }
   17871                 :   }
   17872               4 :   if (obj4) {
   17873                 :     {
   17874                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   17875               0 :       psProgressInfo->psPyCallbackData = obj4 ;
   17876                 :     }
   17877                 :   }
   17878                 :   {
   17879               4 :     if (!arg1) {
   17880               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17881                 :     }
   17882                 :   }
   17883                 :   {
   17884               4 :     if (!arg2) {
   17885               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   17886                 :     }
   17887                 :   }
   17888                 :   {
   17889               4 :     if ( bUseExceptions ) {
   17890               0 :       CPLErrorReset();
   17891                 :     }
   17892               4 :     result = (int)ComputeProximity(arg1,arg2,arg3,arg4,arg5);
   17893               4 :     if ( bUseExceptions ) {
   17894               0 :       CPLErr eclass = CPLGetLastErrorType();
   17895               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   17896               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   17897                 :       }
   17898                 :     }
   17899                 :   }
   17900               4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   17901                 :   {
   17902                 :     /* %typemap(freearg) char **options */
   17903               4 :     CSLDestroy( arg3 );
   17904                 :   }
   17905                 :   {
   17906                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   17907                 :     
   17908               4 :     CPLFree(psProgressInfo);
   17909                 :     
   17910                 :   }
   17911               4 :   return resultobj;
   17912                 : fail:
   17913                 :   {
   17914                 :     /* %typemap(freearg) char **options */
   17915               0 :     CSLDestroy( arg3 );
   17916                 :   }
   17917                 :   {
   17918                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   17919                 :     
   17920               0 :     CPLFree(psProgressInfo);
   17921                 :     
   17922                 :   }
   17923               0 :   return NULL;
   17924                 : }
   17925                 : 
   17926                 : 
   17927               4 : SWIGINTERN PyObject *_wrap_RasterizeLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   17928               4 :   PyObject *resultobj = 0;
   17929               4 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   17930                 :   int arg2 ;
   17931               4 :   int *arg3 = (int *) 0 ;
   17932               4 :   OGRLayerShadow *arg4 = (OGRLayerShadow *) 0 ;
   17933               4 :   void *arg5 = (void *) NULL ;
   17934               4 :   void *arg6 = (void *) NULL ;
   17935               4 :   int arg7 = (int) 0 ;
   17936               4 :   double *arg8 = (double *) NULL ;
   17937               4 :   char **arg9 = (char **) NULL ;
   17938               4 :   GDALProgressFunc arg10 = (GDALProgressFunc) NULL ;
   17939               4 :   void *arg11 = (void *) NULL ;
   17940               4 :   void *argp1 = 0 ;
   17941               4 :   int res1 = 0 ;
   17942               4 :   void *argp4 = 0 ;
   17943               4 :   int res4 = 0 ;
   17944                 :   int res5 ;
   17945                 :   int res6 ;
   17946               4 :   PyObject * obj0 = 0 ;
   17947               4 :   PyObject * obj1 = 0 ;
   17948               4 :   PyObject * obj2 = 0 ;
   17949               4 :   PyObject * obj3 = 0 ;
   17950               4 :   PyObject * obj4 = 0 ;
   17951               4 :   PyObject * obj5 = 0 ;
   17952               4 :   PyObject * obj6 = 0 ;
   17953               4 :   PyObject * obj7 = 0 ;
   17954               4 :   PyObject * obj8 = 0 ;
   17955                 :   char *  kwnames[] = {
   17956                 :     (char *) "dataset",(char *) "bands",(char *) "layer",(char *) "pfnTransformer",(char *) "pTransformArg",(char *) "burn_values",(char *) "options",(char *) "callback",(char *) "callback_data", NULL 
   17957               4 :   };
   17958                 :   int result;
   17959                 :   
   17960                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   17961                 :   PyProgressData *psProgressInfo;
   17962               4 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   17963               4 :   psProgressInfo->nLastReported = -1;
   17964               4 :   psProgressInfo->psPyCallback = NULL;
   17965               4 :   psProgressInfo->psPyCallbackData = NULL;
   17966               4 :   arg11 = psProgressInfo;
   17967               4 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOOOO:RasterizeLayer",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
   17968               4 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   17969               4 :   if (!SWIG_IsOK(res1)) {
   17970               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RasterizeLayer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   17971                 :   }
   17972               4 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   17973                 :   {
   17974                 :     /* %typemap(in,numinputs=1) (int nList, int* pList)*/
   17975                 :     /* check if is List */
   17976               4 :     if ( !PySequence_Check(obj1) ) {
   17977               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   17978               0 :       SWIG_fail;
   17979                 :     }
   17980               4 :     arg2 = PySequence_Size(obj1);
   17981               4 :     arg3 = (int*) malloc(arg2*sizeof(int));
   17982              16 :     for( int i = 0; i<arg2; i++ ) {
   17983              12 :       PyObject *o = PySequence_GetItem(obj1,i);
   17984              12 :       if ( !PyArg_Parse(o,"i",&arg3[i]) ) {
   17985               0 :         PyErr_SetString(PyExc_TypeError, "not an integer");
   17986               0 :         Py_DECREF(o);
   17987                 :         SWIG_fail;
   17988                 :       }
   17989              12 :       Py_DECREF(o);
   17990                 :     }
   17991                 :   }
   17992               4 :   res4 = SWIG_ConvertPtr(obj2, &argp4,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   17993               4 :   if (!SWIG_IsOK(res4)) {
   17994               0 :     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "RasterizeLayer" "', argument " "4"" of type '" "OGRLayerShadow *""'"); 
   17995                 :   }
   17996               4 :   arg4 = reinterpret_cast< OGRLayerShadow * >(argp4);
   17997               4 :   if (obj3) {
   17998               0 :     res5 = SWIG_ConvertPtr(obj3,SWIG_as_voidptrptr(&arg5), 0, 0);
   17999               0 :     if (!SWIG_IsOK(res5)) {
   18000               0 :       SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "RasterizeLayer" "', argument " "5"" of type '" "void *""'"); 
   18001                 :     }
   18002                 :   }
   18003               4 :   if (obj4) {
   18004               0 :     res6 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg6), 0, 0);
   18005               0 :     if (!SWIG_IsOK(res6)) {
   18006               0 :       SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "RasterizeLayer" "', argument " "6"" of type '" "void *""'"); 
   18007                 :     }
   18008                 :   }
   18009               4 :   if (obj5) {
   18010                 :     {
   18011                 :       /* %typemap(in,numinputs=1) (int nList, double* pList)*/
   18012                 :       /* check if is List */
   18013               3 :       if ( !PySequence_Check(obj5) ) {
   18014               0 :         PyErr_SetString(PyExc_TypeError, "not a sequence");
   18015               0 :         SWIG_fail;
   18016                 :       }
   18017               3 :       arg7 = PySequence_Size(obj5);
   18018               3 :       arg8 = (double*) malloc(arg7*sizeof(double));
   18019              12 :       for( int i = 0; i<arg7; i++ ) {
   18020               9 :         PyObject *o = PySequence_GetItem(obj5,i);
   18021               9 :         if ( !PyArg_Parse(o,"d",&arg8[i]) ) {
   18022               0 :           PyErr_SetString(PyExc_TypeError, "not a number");
   18023               0 :           Py_DECREF(o);
   18024                 :           SWIG_fail;
   18025                 :         }
   18026               9 :         Py_DECREF(o);
   18027                 :       }
   18028                 :     }
   18029                 :   }
   18030               4 :   if (obj6) {
   18031                 :     {
   18032                 :       /* %typemap(in) char **options */
   18033                 :       /* Check if is a list */
   18034               3 :       if ( ! PySequence_Check(obj6)) {
   18035               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
   18036               0 :         SWIG_fail;
   18037                 :       }
   18038                 :       
   18039               3 :       int size = PySequence_Size(obj6);
   18040               6 :       for (int i = 0; i < size; i++) {
   18041               3 :         PyObject* pyObj = PySequence_GetItem(obj6,i);
   18042               3 :         if (PyUnicode_Check(pyObj))
   18043                 :         {
   18044                 :           char *pszStr;
   18045                 :           Py_ssize_t nLen;
   18046               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   18047                 : #if PY_VERSION_HEX >= 0x03000000
   18048                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   18049                 : #else
   18050               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   18051                 : #endif
   18052               0 :           arg9 = CSLAddString( arg9, pszStr );
   18053               0 :           Py_XDECREF(pyUTF8Str);
   18054                 :         }
   18055                 : #if PY_VERSION_HEX >= 0x03000000
   18056                 :         else if (PyBytes_Check(pyObj))
   18057                 :         arg9 = CSLAddString( arg9, PyBytes_AsString(pyObj) );
   18058                 : #else
   18059               3 :         else if (PyString_Check(pyObj))
   18060               3 :         arg9 = CSLAddString( arg9, PyString_AsString(pyObj) );
   18061                 : #endif
   18062                 :         else
   18063                 :         {
   18064               0 :           Py_DECREF(pyObj);
   18065               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   18066               0 :           SWIG_fail;
   18067                 :         }
   18068               3 :         Py_DECREF(pyObj);
   18069                 :       }
   18070                 :     }
   18071                 :   }
   18072               4 :   if (obj7) {
   18073                 :     {
   18074                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   18075                 :       /* callback_func typemap */
   18076               0 :       if (obj7 && obj7 != Py_None ) {
   18077               0 :         void* cbfunction = NULL;
   18078                 :         SWIG_ConvertPtr( obj7, 
   18079                 :           (void**)&cbfunction, 
   18080                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int, 
   18081               0 :           SWIG_POINTER_EXCEPTION | 0 );
   18082                 :         
   18083               0 :         if ( cbfunction == GDALTermProgress ) {
   18084               0 :           arg10 = GDALTermProgress;
   18085                 :         } else {
   18086               0 :           if (!PyCallable_Check(obj7)) {
   18087                 :             PyErr_SetString( PyExc_RuntimeError, 
   18088               0 :               "Object given is not a Python function" );
   18089               0 :             SWIG_fail;
   18090                 :           }
   18091               0 :           psProgressInfo->psPyCallback = obj7;
   18092               0 :           arg10 = PyProgressProxy;
   18093                 :         }
   18094                 :         
   18095                 :       }
   18096                 :       
   18097                 :     }
   18098                 :   }
   18099               4 :   if (obj8) {
   18100                 :     {
   18101                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   18102               0 :       psProgressInfo->psPyCallbackData = obj8 ;
   18103                 :     }
   18104                 :   }
   18105                 :   {
   18106               4 :     if (!arg1) {
   18107               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18108                 :     }
   18109                 :   }
   18110                 :   {
   18111               4 :     if (!arg4) {
   18112               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18113                 :     }
   18114                 :   }
   18115                 :   {
   18116               4 :     if ( bUseExceptions ) {
   18117               0 :       CPLErrorReset();
   18118                 :     }
   18119               4 :     result = (int)RasterizeLayer(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
   18120               4 :     if ( bUseExceptions ) {
   18121               0 :       CPLErr eclass = CPLGetLastErrorType();
   18122               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18123               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18124                 :       }
   18125                 :     }
   18126                 :   }
   18127               4 :   resultobj = SWIG_From_int(static_cast< int >(result));
   18128                 :   {
   18129                 :     /* %typemap(freearg) (int nList, int* pList) */
   18130               4 :     if (arg3) {
   18131               4 :       free((void*) arg3);
   18132                 :     }
   18133                 :   }
   18134                 :   {
   18135                 :     /* %typemap(freearg) (int nList, double* pList) */
   18136               4 :     if (arg8) {
   18137               3 :       free((void*) arg8);
   18138                 :     }
   18139                 :   }
   18140                 :   {
   18141                 :     /* %typemap(freearg) char **options */
   18142               4 :     CSLDestroy( arg9 );
   18143                 :   }
   18144                 :   {
   18145                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   18146                 :     
   18147               4 :     CPLFree(psProgressInfo);
   18148                 :     
   18149                 :   }
   18150               4 :   return resultobj;
   18151                 : fail:
   18152                 :   {
   18153                 :     /* %typemap(freearg) (int nList, int* pList) */
   18154               0 :     if (arg3) {
   18155               0 :       free((void*) arg3);
   18156                 :     }
   18157                 :   }
   18158                 :   {
   18159                 :     /* %typemap(freearg) (int nList, double* pList) */
   18160               0 :     if (arg8) {
   18161               0 :       free((void*) arg8);
   18162                 :     }
   18163                 :   }
   18164                 :   {
   18165                 :     /* %typemap(freearg) char **options */
   18166               0 :     CSLDestroy( arg9 );
   18167                 :   }
   18168                 :   {
   18169                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   18170                 :     
   18171               0 :     CPLFree(psProgressInfo);
   18172                 :     
   18173                 :   }
   18174               0 :   return NULL;
   18175                 : }
   18176                 : 
   18177                 : 
   18178               6 : SWIGINTERN PyObject *_wrap_Polygonize(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   18179               6 :   PyObject *resultobj = 0;
   18180               6 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   18181               6 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   18182               6 :   OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
   18183                 :   int arg4 ;
   18184               6 :   char **arg5 = (char **) NULL ;
   18185               6 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   18186               6 :   void *arg7 = (void *) NULL ;
   18187               6 :   void *argp1 = 0 ;
   18188               6 :   int res1 = 0 ;
   18189               6 :   void *argp2 = 0 ;
   18190               6 :   int res2 = 0 ;
   18191               6 :   void *argp3 = 0 ;
   18192               6 :   int res3 = 0 ;
   18193                 :   int val4 ;
   18194               6 :   int ecode4 = 0 ;
   18195               6 :   PyObject * obj0 = 0 ;
   18196               6 :   PyObject * obj1 = 0 ;
   18197               6 :   PyObject * obj2 = 0 ;
   18198               6 :   PyObject * obj3 = 0 ;
   18199               6 :   PyObject * obj4 = 0 ;
   18200               6 :   PyObject * obj5 = 0 ;
   18201               6 :   PyObject * obj6 = 0 ;
   18202                 :   char *  kwnames[] = {
   18203                 :     (char *) "srcBand",(char *) "maskBand",(char *) "outLayer",(char *) "iPixValField",(char *) "options",(char *) "callback",(char *) "callback_data", NULL 
   18204               6 :   };
   18205                 :   int result;
   18206                 :   
   18207                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   18208                 :   PyProgressData *psProgressInfo;
   18209               6 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   18210               6 :   psProgressInfo->nLastReported = -1;
   18211               6 :   psProgressInfo->psPyCallback = NULL;
   18212               6 :   psProgressInfo->psPyCallbackData = NULL;
   18213               6 :   arg7 = psProgressInfo;
   18214               6 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOO:Polygonize",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
   18215               6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   18216               6 :   if (!SWIG_IsOK(res1)) {
   18217               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Polygonize" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   18218                 :   }
   18219               6 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   18220               6 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   18221               6 :   if (!SWIG_IsOK(res2)) {
   18222               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Polygonize" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   18223                 :   }
   18224               6 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   18225               6 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   18226               6 :   if (!SWIG_IsOK(res3)) {
   18227               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Polygonize" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
   18228                 :   }
   18229               6 :   arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
   18230               6 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   18231               6 :   if (!SWIG_IsOK(ecode4)) {
   18232               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Polygonize" "', argument " "4"" of type '" "int""'");
   18233                 :   } 
   18234               6 :   arg4 = static_cast< int >(val4);
   18235               6 :   if (obj4) {
   18236                 :     {
   18237                 :       /* %typemap(in) char **options */
   18238                 :       /* Check if is a list */
   18239               3 :       if ( ! PySequence_Check(obj4)) {
   18240               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
   18241               0 :         SWIG_fail;
   18242                 :       }
   18243                 :       
   18244               3 :       int size = PySequence_Size(obj4);
   18245               4 :       for (int i = 0; i < size; i++) {
   18246               1 :         PyObject* pyObj = PySequence_GetItem(obj4,i);
   18247               1 :         if (PyUnicode_Check(pyObj))
   18248                 :         {
   18249                 :           char *pszStr;
   18250                 :           Py_ssize_t nLen;
   18251               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   18252                 : #if PY_VERSION_HEX >= 0x03000000
   18253                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   18254                 : #else
   18255               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   18256                 : #endif
   18257               0 :           arg5 = CSLAddString( arg5, pszStr );
   18258               0 :           Py_XDECREF(pyUTF8Str);
   18259                 :         }
   18260                 : #if PY_VERSION_HEX >= 0x03000000
   18261                 :         else if (PyBytes_Check(pyObj))
   18262                 :         arg5 = CSLAddString( arg5, PyBytes_AsString(pyObj) );
   18263                 : #else
   18264               1 :         else if (PyString_Check(pyObj))
   18265               1 :         arg5 = CSLAddString( arg5, PyString_AsString(pyObj) );
   18266                 : #endif
   18267                 :         else
   18268                 :         {
   18269               0 :           Py_DECREF(pyObj);
   18270               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   18271               0 :           SWIG_fail;
   18272                 :         }
   18273               1 :         Py_DECREF(pyObj);
   18274                 :       }
   18275                 :     }
   18276                 :   }
   18277               6 :   if (obj5) {
   18278                 :     {
   18279                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   18280                 :       /* callback_func typemap */
   18281               2 :       if (obj5 && obj5 != Py_None ) {
   18282               1 :         void* cbfunction = NULL;
   18283                 :         SWIG_ConvertPtr( obj5, 
   18284                 :           (void**)&cbfunction, 
   18285                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int, 
   18286               1 :           SWIG_POINTER_EXCEPTION | 0 );
   18287                 :         
   18288               1 :         if ( cbfunction == GDALTermProgress ) {
   18289               1 :           arg6 = GDALTermProgress;
   18290                 :         } else {
   18291               0 :           if (!PyCallable_Check(obj5)) {
   18292                 :             PyErr_SetString( PyExc_RuntimeError, 
   18293               0 :               "Object given is not a Python function" );
   18294               0 :             SWIG_fail;
   18295                 :           }
   18296               0 :           psProgressInfo->psPyCallback = obj5;
   18297               0 :           arg6 = PyProgressProxy;
   18298                 :         }
   18299                 :         
   18300                 :       }
   18301                 :       
   18302                 :     }
   18303                 :   }
   18304               6 :   if (obj6) {
   18305                 :     {
   18306                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   18307               0 :       psProgressInfo->psPyCallbackData = obj6 ;
   18308                 :     }
   18309                 :   }
   18310                 :   {
   18311               6 :     if (!arg1) {
   18312               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18313                 :     }
   18314                 :   }
   18315                 :   {
   18316               6 :     if (!arg3) {
   18317               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18318                 :     }
   18319                 :   }
   18320                 :   {
   18321               6 :     if ( bUseExceptions ) {
   18322               0 :       CPLErrorReset();
   18323                 :     }
   18324               6 :     result = (int)Polygonize(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   18325               6 :     if ( bUseExceptions ) {
   18326               0 :       CPLErr eclass = CPLGetLastErrorType();
   18327               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18328               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18329                 :       }
   18330                 :     }
   18331                 :   }
   18332               6 :   resultobj = SWIG_From_int(static_cast< int >(result));
   18333                 :   {
   18334                 :     /* %typemap(freearg) char **options */
   18335               6 :     CSLDestroy( arg5 );
   18336                 :   }
   18337                 :   {
   18338                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   18339                 :     
   18340               6 :     CPLFree(psProgressInfo);
   18341                 :     
   18342                 :   }
   18343               6 :   return resultobj;
   18344                 : fail:
   18345                 :   {
   18346                 :     /* %typemap(freearg) char **options */
   18347               0 :     CSLDestroy( arg5 );
   18348                 :   }
   18349                 :   {
   18350                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   18351                 :     
   18352               0 :     CPLFree(psProgressInfo);
   18353                 :     
   18354                 :   }
   18355               0 :   return NULL;
   18356                 : }
   18357                 : 
   18358                 : 
   18359               1 : SWIGINTERN PyObject *_wrap_FillNodata(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   18360               1 :   PyObject *resultobj = 0;
   18361               1 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   18362               1 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   18363                 :   double arg3 ;
   18364                 :   int arg4 ;
   18365               1 :   char **arg5 = (char **) NULL ;
   18366               1 :   GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
   18367               1 :   void *arg7 = (void *) NULL ;
   18368               1 :   void *argp1 = 0 ;
   18369               1 :   int res1 = 0 ;
   18370               1 :   void *argp2 = 0 ;
   18371               1 :   int res2 = 0 ;
   18372                 :   double val3 ;
   18373               1 :   int ecode3 = 0 ;
   18374                 :   int val4 ;
   18375               1 :   int ecode4 = 0 ;
   18376               1 :   PyObject * obj0 = 0 ;
   18377               1 :   PyObject * obj1 = 0 ;
   18378               1 :   PyObject * obj2 = 0 ;
   18379               1 :   PyObject * obj3 = 0 ;
   18380               1 :   PyObject * obj4 = 0 ;
   18381               1 :   PyObject * obj5 = 0 ;
   18382               1 :   PyObject * obj6 = 0 ;
   18383                 :   char *  kwnames[] = {
   18384                 :     (char *) "targetBand",(char *) "maskBand",(char *) "maxSearchDist",(char *) "smoothingIterations",(char *) "options",(char *) "callback",(char *) "callback_data", NULL 
   18385               1 :   };
   18386                 :   int result;
   18387                 :   
   18388                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   18389                 :   PyProgressData *psProgressInfo;
   18390               1 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   18391               1 :   psProgressInfo->nLastReported = -1;
   18392               1 :   psProgressInfo->psPyCallback = NULL;
   18393               1 :   psProgressInfo->psPyCallbackData = NULL;
   18394               1 :   arg7 = psProgressInfo;
   18395               1 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOO:FillNodata",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
   18396               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   18397               1 :   if (!SWIG_IsOK(res1)) {
   18398               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FillNodata" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   18399                 :   }
   18400               1 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   18401               1 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   18402               1 :   if (!SWIG_IsOK(res2)) {
   18403               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FillNodata" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   18404                 :   }
   18405               1 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   18406               1 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   18407               1 :   if (!SWIG_IsOK(ecode3)) {
   18408               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FillNodata" "', argument " "3"" of type '" "double""'");
   18409                 :   } 
   18410               1 :   arg3 = static_cast< double >(val3);
   18411               1 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   18412               1 :   if (!SWIG_IsOK(ecode4)) {
   18413               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "FillNodata" "', argument " "4"" of type '" "int""'");
   18414                 :   } 
   18415               1 :   arg4 = static_cast< int >(val4);
   18416               1 :   if (obj4) {
   18417                 :     {
   18418                 :       /* %typemap(in) char **options */
   18419                 :       /* Check if is a list */
   18420               1 :       if ( ! PySequence_Check(obj4)) {
   18421               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
   18422               0 :         SWIG_fail;
   18423                 :       }
   18424                 :       
   18425               1 :       int size = PySequence_Size(obj4);
   18426               1 :       for (int i = 0; i < size; i++) {
   18427               0 :         PyObject* pyObj = PySequence_GetItem(obj4,i);
   18428               0 :         if (PyUnicode_Check(pyObj))
   18429                 :         {
   18430                 :           char *pszStr;
   18431                 :           Py_ssize_t nLen;
   18432               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   18433                 : #if PY_VERSION_HEX >= 0x03000000
   18434                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   18435                 : #else
   18436               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   18437                 : #endif
   18438               0 :           arg5 = CSLAddString( arg5, pszStr );
   18439               0 :           Py_XDECREF(pyUTF8Str);
   18440                 :         }
   18441                 : #if PY_VERSION_HEX >= 0x03000000
   18442                 :         else if (PyBytes_Check(pyObj))
   18443                 :         arg5 = CSLAddString( arg5, PyBytes_AsString(pyObj) );
   18444                 : #else
   18445               0 :         else if (PyString_Check(pyObj))
   18446               0 :         arg5 = CSLAddString( arg5, PyString_AsString(pyObj) );
   18447                 : #endif
   18448                 :         else
   18449                 :         {
   18450               0 :           Py_DECREF(pyObj);
   18451               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   18452               0 :           SWIG_fail;
   18453                 :         }
   18454               0 :         Py_DECREF(pyObj);
   18455                 :       }
   18456                 :     }
   18457                 :   }
   18458               1 :   if (obj5) {
   18459                 :     {
   18460                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   18461                 :       /* callback_func typemap */
   18462               1 :       if (obj5 && obj5 != Py_None ) {
   18463               1 :         void* cbfunction = NULL;
   18464                 :         SWIG_ConvertPtr( obj5, 
   18465                 :           (void**)&cbfunction, 
   18466                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int, 
   18467               1 :           SWIG_POINTER_EXCEPTION | 0 );
   18468                 :         
   18469               1 :         if ( cbfunction == GDALTermProgress ) {
   18470               1 :           arg6 = GDALTermProgress;
   18471                 :         } else {
   18472               0 :           if (!PyCallable_Check(obj5)) {
   18473                 :             PyErr_SetString( PyExc_RuntimeError, 
   18474               0 :               "Object given is not a Python function" );
   18475               0 :             SWIG_fail;
   18476                 :           }
   18477               0 :           psProgressInfo->psPyCallback = obj5;
   18478               0 :           arg6 = PyProgressProxy;
   18479                 :         }
   18480                 :         
   18481                 :       }
   18482                 :       
   18483                 :     }
   18484                 :   }
   18485               1 :   if (obj6) {
   18486                 :     {
   18487                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   18488               0 :       psProgressInfo->psPyCallbackData = obj6 ;
   18489                 :     }
   18490                 :   }
   18491                 :   {
   18492               1 :     if (!arg1) {
   18493               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18494                 :     }
   18495                 :   }
   18496                 :   {
   18497               1 :     if ( bUseExceptions ) {
   18498               0 :       CPLErrorReset();
   18499                 :     }
   18500               1 :     result = (int)FillNodata(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   18501               1 :     if ( bUseExceptions ) {
   18502               0 :       CPLErr eclass = CPLGetLastErrorType();
   18503               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18504               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18505                 :       }
   18506                 :     }
   18507                 :   }
   18508               1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   18509                 :   {
   18510                 :     /* %typemap(freearg) char **options */
   18511               1 :     CSLDestroy( arg5 );
   18512                 :   }
   18513                 :   {
   18514                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   18515                 :     
   18516               1 :     CPLFree(psProgressInfo);
   18517                 :     
   18518                 :   }
   18519               1 :   return resultobj;
   18520                 : fail:
   18521                 :   {
   18522                 :     /* %typemap(freearg) char **options */
   18523               0 :     CSLDestroy( arg5 );
   18524                 :   }
   18525                 :   {
   18526                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   18527                 :     
   18528               0 :     CPLFree(psProgressInfo);
   18529                 :     
   18530                 :   }
   18531               0 :   return NULL;
   18532                 : }
   18533                 : 
   18534                 : 
   18535               6 : SWIGINTERN PyObject *_wrap_SieveFilter(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   18536               6 :   PyObject *resultobj = 0;
   18537               6 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   18538               6 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   18539               6 :   GDALRasterBandShadow *arg3 = (GDALRasterBandShadow *) 0 ;
   18540                 :   int arg4 ;
   18541               6 :   int arg5 = (int) 4 ;
   18542               6 :   char **arg6 = (char **) NULL ;
   18543               6 :   GDALProgressFunc arg7 = (GDALProgressFunc) NULL ;
   18544               6 :   void *arg8 = (void *) NULL ;
   18545               6 :   void *argp1 = 0 ;
   18546               6 :   int res1 = 0 ;
   18547               6 :   void *argp2 = 0 ;
   18548               6 :   int res2 = 0 ;
   18549               6 :   void *argp3 = 0 ;
   18550               6 :   int res3 = 0 ;
   18551                 :   int val4 ;
   18552               6 :   int ecode4 = 0 ;
   18553                 :   int val5 ;
   18554               6 :   int ecode5 = 0 ;
   18555               6 :   PyObject * obj0 = 0 ;
   18556               6 :   PyObject * obj1 = 0 ;
   18557               6 :   PyObject * obj2 = 0 ;
   18558               6 :   PyObject * obj3 = 0 ;
   18559               6 :   PyObject * obj4 = 0 ;
   18560               6 :   PyObject * obj5 = 0 ;
   18561               6 :   PyObject * obj6 = 0 ;
   18562               6 :   PyObject * obj7 = 0 ;
   18563                 :   char *  kwnames[] = {
   18564                 :     (char *) "srcBand",(char *) "maskBand",(char *) "dstBand",(char *) "threshold",(char *) "connectedness",(char *) "options",(char *) "callback",(char *) "callback_data", NULL 
   18565               6 :   };
   18566                 :   int result;
   18567                 :   
   18568                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   18569                 :   PyProgressData *psProgressInfo;
   18570               6 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   18571               6 :   psProgressInfo->nLastReported = -1;
   18572               6 :   psProgressInfo->psPyCallback = NULL;
   18573               6 :   psProgressInfo->psPyCallbackData = NULL;
   18574               6 :   arg8 = psProgressInfo;
   18575               6 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOO:SieveFilter",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
   18576               6 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   18577               6 :   if (!SWIG_IsOK(res1)) {
   18578               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SieveFilter" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   18579                 :   }
   18580               6 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   18581               6 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   18582               6 :   if (!SWIG_IsOK(res2)) {
   18583               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SieveFilter" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   18584                 :   }
   18585               6 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   18586               6 :   res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   18587               6 :   if (!SWIG_IsOK(res3)) {
   18588               0 :     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SieveFilter" "', argument " "3"" of type '" "GDALRasterBandShadow *""'"); 
   18589                 :   }
   18590               6 :   arg3 = reinterpret_cast< GDALRasterBandShadow * >(argp3);
   18591               6 :   ecode4 = SWIG_AsVal_int(obj3, &val4);
   18592               6 :   if (!SWIG_IsOK(ecode4)) {
   18593               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SieveFilter" "', argument " "4"" of type '" "int""'");
   18594                 :   } 
   18595               6 :   arg4 = static_cast< int >(val4);
   18596               6 :   if (obj4) {
   18597               6 :     ecode5 = SWIG_AsVal_int(obj4, &val5);
   18598               6 :     if (!SWIG_IsOK(ecode5)) {
   18599               0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SieveFilter" "', argument " "5"" of type '" "int""'");
   18600                 :     } 
   18601               6 :     arg5 = static_cast< int >(val5);
   18602                 :   }
   18603               6 :   if (obj5) {
   18604                 :     {
   18605                 :       /* %typemap(in) char **options */
   18606                 :       /* Check if is a list */
   18607               0 :       if ( ! PySequence_Check(obj5)) {
   18608               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
   18609               0 :         SWIG_fail;
   18610                 :       }
   18611                 :       
   18612               0 :       int size = PySequence_Size(obj5);
   18613               0 :       for (int i = 0; i < size; i++) {
   18614               0 :         PyObject* pyObj = PySequence_GetItem(obj5,i);
   18615               0 :         if (PyUnicode_Check(pyObj))
   18616                 :         {
   18617                 :           char *pszStr;
   18618                 :           Py_ssize_t nLen;
   18619               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   18620                 : #if PY_VERSION_HEX >= 0x03000000
   18621                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   18622                 : #else
   18623               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   18624                 : #endif
   18625               0 :           arg6 = CSLAddString( arg6, pszStr );
   18626               0 :           Py_XDECREF(pyUTF8Str);
   18627                 :         }
   18628                 : #if PY_VERSION_HEX >= 0x03000000
   18629                 :         else if (PyBytes_Check(pyObj))
   18630                 :         arg6 = CSLAddString( arg6, PyBytes_AsString(pyObj) );
   18631                 : #else
   18632               0 :         else if (PyString_Check(pyObj))
   18633               0 :         arg6 = CSLAddString( arg6, PyString_AsString(pyObj) );
   18634                 : #endif
   18635                 :         else
   18636                 :         {
   18637               0 :           Py_DECREF(pyObj);
   18638               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   18639               0 :           SWIG_fail;
   18640                 :         }
   18641               0 :         Py_DECREF(pyObj);
   18642                 :       }
   18643                 :     }
   18644                 :   }
   18645               6 :   if (obj6) {
   18646                 :     {
   18647                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   18648                 :       /* callback_func typemap */
   18649               1 :       if (obj6 && obj6 != Py_None ) {
   18650               1 :         void* cbfunction = NULL;
   18651                 :         SWIG_ConvertPtr( obj6, 
   18652                 :           (void**)&cbfunction, 
   18653                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int, 
   18654               1 :           SWIG_POINTER_EXCEPTION | 0 );
   18655                 :         
   18656               1 :         if ( cbfunction == GDALTermProgress ) {
   18657               1 :           arg7 = GDALTermProgress;
   18658                 :         } else {
   18659               0 :           if (!PyCallable_Check(obj6)) {
   18660                 :             PyErr_SetString( PyExc_RuntimeError, 
   18661               0 :               "Object given is not a Python function" );
   18662               0 :             SWIG_fail;
   18663                 :           }
   18664               0 :           psProgressInfo->psPyCallback = obj6;
   18665               0 :           arg7 = PyProgressProxy;
   18666                 :         }
   18667                 :         
   18668                 :       }
   18669                 :       
   18670                 :     }
   18671                 :   }
   18672               6 :   if (obj7) {
   18673                 :     {
   18674                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   18675               0 :       psProgressInfo->psPyCallbackData = obj7 ;
   18676                 :     }
   18677                 :   }
   18678                 :   {
   18679               6 :     if (!arg1) {
   18680               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18681                 :     }
   18682                 :   }
   18683                 :   {
   18684               6 :     if (!arg3) {
   18685               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18686                 :     }
   18687                 :   }
   18688                 :   {
   18689               6 :     if ( bUseExceptions ) {
   18690               0 :       CPLErrorReset();
   18691                 :     }
   18692               6 :     result = (int)SieveFilter(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
   18693               6 :     if ( bUseExceptions ) {
   18694               0 :       CPLErr eclass = CPLGetLastErrorType();
   18695               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18696               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18697                 :       }
   18698                 :     }
   18699                 :   }
   18700               6 :   resultobj = SWIG_From_int(static_cast< int >(result));
   18701                 :   {
   18702                 :     /* %typemap(freearg) char **options */
   18703               6 :     CSLDestroy( arg6 );
   18704                 :   }
   18705                 :   {
   18706                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   18707                 :     
   18708               6 :     CPLFree(psProgressInfo);
   18709                 :     
   18710                 :   }
   18711               6 :   return resultobj;
   18712                 : fail:
   18713                 :   {
   18714                 :     /* %typemap(freearg) char **options */
   18715               0 :     CSLDestroy( arg6 );
   18716                 :   }
   18717                 :   {
   18718                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   18719                 :     
   18720               0 :     CPLFree(psProgressInfo);
   18721                 :     
   18722                 :   }
   18723               0 :   return NULL;
   18724                 : }
   18725                 : 
   18726                 : 
   18727               2 : SWIGINTERN PyObject *_wrap_RegenerateOverviews(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   18728               2 :   PyObject *resultobj = 0;
   18729               2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   18730                 :   int arg2 ;
   18731               2 :   GDALRasterBandShadow **arg3 = (GDALRasterBandShadow **) 0 ;
   18732               2 :   char *arg4 = (char *) "average" ;
   18733               2 :   GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
   18734               2 :   void *arg6 = (void *) NULL ;
   18735               2 :   void *argp1 = 0 ;
   18736               2 :   int res1 = 0 ;
   18737                 :   int res4 ;
   18738               2 :   char *buf4 = 0 ;
   18739               2 :   int alloc4 = 0 ;
   18740               2 :   PyObject * obj0 = 0 ;
   18741               2 :   PyObject * obj1 = 0 ;
   18742               2 :   PyObject * obj2 = 0 ;
   18743               2 :   PyObject * obj3 = 0 ;
   18744               2 :   PyObject * obj4 = 0 ;
   18745                 :   char *  kwnames[] = {
   18746                 :     (char *) "srcBand",(char *) "overviewBandCount",(char *) "resampling",(char *) "callback",(char *) "callback_data", NULL 
   18747               2 :   };
   18748                 :   int result;
   18749                 :   
   18750                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   18751                 :   PyProgressData *psProgressInfo;
   18752               2 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   18753               2 :   psProgressInfo->nLastReported = -1;
   18754               2 :   psProgressInfo->psPyCallback = NULL;
   18755               2 :   psProgressInfo->psPyCallbackData = NULL;
   18756               2 :   arg6 = psProgressInfo;
   18757               2 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOO:RegenerateOverviews",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   18758               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   18759               2 :   if (!SWIG_IsOK(res1)) {
   18760               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RegenerateOverviews" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   18761                 :   }
   18762               2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   18763                 :   {
   18764                 :     /*  OBJECT_LIST_INPUT %typemap(in) (int itemcount, GDALRasterBandShadow *optional_##GDALRasterBandShadow)*/
   18765               2 :     if ( !PySequence_Check(obj1) ) {
   18766               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   18767               0 :       SWIG_fail;
   18768                 :     }
   18769               2 :     arg2 = PySequence_Size(obj1);
   18770               2 :     arg3 = (GDALRasterBandShadow**) CPLMalloc(arg2*sizeof(GDALRasterBandShadow*));
   18771                 :     
   18772               6 :     for( int i = 0; i<arg2; i++ ) {
   18773               4 :       PyObject *o = PySequence_GetItem(obj1,i);
   18774                 : #if 0x010340 <= 0x010337
   18775                 :       PySwigObject *sobj = SWIG_Python_GetSwigThis(o);
   18776                 : #else
   18777               4 :       SwigPyObject *sobj = SWIG_Python_GetSwigThis(o);
   18778                 : #endif
   18779               4 :       GDALRasterBandShadow* rawobjectpointer = NULL;
   18780               4 :       if (!sobj) {
   18781               0 :         Py_DECREF(o);
   18782                 :         SWIG_fail;
   18783                 :       }
   18784               4 :       rawobjectpointer = (GDALRasterBandShadow*) sobj->ptr;
   18785               4 :       arg3[i] = rawobjectpointer;
   18786               4 :       Py_DECREF(o);
   18787                 :       
   18788                 :     }
   18789                 :   }
   18790               2 :   if (obj2) {
   18791               2 :     res4 = SWIG_AsCharPtrAndSize(obj2, &buf4, NULL, &alloc4);
   18792               2 :     if (!SWIG_IsOK(res4)) {
   18793               0 :       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "RegenerateOverviews" "', argument " "4"" of type '" "char const *""'");
   18794                 :     }
   18795               2 :     arg4 = reinterpret_cast< char * >(buf4);
   18796                 :   }
   18797               2 :   if (obj3) {
   18798                 :     {
   18799                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   18800                 :       /* callback_func typemap */
   18801               0 :       if (obj3 && obj3 != Py_None ) {
   18802               0 :         void* cbfunction = NULL;
   18803                 :         SWIG_ConvertPtr( obj3, 
   18804                 :           (void**)&cbfunction, 
   18805                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int, 
   18806               0 :           SWIG_POINTER_EXCEPTION | 0 );
   18807                 :         
   18808               0 :         if ( cbfunction == GDALTermProgress ) {
   18809               0 :           arg5 = GDALTermProgress;
   18810                 :         } else {
   18811               0 :           if (!PyCallable_Check(obj3)) {
   18812                 :             PyErr_SetString( PyExc_RuntimeError, 
   18813               0 :               "Object given is not a Python function" );
   18814               0 :             SWIG_fail;
   18815                 :           }
   18816               0 :           psProgressInfo->psPyCallback = obj3;
   18817               0 :           arg5 = PyProgressProxy;
   18818                 :         }
   18819                 :         
   18820                 :       }
   18821                 :       
   18822                 :     }
   18823                 :   }
   18824               2 :   if (obj4) {
   18825                 :     {
   18826                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   18827               0 :       psProgressInfo->psPyCallbackData = obj4 ;
   18828                 :     }
   18829                 :   }
   18830                 :   {
   18831               2 :     if (!arg1) {
   18832               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18833                 :     }
   18834                 :   }
   18835                 :   {
   18836               2 :     if ( bUseExceptions ) {
   18837               0 :       CPLErrorReset();
   18838                 :     }
   18839               2 :     result = (int)RegenerateOverviews(arg1,arg2,arg3,(char const *)arg4,arg5,arg6);
   18840               2 :     if ( bUseExceptions ) {
   18841               0 :       CPLErr eclass = CPLGetLastErrorType();
   18842               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18843               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18844                 :       }
   18845                 :     }
   18846                 :   }
   18847               2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   18848                 :   {
   18849                 :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   18850               2 :     CPLFree( arg3 );
   18851                 :   }
   18852               2 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   18853                 :   {
   18854                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   18855                 :     
   18856               2 :     CPLFree(psProgressInfo);
   18857                 :     
   18858                 :   }
   18859               2 :   return resultobj;
   18860                 : fail:
   18861                 :   {
   18862                 :     /* OBJECT_LIST_INPUT %typemap(freearg) (int object_list_count, GDALRasterBandShadow **poObjects)*/
   18863               0 :     CPLFree( arg3 );
   18864                 :   }
   18865               0 :   if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
   18866                 :   {
   18867                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   18868                 :     
   18869               0 :     CPLFree(psProgressInfo);
   18870                 :     
   18871                 :   }
   18872               0 :   return NULL;
   18873                 : }
   18874                 : 
   18875                 : 
   18876               2 : SWIGINTERN PyObject *_wrap_RegenerateOverview(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   18877               2 :   PyObject *resultobj = 0;
   18878               2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   18879               2 :   GDALRasterBandShadow *arg2 = (GDALRasterBandShadow *) 0 ;
   18880               2 :   char *arg3 = (char *) "average" ;
   18881               2 :   GDALProgressFunc arg4 = (GDALProgressFunc) NULL ;
   18882               2 :   void *arg5 = (void *) NULL ;
   18883               2 :   void *argp1 = 0 ;
   18884               2 :   int res1 = 0 ;
   18885               2 :   void *argp2 = 0 ;
   18886               2 :   int res2 = 0 ;
   18887                 :   int res3 ;
   18888               2 :   char *buf3 = 0 ;
   18889               2 :   int alloc3 = 0 ;
   18890               2 :   PyObject * obj0 = 0 ;
   18891               2 :   PyObject * obj1 = 0 ;
   18892               2 :   PyObject * obj2 = 0 ;
   18893               2 :   PyObject * obj3 = 0 ;
   18894               2 :   PyObject * obj4 = 0 ;
   18895                 :   char *  kwnames[] = {
   18896                 :     (char *) "srcBand",(char *) "overviewBand",(char *) "resampling",(char *) "callback",(char *) "callback_data", NULL 
   18897               2 :   };
   18898                 :   int result;
   18899                 :   
   18900                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   18901                 :   PyProgressData *psProgressInfo;
   18902               2 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   18903               2 :   psProgressInfo->nLastReported = -1;
   18904               2 :   psProgressInfo->psPyCallback = NULL;
   18905               2 :   psProgressInfo->psPyCallbackData = NULL;
   18906               2 :   arg5 = psProgressInfo;
   18907               2 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOO:RegenerateOverview",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   18908               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   18909               2 :   if (!SWIG_IsOK(res1)) {
   18910               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RegenerateOverview" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   18911                 :   }
   18912               2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   18913               2 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   18914               2 :   if (!SWIG_IsOK(res2)) {
   18915               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RegenerateOverview" "', argument " "2"" of type '" "GDALRasterBandShadow *""'"); 
   18916                 :   }
   18917               2 :   arg2 = reinterpret_cast< GDALRasterBandShadow * >(argp2);
   18918               2 :   if (obj2) {
   18919               2 :     res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   18920               2 :     if (!SWIG_IsOK(res3)) {
   18921               0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "RegenerateOverview" "', argument " "3"" of type '" "char const *""'");
   18922                 :     }
   18923               2 :     arg3 = reinterpret_cast< char * >(buf3);
   18924                 :   }
   18925               2 :   if (obj3) {
   18926                 :     {
   18927                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   18928                 :       /* callback_func typemap */
   18929               0 :       if (obj3 && obj3 != Py_None ) {
   18930               0 :         void* cbfunction = NULL;
   18931                 :         SWIG_ConvertPtr( obj3, 
   18932                 :           (void**)&cbfunction, 
   18933                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int, 
   18934               0 :           SWIG_POINTER_EXCEPTION | 0 );
   18935                 :         
   18936               0 :         if ( cbfunction == GDALTermProgress ) {
   18937               0 :           arg4 = GDALTermProgress;
   18938                 :         } else {
   18939               0 :           if (!PyCallable_Check(obj3)) {
   18940                 :             PyErr_SetString( PyExc_RuntimeError, 
   18941               0 :               "Object given is not a Python function" );
   18942               0 :             SWIG_fail;
   18943                 :           }
   18944               0 :           psProgressInfo->psPyCallback = obj3;
   18945               0 :           arg4 = PyProgressProxy;
   18946                 :         }
   18947                 :         
   18948                 :       }
   18949                 :       
   18950                 :     }
   18951                 :   }
   18952               2 :   if (obj4) {
   18953                 :     {
   18954                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   18955               0 :       psProgressInfo->psPyCallbackData = obj4 ;
   18956                 :     }
   18957                 :   }
   18958                 :   {
   18959               2 :     if (!arg1) {
   18960               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18961                 :     }
   18962                 :   }
   18963                 :   {
   18964               2 :     if (!arg2) {
   18965               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   18966                 :     }
   18967                 :   }
   18968                 :   {
   18969               2 :     if ( bUseExceptions ) {
   18970               0 :       CPLErrorReset();
   18971                 :     }
   18972               2 :     result = (int)RegenerateOverview(arg1,arg2,(char const *)arg3,arg4,arg5);
   18973               2 :     if ( bUseExceptions ) {
   18974               0 :       CPLErr eclass = CPLGetLastErrorType();
   18975               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   18976               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   18977                 :       }
   18978                 :     }
   18979                 :   }
   18980               2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   18981               2 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   18982                 :   {
   18983                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   18984                 :     
   18985               2 :     CPLFree(psProgressInfo);
   18986                 :     
   18987                 :   }
   18988               2 :   return resultobj;
   18989                 : fail:
   18990               0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   18991                 :   {
   18992                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   18993                 :     
   18994               0 :     CPLFree(psProgressInfo);
   18995                 :     
   18996                 :   }
   18997               0 :   return NULL;
   18998                 : }
   18999                 : 
   19000                 : 
   19001               2 : SWIGINTERN PyObject *_wrap_ContourGenerate(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   19002               2 :   PyObject *resultobj = 0;
   19003               2 :   GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
   19004                 :   double arg2 ;
   19005                 :   double arg3 ;
   19006                 :   int arg4 ;
   19007               2 :   double *arg5 = (double *) 0 ;
   19008                 :   int arg6 ;
   19009                 :   double arg7 ;
   19010               2 :   OGRLayerShadow *arg8 = (OGRLayerShadow *) 0 ;
   19011                 :   int arg9 ;
   19012                 :   int arg10 ;
   19013               2 :   GDALProgressFunc arg11 = (GDALProgressFunc) NULL ;
   19014               2 :   void *arg12 = (void *) NULL ;
   19015               2 :   void *argp1 = 0 ;
   19016               2 :   int res1 = 0 ;
   19017                 :   double val2 ;
   19018               2 :   int ecode2 = 0 ;
   19019                 :   double val3 ;
   19020               2 :   int ecode3 = 0 ;
   19021                 :   int val6 ;
   19022               2 :   int ecode6 = 0 ;
   19023                 :   double val7 ;
   19024               2 :   int ecode7 = 0 ;
   19025               2 :   void *argp8 = 0 ;
   19026               2 :   int res8 = 0 ;
   19027                 :   int val9 ;
   19028               2 :   int ecode9 = 0 ;
   19029                 :   int val10 ;
   19030               2 :   int ecode10 = 0 ;
   19031               2 :   PyObject * obj0 = 0 ;
   19032               2 :   PyObject * obj1 = 0 ;
   19033               2 :   PyObject * obj2 = 0 ;
   19034               2 :   PyObject * obj3 = 0 ;
   19035               2 :   PyObject * obj4 = 0 ;
   19036               2 :   PyObject * obj5 = 0 ;
   19037               2 :   PyObject * obj6 = 0 ;
   19038               2 :   PyObject * obj7 = 0 ;
   19039               2 :   PyObject * obj8 = 0 ;
   19040               2 :   PyObject * obj9 = 0 ;
   19041               2 :   PyObject * obj10 = 0 ;
   19042                 :   char *  kwnames[] = {
   19043                 :     (char *) "srcBand",(char *) "contourInterval",(char *) "contourBase",(char *) "fixedLevelCount",(char *) "useNoData",(char *) "noDataValue",(char *) "dstLayer",(char *) "idField",(char *) "elevField",(char *) "callback",(char *) "callback_data", NULL 
   19044               2 :   };
   19045                 :   int result;
   19046                 :   
   19047                 :   /* %typemap(arginit) ( const char* callback_data=NULL)  */
   19048                 :   PyProgressData *psProgressInfo;
   19049               2 :   psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
   19050               2 :   psProgressInfo->nLastReported = -1;
   19051               2 :   psProgressInfo->psPyCallback = NULL;
   19052               2 :   psProgressInfo->psPyCallbackData = NULL;
   19053               2 :   arg12 = psProgressInfo;
   19054               2 :   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOOOOO|OO:ContourGenerate",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) SWIG_fail;
   19055               2 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALRasterBandShadow, 0 |  0 );
   19056               2 :   if (!SWIG_IsOK(res1)) {
   19057               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContourGenerate" "', argument " "1"" of type '" "GDALRasterBandShadow *""'"); 
   19058                 :   }
   19059               2 :   arg1 = reinterpret_cast< GDALRasterBandShadow * >(argp1);
   19060               2 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   19061               2 :   if (!SWIG_IsOK(ecode2)) {
   19062               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ContourGenerate" "', argument " "2"" of type '" "double""'");
   19063                 :   } 
   19064               2 :   arg2 = static_cast< double >(val2);
   19065               2 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   19066               2 :   if (!SWIG_IsOK(ecode3)) {
   19067               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ContourGenerate" "', argument " "3"" of type '" "double""'");
   19068                 :   } 
   19069               2 :   arg3 = static_cast< double >(val3);
   19070                 :   {
   19071                 :     /* %typemap(in,numinputs=1) (int nList, double* pList)*/
   19072                 :     /* check if is List */
   19073               2 :     if ( !PySequence_Check(obj3) ) {
   19074               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19075               0 :       SWIG_fail;
   19076                 :     }
   19077               2 :     arg4 = PySequence_Size(obj3);
   19078               2 :     arg5 = (double*) malloc(arg4*sizeof(double));
   19079               5 :     for( int i = 0; i<arg4; i++ ) {
   19080               3 :       PyObject *o = PySequence_GetItem(obj3,i);
   19081               3 :       if ( !PyArg_Parse(o,"d",&arg5[i]) ) {
   19082               0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   19083               0 :         Py_DECREF(o);
   19084                 :         SWIG_fail;
   19085                 :       }
   19086               3 :       Py_DECREF(o);
   19087                 :     }
   19088                 :   }
   19089               2 :   ecode6 = SWIG_AsVal_int(obj4, &val6);
   19090               2 :   if (!SWIG_IsOK(ecode6)) {
   19091               0 :     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "ContourGenerate" "', argument " "6"" of type '" "int""'");
   19092                 :   } 
   19093               2 :   arg6 = static_cast< int >(val6);
   19094               2 :   ecode7 = SWIG_AsVal_double(obj5, &val7);
   19095               2 :   if (!SWIG_IsOK(ecode7)) {
   19096               0 :     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ContourGenerate" "', argument " "7"" of type '" "double""'");
   19097                 :   } 
   19098               2 :   arg7 = static_cast< double >(val7);
   19099               2 :   res8 = SWIG_ConvertPtr(obj6, &argp8,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
   19100               2 :   if (!SWIG_IsOK(res8)) {
   19101               0 :     SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "ContourGenerate" "', argument " "8"" of type '" "OGRLayerShadow *""'"); 
   19102                 :   }
   19103               2 :   arg8 = reinterpret_cast< OGRLayerShadow * >(argp8);
   19104               2 :   ecode9 = SWIG_AsVal_int(obj7, &val9);
   19105               2 :   if (!SWIG_IsOK(ecode9)) {
   19106               0 :     SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "ContourGenerate" "', argument " "9"" of type '" "int""'");
   19107                 :   } 
   19108               2 :   arg9 = static_cast< int >(val9);
   19109               2 :   ecode10 = SWIG_AsVal_int(obj8, &val10);
   19110               2 :   if (!SWIG_IsOK(ecode10)) {
   19111               0 :     SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "ContourGenerate" "', argument " "10"" of type '" "int""'");
   19112                 :   } 
   19113               2 :   arg10 = static_cast< int >(val10);
   19114               2 :   if (obj9) {
   19115                 :     {
   19116                 :       /* %typemap(in) (GDALProgressFunc callback = NULL) */
   19117                 :       /* callback_func typemap */
   19118               0 :       if (obj9 && obj9 != Py_None ) {
   19119               0 :         void* cbfunction = NULL;
   19120                 :         SWIG_ConvertPtr( obj9, 
   19121                 :           (void**)&cbfunction, 
   19122                 :           SWIGTYPE_p_f_double_p_q_const__char_p_void__int, 
   19123               0 :           SWIG_POINTER_EXCEPTION | 0 );
   19124                 :         
   19125               0 :         if ( cbfunction == GDALTermProgress ) {
   19126               0 :           arg11 = GDALTermProgress;
   19127                 :         } else {
   19128               0 :           if (!PyCallable_Check(obj9)) {
   19129                 :             PyErr_SetString( PyExc_RuntimeError, 
   19130               0 :               "Object given is not a Python function" );
   19131               0 :             SWIG_fail;
   19132                 :           }
   19133               0 :           psProgressInfo->psPyCallback = obj9;
   19134               0 :           arg11 = PyProgressProxy;
   19135                 :         }
   19136                 :         
   19137                 :       }
   19138                 :       
   19139                 :     }
   19140                 :   }
   19141               2 :   if (obj10) {
   19142                 :     {
   19143                 :       /* %typemap(in) ( void* callback_data=NULL)  */
   19144               0 :       psProgressInfo->psPyCallbackData = obj10 ;
   19145                 :     }
   19146                 :   }
   19147                 :   {
   19148               2 :     if (!arg1) {
   19149               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19150                 :     }
   19151                 :   }
   19152                 :   {
   19153               2 :     if (!arg8) {
   19154               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19155                 :     }
   19156                 :   }
   19157                 :   {
   19158               2 :     if ( bUseExceptions ) {
   19159               0 :       CPLErrorReset();
   19160                 :     }
   19161               2 :     result = (int)ContourGenerate(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
   19162               2 :     if ( bUseExceptions ) {
   19163               0 :       CPLErr eclass = CPLGetLastErrorType();
   19164               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19165               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19166                 :       }
   19167                 :     }
   19168                 :   }
   19169               2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19170                 :   {
   19171                 :     /* %typemap(freearg) (int nList, double* pList) */
   19172               2 :     if (arg5) {
   19173               2 :       free((void*) arg5);
   19174                 :     }
   19175                 :   }
   19176                 :   {
   19177                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   19178                 :     
   19179               2 :     CPLFree(psProgressInfo);
   19180                 :     
   19181                 :   }
   19182               2 :   return resultobj;
   19183                 : fail:
   19184                 :   {
   19185                 :     /* %typemap(freearg) (int nList, double* pList) */
   19186               0 :     if (arg5) {
   19187               0 :       free((void*) arg5);
   19188                 :     }
   19189                 :   }
   19190                 :   {
   19191                 :     /* %typemap(freearg) ( void* callback_data=NULL)  */
   19192                 :     
   19193               0 :     CPLFree(psProgressInfo);
   19194                 :     
   19195                 :   }
   19196               0 :   return NULL;
   19197                 : }
   19198                 : 
   19199                 : 
   19200              13 : SWIGINTERN PyObject *_wrap_AutoCreateWarpedVRT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19201              13 :   PyObject *resultobj = 0;
   19202              13 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   19203              13 :   char *arg2 = (char *) 0 ;
   19204              13 :   char *arg3 = (char *) 0 ;
   19205              13 :   GDALResampleAlg arg4 = (GDALResampleAlg) GRA_NearestNeighbour ;
   19206              13 :   double arg5 = (double) 0.0 ;
   19207              13 :   void *argp1 = 0 ;
   19208              13 :   int res1 = 0 ;
   19209                 :   int res2 ;
   19210              13 :   char *buf2 = 0 ;
   19211              13 :   int alloc2 = 0 ;
   19212                 :   int res3 ;
   19213              13 :   char *buf3 = 0 ;
   19214              13 :   int alloc3 = 0 ;
   19215                 :   int val4 ;
   19216              13 :   int ecode4 = 0 ;
   19217                 :   double val5 ;
   19218              13 :   int ecode5 = 0 ;
   19219              13 :   PyObject * obj0 = 0 ;
   19220              13 :   PyObject * obj1 = 0 ;
   19221              13 :   PyObject * obj2 = 0 ;
   19222              13 :   PyObject * obj3 = 0 ;
   19223              13 :   PyObject * obj4 = 0 ;
   19224              13 :   GDALDatasetShadow *result = 0 ;
   19225                 :   
   19226              13 :   if (!PyArg_ParseTuple(args,(char *)"O|OOOO:AutoCreateWarpedVRT",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   19227              13 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   19228              13 :   if (!SWIG_IsOK(res1)) {
   19229               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AutoCreateWarpedVRT" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   19230                 :   }
   19231              13 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   19232              13 :   if (obj1) {
   19233              12 :     res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   19234              12 :     if (!SWIG_IsOK(res2)) {
   19235               0 :       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AutoCreateWarpedVRT" "', argument " "2"" of type '" "char const *""'");
   19236                 :     }
   19237              12 :     arg2 = reinterpret_cast< char * >(buf2);
   19238                 :   }
   19239              13 :   if (obj2) {
   19240              12 :     res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   19241              12 :     if (!SWIG_IsOK(res3)) {
   19242               0 :       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AutoCreateWarpedVRT" "', argument " "3"" of type '" "char const *""'");
   19243                 :     }
   19244              12 :     arg3 = reinterpret_cast< char * >(buf3);
   19245                 :   }
   19246              13 :   if (obj3) {
   19247              12 :     ecode4 = SWIG_AsVal_int(obj3, &val4);
   19248              12 :     if (!SWIG_IsOK(ecode4)) {
   19249               0 :       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "AutoCreateWarpedVRT" "', argument " "4"" of type '" "GDALResampleAlg""'");
   19250                 :     } 
   19251              12 :     arg4 = static_cast< GDALResampleAlg >(val4);
   19252                 :   }
   19253              13 :   if (obj4) {
   19254              12 :     ecode5 = SWIG_AsVal_double(obj4, &val5);
   19255              12 :     if (!SWIG_IsOK(ecode5)) {
   19256               0 :       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "AutoCreateWarpedVRT" "', argument " "5"" of type '" "double""'");
   19257                 :     } 
   19258              12 :     arg5 = static_cast< double >(val5);
   19259                 :   }
   19260                 :   {
   19261              13 :     if (!arg1) {
   19262               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   19263                 :     }
   19264                 :   }
   19265                 :   {
   19266              13 :     if ( bUseExceptions ) {
   19267               0 :       CPLErrorReset();
   19268                 :     }
   19269              13 :     result = (GDALDatasetShadow *)AutoCreateWarpedVRT(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5);
   19270              13 :     if ( bUseExceptions ) {
   19271               0 :       CPLErr eclass = CPLGetLastErrorType();
   19272               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19273               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19274                 :       }
   19275                 :     }
   19276                 :   }
   19277              13 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   19278              13 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   19279              13 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   19280              13 :   return resultobj;
   19281                 : fail:
   19282               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   19283               0 :   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
   19284               0 :   return NULL;
   19285                 : }
   19286                 : 
   19287                 : 
   19288               8 : SWIGINTERN PyObject *_wrap_new_Transformer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19289               8 :   PyObject *resultobj = 0;
   19290               8 :   GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
   19291               8 :   GDALDatasetShadow *arg2 = (GDALDatasetShadow *) 0 ;
   19292               8 :   char **arg3 = (char **) 0 ;
   19293               8 :   void *argp1 = 0 ;
   19294               8 :   int res1 = 0 ;
   19295               8 :   void *argp2 = 0 ;
   19296               8 :   int res2 = 0 ;
   19297               8 :   PyObject * obj0 = 0 ;
   19298               8 :   PyObject * obj1 = 0 ;
   19299               8 :   PyObject * obj2 = 0 ;
   19300               8 :   GDALTransformerInfoShadow *result = 0 ;
   19301                 :   
   19302               8 :   if (!PyArg_ParseTuple(args,(char *)"OOO:new_Transformer",&obj0,&obj1,&obj2)) SWIG_fail;
   19303               8 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   19304               8 :   if (!SWIG_IsOK(res1)) {
   19305               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Transformer" "', argument " "1"" of type '" "GDALDatasetShadow *""'"); 
   19306                 :   }
   19307               8 :   arg1 = reinterpret_cast< GDALDatasetShadow * >(argp1);
   19308               8 :   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
   19309               8 :   if (!SWIG_IsOK(res2)) {
   19310               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Transformer" "', argument " "2"" of type '" "GDALDatasetShadow *""'"); 
   19311                 :   }
   19312               8 :   arg2 = reinterpret_cast< GDALDatasetShadow * >(argp2);
   19313                 :   {
   19314                 :     /* %typemap(in) char **options */
   19315                 :     /* Check if is a list */
   19316               8 :     if ( ! PySequence_Check(obj2)) {
   19317               0 :       PyErr_SetString(PyExc_TypeError,"not a sequence");
   19318               0 :       SWIG_fail;
   19319                 :     }
   19320                 :     
   19321               8 :     int size = PySequence_Size(obj2);
   19322              17 :     for (int i = 0; i < size; i++) {
   19323               9 :       PyObject* pyObj = PySequence_GetItem(obj2,i);
   19324               9 :       if (PyUnicode_Check(pyObj))
   19325                 :       {
   19326                 :         char *pszStr;
   19327                 :         Py_ssize_t nLen;
   19328               0 :         PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   19329                 : #if PY_VERSION_HEX >= 0x03000000
   19330                 :         PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   19331                 : #else
   19332               0 :         PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   19333                 : #endif
   19334               0 :         arg3 = CSLAddString( arg3, pszStr );
   19335               0 :         Py_XDECREF(pyUTF8Str);
   19336                 :       }
   19337                 : #if PY_VERSION_HEX >= 0x03000000
   19338                 :       else if (PyBytes_Check(pyObj))
   19339                 :       arg3 = CSLAddString( arg3, PyBytes_AsString(pyObj) );
   19340                 : #else
   19341               9 :       else if (PyString_Check(pyObj))
   19342               9 :       arg3 = CSLAddString( arg3, PyString_AsString(pyObj) );
   19343                 : #endif
   19344                 :       else
   19345                 :       {
   19346               0 :         Py_DECREF(pyObj);
   19347               0 :         PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   19348               0 :         SWIG_fail;
   19349                 :       }
   19350               9 :       Py_DECREF(pyObj);
   19351                 :     }
   19352                 :   }
   19353                 :   {
   19354               8 :     if ( bUseExceptions ) {
   19355               0 :       CPLErrorReset();
   19356                 :     }
   19357               8 :     result = (GDALTransformerInfoShadow *)new_GDALTransformerInfoShadow(arg1,arg2,arg3);
   19358               8 :     if ( bUseExceptions ) {
   19359               0 :       CPLErr eclass = CPLGetLastErrorType();
   19360               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19361               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19362                 :       }
   19363                 :     }
   19364                 :   }
   19365               8 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALTransformerInfoShadow, SWIG_POINTER_NEW |  0 );
   19366                 :   {
   19367                 :     /* %typemap(freearg) char **options */
   19368               8 :     CSLDestroy( arg3 );
   19369                 :   }
   19370               8 :   return resultobj;
   19371                 : fail:
   19372                 :   {
   19373                 :     /* %typemap(freearg) char **options */
   19374               0 :     CSLDestroy( arg3 );
   19375                 :   }
   19376               0 :   return NULL;
   19377                 : }
   19378                 : 
   19379                 : 
   19380               8 : SWIGINTERN PyObject *_wrap_delete_Transformer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19381               8 :   PyObject *resultobj = 0;
   19382               8 :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   19383               8 :   void *argp1 = 0 ;
   19384               8 :   int res1 = 0 ;
   19385               8 :   PyObject * obj0 = 0 ;
   19386                 :   
   19387               8 :   if (!PyArg_ParseTuple(args,(char *)"O:delete_Transformer",&obj0)) SWIG_fail;
   19388               8 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, SWIG_POINTER_DISOWN |  0 );
   19389               8 :   if (!SWIG_IsOK(res1)) {
   19390               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Transformer" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   19391                 :   }
   19392               8 :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   19393                 :   {
   19394               8 :     if ( bUseExceptions ) {
   19395               0 :       CPLErrorReset();
   19396                 :     }
   19397                 :     delete_GDALTransformerInfoShadow(arg1);
   19398               8 :     if ( bUseExceptions ) {
   19399               0 :       CPLErr eclass = CPLGetLastErrorType();
   19400               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19401               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19402                 :       }
   19403                 :     }
   19404                 :   }
   19405               8 :   resultobj = SWIG_Py_Void();
   19406               8 :   return resultobj;
   19407                 : fail:
   19408               0 :   return NULL;
   19409                 : }
   19410                 : 
   19411                 : 
   19412               0 : SWIGINTERN PyObject *_wrap_Transformer_TransformPoint__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19413               0 :   PyObject *resultobj = 0;
   19414               0 :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   19415                 :   int arg2 ;
   19416                 :   double *arg3 ;
   19417               0 :   void *argp1 = 0 ;
   19418               0 :   int res1 = 0 ;
   19419                 :   int val2 ;
   19420               0 :   int ecode2 = 0 ;
   19421                 :   double argin3[3] ;
   19422               0 :   PyObject * obj0 = 0 ;
   19423               0 :   PyObject * obj1 = 0 ;
   19424               0 :   PyObject * obj2 = 0 ;
   19425                 :   int result;
   19426                 :   
   19427               0 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Transformer_TransformPoint",&obj0,&obj1,&obj2)) SWIG_fail;
   19428               0 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   19429               0 :   if (!SWIG_IsOK(res1)) {
   19430               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Transformer_TransformPoint" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   19431                 :   }
   19432               0 :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   19433               0 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   19434               0 :   if (!SWIG_IsOK(ecode2)) {
   19435               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Transformer_TransformPoint" "', argument " "2"" of type '" "int""'");
   19436                 :   } 
   19437               0 :   arg2 = static_cast< int >(val2);
   19438                 :   {
   19439                 :     /* %typemap(in) (double argin3[ANY]) */
   19440               0 :     arg3 = argin3;
   19441               0 :     if (! PySequence_Check(obj2) ) {
   19442               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19443               0 :       SWIG_fail;
   19444                 :     }
   19445               0 :     int seq_size = PySequence_Size(obj2);
   19446               0 :     if ( seq_size != 3 ) {
   19447               0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   19448               0 :       SWIG_fail;
   19449                 :     }
   19450               0 :     for (unsigned int i=0; i<3; i++) {
   19451               0 :       PyObject *o = PySequence_GetItem(obj2,i);
   19452                 :       double val;
   19453               0 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   19454               0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   19455               0 :         Py_DECREF(o);
   19456                 :         SWIG_fail;
   19457                 :       }
   19458               0 :       arg3[i] =  val;
   19459               0 :       Py_DECREF(o);
   19460                 :     }
   19461                 :   }
   19462                 :   {
   19463               0 :     if ( bUseExceptions ) {
   19464               0 :       CPLErrorReset();
   19465                 :     }
   19466               0 :     result = (int)GDALTransformerInfoShadow_TransformPoint__SWIG_0(arg1,arg2,arg3);
   19467               0 :     if ( bUseExceptions ) {
   19468               0 :       CPLErr eclass = CPLGetLastErrorType();
   19469               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19470               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19471                 :       }
   19472                 :     }
   19473                 :   }
   19474               0 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19475                 :   {
   19476                 :     /* %typemap(argout) (double argout[ANY]) */
   19477               0 :     PyObject *out = CreateTupleFromDoubleArray( arg3, 3 );
   19478               0 :     resultobj = t_output_helper(resultobj,out);
   19479                 :   }
   19480               0 :   return resultobj;
   19481                 : fail:
   19482               0 :   return NULL;
   19483                 : }
   19484                 : 
   19485                 : 
   19486              16 : SWIGINTERN PyObject *_wrap_Transformer_TransformPoint__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19487              16 :   PyObject *resultobj = 0;
   19488              16 :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   19489                 :   double *arg2 ;
   19490                 :   int arg3 ;
   19491                 :   double arg4 ;
   19492                 :   double arg5 ;
   19493              16 :   double arg6 = (double) 0.0 ;
   19494              16 :   void *argp1 = 0 ;
   19495              16 :   int res1 = 0 ;
   19496                 :   double argout2[3] ;
   19497                 :   int val3 ;
   19498              16 :   int ecode3 = 0 ;
   19499                 :   double val4 ;
   19500              16 :   int ecode4 = 0 ;
   19501                 :   double val5 ;
   19502              16 :   int ecode5 = 0 ;
   19503                 :   double val6 ;
   19504              16 :   int ecode6 = 0 ;
   19505              16 :   PyObject * obj0 = 0 ;
   19506              16 :   PyObject * obj1 = 0 ;
   19507              16 :   PyObject * obj2 = 0 ;
   19508              16 :   PyObject * obj3 = 0 ;
   19509              16 :   PyObject * obj4 = 0 ;
   19510                 :   int result;
   19511                 :   
   19512                 :   {
   19513                 :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   19514              16 :     arg2 = argout2;
   19515                 :   }
   19516              16 :   if (!PyArg_ParseTuple(args,(char *)"OOOO|O:Transformer_TransformPoint",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
   19517              16 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   19518              16 :   if (!SWIG_IsOK(res1)) {
   19519               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Transformer_TransformPoint" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   19520                 :   }
   19521              16 :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   19522              16 :   ecode3 = SWIG_AsVal_int(obj1, &val3);
   19523              16 :   if (!SWIG_IsOK(ecode3)) {
   19524               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Transformer_TransformPoint" "', argument " "3"" of type '" "int""'");
   19525                 :   } 
   19526              16 :   arg3 = static_cast< int >(val3);
   19527              16 :   ecode4 = SWIG_AsVal_double(obj2, &val4);
   19528              16 :   if (!SWIG_IsOK(ecode4)) {
   19529               0 :     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Transformer_TransformPoint" "', argument " "4"" of type '" "double""'");
   19530                 :   } 
   19531              16 :   arg4 = static_cast< double >(val4);
   19532              16 :   ecode5 = SWIG_AsVal_double(obj3, &val5);
   19533              16 :   if (!SWIG_IsOK(ecode5)) {
   19534               0 :     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Transformer_TransformPoint" "', argument " "5"" of type '" "double""'");
   19535                 :   } 
   19536              16 :   arg5 = static_cast< double >(val5);
   19537              16 :   if (obj4) {
   19538              10 :     ecode6 = SWIG_AsVal_double(obj4, &val6);
   19539              10 :     if (!SWIG_IsOK(ecode6)) {
   19540               0 :       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Transformer_TransformPoint" "', argument " "6"" of type '" "double""'");
   19541                 :     } 
   19542              10 :     arg6 = static_cast< double >(val6);
   19543                 :   }
   19544                 :   {
   19545              16 :     if ( bUseExceptions ) {
   19546               0 :       CPLErrorReset();
   19547                 :     }
   19548              16 :     result = (int)GDALTransformerInfoShadow_TransformPoint__SWIG_1(arg1,arg2,arg3,arg4,arg5,arg6);
   19549              16 :     if ( bUseExceptions ) {
   19550               0 :       CPLErr eclass = CPLGetLastErrorType();
   19551               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19552               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19553                 :       }
   19554                 :     }
   19555                 :   }
   19556              16 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19557                 :   {
   19558                 :     /* %typemap(argout) (double argout[ANY]) */
   19559              16 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 3 );
   19560              16 :     resultobj = t_output_helper(resultobj,out);
   19561                 :   }
   19562              16 :   return resultobj;
   19563                 : fail:
   19564               0 :   return NULL;
   19565                 : }
   19566                 : 
   19567                 : 
   19568              16 : SWIGINTERN PyObject *_wrap_Transformer_TransformPoint(PyObject *self, PyObject *args) {
   19569                 :   int argc;
   19570                 :   PyObject *argv[6];
   19571                 :   int ii;
   19572                 :   
   19573              16 :   if (!PyTuple_Check(args)) SWIG_fail;
   19574              16 :   argc = (int)PyObject_Length(args);
   19575              90 :   for (ii = 0; (ii < argc) && (ii < 5); ii++) {
   19576              74 :     argv[ii] = PyTuple_GET_ITEM(args,ii);
   19577                 :   }
   19578              16 :   if (argc == 3) {
   19579                 :     int _v;
   19580               0 :     void *vptr = 0;
   19581               0 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALTransformerInfoShadow, 0);
   19582               0 :     _v = SWIG_CheckState(res);
   19583               0 :     if (_v) {
   19584                 :       {
   19585               0 :         int res = SWIG_AsVal_int(argv[1], NULL);
   19586               0 :         _v = SWIG_CheckState(res);
   19587                 :       }
   19588               0 :       if (_v) {
   19589               0 :         void *vptr = 0;
   19590               0 :         int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_double, 0);
   19591               0 :         _v = SWIG_CheckState(res);
   19592               0 :         if (_v) {
   19593               0 :           return _wrap_Transformer_TransformPoint__SWIG_0(self, args);
   19594                 :         }
   19595                 :       }
   19596                 :     }
   19597                 :   }
   19598              16 :   if ((argc >= 4) && (argc <= 5)) {
   19599                 :     int _v;
   19600              16 :     void *vptr = 0;
   19601              16 :     int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALTransformerInfoShadow, 0);
   19602              16 :     _v = SWIG_CheckState(res);
   19603              16 :     if (_v) {
   19604                 :       {
   19605              16 :         int res = SWIG_AsVal_int(argv[1], NULL);
   19606              16 :         _v = SWIG_CheckState(res);
   19607                 :       }
   19608              16 :       if (_v) {
   19609                 :         {
   19610              16 :           int res = SWIG_AsVal_double(argv[2], NULL);
   19611              16 :           _v = SWIG_CheckState(res);
   19612                 :         }
   19613              16 :         if (_v) {
   19614                 :           {
   19615              16 :             int res = SWIG_AsVal_double(argv[3], NULL);
   19616              16 :             _v = SWIG_CheckState(res);
   19617                 :           }
   19618              16 :           if (_v) {
   19619              16 :             if (argc <= 4) {
   19620               6 :               return _wrap_Transformer_TransformPoint__SWIG_1(self, args);
   19621                 :             }
   19622                 :             {
   19623              10 :               int res = SWIG_AsVal_double(argv[4], NULL);
   19624              10 :               _v = SWIG_CheckState(res);
   19625                 :             }
   19626              10 :             if (_v) {
   19627              10 :               return _wrap_Transformer_TransformPoint__SWIG_1(self, args);
   19628                 :             }
   19629                 :           }
   19630                 :         }
   19631                 :       }
   19632                 :     }
   19633                 :   }
   19634                 :   
   19635                 : fail:
   19636                 :   SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Transformer_TransformPoint'.\n"
   19637                 :     "  Possible C/C++ prototypes are:\n"
   19638                 :     "    TransformPoint(GDALTransformerInfoShadow *,int,double [3])\n"
   19639               0 :     "    TransformPoint(GDALTransformerInfoShadow *,double [3],int,double,double,double)\n");
   19640               0 :   return NULL;
   19641                 : }
   19642                 : 
   19643                 : 
   19644               1 : SWIGINTERN PyObject *_wrap_Transformer_TransformPoints(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19645               1 :   PyObject *resultobj = 0;
   19646               1 :   GDALTransformerInfoShadow *arg1 = (GDALTransformerInfoShadow *) 0 ;
   19647                 :   int arg2 ;
   19648                 :   int arg3 ;
   19649               1 :   double *arg4 = (double *) 0 ;
   19650               1 :   double *arg5 = (double *) 0 ;
   19651               1 :   double *arg6 = (double *) 0 ;
   19652               1 :   int *arg7 = (int *) 0 ;
   19653               1 :   void *argp1 = 0 ;
   19654               1 :   int res1 = 0 ;
   19655                 :   int val2 ;
   19656               1 :   int ecode2 = 0 ;
   19657               1 :   PyObject * obj0 = 0 ;
   19658               1 :   PyObject * obj1 = 0 ;
   19659               1 :   PyObject * obj2 = 0 ;
   19660                 :   int result;
   19661                 :   
   19662               1 :   if (!PyArg_ParseTuple(args,(char *)"OOO:Transformer_TransformPoints",&obj0,&obj1,&obj2)) SWIG_fail;
   19663               1 :   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALTransformerInfoShadow, 0 |  0 );
   19664               1 :   if (!SWIG_IsOK(res1)) {
   19665               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Transformer_TransformPoints" "', argument " "1"" of type '" "GDALTransformerInfoShadow *""'"); 
   19666                 :   }
   19667               1 :   arg1 = reinterpret_cast< GDALTransformerInfoShadow * >(argp1);
   19668               1 :   ecode2 = SWIG_AsVal_int(obj1, &val2);
   19669               1 :   if (!SWIG_IsOK(ecode2)) {
   19670               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Transformer_TransformPoints" "', argument " "2"" of type '" "int""'");
   19671                 :   } 
   19672               1 :   arg2 = static_cast< int >(val2);
   19673                 :   {
   19674                 :     /*  typemap(in,numinputs=1) (int nCount, double *x, double *y, double *z, int* panSuccess) */
   19675               1 :     if ( !PySequence_Check(obj2) ) {
   19676               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19677               0 :       SWIG_fail;
   19678                 :     }
   19679                 :     
   19680               1 :     arg3 = PySequence_Size(obj2);
   19681               1 :     arg4 = (double*) VSIMalloc(arg3*sizeof(double));
   19682               1 :     arg5 = (double*) VSIMalloc(arg3*sizeof(double));
   19683               1 :     arg6 = (double*) VSIMalloc(arg3*sizeof(double));
   19684               1 :     arg7 = (int*) VSIMalloc(arg3*sizeof(int));
   19685                 :     
   19686               1 :     if (arg4 == NULL || arg5 == NULL || arg6 == NULL || arg7 == NULL)
   19687                 :     {
   19688               0 :       PyErr_SetString( PyExc_RuntimeError, "Out of memory" );
   19689               0 :       SWIG_fail;
   19690                 :     }
   19691                 :     
   19692               1 :     if (!DecomposeSequenceOfCoordinates(obj2,arg3,arg4,arg5,arg6)) {
   19693                 :       SWIG_fail;
   19694                 :     }
   19695                 :   }
   19696                 :   {
   19697               1 :     if ( bUseExceptions ) {
   19698               0 :       CPLErrorReset();
   19699                 :     }
   19700               1 :     result = (int)GDALTransformerInfoShadow_TransformPoints(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
   19701               1 :     if ( bUseExceptions ) {
   19702               0 :       CPLErr eclass = CPLGetLastErrorType();
   19703               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19704               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19705                 :       }
   19706                 :     }
   19707                 :   }
   19708               1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19709                 :   {
   19710                 :     /* %typemap(argout)  (int nCount, double *x, double *y, double *z, int* panSuccess) */
   19711               1 :     Py_DECREF(resultobj);
   19712               1 :     PyObject *xyz = PyList_New( arg3 );
   19713               1 :     PyObject *success = PyList_New( arg3 );
   19714               2 :     for( int i=0; i< arg3; i++ ) {
   19715               1 :       PyObject *tuple = PyTuple_New( 3 );
   19716               1 :       PyTuple_SetItem( tuple, 0, PyFloat_FromDouble( (arg4)[i] ) );
   19717               1 :       PyTuple_SetItem( tuple, 1, PyFloat_FromDouble( (arg5)[i] ) );
   19718               1 :       PyTuple_SetItem( tuple, 2, PyFloat_FromDouble( (arg6)[i] ) );
   19719               1 :       PyList_SetItem( xyz, i, tuple );
   19720               1 :       PyList_SetItem( success, i, Py_BuildValue( "i",  (arg7)[i]) );
   19721                 :     }
   19722               1 :     resultobj = PyTuple_New( 2 );
   19723               1 :     PyTuple_SetItem( resultobj, 0, xyz );
   19724               1 :     PyTuple_SetItem( resultobj, 1, success );
   19725                 :   }
   19726                 :   {
   19727                 :     /* %typemap(freearg)  (int nCount, double *x, double *y, double *z, int* panSuccess) */
   19728               1 :     VSIFree(arg4);
   19729               1 :     VSIFree(arg5);
   19730               1 :     VSIFree(arg6);
   19731               1 :     VSIFree(arg7);
   19732                 :   }
   19733               1 :   return resultobj;
   19734                 : fail:
   19735                 :   {
   19736                 :     /* %typemap(freearg)  (int nCount, double *x, double *y, double *z, int* panSuccess) */
   19737               0 :     VSIFree(arg4);
   19738               0 :     VSIFree(arg5);
   19739               0 :     VSIFree(arg6);
   19740               0 :     VSIFree(arg7);
   19741                 :   }
   19742               0 :   return NULL;
   19743                 : }
   19744                 : 
   19745                 : 
   19746               6 : SWIGINTERN PyObject *Transformer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19747                 :   PyObject *obj;
   19748               6 :   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   19749               6 :   SWIG_TypeNewClientData(SWIGTYPE_p_GDALTransformerInfoShadow, SWIG_NewClientData(obj));
   19750               6 :   return SWIG_Py_Void();
   19751                 : }
   19752                 : 
   19753               1 : SWIGINTERN PyObject *_wrap_ApplyGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19754               1 :   PyObject *resultobj = 0;
   19755                 :   double *arg1 ;
   19756                 :   double arg2 ;
   19757                 :   double arg3 ;
   19758               1 :   double *arg4 = (double *) 0 ;
   19759               1 :   double *arg5 = (double *) 0 ;
   19760                 :   double argin1[6] ;
   19761                 :   double val2 ;
   19762               1 :   int ecode2 = 0 ;
   19763                 :   double val3 ;
   19764               1 :   int ecode3 = 0 ;
   19765                 :   double temp4 ;
   19766               1 :   int res4 = SWIG_TMPOBJ ;
   19767                 :   double temp5 ;
   19768               1 :   int res5 = SWIG_TMPOBJ ;
   19769               1 :   PyObject * obj0 = 0 ;
   19770               1 :   PyObject * obj1 = 0 ;
   19771               1 :   PyObject * obj2 = 0 ;
   19772                 :   
   19773               1 :   arg4 = &temp4;
   19774               1 :   arg5 = &temp5;
   19775               1 :   if (!PyArg_ParseTuple(args,(char *)"OOO:ApplyGeoTransform",&obj0,&obj1,&obj2)) SWIG_fail;
   19776                 :   {
   19777                 :     /* %typemap(in) (double argin1[ANY]) */
   19778               1 :     arg1 = argin1;
   19779               1 :     if (! PySequence_Check(obj0) ) {
   19780               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19781               0 :       SWIG_fail;
   19782                 :     }
   19783               1 :     int seq_size = PySequence_Size(obj0);
   19784               1 :     if ( seq_size != 6 ) {
   19785               0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   19786               0 :       SWIG_fail;
   19787                 :     }
   19788               7 :     for (unsigned int i=0; i<6; i++) {
   19789               6 :       PyObject *o = PySequence_GetItem(obj0,i);
   19790                 :       double val;
   19791               6 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   19792               0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   19793               0 :         Py_DECREF(o);
   19794                 :         SWIG_fail;
   19795                 :       }
   19796               6 :       arg1[i] =  val;
   19797               6 :       Py_DECREF(o);
   19798                 :     }
   19799                 :   }
   19800               1 :   ecode2 = SWIG_AsVal_double(obj1, &val2);
   19801               1 :   if (!SWIG_IsOK(ecode2)) {
   19802               0 :     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ApplyGeoTransform" "', argument " "2"" of type '" "double""'");
   19803                 :   } 
   19804               1 :   arg2 = static_cast< double >(val2);
   19805               1 :   ecode3 = SWIG_AsVal_double(obj2, &val3);
   19806               1 :   if (!SWIG_IsOK(ecode3)) {
   19807               0 :     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ApplyGeoTransform" "', argument " "3"" of type '" "double""'");
   19808                 :   } 
   19809               1 :   arg3 = static_cast< double >(val3);
   19810                 :   {
   19811               1 :     if ( bUseExceptions ) {
   19812               0 :       CPLErrorReset();
   19813                 :     }
   19814               1 :     GDALApplyGeoTransform(arg1,arg2,arg3,arg4,arg5);
   19815               1 :     if ( bUseExceptions ) {
   19816               0 :       CPLErr eclass = CPLGetLastErrorType();
   19817               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19818               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19819                 :       }
   19820                 :     }
   19821                 :   }
   19822               1 :   resultobj = SWIG_Py_Void();
   19823               2 :   if (SWIG_IsTmpObj(res4)) {
   19824               1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
   19825                 :   } else {
   19826               0 :     int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   19827               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
   19828                 :   }
   19829               2 :   if (SWIG_IsTmpObj(res5)) {
   19830               1 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
   19831                 :   } else {
   19832               0 :     int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
   19833               0 :     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
   19834                 :   }
   19835               1 :   return resultobj;
   19836                 : fail:
   19837               0 :   return NULL;
   19838                 : }
   19839                 : 
   19840                 : 
   19841               1 : SWIGINTERN PyObject *_wrap_InvGeoTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19842               1 :   PyObject *resultobj = 0;
   19843                 :   double *arg1 ;
   19844                 :   double *arg2 ;
   19845                 :   double argin1[6] ;
   19846                 :   double argout2[6] ;
   19847               1 :   PyObject * obj0 = 0 ;
   19848                 :   int result;
   19849                 :   
   19850                 :   {
   19851                 :     /* %typemap(in,numinputs=0) (double argout2[ANY]) */
   19852               1 :     arg2 = argout2;
   19853                 :   }
   19854               1 :   if (!PyArg_ParseTuple(args,(char *)"O:InvGeoTransform",&obj0)) SWIG_fail;
   19855                 :   {
   19856                 :     /* %typemap(in) (double argin1[ANY]) */
   19857               1 :     arg1 = argin1;
   19858               1 :     if (! PySequence_Check(obj0) ) {
   19859               0 :       PyErr_SetString(PyExc_TypeError, "not a sequence");
   19860               0 :       SWIG_fail;
   19861                 :     }
   19862               1 :     int seq_size = PySequence_Size(obj0);
   19863               1 :     if ( seq_size != 6 ) {
   19864               0 :       PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
   19865               0 :       SWIG_fail;
   19866                 :     }
   19867               7 :     for (unsigned int i=0; i<6; i++) {
   19868               6 :       PyObject *o = PySequence_GetItem(obj0,i);
   19869                 :       double val;
   19870               6 :       if ( !PyArg_Parse(o, "d", &val ) ) {
   19871               0 :         PyErr_SetString(PyExc_TypeError, "not a number");
   19872               0 :         Py_DECREF(o);
   19873                 :         SWIG_fail;
   19874                 :       }
   19875               6 :       arg1[i] =  val;
   19876               6 :       Py_DECREF(o);
   19877                 :     }
   19878                 :   }
   19879                 :   {
   19880               1 :     if ( bUseExceptions ) {
   19881               0 :       CPLErrorReset();
   19882                 :     }
   19883               1 :     result = (int)GDALInvGeoTransform(arg1,arg2);
   19884               1 :     if ( bUseExceptions ) {
   19885               0 :       CPLErr eclass = CPLGetLastErrorType();
   19886               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19887               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19888                 :       }
   19889                 :     }
   19890                 :   }
   19891               1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   19892                 :   {
   19893                 :     /* %typemap(argout) (double argout[ANY]) */
   19894               1 :     PyObject *out = CreateTupleFromDoubleArray( arg2, 6 );
   19895               1 :     resultobj = t_output_helper(resultobj,out);
   19896                 :   }
   19897               1 :   return resultobj;
   19898                 : fail:
   19899               0 :   return NULL;
   19900                 : }
   19901                 : 
   19902                 : 
   19903            1940 : SWIGINTERN PyObject *_wrap_VersionInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19904            1940 :   PyObject *resultobj = 0;
   19905            1940 :   char *arg1 = (char *) "VERSION_NUM" ;
   19906                 :   int res1 ;
   19907            1940 :   char *buf1 = 0 ;
   19908            1940 :   int alloc1 = 0 ;
   19909            1940 :   PyObject * obj0 = 0 ;
   19910            1940 :   char *result = 0 ;
   19911                 :   
   19912            1940 :   if (!PyArg_ParseTuple(args,(char *)"|O:VersionInfo",&obj0)) SWIG_fail;
   19913            1940 :   if (obj0) {
   19914            1940 :     res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
   19915            1940 :     if (!SWIG_IsOK(res1)) {
   19916               0 :       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VersionInfo" "', argument " "1"" of type '" "char const *""'");
   19917                 :     }
   19918            1940 :     arg1 = reinterpret_cast< char * >(buf1);
   19919                 :   }
   19920                 :   {
   19921            1940 :     if ( bUseExceptions ) {
   19922               0 :       CPLErrorReset();
   19923                 :     }
   19924            1940 :     result = (char *)GDALVersionInfo((char const *)arg1);
   19925            1940 :     if ( bUseExceptions ) {
   19926               0 :       CPLErr eclass = CPLGetLastErrorType();
   19927               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19928               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19929                 :       }
   19930                 :     }
   19931                 :   }
   19932            1940 :   resultobj = SWIG_FromCharPtr((const char *)result);
   19933            1940 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   19934            1940 :   return resultobj;
   19935                 : fail:
   19936               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   19937               0 :   return NULL;
   19938                 : }
   19939                 : 
   19940                 : 
   19941              20 : SWIGINTERN PyObject *_wrap_AllRegister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19942              20 :   PyObject *resultobj = 0;
   19943                 :   
   19944              20 :   if (!PyArg_ParseTuple(args,(char *)":AllRegister")) SWIG_fail;
   19945                 :   {
   19946              20 :     if ( bUseExceptions ) {
   19947               0 :       CPLErrorReset();
   19948                 :     }
   19949              20 :     GDALAllRegister();
   19950              20 :     if ( bUseExceptions ) {
   19951               0 :       CPLErr eclass = CPLGetLastErrorType();
   19952               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19953               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19954                 :       }
   19955                 :     }
   19956                 :   }
   19957              20 :   resultobj = SWIG_Py_Void();
   19958              20 :   return resultobj;
   19959                 : fail:
   19960               0 :   return NULL;
   19961                 : }
   19962                 : 
   19963                 : 
   19964               0 : SWIGINTERN PyObject *_wrap_GDALDestroyDriverManager(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19965               0 :   PyObject *resultobj = 0;
   19966                 :   
   19967               0 :   if (!PyArg_ParseTuple(args,(char *)":GDALDestroyDriverManager")) SWIG_fail;
   19968                 :   {
   19969               0 :     if ( bUseExceptions ) {
   19970               0 :       CPLErrorReset();
   19971                 :     }
   19972               0 :     GDALDestroyDriverManager();
   19973               0 :     if ( bUseExceptions ) {
   19974               0 :       CPLErr eclass = CPLGetLastErrorType();
   19975               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   19976               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   19977                 :       }
   19978                 :     }
   19979                 :   }
   19980               0 :   resultobj = SWIG_Py_Void();
   19981               0 :   return resultobj;
   19982                 : fail:
   19983               0 :   return NULL;
   19984                 : }
   19985                 : 
   19986                 : 
   19987              10 : SWIGINTERN PyObject *_wrap_GetCacheMax(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   19988              10 :   PyObject *resultobj = 0;
   19989                 :   GIntBig result;
   19990                 :   
   19991              10 :   if (!PyArg_ParseTuple(args,(char *)":GetCacheMax")) SWIG_fail;
   19992                 :   {
   19993              10 :     if ( bUseExceptions ) {
   19994               1 :       CPLErrorReset();
   19995                 :     }
   19996              10 :     result = wrapper_GDALGetCacheMax();
   19997              10 :     if ( bUseExceptions ) {
   19998               1 :       CPLErr eclass = CPLGetLastErrorType();
   19999               1 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20000               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20001                 :       }
   20002                 :     }
   20003                 :   }
   20004                 :   {
   20005                 :     char szTmp[32];
   20006                 :     sprintf(szTmp, CPL_FRMT_GIB, result);
   20007                 : #if PY_VERSION_HEX>=0x03000000
   20008                 :     resultobj = PyLong_FromString(szTmp, NULL, 10);
   20009                 : #else
   20010              10 :     resultobj = PyInt_FromString(szTmp, NULL, 10);
   20011                 : #endif
   20012                 :   }
   20013              10 :   return resultobj;
   20014                 : fail:
   20015               0 :   return NULL;
   20016                 : }
   20017                 : 
   20018                 : 
   20019               2 : SWIGINTERN PyObject *_wrap_GetCacheUsed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20020               2 :   PyObject *resultobj = 0;
   20021                 :   GIntBig result;
   20022                 :   
   20023               2 :   if (!PyArg_ParseTuple(args,(char *)":GetCacheUsed")) SWIG_fail;
   20024                 :   {
   20025               2 :     if ( bUseExceptions ) {
   20026               0 :       CPLErrorReset();
   20027                 :     }
   20028               2 :     result = wrapper_GDALGetCacheUsed();
   20029               2 :     if ( bUseExceptions ) {
   20030               0 :       CPLErr eclass = CPLGetLastErrorType();
   20031               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20032               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20033                 :       }
   20034                 :     }
   20035                 :   }
   20036                 :   {
   20037                 :     char szTmp[32];
   20038                 :     sprintf(szTmp, CPL_FRMT_GIB, result);
   20039                 : #if PY_VERSION_HEX>=0x03000000
   20040                 :     resultobj = PyLong_FromString(szTmp, NULL, 10);
   20041                 : #else
   20042               2 :     resultobj = PyInt_FromString(szTmp, NULL, 10);
   20043                 : #endif
   20044                 :   }
   20045               2 :   return resultobj;
   20046                 : fail:
   20047               0 :   return NULL;
   20048                 : }
   20049                 : 
   20050                 : 
   20051              12 : SWIGINTERN PyObject *_wrap_SetCacheMax(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20052              12 :   PyObject *resultobj = 0;
   20053                 :   GIntBig arg1 ;
   20054              12 :   PyObject * obj0 = 0 ;
   20055                 :   
   20056              12 :   if (!PyArg_ParseTuple(args,(char *)"O:SetCacheMax",&obj0)) SWIG_fail;
   20057                 :   {
   20058                 :     PY_LONG_LONG val;
   20059              12 :     if ( !PyArg_Parse(obj0,"L",&val) ) {
   20060               0 :       PyErr_SetString(PyExc_TypeError, "not an integer");
   20061               0 :       SWIG_fail;
   20062                 :     }
   20063              12 :     arg1 = (GIntBig)val;
   20064                 :   }
   20065                 :   {
   20066              12 :     if ( bUseExceptions ) {
   20067               0 :       CPLErrorReset();
   20068                 :     }
   20069              12 :     wrapper_GDALSetCacheMax(arg1);
   20070              12 :     if ( bUseExceptions ) {
   20071               0 :       CPLErr eclass = CPLGetLastErrorType();
   20072               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20073               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20074                 :       }
   20075                 :     }
   20076                 :   }
   20077              12 :   resultobj = SWIG_Py_Void();
   20078              12 :   return resultobj;
   20079                 : fail:
   20080               0 :   return NULL;
   20081                 : }
   20082                 : 
   20083                 : 
   20084               1 : SWIGINTERN PyObject *_wrap_GetDataTypeSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20085               1 :   PyObject *resultobj = 0;
   20086                 :   GDALDataType arg1 ;
   20087                 :   int val1 ;
   20088               1 :   int ecode1 = 0 ;
   20089               1 :   PyObject * obj0 = 0 ;
   20090                 :   int result;
   20091                 :   
   20092               1 :   if (!PyArg_ParseTuple(args,(char *)"O:GetDataTypeSize",&obj0)) SWIG_fail;
   20093               1 :   ecode1 = SWIG_AsVal_int(obj0, &val1);
   20094               1 :   if (!SWIG_IsOK(ecode1)) {
   20095               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetDataTypeSize" "', argument " "1"" of type '" "GDALDataType""'");
   20096                 :   } 
   20097               1 :   arg1 = static_cast< GDALDataType >(val1);
   20098                 :   {
   20099               1 :     if ( bUseExceptions ) {
   20100               0 :       CPLErrorReset();
   20101                 :     }
   20102               1 :     result = (int)GDALGetDataTypeSize(arg1);
   20103               1 :     if ( bUseExceptions ) {
   20104               0 :       CPLErr eclass = CPLGetLastErrorType();
   20105               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20106               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20107                 :       }
   20108                 :     }
   20109                 :   }
   20110               1 :   resultobj = SWIG_From_int(static_cast< int >(result));
   20111               1 :   return resultobj;
   20112                 : fail:
   20113               0 :   return NULL;
   20114                 : }
   20115                 : 
   20116                 : 
   20117              22 : SWIGINTERN PyObject *_wrap_DataTypeIsComplex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20118              22 :   PyObject *resultobj = 0;
   20119                 :   GDALDataType arg1 ;
   20120                 :   int val1 ;
   20121              22 :   int ecode1 = 0 ;
   20122              22 :   PyObject * obj0 = 0 ;
   20123                 :   int result;
   20124                 :   
   20125              22 :   if (!PyArg_ParseTuple(args,(char *)"O:DataTypeIsComplex",&obj0)) SWIG_fail;
   20126              22 :   ecode1 = SWIG_AsVal_int(obj0, &val1);
   20127              22 :   if (!SWIG_IsOK(ecode1)) {
   20128               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "DataTypeIsComplex" "', argument " "1"" of type '" "GDALDataType""'");
   20129                 :   } 
   20130              22 :   arg1 = static_cast< GDALDataType >(val1);
   20131                 :   {
   20132              22 :     if ( bUseExceptions ) {
   20133               0 :       CPLErrorReset();
   20134                 :     }
   20135              22 :     result = (int)GDALDataTypeIsComplex(arg1);
   20136              22 :     if ( bUseExceptions ) {
   20137               0 :       CPLErr eclass = CPLGetLastErrorType();
   20138               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20139               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20140                 :       }
   20141                 :     }
   20142                 :   }
   20143              22 :   resultobj = SWIG_From_int(static_cast< int >(result));
   20144              22 :   return resultobj;
   20145                 : fail:
   20146               0 :   return NULL;
   20147                 : }
   20148                 : 
   20149                 : 
   20150            4576 : SWIGINTERN PyObject *_wrap_GetDataTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20151            4576 :   PyObject *resultobj = 0;
   20152                 :   GDALDataType arg1 ;
   20153                 :   int val1 ;
   20154            4576 :   int ecode1 = 0 ;
   20155            4576 :   PyObject * obj0 = 0 ;
   20156            4576 :   char *result = 0 ;
   20157                 :   
   20158            4576 :   if (!PyArg_ParseTuple(args,(char *)"O:GetDataTypeName",&obj0)) SWIG_fail;
   20159            4576 :   ecode1 = SWIG_AsVal_int(obj0, &val1);
   20160            4576 :   if (!SWIG_IsOK(ecode1)) {
   20161               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetDataTypeName" "', argument " "1"" of type '" "GDALDataType""'");
   20162                 :   } 
   20163            4576 :   arg1 = static_cast< GDALDataType >(val1);
   20164                 :   {
   20165            4576 :     if ( bUseExceptions ) {
   20166               0 :       CPLErrorReset();
   20167                 :     }
   20168            4576 :     result = (char *)GDALGetDataTypeName(arg1);
   20169            4576 :     if ( bUseExceptions ) {
   20170               0 :       CPLErr eclass = CPLGetLastErrorType();
   20171               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20172               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20173                 :       }
   20174                 :     }
   20175                 :   }
   20176            4576 :   resultobj = SWIG_FromCharPtr((const char *)result);
   20177            4576 :   return resultobj;
   20178                 : fail:
   20179               0 :   return NULL;
   20180                 : }
   20181                 : 
   20182                 : 
   20183               1 : SWIGINTERN PyObject *_wrap_GetDataTypeByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20184               1 :   PyObject *resultobj = 0;
   20185               1 :   char *arg1 = (char *) 0 ;
   20186                 :   int res1 ;
   20187               1 :   char *buf1 = 0 ;
   20188               1 :   int alloc1 = 0 ;
   20189               1 :   PyObject * obj0 = 0 ;
   20190                 :   GDALDataType result;
   20191                 :   
   20192               1 :   if (!PyArg_ParseTuple(args,(char *)"O:GetDataTypeByName",&obj0)) SWIG_fail;
   20193               1 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
   20194               1 :   if (!SWIG_IsOK(res1)) {
   20195               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetDataTypeByName" "', argument " "1"" of type '" "char const *""'");
   20196                 :   }
   20197               1 :   arg1 = reinterpret_cast< char * >(buf1);
   20198                 :   {
   20199               1 :     if ( bUseExceptions ) {
   20200               0 :       CPLErrorReset();
   20201                 :     }
   20202               1 :     result = (GDALDataType)GDALGetDataTypeByName((char const *)arg1);
   20203               1 :     if ( bUseExceptions ) {
   20204               0 :       CPLErr eclass = CPLGetLastErrorType();
   20205               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20206               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20207                 :       }
   20208                 :     }
   20209                 :   }
   20210               2 :   resultobj = SWIG_From_int(static_cast< int >(result));
   20211               1 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   20212               1 :   return resultobj;
   20213                 : fail:
   20214               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   20215               0 :   return NULL;
   20216                 : }
   20217                 : 
   20218                 : 
   20219              17 : SWIGINTERN PyObject *_wrap_GetColorInterpretationName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20220              17 :   PyObject *resultobj = 0;
   20221                 :   GDALColorInterp arg1 ;
   20222                 :   int val1 ;
   20223              17 :   int ecode1 = 0 ;
   20224              17 :   PyObject * obj0 = 0 ;
   20225              17 :   char *result = 0 ;
   20226                 :   
   20227              17 :   if (!PyArg_ParseTuple(args,(char *)"O:GetColorInterpretationName",&obj0)) SWIG_fail;
   20228              17 :   ecode1 = SWIG_AsVal_int(obj0, &val1);
   20229              17 :   if (!SWIG_IsOK(ecode1)) {
   20230               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetColorInterpretationName" "', argument " "1"" of type '" "GDALColorInterp""'");
   20231                 :   } 
   20232              17 :   arg1 = static_cast< GDALColorInterp >(val1);
   20233                 :   {
   20234              17 :     if ( bUseExceptions ) {
   20235               0 :       CPLErrorReset();
   20236                 :     }
   20237              17 :     result = (char *)GDALGetColorInterpretationName(arg1);
   20238              17 :     if ( bUseExceptions ) {
   20239               0 :       CPLErr eclass = CPLGetLastErrorType();
   20240               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20241               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20242                 :       }
   20243                 :     }
   20244                 :   }
   20245              17 :   resultobj = SWIG_FromCharPtr((const char *)result);
   20246              17 :   return resultobj;
   20247                 : fail:
   20248               0 :   return NULL;
   20249                 : }
   20250                 : 
   20251                 : 
   20252               2 : SWIGINTERN PyObject *_wrap_GetPaletteInterpretationName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20253               2 :   PyObject *resultobj = 0;
   20254                 :   GDALPaletteInterp arg1 ;
   20255                 :   int val1 ;
   20256               2 :   int ecode1 = 0 ;
   20257               2 :   PyObject * obj0 = 0 ;
   20258               2 :   char *result = 0 ;
   20259                 :   
   20260               2 :   if (!PyArg_ParseTuple(args,(char *)"O:GetPaletteInterpretationName",&obj0)) SWIG_fail;
   20261               2 :   ecode1 = SWIG_AsVal_int(obj0, &val1);
   20262               2 :   if (!SWIG_IsOK(ecode1)) {
   20263               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetPaletteInterpretationName" "', argument " "1"" of type '" "GDALPaletteInterp""'");
   20264                 :   } 
   20265               2 :   arg1 = static_cast< GDALPaletteInterp >(val1);
   20266                 :   {
   20267               2 :     if ( bUseExceptions ) {
   20268               0 :       CPLErrorReset();
   20269                 :     }
   20270               2 :     result = (char *)GDALGetPaletteInterpretationName(arg1);
   20271               2 :     if ( bUseExceptions ) {
   20272               0 :       CPLErr eclass = CPLGetLastErrorType();
   20273               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20274               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20275                 :       }
   20276                 :     }
   20277                 :   }
   20278               2 :   resultobj = SWIG_FromCharPtr((const char *)result);
   20279               2 :   return resultobj;
   20280                 : fail:
   20281               0 :   return NULL;
   20282                 : }
   20283                 : 
   20284                 : 
   20285             130 : SWIGINTERN PyObject *_wrap_DecToDMS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20286             130 :   PyObject *resultobj = 0;
   20287                 :   double arg1 ;
   20288             130 :   char *arg2 = (char *) 0 ;
   20289             130 :   int arg3 = (int) 2 ;
   20290                 :   double val1 ;
   20291             130 :   int ecode1 = 0 ;
   20292                 :   int res2 ;
   20293             130 :   char *buf2 = 0 ;
   20294             130 :   int alloc2 = 0 ;
   20295                 :   int val3 ;
   20296             130 :   int ecode3 = 0 ;
   20297             130 :   PyObject * obj0 = 0 ;
   20298             130 :   PyObject * obj1 = 0 ;
   20299             130 :   PyObject * obj2 = 0 ;
   20300             130 :   char *result = 0 ;
   20301                 :   
   20302             130 :   if (!PyArg_ParseTuple(args,(char *)"OO|O:DecToDMS",&obj0,&obj1,&obj2)) SWIG_fail;
   20303             130 :   ecode1 = SWIG_AsVal_double(obj0, &val1);
   20304             130 :   if (!SWIG_IsOK(ecode1)) {
   20305               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "DecToDMS" "', argument " "1"" of type '" "double""'");
   20306                 :   } 
   20307             130 :   arg1 = static_cast< double >(val1);
   20308             130 :   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   20309             130 :   if (!SWIG_IsOK(res2)) {
   20310               0 :     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DecToDMS" "', argument " "2"" of type '" "char const *""'");
   20311                 :   }
   20312             130 :   arg2 = reinterpret_cast< char * >(buf2);
   20313             130 :   if (obj2) {
   20314             130 :     ecode3 = SWIG_AsVal_int(obj2, &val3);
   20315             130 :     if (!SWIG_IsOK(ecode3)) {
   20316               0 :       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DecToDMS" "', argument " "3"" of type '" "int""'");
   20317                 :     } 
   20318             130 :     arg3 = static_cast< int >(val3);
   20319                 :   }
   20320                 :   {
   20321             130 :     if ( bUseExceptions ) {
   20322               0 :       CPLErrorReset();
   20323                 :     }
   20324             130 :     result = (char *)GDALDecToDMS(arg1,(char const *)arg2,arg3);
   20325             130 :     if ( bUseExceptions ) {
   20326               0 :       CPLErr eclass = CPLGetLastErrorType();
   20327               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20328               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20329                 :       }
   20330                 :     }
   20331                 :   }
   20332             130 :   resultobj = SWIG_FromCharPtr((const char *)result);
   20333             130 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   20334             130 :   return resultobj;
   20335                 : fail:
   20336               0 :   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   20337               0 :   return NULL;
   20338                 : }
   20339                 : 
   20340                 : 
   20341               4 : SWIGINTERN PyObject *_wrap_PackedDMSToDec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20342               4 :   PyObject *resultobj = 0;
   20343                 :   double arg1 ;
   20344                 :   double val1 ;
   20345               4 :   int ecode1 = 0 ;
   20346               4 :   PyObject * obj0 = 0 ;
   20347                 :   double result;
   20348                 :   
   20349               4 :   if (!PyArg_ParseTuple(args,(char *)"O:PackedDMSToDec",&obj0)) SWIG_fail;
   20350               4 :   ecode1 = SWIG_AsVal_double(obj0, &val1);
   20351               4 :   if (!SWIG_IsOK(ecode1)) {
   20352               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "PackedDMSToDec" "', argument " "1"" of type '" "double""'");
   20353                 :   } 
   20354               4 :   arg1 = static_cast< double >(val1);
   20355                 :   {
   20356               4 :     if ( bUseExceptions ) {
   20357               0 :       CPLErrorReset();
   20358                 :     }
   20359               4 :     result = (double)GDALPackedDMSToDec(arg1);
   20360               4 :     if ( bUseExceptions ) {
   20361               0 :       CPLErr eclass = CPLGetLastErrorType();
   20362               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20363               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20364                 :       }
   20365                 :     }
   20366                 :   }
   20367               4 :   resultobj = SWIG_From_double(static_cast< double >(result));
   20368               4 :   return resultobj;
   20369                 : fail:
   20370               0 :   return NULL;
   20371                 : }
   20372                 : 
   20373                 : 
   20374               4 : SWIGINTERN PyObject *_wrap_DecToPackedDMS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20375               4 :   PyObject *resultobj = 0;
   20376                 :   double arg1 ;
   20377                 :   double val1 ;
   20378               4 :   int ecode1 = 0 ;
   20379               4 :   PyObject * obj0 = 0 ;
   20380                 :   double result;
   20381                 :   
   20382               4 :   if (!PyArg_ParseTuple(args,(char *)"O:DecToPackedDMS",&obj0)) SWIG_fail;
   20383               4 :   ecode1 = SWIG_AsVal_double(obj0, &val1);
   20384               4 :   if (!SWIG_IsOK(ecode1)) {
   20385               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "DecToPackedDMS" "', argument " "1"" of type '" "double""'");
   20386                 :   } 
   20387               4 :   arg1 = static_cast< double >(val1);
   20388                 :   {
   20389               4 :     if ( bUseExceptions ) {
   20390               0 :       CPLErrorReset();
   20391                 :     }
   20392               4 :     result = (double)GDALDecToPackedDMS(arg1);
   20393               4 :     if ( bUseExceptions ) {
   20394               0 :       CPLErr eclass = CPLGetLastErrorType();
   20395               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20396               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20397                 :       }
   20398                 :     }
   20399                 :   }
   20400               4 :   resultobj = SWIG_From_double(static_cast< double >(result));
   20401               4 :   return resultobj;
   20402                 : fail:
   20403               0 :   return NULL;
   20404                 : }
   20405                 : 
   20406                 : 
   20407               6 : SWIGINTERN PyObject *_wrap_ParseXMLString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20408               6 :   PyObject *resultobj = 0;
   20409               6 :   char *arg1 = (char *) 0 ;
   20410                 :   int res1 ;
   20411               6 :   char *buf1 = 0 ;
   20412               6 :   int alloc1 = 0 ;
   20413               6 :   PyObject * obj0 = 0 ;
   20414               6 :   CPLXMLNode *result = 0 ;
   20415                 :   
   20416               6 :   if (!PyArg_ParseTuple(args,(char *)"O:ParseXMLString",&obj0)) SWIG_fail;
   20417               6 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
   20418               6 :   if (!SWIG_IsOK(res1)) {
   20419               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParseXMLString" "', argument " "1"" of type '" "char *""'");
   20420                 :   }
   20421               6 :   arg1 = reinterpret_cast< char * >(buf1);
   20422                 :   {
   20423               6 :     if ( bUseExceptions ) {
   20424               0 :       CPLErrorReset();
   20425                 :     }
   20426               6 :     result = (CPLXMLNode *)CPLParseXMLString(arg1);
   20427               6 :     if ( bUseExceptions ) {
   20428               0 :       CPLErr eclass = CPLGetLastErrorType();
   20429               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20430               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20431                 :       }
   20432                 :     }
   20433                 :   }
   20434                 :   {
   20435                 :     /* %typemap(out) (CPLXMLNode*) */
   20436                 :     
   20437               6 :     CPLXMLNode *psXMLTree = result;
   20438               6 :     int         bFakeRoot = FALSE;
   20439                 :     
   20440               6 :     if( psXMLTree != NULL && psXMLTree->psNext != NULL )
   20441                 :     {
   20442               2 :       CPLXMLNode *psFirst = psXMLTree;
   20443                 :       
   20444                 :       /* create a "pseudo" root if we have multiple elements */
   20445               2 :       psXMLTree = CPLCreateXMLNode( NULL, CXT_Element, "" );
   20446               2 :       psXMLTree->psChild = psFirst;
   20447               2 :       bFakeRoot = TRUE;
   20448                 :     }
   20449                 :     
   20450               6 :     resultobj = XMLTreeToPyList( psXMLTree );
   20451                 :     
   20452               6 :     if( bFakeRoot )
   20453                 :     {
   20454               2 :       psXMLTree->psChild = NULL;
   20455               2 :       CPLDestroyXMLNode( psXMLTree );
   20456                 :     }
   20457                 :   }
   20458               6 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   20459                 :   {
   20460                 :     /* %typemap(ret) (CPLXMLNode*) */
   20461               6 :     if ( result ) CPLDestroyXMLNode( result );
   20462                 :   }
   20463               6 :   return resultobj;
   20464                 : fail:
   20465               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   20466               0 :   return NULL;
   20467                 : }
   20468                 : 
   20469                 : 
   20470               2 : SWIGINTERN PyObject *_wrap_SerializeXMLTree(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20471               2 :   PyObject *resultobj = 0;
   20472               2 :   CPLXMLNode *arg1 = (CPLXMLNode *) 0 ;
   20473               2 :   PyObject * obj0 = 0 ;
   20474               2 :   retStringAndCPLFree *result = 0 ;
   20475                 :   
   20476               2 :   if (!PyArg_ParseTuple(args,(char *)"O:SerializeXMLTree",&obj0)) SWIG_fail;
   20477                 :   {
   20478                 :     /* %typemap(python,in) (CPLXMLNode* xmlnode ) */
   20479               2 :     arg1 = PyListToXMLTree( obj0 );
   20480               2 :     if ( !arg1 ) SWIG_fail;
   20481                 :   }
   20482                 :   {
   20483               2 :     if ( bUseExceptions ) {
   20484               0 :       CPLErrorReset();
   20485                 :     }
   20486               2 :     result = (retStringAndCPLFree *)CPLSerializeXMLTree(arg1);
   20487               2 :     if ( bUseExceptions ) {
   20488               0 :       CPLErr eclass = CPLGetLastErrorType();
   20489               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20490               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20491                 :       }
   20492                 :     }
   20493                 :   }
   20494                 :   {
   20495                 :     /* %typemap(out) (retStringAndCPLFree*) */
   20496               2 :     if(result)
   20497                 :     {
   20498               2 :       resultobj = GDALPythonObjectFromCStr( (const char *)result);
   20499               2 :       CPLFree(result);
   20500                 :     }
   20501                 :   }
   20502                 :   {
   20503                 :     /* %typemap(freearg) (CPLXMLNode *xmlnode) */
   20504               2 :     if ( arg1 ) CPLDestroyXMLNode( arg1 );
   20505                 :   }
   20506               2 :   return resultobj;
   20507                 : fail:
   20508                 :   {
   20509                 :     /* %typemap(freearg) (CPLXMLNode *xmlnode) */
   20510               0 :     if ( arg1 ) CPLDestroyXMLNode( arg1 );
   20511                 :   }
   20512               0 :   return NULL;
   20513                 : }
   20514                 : 
   20515                 : 
   20516              18 : SWIGINTERN PyObject *_wrap_GetDriverCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20517              18 :   PyObject *resultobj = 0;
   20518                 :   int result;
   20519                 :   
   20520              18 :   if (!PyArg_ParseTuple(args,(char *)":GetDriverCount")) SWIG_fail;
   20521                 :   {
   20522              18 :     if ( bUseExceptions ) {
   20523               0 :       CPLErrorReset();
   20524                 :     }
   20525              18 :     result = (int)GetDriverCount();
   20526              18 :     if ( bUseExceptions ) {
   20527               0 :       CPLErr eclass = CPLGetLastErrorType();
   20528               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20529               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20530                 :       }
   20531                 :     }
   20532                 :   }
   20533              18 :   resultobj = SWIG_From_int(static_cast< int >(result));
   20534              18 :   return resultobj;
   20535                 : fail:
   20536               0 :   return NULL;
   20537                 : }
   20538                 : 
   20539                 : 
   20540            2070 : SWIGINTERN PyObject *_wrap_GetDriverByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20541            2070 :   PyObject *resultobj = 0;
   20542            2070 :   char *arg1 = (char *) 0 ;
   20543                 :   int res1 ;
   20544            2070 :   char *buf1 = 0 ;
   20545            2070 :   int alloc1 = 0 ;
   20546            2070 :   PyObject * obj0 = 0 ;
   20547            2070 :   GDALDriverShadow *result = 0 ;
   20548                 :   
   20549            2070 :   if (!PyArg_ParseTuple(args,(char *)"O:GetDriverByName",&obj0)) SWIG_fail;
   20550            2070 :   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
   20551            2070 :   if (!SWIG_IsOK(res1)) {
   20552               0 :     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetDriverByName" "', argument " "1"" of type '" "char const *""'");
   20553                 :   }
   20554            2070 :   arg1 = reinterpret_cast< char * >(buf1);
   20555                 :   {
   20556            2070 :     if (!arg1) {
   20557               0 :       SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
   20558                 :     }
   20559                 :   }
   20560                 :   {
   20561            2070 :     if ( bUseExceptions ) {
   20562               0 :       CPLErrorReset();
   20563                 :     }
   20564            2070 :     result = (GDALDriverShadow *)GetDriverByName((char const *)arg1);
   20565            2070 :     if ( bUseExceptions ) {
   20566               0 :       CPLErr eclass = CPLGetLastErrorType();
   20567               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20568               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20569                 :       }
   20570                 :     }
   20571                 :   }
   20572            2070 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   20573            2070 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   20574            2070 :   return resultobj;
   20575                 : fail:
   20576               0 :   if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
   20577               0 :   return NULL;
   20578                 : }
   20579                 : 
   20580                 : 
   20581            2286 : SWIGINTERN PyObject *_wrap_GetDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20582            2286 :   PyObject *resultobj = 0;
   20583                 :   int arg1 ;
   20584                 :   int val1 ;
   20585            2286 :   int ecode1 = 0 ;
   20586            2286 :   PyObject * obj0 = 0 ;
   20587            2286 :   GDALDriverShadow *result = 0 ;
   20588                 :   
   20589            2286 :   if (!PyArg_ParseTuple(args,(char *)"O:GetDriver",&obj0)) SWIG_fail;
   20590            2286 :   ecode1 = SWIG_AsVal_int(obj0, &val1);
   20591            2286 :   if (!SWIG_IsOK(ecode1)) {
   20592               0 :     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetDriver" "', argument " "1"" of type '" "int""'");
   20593                 :   } 
   20594            2286 :   arg1 = static_cast< int >(val1);
   20595                 :   {
   20596            2286 :     if ( bUseExceptions ) {
   20597               0 :       CPLErrorReset();
   20598                 :     }
   20599            2286 :     result = (GDALDriverShadow *)GetDriver(arg1);
   20600            2286 :     if ( bUseExceptions ) {
   20601               0 :       CPLErr eclass = CPLGetLastErrorType();
   20602               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20603               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20604                 :       }
   20605                 :     }
   20606                 :   }
   20607            2286 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   20608            2286 :   return resultobj;
   20609                 : fail:
   20610               0 :   return NULL;
   20611                 : }
   20612                 : 
   20613                 : 
   20614            4292 : SWIGINTERN PyObject *_wrap_Open(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20615            4292 :   PyObject *resultobj = 0;
   20616            4292 :   char *arg1 = (char *) 0 ;
   20617            4292 :   GDALAccess arg2 = (GDALAccess) GA_ReadOnly ;
   20618            4292 :   int bToFree1 = 0 ;
   20619                 :   int val2 ;
   20620            4292 :   int ecode2 = 0 ;
   20621            4292 :   PyObject * obj0 = 0 ;
   20622            4292 :   PyObject * obj1 = 0 ;
   20623            4292 :   GDALDatasetShadow *result = 0 ;
   20624                 :   
   20625            4292 :   if (!PyArg_ParseTuple(args,(char *)"O|O:Open",&obj0,&obj1)) SWIG_fail;
   20626                 :   {
   20627                 :     /* %typemap(in) (const char *utf8_path) */
   20628            4292 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   20629            4292 :     if (arg1 == NULL)
   20630                 :     {
   20631               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
   20632               0 :       SWIG_fail;
   20633                 :     }
   20634                 :   }
   20635            4292 :   if (obj1) {
   20636             477 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   20637             477 :     if (!SWIG_IsOK(ecode2)) {
   20638               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Open" "', argument " "2"" of type '" "GDALAccess""'");
   20639                 :     } 
   20640             477 :     arg2 = static_cast< GDALAccess >(val2);
   20641                 :   }
   20642                 :   {
   20643            4292 :     if ( bUseExceptions ) {
   20644               1 :       CPLErrorReset();
   20645                 :     }
   20646            4292 :     result = (GDALDatasetShadow *)Open((char const *)arg1,arg2);
   20647            4292 :     if ( bUseExceptions ) {
   20648               1 :       CPLErr eclass = CPLGetLastErrorType();
   20649               1 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20650               1 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20651                 :       }
   20652                 :     }
   20653                 :   }
   20654            4291 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   20655                 :   {
   20656                 :     /* %typemap(freearg) (const char *utf8_path) */
   20657            4291 :     GDALPythonFreeCStr(arg1, bToFree1);
   20658                 :   }
   20659            4291 :   return resultobj;
   20660                 : fail:
   20661                 :   {
   20662                 :     /* %typemap(freearg) (const char *utf8_path) */
   20663               1 :     GDALPythonFreeCStr(arg1, bToFree1);
   20664                 :   }
   20665               1 :   return NULL;
   20666                 : }
   20667                 : 
   20668                 : 
   20669            5004 : SWIGINTERN PyObject *_wrap_OpenShared(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20670            5004 :   PyObject *resultobj = 0;
   20671            5004 :   char *arg1 = (char *) 0 ;
   20672            5004 :   GDALAccess arg2 = (GDALAccess) GA_ReadOnly ;
   20673            5004 :   int bToFree1 = 0 ;
   20674                 :   int val2 ;
   20675            5004 :   int ecode2 = 0 ;
   20676            5004 :   PyObject * obj0 = 0 ;
   20677            5004 :   PyObject * obj1 = 0 ;
   20678            5004 :   GDALDatasetShadow *result = 0 ;
   20679                 :   
   20680            5004 :   if (!PyArg_ParseTuple(args,(char *)"O|O:OpenShared",&obj0,&obj1)) SWIG_fail;
   20681                 :   {
   20682                 :     /* %typemap(in) (const char *utf8_path) */
   20683            5004 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   20684            5004 :     if (arg1 == NULL)
   20685                 :     {
   20686               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
   20687               0 :       SWIG_fail;
   20688                 :     }
   20689                 :   }
   20690            5004 :   if (obj1) {
   20691               1 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   20692               1 :     if (!SWIG_IsOK(ecode2)) {
   20693               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OpenShared" "', argument " "2"" of type '" "GDALAccess""'");
   20694                 :     } 
   20695               1 :     arg2 = static_cast< GDALAccess >(val2);
   20696                 :   }
   20697                 :   {
   20698            5004 :     if ( bUseExceptions ) {
   20699               0 :       CPLErrorReset();
   20700                 :     }
   20701            5004 :     result = (GDALDatasetShadow *)OpenShared((char const *)arg1,arg2);
   20702            5004 :     if ( bUseExceptions ) {
   20703               0 :       CPLErr eclass = CPLGetLastErrorType();
   20704               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20705               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20706                 :       }
   20707                 :     }
   20708                 :   }
   20709            5004 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
   20710                 :   {
   20711                 :     /* %typemap(freearg) (const char *utf8_path) */
   20712            5004 :     GDALPythonFreeCStr(arg1, bToFree1);
   20713                 :   }
   20714            5004 :   return resultobj;
   20715                 : fail:
   20716                 :   {
   20717                 :     /* %typemap(freearg) (const char *utf8_path) */
   20718               0 :     GDALPythonFreeCStr(arg1, bToFree1);
   20719                 :   }
   20720               0 :   return NULL;
   20721                 : }
   20722                 : 
   20723                 : 
   20724               6 : SWIGINTERN PyObject *_wrap_IdentifyDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20725               6 :   PyObject *resultobj = 0;
   20726               6 :   char *arg1 = (char *) 0 ;
   20727               6 :   char **arg2 = (char **) NULL ;
   20728               6 :   int bToFree1 = 0 ;
   20729               6 :   PyObject * obj0 = 0 ;
   20730               6 :   PyObject * obj1 = 0 ;
   20731               6 :   GDALDriverShadow *result = 0 ;
   20732                 :   
   20733               6 :   if (!PyArg_ParseTuple(args,(char *)"O|O:IdentifyDriver",&obj0,&obj1)) SWIG_fail;
   20734                 :   {
   20735                 :     /* %typemap(in) (const char *utf8_path) */
   20736               6 :     arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
   20737               6 :     if (arg1 == NULL)
   20738                 :     {
   20739               0 :       PyErr_SetString( PyExc_RuntimeError, "not a string" );
   20740               0 :       SWIG_fail;
   20741                 :     }
   20742                 :   }
   20743               6 :   if (obj1) {
   20744                 :     {
   20745                 :       /* %typemap(in) char **options */
   20746                 :       /* Check if is a list */
   20747               2 :       if ( ! PySequence_Check(obj1)) {
   20748               0 :         PyErr_SetString(PyExc_TypeError,"not a sequence");
   20749               0 :         SWIG_fail;
   20750                 :       }
   20751                 :       
   20752               2 :       int size = PySequence_Size(obj1);
   20753             366 :       for (int i = 0; i < size; i++) {
   20754             364 :         PyObject* pyObj = PySequence_GetItem(obj1,i);
   20755             364 :         if (PyUnicode_Check(pyObj))
   20756                 :         {
   20757                 :           char *pszStr;
   20758                 :           Py_ssize_t nLen;
   20759               0 :           PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   20760                 : #if PY_VERSION_HEX >= 0x03000000
   20761                 :           PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   20762                 : #else
   20763               0 :           PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   20764                 : #endif
   20765               0 :           arg2 = CSLAddString( arg2, pszStr );
   20766               0 :           Py_XDECREF(pyUTF8Str);
   20767                 :         }
   20768                 : #if PY_VERSION_HEX >= 0x03000000
   20769                 :         else if (PyBytes_Check(pyObj))
   20770                 :         arg2 = CSLAddString( arg2, PyBytes_AsString(pyObj) );
   20771                 : #else
   20772             364 :         else if (PyString_Check(pyObj))
   20773             364 :         arg2 = CSLAddString( arg2, PyString_AsString(pyObj) );
   20774                 : #endif
   20775                 :         else
   20776                 :         {
   20777               0 :           Py_DECREF(pyObj);
   20778               0 :           PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   20779               0 :           SWIG_fail;
   20780                 :         }
   20781             364 :         Py_DECREF(pyObj);
   20782                 :       }
   20783                 :     }
   20784                 :   }
   20785                 :   {
   20786               6 :     if ( bUseExceptions ) {
   20787               0 :       CPLErrorReset();
   20788                 :     }
   20789               6 :     result = (GDALDriverShadow *)IdentifyDriver((char const *)arg1,arg2);
   20790               6 :     if ( bUseExceptions ) {
   20791               0 :       CPLErr eclass = CPLGetLastErrorType();
   20792               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20793               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20794                 :       }
   20795                 :     }
   20796                 :   }
   20797               6 :   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
   20798                 :   {
   20799                 :     /* %typemap(freearg) (const char *utf8_path) */
   20800               6 :     GDALPythonFreeCStr(arg1, bToFree1);
   20801                 :   }
   20802                 :   {
   20803                 :     /* %typemap(freearg) char **options */
   20804               6 :     CSLDestroy( arg2 );
   20805                 :   }
   20806               6 :   return resultobj;
   20807                 : fail:
   20808                 :   {
   20809                 :     /* %typemap(freearg) (const char *utf8_path) */
   20810               0 :     GDALPythonFreeCStr(arg1, bToFree1);
   20811                 :   }
   20812                 :   {
   20813                 :     /* %typemap(freearg) char **options */
   20814               0 :     CSLDestroy( arg2 );
   20815                 :   }
   20816               0 :   return NULL;
   20817                 : }
   20818                 : 
   20819                 : 
   20820              44 : SWIGINTERN PyObject *_wrap_GeneralCmdLineProcessor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   20821              44 :   PyObject *resultobj = 0;
   20822              44 :   char **arg1 = (char **) 0 ;
   20823              44 :   int arg2 = (int) 0 ;
   20824                 :   int val2 ;
   20825              44 :   int ecode2 = 0 ;
   20826              44 :   PyObject * obj0 = 0 ;
   20827              44 :   PyObject * obj1 = 0 ;
   20828              44 :   char **result = 0 ;
   20829                 :   
   20830              44 :   if (!PyArg_ParseTuple(args,(char *)"O|O:GeneralCmdLineProcessor",&obj0,&obj1)) SWIG_fail;
   20831                 :   {
   20832                 :     /* %typemap(in) char **options */
   20833                 :     /* Check if is a list */
   20834              44 :     if ( ! PySequence_Check(obj0)) {
   20835               0 :       PyErr_SetString(PyExc_TypeError,"not a sequence");
   20836               0 :       SWIG_fail;
   20837                 :     }
   20838                 :     
   20839              44 :     int size = PySequence_Size(obj0);
   20840             213 :     for (int i = 0; i < size; i++) {
   20841             169 :       PyObject* pyObj = PySequence_GetItem(obj0,i);
   20842             169 :       if (PyUnicode_Check(pyObj))
   20843                 :       {
   20844                 :         char *pszStr;
   20845                 :         Py_ssize_t nLen;
   20846               0 :         PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
   20847                 : #if PY_VERSION_HEX >= 0x03000000
   20848                 :         PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   20849                 : #else
   20850               0 :         PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
   20851                 : #endif
   20852               0 :         arg1 = CSLAddString( arg1, pszStr );
   20853               0 :         Py_XDECREF(pyUTF8Str);
   20854                 :       }
   20855                 : #if PY_VERSION_HEX >= 0x03000000
   20856                 :       else if (PyBytes_Check(pyObj))
   20857                 :       arg1 = CSLAddString( arg1, PyBytes_AsString(pyObj) );
   20858                 : #else
   20859             169 :       else if (PyString_Check(pyObj))
   20860             169 :       arg1 = CSLAddString( arg1, PyString_AsString(pyObj) );
   20861                 : #endif
   20862                 :       else
   20863                 :       {
   20864               0 :         Py_DECREF(pyObj);
   20865               0 :         PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
   20866               0 :         SWIG_fail;
   20867                 :       }
   20868             169 :       Py_DECREF(pyObj);
   20869                 :     }
   20870                 :   }
   20871              44 :   if (obj1) {
   20872               0 :     ecode2 = SWIG_AsVal_int(obj1, &val2);
   20873               0 :     if (!SWIG_IsOK(ecode2)) {
   20874               0 :       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GeneralCmdLineProcessor" "', argument " "2"" of type '" "int""'");
   20875                 :     } 
   20876               0 :     arg2 = static_cast< int >(val2);
   20877                 :   }
   20878                 :   {
   20879              44 :     if ( bUseExceptions ) {
   20880               0 :       CPLErrorReset();
   20881                 :     }
   20882              44 :     result = (char **)GeneralCmdLineProcessor(arg1,arg2);
   20883              44 :     if ( bUseExceptions ) {
   20884               0 :       CPLErr eclass = CPLGetLastErrorType();
   20885               0 :       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
   20886               0 :         SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
   20887                 :       }
   20888                 :     }
   20889                 :   }
   20890                 :   {
   20891                 :     /* %typemap(out) char **CSL -> ( string ) */
   20892              44 :     char **stringarray = result;
   20893              44 :     if ( stringarray == NULL ) {
   20894               0 :       resultobj = Py_None;
   20895               0 :       Py_INCREF( resultobj );
   20896                 :     }
   20897                 :     else {
   20898              44 :       int len = CSLCount( stringarray );
   20899              44 :       resultobj = PyList_New( len );
   20900             213 :       for ( int i = 0; i < len; ++i ) {
   20901             169 :         PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
   20902             169 :         PyList_SetItem(resultobj, i, o );
   20903                 :       }
   20904                 :     }
   20905              44 :     CSLDestroy(result);
   20906                 :   }
   20907                 :   {
   20908                 :     /* %typemap(freearg) char **options */
   20909              44 :     CSLDestroy( arg1 );
   20910                 :   }
   20911              44 :   return resultobj;
   20912                 : fail:
   20913                 :   {
   20914                 :     /* %typemap(freearg) char **options */
   20915               0 :     CSLDestroy( arg1 );
   20916                 :   }
   20917               0 :   return NULL;
   20918                 : }
   20919                 : 
   20920                 : 
   20921                 : static PyMethodDef SwigMethods[] = {
   20922                 :    { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
   20923                 :    { (char *)"GetUseExceptions", _wrap_GetUseExceptions, METH_VARARGS, (char *)"GetUseExceptions() -> int"},
   20924                 :    { (char *)"UseExceptions", _wrap_UseExceptions, METH_VARARGS, (char *)"UseExceptions()"},
   20925                 :    { (char *)"DontUseExceptions", _wrap_DontUseExceptions, METH_VARARGS, (char *)"DontUseExceptions()"},
   20926                 :    { (char *)"VSIFReadL", _wrap_VSIFReadL, METH_VARARGS, (char *)"VSIFReadL(int nMembSize, int nMembCount, VSILFILE fp) -> int"},
   20927                 :    { (char *)"Debug", _wrap_Debug, METH_VARARGS, (char *)"Debug(char msg_class, char message)"},
   20928                 :    { (char *)"Error", _wrap_Error, METH_VARARGS, (char *)"Error(CPLErr msg_class = CE_Failure, int err_code = 0, char msg = \"error\")"},
   20929                 :    { (char *)"PushErrorHandler", _wrap_PushErrorHandler, METH_VARARGS, (char *)"\n"
   20930                 :     "PushErrorHandler(char pszCallbackName = None) -> CPLErr\n"
   20931                 :     "PushErrorHandler(CPLErrorHandler arg0)\n"
   20932                 :     ""},
   20933                 :    { (char *)"PopErrorHandler", _wrap_PopErrorHandler, METH_VARARGS, (char *)"PopErrorHandler()"},
   20934                 :    { (char *)"ErrorReset", _wrap_ErrorReset, METH_VARARGS, (char *)"ErrorReset()"},
   20935                 :    { (char *)"EscapeString", (PyCFunction) _wrap_EscapeString, METH_VARARGS | METH_KEYWORDS, (char *)"EscapeString(int len, int scheme = CPLES_SQL) -> retStringAndCPLFree"},
   20936                 :    { (char *)"GetLastErrorNo", _wrap_GetLastErrorNo, METH_VARARGS, (char *)"GetLastErrorNo() -> int"},
   20937                 :    { (char *)"GetLastErrorType", _wrap_GetLastErrorType, METH_VARARGS, (char *)"GetLastErrorType() -> int"},
   20938                 :    { (char *)"GetLastErrorMsg", _wrap_GetLastErrorMsg, METH_VARARGS, (char *)"GetLastErrorMsg() -> char"},
   20939                 :    { (char *)"PushFinderLocation", _wrap_PushFinderLocation, METH_VARARGS, (char *)"PushFinderLocation(char utf8_path)"},
   20940                 :    { (char *)"PopFinderLocation", _wrap_PopFinderLocation, METH_VARARGS, (char *)"PopFinderLocation()"},
   20941                 :    { (char *)"FinderClean", _wrap_FinderClean, METH_VARARGS, (char *)"FinderClean()"},
   20942                 :    { (char *)"FindFile", _wrap_FindFile, METH_VARARGS, (char *)"FindFile(char pszClass, char utf8_path) -> char"},
   20943                 :    { (char *)"ReadDir", _wrap_ReadDir, METH_VARARGS, (char *)"ReadDir(char utf8_path) -> char"},
   20944                 :    { (char *)"SetConfigOption", _wrap_SetConfigOption, METH_VARARGS, (char *)"SetConfigOption(char pszKey, char pszValue)"},
   20945                 :    { (char *)"GetConfigOption", _wrap_GetConfigOption, METH_VARARGS, (char *)"GetConfigOption(char pszKey, char pszDefault = None) -> char"},
   20946                 :    { (char *)"CPLBinaryToHex", _wrap_CPLBinaryToHex, METH_VARARGS, (char *)"CPLBinaryToHex(int nBytes) -> retStringAndCPLFree"},
   20947                 :    { (char *)"CPLHexToBinary", _wrap_CPLHexToBinary, METH_VARARGS, (char *)"CPLHexToBinary(char pszHex, int pnBytes) -> GByte"},
   20948                 :    { (char *)"FileFromMemBuffer", _wrap_FileFromMemBuffer, METH_VARARGS, (char *)"FileFromMemBuffer(char utf8_path, int nBytes)"},
   20949                 :    { (char *)"Unlink", _wrap_Unlink, METH_VARARGS, (char *)"Unlink(char utf8_path) -> int"},
   20950                 :    { (char *)"HasThreadSupport", _wrap_HasThreadSupport, METH_VARARGS, (char *)"HasThreadSupport() -> int"},
   20951                 :    { (char *)"Mkdir", _wrap_Mkdir, METH_VARARGS, (char *)"Mkdir(char utf8_path, int mode) -> int"},
   20952                 :    { (char *)"Rmdir", _wrap_Rmdir, METH_VARARGS, (char *)"Rmdir(char utf8_path) -> int"},
   20953                 :    { (char *)"Rename", _wrap_Rename, METH_VARARGS, (char *)"Rename(char pszOld, char pszNew) -> int"},
   20954                 :    { (char *)"StatBuf_mode_get", _wrap_StatBuf_mode_get, METH_VARARGS, (char *)"StatBuf_mode_get(StatBuf self) -> int"},
   20955                 :    { (char *)"StatBuf_size_get", _wrap_StatBuf_size_get, METH_VARARGS, (char *)"StatBuf_size_get(StatBuf self) -> GIntBig"},
   20956                 :    { (char *)"StatBuf_mtime_get", _wrap_StatBuf_mtime_get, METH_VARARGS, (char *)"StatBuf_mtime_get(StatBuf self) -> GIntBig"},
   20957                 :    { (char *)"new_StatBuf", _wrap_new_StatBuf, METH_VARARGS, (char *)"new_StatBuf(StatBuf psStatBuf) -> StatBuf"},
   20958                 :    { (char *)"delete_StatBuf", _wrap_delete_StatBuf, METH_VARARGS, (char *)"delete_StatBuf(StatBuf self)"},
   20959                 :    { (char *)"StatBuf_IsDirectory", _wrap_StatBuf_IsDirectory, METH_VARARGS, (char *)"StatBuf_IsDirectory(StatBuf self) -> int"},
   20960                 :    { (char *)"StatBuf_swigregister", StatBuf_swigregister, METH_VARARGS, NULL},
   20961                 :    { (char *)"VSIStatL", _wrap_VSIStatL, METH_VARARGS, (char *)"VSIStatL(char utf8_path, int nFlags = 0) -> int"},
   20962                 :    { (char *)"VSIFOpenL", _wrap_VSIFOpenL, METH_VARARGS, (char *)"VSIFOpenL(char utf8_path, char pszMode) -> VSILFILE"},
   20963                 :    { (char *)"VSIFCloseL", _wrap_VSIFCloseL, METH_VARARGS, (char *)"VSIFCloseL(VSILFILE arg0)"},
   20964                 :    { (char *)"VSIFSeekL", _wrap_VSIFSeekL, METH_VARARGS, (char *)"VSIFSeekL(VSILFILE arg0, GIntBig arg1, int arg2) -> int"},
   20965                 :    { (char *)"VSIFTellL", _wrap_VSIFTellL, METH_VARARGS, (char *)"VSIFTellL(VSILFILE arg0) -> GIntBig"},
   20966                 :    { (char *)"VSIFTruncateL", _wrap_VSIFTruncateL, METH_VARARGS, (char *)"VSIFTruncateL(VSILFILE arg0, GIntBig arg1) -> int"},
   20967                 :    { (char *)"VSIFWriteL", _wrap_VSIFWriteL, METH_VARARGS, (char *)"VSIFWriteL(int nLen, int size, int memb, VSILFILE f) -> int"},
   20968                 :    { (char *)"MajorObject_GetDescription", _wrap_MajorObject_GetDescription, METH_VARARGS, (char *)"MajorObject_GetDescription(MajorObject self) -> char"},
   20969                 :    { (char *)"MajorObject_SetDescription", _wrap_MajorObject_SetDescription, METH_VARARGS, (char *)"MajorObject_SetDescription(MajorObject self, char pszNewDesc)"},
   20970                 :    { (char *)"MajorObject_GetMetadata_Dict", _wrap_MajorObject_GetMetadata_Dict, METH_VARARGS, (char *)"MajorObject_GetMetadata_Dict(MajorObject self, char pszDomain = \"\") -> char"},
   20971                 :    { (char *)"MajorObject_GetMetadata_List", _wrap_MajorObject_GetMetadata_List, METH_VARARGS, (char *)"MajorObject_GetMetadata_List(MajorObject self, char pszDomain = \"\") -> char"},
   20972                 :    { (char *)"MajorObject_SetMetadata", _wrap_MajorObject_SetMetadata, METH_VARARGS, (char *)"\n"
   20973                 :     "SetMetadata(char papszMetadata, char pszDomain = \"\") -> CPLErr\n"
   20974                 :     "MajorObject_SetMetadata(MajorObject self, char pszMetadataString, char pszDomain = \"\") -> CPLErr\n"
   20975                 :     ""},
   20976                 :    { (char *)"MajorObject_GetMetadataItem", _wrap_MajorObject_GetMetadataItem, METH_VARARGS, (char *)"MajorObject_GetMetadataItem(MajorObject self, char pszName, char pszDomain = \"\") -> char"},
   20977                 :    { (char *)"MajorObject_SetMetadataItem", _wrap_MajorObject_SetMetadataItem, METH_VARARGS, (char *)"MajorObject_SetMetadataItem(MajorObject self, char pszName, char pszValue, char pszDomain = \"\") -> CPLErr"},
   20978                 :    { (char *)"MajorObject_swigregister", MajorObject_swigregister, METH_VARARGS, NULL},
   20979                 :    { (char *)"Driver_ShortName_get", _wrap_Driver_ShortName_get, METH_VARARGS, (char *)"Driver_ShortName_get(Driver self) -> char"},
   20980                 :    { (char *)"Driver_LongName_get", _wrap_Driver_LongName_get, METH_VARARGS, (char *)"Driver_LongName_get(Driver self) -> char"},
   20981                 :    { (char *)"Driver_HelpTopic_get", _wrap_Driver_HelpTopic_get, METH_VARARGS, (char *)"Driver_HelpTopic_get(Driver self) -> char"},
   20982                 :    { (char *)"Driver_Create", (PyCFunction) _wrap_Driver_Create, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   20983                 :     "Driver_Create(Driver self, char utf8_path, int xsize, int ysize, \n"
   20984                 :     "    int bands = 1, GDALDataType eType = GDT_Byte, \n"
   20985                 :     "    char options = None) -> Dataset\n"
   20986                 :     ""},
   20987                 :    { (char *)"Driver_CreateCopy", (PyCFunction) _wrap_Driver_CreateCopy, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   20988                 :     "Driver_CreateCopy(Driver self, char utf8_path, Dataset src, int strict = 1, \n"
   20989                 :     "    char options = None, GDALProgressFunc callback = None, \n"
   20990                 :     "    void callback_data = None) -> Dataset\n"
   20991                 :     ""},
   20992                 :    { (char *)"Driver_Delete", _wrap_Driver_Delete, METH_VARARGS, (char *)"Driver_Delete(Driver self, char utf8_path) -> int"},
   20993                 :    { (char *)"Driver_Rename", _wrap_Driver_Rename, METH_VARARGS, (char *)"Driver_Rename(Driver self, char newName, char oldName) -> int"},
   20994                 :    { (char *)"Driver_CopyFiles", _wrap_Driver_CopyFiles, METH_VARARGS, (char *)"Driver_CopyFiles(Driver self, char newName, char oldName) -> int"},
   20995                 :    { (char *)"Driver_Register", _wrap_Driver_Register, METH_VARARGS, (char *)"Driver_Register(Driver self) -> int"},
   20996                 :    { (char *)"Driver_Deregister", _wrap_Driver_Deregister, METH_VARARGS, (char *)"Driver_Deregister(Driver self)"},
   20997                 :    { (char *)"Driver_swigregister", Driver_swigregister, METH_VARARGS, NULL},
   20998                 :    { (char *)"ColorEntry_c1_set", _wrap_ColorEntry_c1_set, METH_VARARGS, (char *)"ColorEntry_c1_set(ColorEntry self, short c1)"},
   20999                 :    { (char *)"ColorEntry_c1_get", _wrap_ColorEntry_c1_get, METH_VARARGS, (char *)"ColorEntry_c1_get(ColorEntry self) -> short"},
   21000                 :    { (char *)"ColorEntry_c2_set", _wrap_ColorEntry_c2_set, METH_VARARGS, (char *)"ColorEntry_c2_set(ColorEntry self, short c2)"},
   21001                 :    { (char *)"ColorEntry_c2_get", _wrap_ColorEntry_c2_get, METH_VARARGS, (char *)"ColorEntry_c2_get(ColorEntry self) -> short"},
   21002                 :    { (char *)"ColorEntry_c3_set", _wrap_ColorEntry_c3_set, METH_VARARGS, (char *)"ColorEntry_c3_set(ColorEntry self, short c3)"},
   21003                 :    { (char *)"ColorEntry_c3_get", _wrap_ColorEntry_c3_get, METH_VARARGS, (char *)"ColorEntry_c3_get(ColorEntry self) -> short"},
   21004                 :    { (char *)"ColorEntry_c4_set", _wrap_ColorEntry_c4_set, METH_VARARGS, (char *)"ColorEntry_c4_set(ColorEntry self, short c4)"},
   21005                 :    { (char *)"ColorEntry_c4_get", _wrap_ColorEntry_c4_get, METH_VARARGS, (char *)"ColorEntry_c4_get(ColorEntry self) -> short"},
   21006                 :    { (char *)"new_ColorEntry", _wrap_new_ColorEntry, METH_VARARGS, (char *)"new_ColorEntry() -> ColorEntry"},
   21007                 :    { (char *)"delete_ColorEntry", _wrap_delete_ColorEntry, METH_VARARGS, (char *)"delete_ColorEntry(ColorEntry self)"},
   21008                 :    { (char *)"ColorEntry_swigregister", ColorEntry_swigregister, METH_VARARGS, NULL},
   21009                 :    { (char *)"GCP_GCPX_set", _wrap_GCP_GCPX_set, METH_VARARGS, (char *)"GCP_GCPX_set(GCP self, double GCPX)"},
   21010                 :    { (char *)"GCP_GCPX_get", _wrap_GCP_GCPX_get, METH_VARARGS, (char *)"GCP_GCPX_get(GCP self) -> double"},
   21011                 :    { (char *)"GCP_GCPY_set", _wrap_GCP_GCPY_set, METH_VARARGS, (char *)"GCP_GCPY_set(GCP self, double GCPY)"},
   21012                 :    { (char *)"GCP_GCPY_get", _wrap_GCP_GCPY_get, METH_VARARGS, (char *)"GCP_GCPY_get(GCP self) -> double"},
   21013                 :    { (char *)"GCP_GCPZ_set", _wrap_GCP_GCPZ_set, METH_VARARGS, (char *)"GCP_GCPZ_set(GCP self, double GCPZ)"},
   21014                 :    { (char *)"GCP_GCPZ_get", _wrap_GCP_GCPZ_get, METH_VARARGS, (char *)"GCP_GCPZ_get(GCP self) -> double"},
   21015                 :    { (char *)"GCP_GCPPixel_set", _wrap_GCP_GCPPixel_set, METH_VARARGS, (char *)"GCP_GCPPixel_set(GCP self, double GCPPixel)"},
   21016                 :    { (char *)"GCP_GCPPixel_get", _wrap_GCP_GCPPixel_get, METH_VARARGS, (char *)"GCP_GCPPixel_get(GCP self) -> double"},
   21017                 :    { (char *)"GCP_GCPLine_set", _wrap_GCP_GCPLine_set, METH_VARARGS, (char *)"GCP_GCPLine_set(GCP self, double GCPLine)"},
   21018                 :    { (char *)"GCP_GCPLine_get", _wrap_GCP_GCPLine_get, METH_VARARGS, (char *)"GCP_GCPLine_get(GCP self) -> double"},
   21019                 :    { (char *)"GCP_Info_set", _wrap_GCP_Info_set, METH_VARARGS, (char *)"GCP_Info_set(GCP self, char Info)"},
   21020                 :    { (char *)"GCP_Info_get", _wrap_GCP_Info_get, METH_VARARGS, (char *)"GCP_Info_get(GCP self) -> char"},
   21021                 :    { (char *)"GCP_Id_set", _wrap_GCP_Id_set, METH_VARARGS, (char *)"GCP_Id_set(GCP self, char Id)"},
   21022                 :    { (char *)"GCP_Id_get", _wrap_GCP_Id_get, METH_VARARGS, (char *)"GCP_Id_get(GCP self) -> char"},
   21023                 :    { (char *)"new_GCP", _wrap_new_GCP, METH_VARARGS, (char *)"\n"
   21024                 :     "new_GCP(double x = 0.0, double y = 0.0, double z = 0.0, double pixel = 0.0, \n"
   21025                 :     "    double line = 0.0, char info = \"\", \n"
   21026                 :     "    char id = \"\") -> GCP\n"
   21027                 :     ""},
   21028                 :    { (char *)"delete_GCP", _wrap_delete_GCP, METH_VARARGS, (char *)"delete_GCP(GCP self)"},
   21029                 :    { (char *)"GCP_swigregister", GCP_swigregister, METH_VARARGS, NULL},
   21030                 :    { (char *)"GDAL_GCP_GCPX_get", _wrap_GDAL_GCP_GCPX_get, METH_VARARGS, (char *)"GDAL_GCP_GCPX_get(GCP gcp) -> double"},
   21031                 :    { (char *)"GDAL_GCP_GCPX_set", _wrap_GDAL_GCP_GCPX_set, METH_VARARGS, (char *)"GDAL_GCP_GCPX_set(GCP gcp, double dfGCPX)"},
   21032                 :    { (char *)"GDAL_GCP_GCPY_get", _wrap_GDAL_GCP_GCPY_get, METH_VARARGS, (char *)"GDAL_GCP_GCPY_get(GCP gcp) -> double"},
   21033                 :    { (char *)"GDAL_GCP_GCPY_set", _wrap_GDAL_GCP_GCPY_set, METH_VARARGS, (char *)"GDAL_GCP_GCPY_set(GCP gcp, double dfGCPY)"},
   21034                 :    { (char *)"GDAL_GCP_GCPZ_get", _wrap_GDAL_GCP_GCPZ_get, METH_VARARGS, (char *)"GDAL_GCP_GCPZ_get(GCP gcp) -> double"},
   21035                 :    { (char *)"GDAL_GCP_GCPZ_set", _wrap_GDAL_GCP_GCPZ_set, METH_VARARGS, (char *)"GDAL_GCP_GCPZ_set(GCP gcp, double dfGCPZ)"},
   21036                 :    { (char *)"GDAL_GCP_GCPPixel_get", _wrap_GDAL_GCP_GCPPixel_get, METH_VARARGS, (char *)"GDAL_GCP_GCPPixel_get(GCP gcp) -> double"},
   21037                 :    { (char *)"GDAL_GCP_GCPPixel_set", _wrap_GDAL_GCP_GCPPixel_set, METH_VARARGS, (char *)"GDAL_GCP_GCPPixel_set(GCP gcp, double dfGCPPixel)"},
   21038                 :    { (char *)"GDAL_GCP_GCPLine_get", _wrap_GDAL_GCP_GCPLine_get, METH_VARARGS, (char *)"GDAL_GCP_GCPLine_get(GCP gcp) -> double"},
   21039                 :    { (char *)"GDAL_GCP_GCPLine_set", _wrap_GDAL_GCP_GCPLine_set, METH_VARARGS, (char *)"GDAL_GCP_GCPLine_set(GCP gcp, double dfGCPLine)"},
   21040                 :    { (char *)"GDAL_GCP_Info_get", _wrap_GDAL_GCP_Info_get, METH_VARARGS, (char *)"GDAL_GCP_Info_get(GCP gcp) -> char"},
   21041                 :    { (char *)"GDAL_GCP_Info_set", _wrap_GDAL_GCP_Info_set, METH_VARARGS, (char *)"GDAL_GCP_Info_set(GCP gcp, char pszInfo)"},
   21042                 :    { (char *)"GDAL_GCP_Id_get", _wrap_GDAL_GCP_Id_get, METH_VARARGS, (char *)"GDAL_GCP_Id_get(GCP gcp) -> char"},
   21043                 :    { (char *)"GDAL_GCP_Id_set", _wrap_GDAL_GCP_Id_set, METH_VARARGS, (char *)"GDAL_GCP_Id_set(GCP gcp, char pszId)"},
   21044                 :    { (char *)"GDAL_GCP_get_GCPX", _wrap_GDAL_GCP_get_GCPX, METH_VARARGS, (char *)"GDAL_GCP_get_GCPX(GCP gcp) -> double"},
   21045                 :    { (char *)"GDAL_GCP_set_GCPX", _wrap_GDAL_GCP_set_GCPX, METH_VARARGS, (char *)"GDAL_GCP_set_GCPX(GCP gcp, double dfGCPX)"},
   21046                 :    { (char *)"GDAL_GCP_get_GCPY", _wrap_GDAL_GCP_get_GCPY, METH_VARARGS, (char *)"GDAL_GCP_get_GCPY(GCP gcp) -> double"},
   21047                 :    { (char *)"GDAL_GCP_set_GCPY", _wrap_GDAL_GCP_set_GCPY, METH_VARARGS, (char *)"GDAL_GCP_set_GCPY(GCP gcp, double dfGCPY)"},
   21048                 :    { (char *)"GDAL_GCP_get_GCPZ", _wrap_GDAL_GCP_get_GCPZ, METH_VARARGS, (char *)"GDAL_GCP_get_GCPZ(GCP gcp) -> double"},
   21049                 :    { (char *)"GDAL_GCP_set_GCPZ", _wrap_GDAL_GCP_set_GCPZ, METH_VARARGS, (char *)"GDAL_GCP_set_GCPZ(GCP gcp, double dfGCPZ)"},
   21050                 :    { (char *)"GDAL_GCP_get_GCPPixel", _wrap_GDAL_GCP_get_GCPPixel, METH_VARARGS, (char *)"GDAL_GCP_get_GCPPixel(GCP gcp) -> double"},
   21051                 :    { (char *)"GDAL_GCP_set_GCPPixel", _wrap_GDAL_GCP_set_GCPPixel, METH_VARARGS, (char *)"GDAL_GCP_set_GCPPixel(GCP gcp, double dfGCPPixel)"},
   21052                 :    { (char *)"GDAL_GCP_get_GCPLine", _wrap_GDAL_GCP_get_GCPLine, METH_VARARGS, (char *)"GDAL_GCP_get_GCPLine(GCP gcp) -> double"},
   21053                 :    { (char *)"GDAL_GCP_set_GCPLine", _wrap_GDAL_GCP_set_GCPLine, METH_VARARGS, (char *)"GDAL_GCP_set_GCPLine(GCP gcp, double dfGCPLine)"},
   21054                 :    { (char *)"GDAL_GCP_get_Info", _wrap_GDAL_GCP_get_Info, METH_VARARGS, (char *)"GDAL_GCP_get_Info(GCP gcp) -> char"},
   21055                 :    { (char *)"GDAL_GCP_set_Info", _wrap_GDAL_GCP_set_Info, METH_VARARGS, (char *)"GDAL_GCP_set_Info(GCP gcp, char pszInfo)"},
   21056                 :    { (char *)"GDAL_GCP_get_Id", _wrap_GDAL_GCP_get_Id, METH_VARARGS, (char *)"GDAL_GCP_get_Id(GCP gcp) -> char"},
   21057                 :    { (char *)"GDAL_GCP_set_Id", _wrap_GDAL_GCP_set_Id, METH_VARARGS, (char *)"GDAL_GCP_set_Id(GCP gcp, char pszId)"},
   21058                 :    { (char *)"GCPsToGeoTransform", _wrap_GCPsToGeoTransform, METH_VARARGS, (char *)"GCPsToGeoTransform(int nGCPs, int bApproxOK = 1) -> RETURN_NONE"},
   21059                 :    { (char *)"delete_AsyncReader", _wrap_delete_AsyncReader, METH_VARARGS, (char *)"delete_AsyncReader(AsyncReader self)"},
   21060                 :    { (char *)"AsyncReader_GetNextUpdatedRegion", _wrap_AsyncReader_GetNextUpdatedRegion, METH_VARARGS, (char *)"AsyncReader_GetNextUpdatedRegion(AsyncReader self, double timeout) -> GDALAsyncStatusType"},
   21061                 :    { (char *)"AsyncReader_GetBuffer", _wrap_AsyncReader_GetBuffer, METH_VARARGS, (char *)"AsyncReader_GetBuffer(AsyncReader self)"},
   21062                 :    { (char *)"AsyncReader_LockBuffer", _wrap_AsyncReader_LockBuffer, METH_VARARGS, (char *)"AsyncReader_LockBuffer(AsyncReader self, double timeout) -> int"},
   21063                 :    { (char *)"AsyncReader_UnlockBuffer", _wrap_AsyncReader_UnlockBuffer, METH_VARARGS, (char *)"AsyncReader_UnlockBuffer(AsyncReader self)"},
   21064                 :    { (char *)"AsyncReader_swigregister", AsyncReader_swigregister, METH_VARARGS, NULL},
   21065                 :    { (char *)"Dataset_RasterXSize_get", _wrap_Dataset_RasterXSize_get, METH_VARARGS, (char *)"Dataset_RasterXSize_get(Dataset self) -> int"},
   21066                 :    { (char *)"Dataset_RasterYSize_get", _wrap_Dataset_RasterYSize_get, METH_VARARGS, (char *)"Dataset_RasterYSize_get(Dataset self) -> int"},
   21067                 :    { (char *)"Dataset_RasterCount_get", _wrap_Dataset_RasterCount_get, METH_VARARGS, (char *)"Dataset_RasterCount_get(Dataset self) -> int"},
   21068                 :    { (char *)"delete_Dataset", _wrap_delete_Dataset, METH_VARARGS, (char *)"delete_Dataset(Dataset self)"},
   21069                 :    { (char *)"Dataset_GetDriver", _wrap_Dataset_GetDriver, METH_VARARGS, (char *)"Dataset_GetDriver(Dataset self) -> Driver"},
   21070                 :    { (char *)"Dataset_GetRasterBand", _wrap_Dataset_GetRasterBand, METH_VARARGS, (char *)"Dataset_GetRasterBand(Dataset self, int nBand) -> Band"},
   21071                 :    { (char *)"Dataset_GetProjection", _wrap_Dataset_GetProjection, METH_VARARGS, (char *)"Dataset_GetProjection(Dataset self) -> char"},
   21072                 :    { (char *)"Dataset_GetProjectionRef", _wrap_Dataset_GetProjectionRef, METH_VARARGS, (char *)"Dataset_GetProjectionRef(Dataset self) -> char"},
   21073                 :    { (char *)"Dataset_SetProjection", _wrap_Dataset_SetProjection, METH_VARARGS, (char *)"Dataset_SetProjection(Dataset self, char prj) -> CPLErr"},
   21074                 :    { (char *)"Dataset_GetGeoTransform", (PyCFunction) _wrap_Dataset_GetGeoTransform, METH_VARARGS | METH_KEYWORDS, (char *)"Dataset_GetGeoTransform(Dataset self, int can_return_null = None)"},
   21075                 :    { (char *)"Dataset_SetGeoTransform", _wrap_Dataset_SetGeoTransform, METH_VARARGS, (char *)"Dataset_SetGeoTransform(Dataset self, double argin) -> CPLErr"},
   21076                 :    { (char *)"Dataset_BuildOverviews", (PyCFunction) _wrap_Dataset_BuildOverviews, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21077                 :     "Dataset_BuildOverviews(Dataset self, char resampling = \"NEAREST\", int overviewlist = 0, \n"
   21078                 :     "    GDALProgressFunc callback = None, \n"
   21079                 :     "    void callback_data = None) -> int\n"
   21080                 :     ""},
   21081                 :    { (char *)"Dataset_GetGCPCount", _wrap_Dataset_GetGCPCount, METH_VARARGS, (char *)"Dataset_GetGCPCount(Dataset self) -> int"},
   21082                 :    { (char *)"Dataset_GetGCPProjection", _wrap_Dataset_GetGCPProjection, METH_VARARGS, (char *)"Dataset_GetGCPProjection(Dataset self) -> char"},
   21083                 :    { (char *)"Dataset_GetGCPs", _wrap_Dataset_GetGCPs, METH_VARARGS, (char *)"Dataset_GetGCPs(Dataset self)"},
   21084                 :    { (char *)"Dataset_SetGCPs", _wrap_Dataset_SetGCPs, METH_VARARGS, (char *)"Dataset_SetGCPs(Dataset self, int nGCPs, char pszGCPProjection) -> CPLErr"},
   21085                 :    { (char *)"Dataset_FlushCache", _wrap_Dataset_FlushCache, METH_VARARGS, (char *)"Dataset_FlushCache(Dataset self)"},
   21086                 :    { (char *)"Dataset_AddBand", (PyCFunction) _wrap_Dataset_AddBand, METH_VARARGS | METH_KEYWORDS, (char *)"Dataset_AddBand(Dataset self, GDALDataType datatype = GDT_Byte, char options = None) -> CPLErr"},
   21087                 :    { (char *)"Dataset_CreateMaskBand", _wrap_Dataset_CreateMaskBand, METH_VARARGS, (char *)"Dataset_CreateMaskBand(Dataset self, int nFlags) -> CPLErr"},
   21088                 :    { (char *)"Dataset_GetFileList", _wrap_Dataset_GetFileList, METH_VARARGS, (char *)"Dataset_GetFileList(Dataset self) -> char"},
   21089                 :    { (char *)"Dataset_WriteRaster", (PyCFunction) _wrap_Dataset_WriteRaster, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21090                 :     "Dataset_WriteRaster(Dataset self, int xoff, int yoff, int xsize, int ysize, \n"
   21091                 :     "    GIntBig buf_len, int buf_xsize = None, int buf_ysize = None, \n"
   21092                 :     "    GDALDataType buf_type = None, \n"
   21093                 :     "    int band_list = 0, int buf_pixel_space = None, \n"
   21094                 :     "    int buf_line_space = None, int buf_band_space = None) -> CPLErr\n"
   21095                 :     ""},
   21096                 :    { (char *)"Dataset_BeginAsyncReader", (PyCFunction) _wrap_Dataset_BeginAsyncReader, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21097                 :     "Dataset_BeginAsyncReader(Dataset self, int xOff, int yOff, int xSize, int ySize, \n"
   21098                 :     "    int buf_len, int buf_xsize, int buf_ysize, \n"
   21099                 :     "    GDALDataType bufType = (GDALDataType) 0, int band_list = 0, \n"
   21100                 :     "    int nPixelSpace = 0, int nLineSpace = 0, \n"
   21101                 :     "    int nBandSpace = 0, char options = None) -> AsyncReader\n"
   21102                 :     ""},
   21103                 :    { (char *)"Dataset_EndAsyncReader", _wrap_Dataset_EndAsyncReader, METH_VARARGS, (char *)"Dataset_EndAsyncReader(Dataset self, AsyncReader ario)"},
   21104                 :    { (char *)"Dataset_ReadRaster1", (PyCFunction) _wrap_Dataset_ReadRaster1, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21105                 :     "Dataset_ReadRaster1(Dataset self, int xoff, int yoff, int xsize, int ysize, \n"
   21106                 :     "    int buf_xsize = None, int buf_ysize = None, \n"
   21107                 :     "    GDALDataType buf_type = None, int band_list = 0, \n"
   21108                 :     "    int buf_pixel_space = None, int buf_line_space = None, \n"
   21109                 :     "    int buf_band_space = None) -> CPLErr\n"
   21110                 :     ""},
   21111                 :    { (char *)"Dataset_swigregister", Dataset_swigregister, METH_VARARGS, NULL},
   21112                 :    { (char *)"Band_XSize_get", _wrap_Band_XSize_get, METH_VARARGS, (char *)"Band_XSize_get(Band self) -> int"},
   21113                 :    { (char *)"Band_YSize_get", _wrap_Band_YSize_get, METH_VARARGS, (char *)"Band_YSize_get(Band self) -> int"},
   21114                 :    { (char *)"Band_DataType_get", _wrap_Band_DataType_get, METH_VARARGS, (char *)"Band_DataType_get(Band self) -> GDALDataType"},
   21115                 :    { (char *)"Band_GetBand", _wrap_Band_GetBand, METH_VARARGS, (char *)"Band_GetBand(Band self) -> int"},
   21116                 :    { (char *)"Band_GetBlockSize", _wrap_Band_GetBlockSize, METH_VARARGS, (char *)"Band_GetBlockSize(Band self)"},
   21117                 :    { (char *)"Band_GetColorInterpretation", _wrap_Band_GetColorInterpretation, METH_VARARGS, (char *)"Band_GetColorInterpretation(Band self) -> GDALColorInterp"},
   21118                 :    { (char *)"Band_GetRasterColorInterpretation", _wrap_Band_GetRasterColorInterpretation, METH_VARARGS, (char *)"Band_GetRasterColorInterpretation(Band self) -> GDALColorInterp"},
   21119                 :    { (char *)"Band_SetColorInterpretation", _wrap_Band_SetColorInterpretation, METH_VARARGS, (char *)"Band_SetColorInterpretation(Band self, GDALColorInterp val) -> CPLErr"},
   21120                 :    { (char *)"Band_SetRasterColorInterpretation", _wrap_Band_SetRasterColorInterpretation, METH_VARARGS, (char *)"Band_SetRasterColorInterpretation(Band self, GDALColorInterp val) -> CPLErr"},
   21121                 :    { (char *)"Band_GetNoDataValue", _wrap_Band_GetNoDataValue, METH_VARARGS, (char *)"Band_GetNoDataValue(Band self)"},
   21122                 :    { (char *)"Band_SetNoDataValue", _wrap_Band_SetNoDataValue, METH_VARARGS, (char *)"Band_SetNoDataValue(Band self, double d) -> CPLErr"},
   21123                 :    { (char *)"Band_GetUnitType", _wrap_Band_GetUnitType, METH_VARARGS, (char *)"Band_GetUnitType(Band self) -> char"},
   21124                 :    { (char *)"Band_SetUnitType", _wrap_Band_SetUnitType, METH_VARARGS, (char *)"Band_SetUnitType(Band self, char val) -> CPLErr"},
   21125                 :    { (char *)"Band_GetRasterCategoryNames", _wrap_Band_GetRasterCategoryNames, METH_VARARGS, (char *)"Band_GetRasterCategoryNames(Band self) -> char"},
   21126                 :    { (char *)"Band_SetRasterCategoryNames", _wrap_Band_SetRasterCategoryNames, METH_VARARGS, (char *)"Band_SetRasterCategoryNames(Band self, char names) -> CPLErr"},
   21127                 :    { (char *)"Band_GetMinimum", _wrap_Band_GetMinimum, METH_VARARGS, (char *)"Band_GetMinimum(Band self)"},
   21128                 :    { (char *)"Band_GetMaximum", _wrap_Band_GetMaximum, METH_VARARGS, (char *)"Band_GetMaximum(Band self)"},
   21129                 :    { (char *)"Band_GetOffset", _wrap_Band_GetOffset, METH_VARARGS, (char *)"Band_GetOffset(Band self)"},
   21130                 :    { (char *)"Band_GetScale", _wrap_Band_GetScale, METH_VARARGS, (char *)"Band_GetScale(Band self)"},
   21131                 :    { (char *)"Band_SetOffset", _wrap_Band_SetOffset, METH_VARARGS, (char *)"Band_SetOffset(Band self, double val) -> CPLErr"},
   21132                 :    { (char *)"Band_SetScale", _wrap_Band_SetScale, METH_VARARGS, (char *)"Band_SetScale(Band self, double val) -> CPLErr"},
   21133                 :    { (char *)"Band_GetStatistics", _wrap_Band_GetStatistics, METH_VARARGS, (char *)"Band_GetStatistics(Band self, int approx_ok, int force) -> CPLErr"},
   21134                 :    { (char *)"Band_ComputeStatistics", _wrap_Band_ComputeStatistics, METH_VARARGS, (char *)"\n"
   21135                 :     "Band_ComputeStatistics(Band self, bool approx_ok, GDALProgressFunc callback = None, \n"
   21136                 :     "    void callback_data = None) -> CPLErr\n"
   21137                 :     ""},
   21138                 :    { (char *)"Band_SetStatistics", _wrap_Band_SetStatistics, METH_VARARGS, (char *)"Band_SetStatistics(Band self, double min, double max, double mean, double stddev) -> CPLErr"},
   21139                 :    { (char *)"Band_GetOverviewCount", _wrap_Band_GetOverviewCount, METH_VARARGS, (char *)"Band_GetOverviewCount(Band self) -> int"},
   21140                 :    { (char *)"Band_GetOverview", _wrap_Band_GetOverview, METH_VARARGS, (char *)"Band_GetOverview(Band self, int i) -> Band"},
   21141                 :    { (char *)"Band_Checksum", (PyCFunction) _wrap_Band_Checksum, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21142                 :     "Band_Checksum(Band self, int xoff = 0, int yoff = 0, int xsize = None, \n"
   21143                 :     "    int ysize = None) -> int\n"
   21144                 :     ""},
   21145                 :    { (char *)"Band_ComputeRasterMinMax", _wrap_Band_ComputeRasterMinMax, METH_VARARGS, (char *)"Band_ComputeRasterMinMax(Band self, int approx_ok = 0)"},
   21146                 :    { (char *)"Band_ComputeBandStats", _wrap_Band_ComputeBandStats, METH_VARARGS, (char *)"Band_ComputeBandStats(Band self, int samplestep = 1)"},
   21147                 :    { (char *)"Band_Fill", _wrap_Band_Fill, METH_VARARGS, (char *)"Band_Fill(Band self, double real_fill, double imag_fill = 0.0) -> CPLErr"},
   21148                 :    { (char *)"Band_WriteRaster", (PyCFunction) _wrap_Band_WriteRaster, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21149                 :     "Band_WriteRaster(Band self, int xoff, int yoff, int xsize, int ysize, \n"
   21150                 :     "    GIntBig buf_len, int buf_xsize = None, int buf_ysize = None, \n"
   21151                 :     "    int buf_type = None, int buf_pixel_space = None, \n"
   21152                 :     "    int buf_line_space = None) -> CPLErr\n"
   21153                 :     ""},
   21154                 :    { (char *)"Band_FlushCache", _wrap_Band_FlushCache, METH_VARARGS, (char *)"Band_FlushCache(Band self)"},
   21155                 :    { (char *)"Band_GetRasterColorTable", _wrap_Band_GetRasterColorTable, METH_VARARGS, (char *)"Band_GetRasterColorTable(Band self) -> ColorTable"},
   21156                 :    { (char *)"Band_GetColorTable", _wrap_Band_GetColorTable, METH_VARARGS, (char *)"Band_GetColorTable(Band self) -> ColorTable"},
   21157                 :    { (char *)"Band_SetRasterColorTable", _wrap_Band_SetRasterColorTable, METH_VARARGS, (char *)"Band_SetRasterColorTable(Band self, ColorTable arg) -> int"},
   21158                 :    { (char *)"Band_SetColorTable", _wrap_Band_SetColorTable, METH_VARARGS, (char *)"Band_SetColorTable(Band self, ColorTable arg) -> int"},
   21159                 :    { (char *)"Band_GetDefaultRAT", _wrap_Band_GetDefaultRAT, METH_VARARGS, (char *)"Band_GetDefaultRAT(Band self) -> RasterAttributeTable"},
   21160                 :    { (char *)"Band_SetDefaultRAT", _wrap_Band_SetDefaultRAT, METH_VARARGS, (char *)"Band_SetDefaultRAT(Band self, RasterAttributeTable table) -> int"},
   21161                 :    { (char *)"Band_GetMaskBand", _wrap_Band_GetMaskBand, METH_VARARGS, (char *)"Band_GetMaskBand(Band self) -> Band"},
   21162                 :    { (char *)"Band_GetMaskFlags", _wrap_Band_GetMaskFlags, METH_VARARGS, (char *)"Band_GetMaskFlags(Band self) -> int"},
   21163                 :    { (char *)"Band_CreateMaskBand", _wrap_Band_CreateMaskBand, METH_VARARGS, (char *)"Band_CreateMaskBand(Band self, int nFlags) -> CPLErr"},
   21164                 :    { (char *)"Band_GetHistogram", (PyCFunction) _wrap_Band_GetHistogram, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21165                 :     "Band_GetHistogram(Band self, double min = -0.5, double max = 255.5, int buckets = 256, \n"
   21166                 :     "    int include_out_of_range = 0, \n"
   21167                 :     "    int approx_ok = 1, GDALProgressFunc callback = None, \n"
   21168                 :     "    void callback_data = None) -> CPLErr\n"
   21169                 :     ""},
   21170                 :    { (char *)"Band_GetDefaultHistogram", (PyCFunction) _wrap_Band_GetDefaultHistogram, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21171                 :     "Band_GetDefaultHistogram(Band self, double min_ret = None, double max_ret = None, \n"
   21172                 :     "    int buckets_ret = None, int ppanHistogram = None, \n"
   21173                 :     "    int force = 1, GDALProgressFunc callback = None, \n"
   21174                 :     "    void callback_data = None) -> CPLErr\n"
   21175                 :     ""},
   21176                 :    { (char *)"Band_SetDefaultHistogram", _wrap_Band_SetDefaultHistogram, METH_VARARGS, (char *)"Band_SetDefaultHistogram(Band self, double min, double max, int buckets_in) -> CPLErr"},
   21177                 :    { (char *)"Band_HasArbitraryOverviews", _wrap_Band_HasArbitraryOverviews, METH_VARARGS, (char *)"Band_HasArbitraryOverviews(Band self) -> bool"},
   21178                 :    { (char *)"Band_GetCategoryNames", _wrap_Band_GetCategoryNames, METH_VARARGS, (char *)"Band_GetCategoryNames(Band self) -> char"},
   21179                 :    { (char *)"Band_SetCategoryNames", _wrap_Band_SetCategoryNames, METH_VARARGS, (char *)"Band_SetCategoryNames(Band self, char papszCategoryNames) -> CPLErr"},
   21180                 :    { (char *)"Band_ReadRaster1", (PyCFunction) _wrap_Band_ReadRaster1, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21181                 :     "Band_ReadRaster1(Band self, int xoff, int yoff, int xsize, int ysize, \n"
   21182                 :     "    int buf_xsize = None, int buf_ysize = None, \n"
   21183                 :     "    int buf_type = None, int buf_pixel_space = None, \n"
   21184                 :     "    int buf_line_space = None) -> CPLErr\n"
   21185                 :     ""},
   21186                 :    { (char *)"Band_swigregister", Band_swigregister, METH_VARARGS, NULL},
   21187                 :    { (char *)"new_ColorTable", (PyCFunction) _wrap_new_ColorTable, METH_VARARGS | METH_KEYWORDS, (char *)"new_ColorTable(GDALPaletteInterp palette = GPI_RGB) -> ColorTable"},
   21188                 :    { (char *)"delete_ColorTable", _wrap_delete_ColorTable, METH_VARARGS, (char *)"delete_ColorTable(ColorTable self)"},
   21189                 :    { (char *)"ColorTable_Clone", _wrap_ColorTable_Clone, METH_VARARGS, (char *)"ColorTable_Clone(ColorTable self) -> ColorTable"},
   21190                 :    { (char *)"ColorTable_GetPaletteInterpretation", _wrap_ColorTable_GetPaletteInterpretation, METH_VARARGS, (char *)"ColorTable_GetPaletteInterpretation(ColorTable self) -> GDALPaletteInterp"},
   21191                 :    { (char *)"ColorTable_GetCount", _wrap_ColorTable_GetCount, METH_VARARGS, (char *)"ColorTable_GetCount(ColorTable self) -> int"},
   21192                 :    { (char *)"ColorTable_GetColorEntry", _wrap_ColorTable_GetColorEntry, METH_VARARGS, (char *)"ColorTable_GetColorEntry(ColorTable self, int entry) -> ColorEntry"},
   21193                 :    { (char *)"ColorTable_GetColorEntryAsRGB", _wrap_ColorTable_GetColorEntryAsRGB, METH_VARARGS, (char *)"ColorTable_GetColorEntryAsRGB(ColorTable self, int entry, ColorEntry centry) -> int"},
   21194                 :    { (char *)"ColorTable_SetColorEntry", _wrap_ColorTable_SetColorEntry, METH_VARARGS, (char *)"ColorTable_SetColorEntry(ColorTable self, int entry, ColorEntry centry)"},
   21195                 :    { (char *)"ColorTable_CreateColorRamp", _wrap_ColorTable_CreateColorRamp, METH_VARARGS, (char *)"\n"
   21196                 :     "ColorTable_CreateColorRamp(ColorTable self, int nStartIndex, ColorEntry startcolor, \n"
   21197                 :     "    int nEndIndex, ColorEntry endcolor)\n"
   21198                 :     ""},
   21199                 :    { (char *)"ColorTable_swigregister", ColorTable_swigregister, METH_VARARGS, NULL},
   21200                 :    { (char *)"new_RasterAttributeTable", _wrap_new_RasterAttributeTable, METH_VARARGS, (char *)"new_RasterAttributeTable() -> RasterAttributeTable"},
   21201                 :    { (char *)"delete_RasterAttributeTable", _wrap_delete_RasterAttributeTable, METH_VARARGS, (char *)"delete_RasterAttributeTable(RasterAttributeTable self)"},
   21202                 :    { (char *)"RasterAttributeTable_Clone", _wrap_RasterAttributeTable_Clone, METH_VARARGS, (char *)"RasterAttributeTable_Clone(RasterAttributeTable self) -> RasterAttributeTable"},
   21203                 :    { (char *)"RasterAttributeTable_GetColumnCount", _wrap_RasterAttributeTable_GetColumnCount, METH_VARARGS, (char *)"RasterAttributeTable_GetColumnCount(RasterAttributeTable self) -> int"},
   21204                 :    { (char *)"RasterAttributeTable_GetNameOfCol", _wrap_RasterAttributeTable_GetNameOfCol, METH_VARARGS, (char *)"RasterAttributeTable_GetNameOfCol(RasterAttributeTable self, int iCol) -> char"},
   21205                 :    { (char *)"RasterAttributeTable_GetUsageOfCol", _wrap_RasterAttributeTable_GetUsageOfCol, METH_VARARGS, (char *)"RasterAttributeTable_GetUsageOfCol(RasterAttributeTable self, int iCol) -> GDALRATFieldUsage"},
   21206                 :    { (char *)"RasterAttributeTable_GetTypeOfCol", _wrap_RasterAttributeTable_GetTypeOfCol, METH_VARARGS, (char *)"RasterAttributeTable_GetTypeOfCol(RasterAttributeTable self, int iCol) -> GDALRATFieldType"},
   21207                 :    { (char *)"RasterAttributeTable_GetColOfUsage", _wrap_RasterAttributeTable_GetColOfUsage, METH_VARARGS, (char *)"RasterAttributeTable_GetColOfUsage(RasterAttributeTable self, GDALRATFieldUsage eUsage) -> int"},
   21208                 :    { (char *)"RasterAttributeTable_GetRowCount", _wrap_RasterAttributeTable_GetRowCount, METH_VARARGS, (char *)"RasterAttributeTable_GetRowCount(RasterAttributeTable self) -> int"},
   21209                 :    { (char *)"RasterAttributeTable_GetValueAsString", _wrap_RasterAttributeTable_GetValueAsString, METH_VARARGS, (char *)"RasterAttributeTable_GetValueAsString(RasterAttributeTable self, int iRow, int iCol) -> char"},
   21210                 :    { (char *)"RasterAttributeTable_GetValueAsInt", _wrap_RasterAttributeTable_GetValueAsInt, METH_VARARGS, (char *)"RasterAttributeTable_GetValueAsInt(RasterAttributeTable self, int iRow, int iCol) -> int"},
   21211                 :    { (char *)"RasterAttributeTable_GetValueAsDouble", _wrap_RasterAttributeTable_GetValueAsDouble, METH_VARARGS, (char *)"RasterAttributeTable_GetValueAsDouble(RasterAttributeTable self, int iRow, int iCol) -> double"},
   21212                 :    { (char *)"RasterAttributeTable_SetValueAsString", _wrap_RasterAttributeTable_SetValueAsString, METH_VARARGS, (char *)"RasterAttributeTable_SetValueAsString(RasterAttributeTable self, int iRow, int iCol, char pszValue)"},
   21213                 :    { (char *)"RasterAttributeTable_SetValueAsInt", _wrap_RasterAttributeTable_SetValueAsInt, METH_VARARGS, (char *)"RasterAttributeTable_SetValueAsInt(RasterAttributeTable self, int iRow, int iCol, int nValue)"},
   21214                 :    { (char *)"RasterAttributeTable_SetValueAsDouble", _wrap_RasterAttributeTable_SetValueAsDouble, METH_VARARGS, (char *)"RasterAttributeTable_SetValueAsDouble(RasterAttributeTable self, int iRow, int iCol, double dfValue)"},
   21215                 :    { (char *)"RasterAttributeTable_SetRowCount", _wrap_RasterAttributeTable_SetRowCount, METH_VARARGS, (char *)"RasterAttributeTable_SetRowCount(RasterAttributeTable self, int nCount)"},
   21216                 :    { (char *)"RasterAttributeTable_CreateColumn", _wrap_RasterAttributeTable_CreateColumn, METH_VARARGS, (char *)"\n"
   21217                 :     "RasterAttributeTable_CreateColumn(RasterAttributeTable self, char pszName, GDALRATFieldType eType, \n"
   21218                 :     "    GDALRATFieldUsage eUsage) -> int\n"
   21219                 :     ""},
   21220                 :    { (char *)"RasterAttributeTable_GetLinearBinning", _wrap_RasterAttributeTable_GetLinearBinning, METH_VARARGS, (char *)"RasterAttributeTable_GetLinearBinning(RasterAttributeTable self) -> bool"},
   21221                 :    { (char *)"RasterAttributeTable_SetLinearBinning", _wrap_RasterAttributeTable_SetLinearBinning, METH_VARARGS, (char *)"RasterAttributeTable_SetLinearBinning(RasterAttributeTable self, double dfRow0Min, double dfBinSize) -> int"},
   21222                 :    { (char *)"RasterAttributeTable_GetRowOfValue", _wrap_RasterAttributeTable_GetRowOfValue, METH_VARARGS, (char *)"RasterAttributeTable_GetRowOfValue(RasterAttributeTable self, double dfValue) -> int"},
   21223                 :    { (char *)"RasterAttributeTable_swigregister", RasterAttributeTable_swigregister, METH_VARARGS, NULL},
   21224                 :    { (char *)"TermProgress_nocb", (PyCFunction) _wrap_TermProgress_nocb, METH_VARARGS | METH_KEYWORDS, (char *)"TermProgress_nocb(double dfProgress, char pszMessage = None, void pData = None) -> int"},
   21225                 :    { (char *)"ComputeMedianCutPCT", (PyCFunction) _wrap_ComputeMedianCutPCT, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21226                 :     "ComputeMedianCutPCT(Band red, Band green, Band blue, int num_colors, ColorTable colors, \n"
   21227                 :     "    GDALProgressFunc callback = None, \n"
   21228                 :     "    void callback_data = None) -> int\n"
   21229                 :     ""},
   21230                 :    { (char *)"DitherRGB2PCT", (PyCFunction) _wrap_DitherRGB2PCT, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21231                 :     "DitherRGB2PCT(Band red, Band green, Band blue, Band target, ColorTable colors, \n"
   21232                 :     "    GDALProgressFunc callback = None, \n"
   21233                 :     "    void callback_data = None) -> int\n"
   21234                 :     ""},
   21235                 :    { (char *)"ReprojectImage", _wrap_ReprojectImage, METH_VARARGS, (char *)"\n"
   21236                 :     "ReprojectImage(Dataset src_ds, Dataset dst_ds, char src_wkt = None, \n"
   21237                 :     "    char dst_wkt = None, GDALResampleAlg eResampleAlg = GRA_NearestNeighbour, \n"
   21238                 :     "    double WarpMemoryLimit = 0.0, \n"
   21239                 :     "    double maxerror = 0.0, GDALProgressFunc callback = None, \n"
   21240                 :     "    void callback_data = None) -> CPLErr\n"
   21241                 :     ""},
   21242                 :    { (char *)"ComputeProximity", (PyCFunction) _wrap_ComputeProximity, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21243                 :     "ComputeProximity(Band srcBand, Band proximityBand, char options = None, \n"
   21244                 :     "    GDALProgressFunc callback = None, void callback_data = None) -> int\n"
   21245                 :     ""},
   21246                 :    { (char *)"RasterizeLayer", (PyCFunction) _wrap_RasterizeLayer, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21247                 :     "RasterizeLayer(Dataset dataset, int bands, OGRLayerShadow layer, void pfnTransformer = None, \n"
   21248                 :     "    void pTransformArg = None, \n"
   21249                 :     "    int burn_values = 0, char options = None, \n"
   21250                 :     "    GDALProgressFunc callback = None, void callback_data = None) -> int\n"
   21251                 :     ""},
   21252                 :    { (char *)"Polygonize", (PyCFunction) _wrap_Polygonize, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21253                 :     "Polygonize(Band srcBand, Band maskBand, OGRLayerShadow outLayer, \n"
   21254                 :     "    int iPixValField, char options = None, GDALProgressFunc callback = None, \n"
   21255                 :     "    void callback_data = None) -> int\n"
   21256                 :     ""},
   21257                 :    { (char *)"FillNodata", (PyCFunction) _wrap_FillNodata, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21258                 :     "FillNodata(Band targetBand, Band maskBand, double maxSearchDist, \n"
   21259                 :     "    int smoothingIterations, char options = None, \n"
   21260                 :     "    GDALProgressFunc callback = None, void callback_data = None) -> int\n"
   21261                 :     ""},
   21262                 :    { (char *)"SieveFilter", (PyCFunction) _wrap_SieveFilter, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21263                 :     "SieveFilter(Band srcBand, Band maskBand, Band dstBand, int threshold, \n"
   21264                 :     "    int connectedness = 4, char options = None, \n"
   21265                 :     "    GDALProgressFunc callback = None, void callback_data = None) -> int\n"
   21266                 :     ""},
   21267                 :    { (char *)"RegenerateOverviews", (PyCFunction) _wrap_RegenerateOverviews, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21268                 :     "RegenerateOverviews(Band srcBand, int overviewBandCount, char resampling = \"average\", \n"
   21269                 :     "    GDALProgressFunc callback = None, \n"
   21270                 :     "    void callback_data = None) -> int\n"
   21271                 :     ""},
   21272                 :    { (char *)"RegenerateOverview", (PyCFunction) _wrap_RegenerateOverview, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21273                 :     "RegenerateOverview(Band srcBand, Band overviewBand, char resampling = \"average\", \n"
   21274                 :     "    GDALProgressFunc callback = None, \n"
   21275                 :     "    void callback_data = None) -> int\n"
   21276                 :     ""},
   21277                 :    { (char *)"ContourGenerate", (PyCFunction) _wrap_ContourGenerate, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
   21278                 :     "ContourGenerate(Band srcBand, double contourInterval, double contourBase, \n"
   21279                 :     "    int fixedLevelCount, int useNoData, double noDataValue, \n"
   21280                 :     "    OGRLayerShadow dstLayer, int idField, \n"
   21281                 :     "    int elevField, GDALProgressFunc callback = None, \n"
   21282                 :     "    void callback_data = None) -> int\n"
   21283                 :     ""},
   21284                 :    { (char *)"AutoCreateWarpedVRT", _wrap_AutoCreateWarpedVRT, METH_VARARGS, (char *)"\n"
   21285                 :     "AutoCreateWarpedVRT(Dataset src_ds, char src_wkt = None, char dst_wkt = None, \n"
   21286                 :     "    GDALResampleAlg eResampleAlg = GRA_NearestNeighbour, \n"
   21287                 :     "    double maxerror = 0.0) -> Dataset\n"
   21288                 :     ""},
   21289                 :    { (char *)"new_Transformer", _wrap_new_Transformer, METH_VARARGS, (char *)"new_Transformer(Dataset src, Dataset dst, char options) -> Transformer"},
   21290                 :    { (char *)"delete_Transformer", _wrap_delete_Transformer, METH_VARARGS, (char *)"delete_Transformer(Transformer self)"},
   21291                 :    { (char *)"Transformer_TransformPoint", _wrap_Transformer_TransformPoint, METH_VARARGS, (char *)"\n"
   21292                 :     "TransformPoint(int bDstToSrc, double inout) -> int\n"
   21293                 :     "Transformer_TransformPoint(Transformer self, int bDstToSrc, double x, double y, \n"
   21294                 :     "    double z = 0.0) -> int\n"
   21295                 :     ""},
   21296                 :    { (char *)"Transformer_TransformPoints", _wrap_Transformer_TransformPoints, METH_VARARGS, (char *)"Transformer_TransformPoints(Transformer self, int bDstToSrc, int nCount) -> int"},
   21297                 :    { (char *)"Transformer_swigregister", Transformer_swigregister, METH_VARARGS, NULL},
   21298                 :    { (char *)"ApplyGeoTransform", _wrap_ApplyGeoTransform, METH_VARARGS, (char *)"ApplyGeoTransform(double padfGeoTransform, double dfPixel, double dfLine)"},
   21299                 :    { (char *)"InvGeoTransform", _wrap_InvGeoTransform, METH_VARARGS, (char *)"InvGeoTransform(double gt_in) -> int"},
   21300                 :    { (char *)"VersionInfo", _wrap_VersionInfo, METH_VARARGS, (char *)"VersionInfo(char request = \"VERSION_NUM\") -> char"},
   21301                 :    { (char *)"AllRegister", _wrap_AllRegister, METH_VARARGS, (char *)"AllRegister()"},
   21302                 :    { (char *)"GDALDestroyDriverManager", _wrap_GDALDestroyDriverManager, METH_VARARGS, (char *)"GDALDestroyDriverManager()"},
   21303                 :    { (char *)"GetCacheMax", _wrap_GetCacheMax, METH_VARARGS, (char *)"GetCacheMax() -> GIntBig"},
   21304                 :    { (char *)"GetCacheUsed", _wrap_GetCacheUsed, METH_VARARGS, (char *)"GetCacheUsed() -> GIntBig"},
   21305                 :    { (char *)"SetCacheMax", _wrap_SetCacheMax, METH_VARARGS, (char *)"SetCacheMax(GIntBig nBytes)"},
   21306                 :    { (char *)"GetDataTypeSize", _wrap_GetDataTypeSize, METH_VARARGS, (char *)"GetDataTypeSize(GDALDataType eDataType) -> int"},
   21307                 :    { (char *)"DataTypeIsComplex", _wrap_DataTypeIsComplex, METH_VARARGS, (char *)"DataTypeIsComplex(GDALDataType eDataType) -> int"},
   21308                 :    { (char *)"GetDataTypeName", _wrap_GetDataTypeName, METH_VARARGS, (char *)"GetDataTypeName(GDALDataType eDataType) -> char"},
   21309                 :    { (char *)"GetDataTypeByName", _wrap_GetDataTypeByName, METH_VARARGS, (char *)"GetDataTypeByName(char pszDataTypeName) -> GDALDataType"},
   21310                 :    { (char *)"GetColorInterpretationName", _wrap_GetColorInterpretationName, METH_VARARGS, (char *)"GetColorInterpretationName(GDALColorInterp eColorInterp) -> char"},
   21311                 :    { (char *)"GetPaletteInterpretationName", _wrap_GetPaletteInterpretationName, METH_VARARGS, (char *)"GetPaletteInterpretationName(GDALPaletteInterp ePaletteInterp) -> char"},
   21312                 :    { (char *)"DecToDMS", _wrap_DecToDMS, METH_VARARGS, (char *)"DecToDMS(double arg0, char arg1, int arg2 = 2) -> char"},
   21313                 :    { (char *)"PackedDMSToDec", _wrap_PackedDMSToDec, METH_VARARGS, (char *)"PackedDMSToDec(double dfPacked) -> double"},
   21314                 :    { (char *)"DecToPackedDMS", _wrap_DecToPackedDMS, METH_VARARGS, (char *)"DecToPackedDMS(double dfDec) -> double"},
   21315                 :    { (char *)"ParseXMLString", _wrap_ParseXMLString, METH_VARARGS, (char *)"ParseXMLString(char pszXMLString) -> CPLXMLNode"},
   21316                 :    { (char *)"SerializeXMLTree", _wrap_SerializeXMLTree, METH_VARARGS, (char *)"SerializeXMLTree(CPLXMLNode xmlnode) -> retStringAndCPLFree"},
   21317                 :    { (char *)"GetDriverCount", _wrap_GetDriverCount, METH_VARARGS, (char *)"GetDriverCount() -> int"},
   21318                 :    { (char *)"GetDriverByName", _wrap_GetDriverByName, METH_VARARGS, (char *)"GetDriverByName(char name) -> Driver"},
   21319                 :    { (char *)"GetDriver", _wrap_GetDriver, METH_VARARGS, (char *)"GetDriver(int i) -> Driver"},
   21320                 :    { (char *)"Open", _wrap_Open, METH_VARARGS, (char *)"Open(char utf8_path, GDALAccess eAccess = GA_ReadOnly) -> Dataset"},
   21321                 :    { (char *)"OpenShared", _wrap_OpenShared, METH_VARARGS, (char *)"OpenShared(char utf8_path, GDALAccess eAccess = GA_ReadOnly) -> Dataset"},
   21322                 :    { (char *)"IdentifyDriver", _wrap_IdentifyDriver, METH_VARARGS, (char *)"IdentifyDriver(char utf8_path, char papszSiblings = None) -> Driver"},
   21323                 :    { (char *)"GeneralCmdLineProcessor", _wrap_GeneralCmdLineProcessor, METH_VARARGS, (char *)"GeneralCmdLineProcessor(char papszArgv, int nOptions = 0) -> char"},
   21324                 :    { NULL, NULL, 0, NULL }
   21325                 : };
   21326                 : 
   21327                 : 
   21328                 : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
   21329                 : 
   21330            2386 : static void *_p_GDALDriverShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   21331            2386 :     return (void *)((GDALMajorObjectShadow *)  ((GDALDriverShadow *) x));
   21332                 : }
   21333             487 : static void *_p_GDALDatasetShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   21334             487 :     return (void *)((GDALMajorObjectShadow *)  ((GDALDatasetShadow *) x));
   21335                 : }
   21336             280 : static void *_p_GDALRasterBandShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
   21337             280 :     return (void *)((GDALMajorObjectShadow *)  ((GDALRasterBandShadow *) x));
   21338                 : }
   21339                 : static swig_type_info _swigt__p_CPLErrorHandler = {"_p_CPLErrorHandler", "CPLErrorHandler *", 0, 0, (void*)0, 0};
   21340                 : static swig_type_info _swigt__p_CPLXMLNode = {"_p_CPLXMLNode", "CPLXMLNode *", 0, 0, (void*)0, 0};
   21341                 : static swig_type_info _swigt__p_GByte = {"_p_GByte", "GByte *", 0, 0, (void*)0, 0};
   21342                 : static swig_type_info _swigt__p_GDALAsyncReaderShadow = {"_p_GDALAsyncReaderShadow", "GDALAsyncReaderShadow *", 0, 0, (void*)0, 0};
   21343                 : static swig_type_info _swigt__p_GDALColorEntry = {"_p_GDALColorEntry", "GDALColorEntry *", 0, 0, (void*)0, 0};
   21344                 : static swig_type_info _swigt__p_GDALColorTableShadow = {"_p_GDALColorTableShadow", "GDALColorTableShadow *", 0, 0, (void*)0, 0};
   21345                 : static swig_type_info _swigt__p_GDALDatasetShadow = {"_p_GDALDatasetShadow", "GDALDatasetShadow *", 0, 0, (void*)0, 0};
   21346                 : static swig_type_info _swigt__p_GDALDriverShadow = {"_p_GDALDriverShadow", "GDALDriverShadow *", 0, 0, (void*)0, 0};
   21347                 : static swig_type_info _swigt__p_GDALMajorObjectShadow = {"_p_GDALMajorObjectShadow", "GDALMajorObjectShadow *", 0, 0, (void*)0, 0};
   21348                 : static swig_type_info _swigt__p_GDALProgressFunc = {"_p_GDALProgressFunc", "GDALProgressFunc *", 0, 0, (void*)0, 0};
   21349                 : static swig_type_info _swigt__p_GDALRasterAttributeTableShadow = {"_p_GDALRasterAttributeTableShadow", "GDALRasterAttributeTableShadow *", 0, 0, (void*)0, 0};
   21350                 : static swig_type_info _swigt__p_GDALRasterBandShadow = {"_p_GDALRasterBandShadow", "GDALRasterBandShadow *", 0, 0, (void*)0, 0};
   21351                 : static swig_type_info _swigt__p_GDALTransformerInfoShadow = {"_p_GDALTransformerInfoShadow", "GDALTransformerInfoShadow *", 0, 0, (void*)0, 0};
   21352                 : static swig_type_info _swigt__p_GDAL_GCP = {"_p_GDAL_GCP", "GDAL_GCP *", 0, 0, (void*)0, 0};
   21353                 : static swig_type_info _swigt__p_GIntBig = {"_p_GIntBig", "GIntBig *", 0, 0, (void*)0, 0};
   21354                 : static swig_type_info _swigt__p_OGRLayerShadow = {"_p_OGRLayerShadow", "OGRLayerShadow *", 0, 0, (void*)0, 0};
   21355                 : static swig_type_info _swigt__p_StatBuf = {"_p_StatBuf", "StatBuf *", 0, 0, (void*)0, 0};
   21356                 : static swig_type_info _swigt__p_char = {"_p_char", "char *|retStringAndCPLFree *", 0, 0, (void*)0, 0};
   21357                 : static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
   21358                 : 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};
   21359                 : static swig_type_info _swigt__p_int = {"_p_int", "CPLErr *|GDALRATFieldType *|int *|GDALColorInterp *|GDALAccess *|GDALPaletteInterp *|GDALDataType *|GDALAsyncStatusType *|GDALRATFieldUsage *|GDALResampleAlg *", 0, 0, (void*)0, 0};
   21360                 : static swig_type_info _swigt__p_p_GDALRasterBandShadow = {"_p_p_GDALRasterBandShadow", "GDALRasterBandShadow **", 0, 0, (void*)0, 0};
   21361                 : static swig_type_info _swigt__p_p_GDAL_GCP = {"_p_p_GDAL_GCP", "GDAL_GCP **", 0, 0, (void*)0, 0};
   21362                 : static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
   21363                 : static swig_type_info _swigt__p_p_int = {"_p_p_int", "int **", 0, 0, (void*)0, 0};
   21364                 : static swig_type_info _swigt__p_p_void = {"_p_p_void", "void **", 0, 0, (void*)0, 0};
   21365                 : static swig_type_info _swigt__p_void = {"_p_void", "VSILFILE *|void *", 0, 0, (void*)0, 0};
   21366                 : 
   21367                 : static swig_type_info *swig_type_initial[] = {
   21368                 :   &_swigt__p_CPLErrorHandler,
   21369                 :   &_swigt__p_CPLXMLNode,
   21370                 :   &_swigt__p_GByte,
   21371                 :   &_swigt__p_GDALAsyncReaderShadow,
   21372                 :   &_swigt__p_GDALColorEntry,
   21373                 :   &_swigt__p_GDALColorTableShadow,
   21374                 :   &_swigt__p_GDALDatasetShadow,
   21375                 :   &_swigt__p_GDALDriverShadow,
   21376                 :   &_swigt__p_GDALMajorObjectShadow,
   21377                 :   &_swigt__p_GDALProgressFunc,
   21378                 :   &_swigt__p_GDALRasterAttributeTableShadow,
   21379                 :   &_swigt__p_GDALRasterBandShadow,
   21380                 :   &_swigt__p_GDALTransformerInfoShadow,
   21381                 :   &_swigt__p_GDAL_GCP,
   21382                 :   &_swigt__p_GIntBig,
   21383                 :   &_swigt__p_OGRLayerShadow,
   21384                 :   &_swigt__p_StatBuf,
   21385                 :   &_swigt__p_char,
   21386                 :   &_swigt__p_double,
   21387                 :   &_swigt__p_f_double_p_q_const__char_p_void__int,
   21388                 :   &_swigt__p_int,
   21389                 :   &_swigt__p_p_GDALRasterBandShadow,
   21390                 :   &_swigt__p_p_GDAL_GCP,
   21391                 :   &_swigt__p_p_char,
   21392                 :   &_swigt__p_p_int,
   21393                 :   &_swigt__p_p_void,
   21394                 :   &_swigt__p_void,
   21395                 : };
   21396                 : 
   21397                 : static swig_cast_info _swigc__p_CPLErrorHandler[] = {  {&_swigt__p_CPLErrorHandler, 0, 0, 0},{0, 0, 0, 0}};
   21398                 : static swig_cast_info _swigc__p_CPLXMLNode[] = {  {&_swigt__p_CPLXMLNode, 0, 0, 0},{0, 0, 0, 0}};
   21399                 : static swig_cast_info _swigc__p_GByte[] = {  {&_swigt__p_GByte, 0, 0, 0},{0, 0, 0, 0}};
   21400                 : static swig_cast_info _swigc__p_GDALAsyncReaderShadow[] = {  {&_swigt__p_GDALAsyncReaderShadow, 0, 0, 0},{0, 0, 0, 0}};
   21401                 : static swig_cast_info _swigc__p_GDALColorEntry[] = {  {&_swigt__p_GDALColorEntry, 0, 0, 0},{0, 0, 0, 0}};
   21402                 : static swig_cast_info _swigc__p_GDALColorTableShadow[] = {  {&_swigt__p_GDALColorTableShadow, 0, 0, 0},{0, 0, 0, 0}};
   21403                 : static swig_cast_info _swigc__p_GDALDatasetShadow[] = {  {&_swigt__p_GDALDatasetShadow, 0, 0, 0},{0, 0, 0, 0}};
   21404                 : static swig_cast_info _swigc__p_GDALDriverShadow[] = {  {&_swigt__p_GDALDriverShadow, 0, 0, 0},{0, 0, 0, 0}};
   21405                 : static swig_cast_info _swigc__p_GDALMajorObjectShadow[] = {  {&_swigt__p_GDALMajorObjectShadow, 0, 0, 0},  {&_swigt__p_GDALDriverShadow, _p_GDALDriverShadowTo_p_GDALMajorObjectShadow, 0, 0},  {&_swigt__p_GDALDatasetShadow, _p_GDALDatasetShadowTo_p_GDALMajorObjectShadow, 0, 0},  {&_swigt__p_GDALRasterBandShadow, _p_GDALRasterBandShadowTo_p_GDALMajorObjectShadow, 0, 0},{0, 0, 0, 0}};
   21406                 : static swig_cast_info _swigc__p_GDALProgressFunc[] = {  {&_swigt__p_GDALProgressFunc, 0, 0, 0},{0, 0, 0, 0}};
   21407                 : static swig_cast_info _swigc__p_GDALRasterAttributeTableShadow[] = {  {&_swigt__p_GDALRasterAttributeTableShadow, 0, 0, 0},{0, 0, 0, 0}};
   21408                 : static swig_cast_info _swigc__p_GDALRasterBandShadow[] = {  {&_swigt__p_GDALRasterBandShadow, 0, 0, 0},{0, 0, 0, 0}};
   21409                 : static swig_cast_info _swigc__p_GDALTransformerInfoShadow[] = {  {&_swigt__p_GDALTransformerInfoShadow, 0, 0, 0},{0, 0, 0, 0}};
   21410                 : static swig_cast_info _swigc__p_GDAL_GCP[] = {  {&_swigt__p_GDAL_GCP, 0, 0, 0},{0, 0, 0, 0}};
   21411                 : static swig_cast_info _swigc__p_GIntBig[] = {  {&_swigt__p_GIntBig, 0, 0, 0},{0, 0, 0, 0}};
   21412                 : static swig_cast_info _swigc__p_OGRLayerShadow[] = {  {&_swigt__p_OGRLayerShadow, 0, 0, 0},{0, 0, 0, 0}};
   21413                 : static swig_cast_info _swigc__p_StatBuf[] = {  {&_swigt__p_StatBuf, 0, 0, 0},{0, 0, 0, 0}};
   21414                 : static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
   21415                 : static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
   21416                 : 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}};
   21417                 : static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
   21418                 : static swig_cast_info _swigc__p_p_GDALRasterBandShadow[] = {  {&_swigt__p_p_GDALRasterBandShadow, 0, 0, 0},{0, 0, 0, 0}};
   21419                 : static swig_cast_info _swigc__p_p_GDAL_GCP[] = {  {&_swigt__p_p_GDAL_GCP, 0, 0, 0},{0, 0, 0, 0}};
   21420                 : static swig_cast_info _swigc__p_p_char[] = {  {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
   21421                 : static swig_cast_info _swigc__p_p_int[] = {  {&_swigt__p_p_int, 0, 0, 0},{0, 0, 0, 0}};
   21422                 : static swig_cast_info _swigc__p_p_void[] = {  {&_swigt__p_p_void, 0, 0, 0},{0, 0, 0, 0}};
   21423                 : static swig_cast_info _swigc__p_void[] = {  {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};
   21424                 : 
   21425                 : static swig_cast_info *swig_cast_initial[] = {
   21426                 :   _swigc__p_CPLErrorHandler,
   21427                 :   _swigc__p_CPLXMLNode,
   21428                 :   _swigc__p_GByte,
   21429                 :   _swigc__p_GDALAsyncReaderShadow,
   21430                 :   _swigc__p_GDALColorEntry,
   21431                 :   _swigc__p_GDALColorTableShadow,
   21432                 :   _swigc__p_GDALDatasetShadow,
   21433                 :   _swigc__p_GDALDriverShadow,
   21434                 :   _swigc__p_GDALMajorObjectShadow,
   21435                 :   _swigc__p_GDALProgressFunc,
   21436                 :   _swigc__p_GDALRasterAttributeTableShadow,
   21437                 :   _swigc__p_GDALRasterBandShadow,
   21438                 :   _swigc__p_GDALTransformerInfoShadow,
   21439                 :   _swigc__p_GDAL_GCP,
   21440                 :   _swigc__p_GIntBig,
   21441                 :   _swigc__p_OGRLayerShadow,
   21442                 :   _swigc__p_StatBuf,
   21443                 :   _swigc__p_char,
   21444                 :   _swigc__p_double,
   21445                 :   _swigc__p_f_double_p_q_const__char_p_void__int,
   21446                 :   _swigc__p_int,
   21447                 :   _swigc__p_p_GDALRasterBandShadow,
   21448                 :   _swigc__p_p_GDAL_GCP,
   21449                 :   _swigc__p_p_char,
   21450                 :   _swigc__p_p_int,
   21451                 :   _swigc__p_p_void,
   21452                 :   _swigc__p_void,
   21453                 : };
   21454                 : 
   21455                 : 
   21456                 : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
   21457                 : 
   21458                 : static swig_const_info swig_const_table[] = {
   21459                 : { SWIG_PY_POINTER, (char*)"TermProgress", 0, 0, (void *)((int (*)(double,char const *,void *))(GDALTermProgress)), &SWIGTYPE_p_f_double_p_q_const__char_p_void__int },
   21460                 : {0, 0, 0, 0.0, 0, 0}};
   21461                 : 
   21462                 : #ifdef __cplusplus
   21463                 : }
   21464                 : #endif
   21465                 : /* -----------------------------------------------------------------------------
   21466                 :  * Type initialization:
   21467                 :  * This problem is tough by the requirement that no dynamic 
   21468                 :  * memory is used. Also, since swig_type_info structures store pointers to 
   21469                 :  * swig_cast_info structures and swig_cast_info structures store pointers back
   21470                 :  * to swig_type_info structures, we need some lookup code at initialization. 
   21471                 :  * The idea is that swig generates all the structures that are needed. 
   21472                 :  * The runtime then collects these partially filled structures. 
   21473                 :  * The SWIG_InitializeModule function takes these initial arrays out of 
   21474                 :  * swig_module, and does all the lookup, filling in the swig_module.types
   21475                 :  * array with the correct data and linking the correct swig_cast_info
   21476                 :  * structures together.
   21477                 :  *
   21478                 :  * The generated swig_type_info structures are assigned staticly to an initial 
   21479                 :  * array. We just loop through that array, and handle each type individually.
   21480                 :  * First we lookup if this type has been already loaded, and if so, use the
   21481                 :  * loaded structure instead of the generated one. Then we have to fill in the
   21482                 :  * cast linked list. The cast data is initially stored in something like a
   21483                 :  * two-dimensional array. Each row corresponds to a type (there are the same
   21484                 :  * number of rows as there are in the swig_type_initial array). Each entry in
   21485                 :  * a column is one of the swig_cast_info structures for that type.
   21486                 :  * The cast_initial array is actually an array of arrays, because each row has
   21487                 :  * a variable number of columns. So to actually build the cast linked list,
   21488                 :  * we find the array of casts associated with the type, and loop through it 
   21489                 :  * adding the casts to the list. The one last trick we need to do is making
   21490                 :  * sure the type pointer in the swig_cast_info struct is correct.
   21491                 :  *
   21492                 :  * First off, we lookup the cast->type name to see if it is already loaded. 
   21493                 :  * There are three cases to handle:
   21494                 :  *  1) If the cast->type has already been loaded AND the type we are adding
   21495                 :  *     casting info to has not been loaded (it is in this module), THEN we
   21496                 :  *     replace the cast->type pointer with the type pointer that has already
   21497                 :  *     been loaded.
   21498                 :  *  2) If BOTH types (the one we are adding casting info to, and the 
   21499                 :  *     cast->type) are loaded, THEN the cast info has already been loaded by
   21500                 :  *     the previous module so we just ignore it.
   21501                 :  *  3) Finally, if cast->type has not already been loaded, then we add that
   21502                 :  *     swig_cast_info to the linked list (because the cast->type) pointer will
   21503                 :  *     be correct.
   21504                 :  * ----------------------------------------------------------------------------- */
   21505                 : 
   21506                 : #ifdef __cplusplus
   21507                 : extern "C" {
   21508                 : #if 0
   21509                 : } /* c-mode */
   21510                 : #endif
   21511                 : #endif
   21512                 : 
   21513                 : #if 0
   21514                 : #define SWIGRUNTIME_DEBUG
   21515                 : #endif
   21516                 : 
   21517                 : 
   21518                 : SWIGRUNTIME void
   21519               6 : SWIG_InitializeModule(void *clientdata) {
   21520                 :   size_t i;
   21521                 :   swig_module_info *module_head, *iter;
   21522                 :   int found, init;
   21523                 :   
   21524               6 :   clientdata = clientdata;
   21525                 :   
   21526                 :   /* check to see if the circular list has been setup, if not, set it up */
   21527               6 :   if (swig_module.next==0) {
   21528                 :     /* Initialize the swig_module */
   21529               6 :     swig_module.type_initial = swig_type_initial;
   21530               6 :     swig_module.cast_initial = swig_cast_initial;
   21531               6 :     swig_module.next = &swig_module;
   21532               6 :     init = 1;
   21533                 :   } else {
   21534               0 :     init = 0;
   21535                 :   }
   21536                 :   
   21537                 :   /* Try and load any already created modules */
   21538               6 :   module_head = SWIG_GetModule(clientdata);
   21539               6 :   if (!module_head) {
   21540                 :     /* This is the first module loaded for this interpreter */
   21541                 :     /* so set the swig module into the interpreter */
   21542                 :     SWIG_SetModule(clientdata, &swig_module);
   21543               6 :     module_head = &swig_module;
   21544                 :   } else {
   21545                 :     /* the interpreter has loaded a SWIG module, but has it loaded this one? */
   21546               0 :     found=0;
   21547               0 :     iter=module_head;
   21548               0 :     do {
   21549               0 :       if (iter==&swig_module) {
   21550               0 :         found=1;
   21551               0 :         break;
   21552                 :       }
   21553               0 :       iter=iter->next;
   21554                 :     } while (iter!= module_head);
   21555                 :     
   21556                 :     /* if the is found in the list, then all is done and we may leave */
   21557               0 :     if (found) return;
   21558                 :     /* otherwise we must add out module into the list */
   21559               0 :     swig_module.next = module_head->next;
   21560               0 :     module_head->next = &swig_module;
   21561                 :   }
   21562                 :   
   21563                 :   /* When multiple interpeters are used, a module could have already been initialized in
   21564                 :        a different interpreter, but not yet have a pointer in this interpreter.
   21565                 :        In this case, we do not want to continue adding types... everything should be
   21566                 :        set up already */
   21567               6 :   if (init == 0) return;
   21568                 :   
   21569                 :   /* Now work on filling in swig_module.types */
   21570                 : #ifdef SWIGRUNTIME_DEBUG
   21571                 :   printf("SWIG_InitializeModule: size %d\n", swig_module.size);
   21572                 : #endif
   21573             168 :   for (i = 0; i < swig_module.size; ++i) {
   21574             162 :     swig_type_info *type = 0;
   21575                 :     swig_type_info *ret;
   21576                 :     swig_cast_info *cast;
   21577                 :     
   21578                 : #ifdef SWIGRUNTIME_DEBUG
   21579                 :     printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
   21580                 : #endif
   21581                 :     
   21582                 :     /* if there is another module already loaded */
   21583             162 :     if (swig_module.next != &swig_module) {
   21584               0 :       type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
   21585                 :     }
   21586             162 :     if (type) {
   21587                 :       /* Overwrite clientdata field */
   21588                 : #ifdef SWIGRUNTIME_DEBUG
   21589                 :       printf("SWIG_InitializeModule: found type %s\n", type->name);
   21590                 : #endif
   21591               0 :       if (swig_module.type_initial[i]->clientdata) {
   21592               0 :         type->clientdata = swig_module.type_initial[i]->clientdata;
   21593                 : #ifdef SWIGRUNTIME_DEBUG
   21594                 :         printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
   21595                 : #endif
   21596                 :       }
   21597                 :     } else {
   21598             162 :       type = swig_module.type_initial[i];
   21599                 :     }
   21600                 :     
   21601                 :     /* Insert casting types */
   21602             162 :     cast = swig_module.cast_initial[i];
   21603             504 :     while (cast->type) {
   21604                 :       /* Don't need to add information already in the list */
   21605             180 :       ret = 0;
   21606                 : #ifdef SWIGRUNTIME_DEBUG
   21607                 :       printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
   21608                 : #endif
   21609             180 :       if (swig_module.next != &swig_module) {
   21610               0 :         ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
   21611                 : #ifdef SWIGRUNTIME_DEBUG
   21612                 :         if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
   21613                 : #endif
   21614                 :       }
   21615             180 :       if (ret) {
   21616               0 :         if (type == swig_module.type_initial[i]) {
   21617                 : #ifdef SWIGRUNTIME_DEBUG
   21618                 :           printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
   21619                 : #endif
   21620               0 :           cast->type = ret;
   21621               0 :           ret = 0;
   21622                 :         } else {
   21623                 :           /* Check for casting already in the list */
   21624               0 :           swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
   21625                 : #ifdef SWIGRUNTIME_DEBUG
   21626                 :           if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
   21627                 : #endif
   21628               0 :           if (!ocast) ret = 0;
   21629                 :         }
   21630                 :       }
   21631                 :       
   21632             180 :       if (!ret) {
   21633                 : #ifdef SWIGRUNTIME_DEBUG
   21634                 :         printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
   21635                 : #endif
   21636             180 :         if (type->cast) {
   21637              18 :           type->cast->prev = cast;
   21638              18 :           cast->next = type->cast;
   21639                 :         }
   21640             180 :         type->cast = cast;
   21641                 :       }
   21642             180 :       cast++;
   21643                 :     }
   21644                 :     /* Set entry in modules->types array equal to the type */
   21645             162 :     swig_module.types[i] = type;
   21646                 :   }
   21647               6 :   swig_module.types[i] = 0;
   21648                 :   
   21649                 : #ifdef SWIGRUNTIME_DEBUG
   21650                 :   printf("**** SWIG_InitializeModule: Cast List ******\n");
   21651                 :   for (i = 0; i < swig_module.size; ++i) {
   21652                 :     int j = 0;
   21653                 :     swig_cast_info *cast = swig_module.cast_initial[i];
   21654                 :     printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
   21655                 :     while (cast->type) {
   21656                 :       printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
   21657                 :       cast++;
   21658                 :       ++j;
   21659                 :     }
   21660                 :     printf("---- Total casts: %d\n",j);
   21661                 :   }
   21662                 :   printf("**** SWIG_InitializeModule: Cast List ******\n");
   21663                 : #endif
   21664                 : }
   21665                 : 
   21666                 : /* This function will propagate the clientdata field of type to
   21667                 : * any new swig_type_info structures that have been added into the list
   21668                 : * of equivalent types.  It is like calling
   21669                 : * SWIG_TypeClientData(type, clientdata) a second time.
   21670                 : */
   21671                 : SWIGRUNTIME void
   21672                 : SWIG_PropagateClientData(void) {
   21673                 :   size_t i;
   21674                 :   swig_cast_info *equiv;
   21675                 :   static int init_run = 0;
   21676                 :   
   21677                 :   if (init_run) return;
   21678                 :   init_run = 1;
   21679                 :   
   21680                 :   for (i = 0; i < swig_module.size; i++) {
   21681                 :     if (swig_module.types[i]->clientdata) {
   21682                 :       equiv = swig_module.types[i]->cast;
   21683                 :       while (equiv) {
   21684                 :         if (!equiv->converter) {
   21685                 :           if (equiv->type && !equiv->type->clientdata)
   21686                 :           SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
   21687                 :         }
   21688                 :         equiv = equiv->next;
   21689                 :       }
   21690                 :     }
   21691                 :   }
   21692                 : }
   21693                 : 
   21694                 : #ifdef __cplusplus
   21695                 : #if 0
   21696                 : {
   21697                 :   /* c-mode */
   21698                 : #endif
   21699                 : }
   21700                 : #endif
   21701                 : 
   21702                 : 
   21703                 : 
   21704                 : #ifdef __cplusplus
   21705                 : extern "C" {
   21706                 : #endif
   21707                 :   
   21708                 :   /* Python-specific SWIG API */
   21709                 : #define SWIG_newvarlink()                             SWIG_Python_newvarlink()
   21710                 : #define SWIG_addvarlink(p, name, get_attr, set_attr)  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
   21711                 : #define SWIG_InstallConstants(d, constants)           SWIG_Python_InstallConstants(d, constants)
   21712                 :   
   21713                 :   /* -----------------------------------------------------------------------------
   21714                 :    * global variable support code.
   21715                 :    * ----------------------------------------------------------------------------- */
   21716                 :   
   21717                 :   typedef struct swig_globalvar {
   21718                 :     char       *name;                  /* Name of global variable */
   21719                 :     PyObject *(*get_attr)(void);       /* Return the current value */
   21720                 :     int       (*set_attr)(PyObject *); /* Set the value */
   21721                 :     struct swig_globalvar *next;
   21722                 :   } swig_globalvar;
   21723                 :   
   21724                 :   typedef struct swig_varlinkobject {
   21725                 :     PyObject_HEAD
   21726                 :     swig_globalvar *vars;
   21727                 :   } swig_varlinkobject;
   21728                 :   
   21729                 :   SWIGINTERN PyObject *
   21730                 :   swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
   21731                 : #if PY_VERSION_HEX >= 0x03000000
   21732                 :     return PyUnicode_InternFromString("<Swig global variables>");
   21733                 : #else
   21734                 :     return PyString_FromString("<Swig global variables>");
   21735                 : #endif
   21736                 :   }
   21737                 :   
   21738                 :   SWIGINTERN PyObject *
   21739                 :   swig_varlink_str(swig_varlinkobject *v) {
   21740                 : #if PY_VERSION_HEX >= 0x03000000
   21741                 :     PyObject *str = PyUnicode_InternFromString("(");
   21742                 :     PyObject *tail;
   21743                 :     PyObject *joined;
   21744                 :     swig_globalvar *var;
   21745                 :     for (var = v->vars; var; var=var->next) {
   21746                 :       tail = PyUnicode_FromString(var->name);
   21747                 :       joined = PyUnicode_Concat(str, tail);
   21748                 :       Py_DecRef(str);
   21749                 :       Py_DecRef(tail);
   21750                 :       str = joined;
   21751                 :       if (var->next) {
   21752                 :         tail = PyUnicode_InternFromString(", ");
   21753                 :         joined = PyUnicode_Concat(str, tail);
   21754                 :         Py_DecRef(str);
   21755                 :         Py_DecRef(tail);
   21756                 :         str = joined;
   21757                 :       }
   21758                 :     }
   21759                 :     tail = PyUnicode_InternFromString(")");
   21760                 :     joined = PyUnicode_Concat(str, tail);
   21761                 :     Py_DecRef(str);
   21762                 :     Py_DecRef(tail);
   21763                 :     str = joined;
   21764                 : #else
   21765                 :     PyObject *str = PyString_FromString("(");
   21766                 :     swig_globalvar *var;
   21767                 :     for (var = v->vars; var; var=var->next) {
   21768                 :       PyString_ConcatAndDel(&str,PyString_FromString(var->name));
   21769                 :       if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
   21770                 :     }
   21771                 :     PyString_ConcatAndDel(&str,PyString_FromString(")"));
   21772                 : #endif
   21773                 :     return str;
   21774                 :   }
   21775                 :   
   21776                 :   SWIGINTERN int
   21777                 :   swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
   21778                 :     char *tmp;
   21779                 :     PyObject *str = swig_varlink_str(v);
   21780                 :     fprintf(fp,"Swig global variables ");
   21781                 :     fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
   21782                 :     SWIG_Python_str_DelForPy3(tmp);
   21783                 :     Py_DECREF(str);
   21784                 :     return 0;
   21785                 :   }
   21786                 :   
   21787                 :   SWIGINTERN void
   21788                 :   swig_varlink_dealloc(swig_varlinkobject *v) {
   21789                 :     swig_globalvar *var = v->vars;
   21790                 :     while (var) {
   21791                 :       swig_globalvar *n = var->next;
   21792                 :       free(var->name);
   21793                 :       free(var);
   21794                 :       var = n;
   21795                 :     }
   21796                 :   }
   21797                 :   
   21798                 :   SWIGINTERN PyObject *
   21799                 :   swig_varlink_getattr(swig_varlinkobject *v, char *n) {
   21800                 :     PyObject *res = NULL;
   21801                 :     swig_globalvar *var = v->vars;
   21802                 :     while (var) {
   21803                 :       if (strcmp(var->name,n) == 0) {
   21804                 :         res = (*var->get_attr)();
   21805                 :         break;
   21806                 :       }
   21807                 :       var = var->next;
   21808                 :     }
   21809                 :     if (res == NULL && !PyErr_Occurred()) {
   21810                 :       PyErr_SetString(PyExc_NameError,"Unknown C global variable");
   21811                 :     }
   21812                 :     return res;
   21813                 :   }
   21814                 :   
   21815                 :   SWIGINTERN int
   21816                 :   swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
   21817                 :     int res = 1;
   21818                 :     swig_globalvar *var = v->vars;
   21819                 :     while (var) {
   21820                 :       if (strcmp(var->name,n) == 0) {
   21821                 :         res = (*var->set_attr)(p);
   21822                 :         break;
   21823                 :       }
   21824                 :       var = var->next;
   21825                 :     }
   21826                 :     if (res == 1 && !PyErr_Occurred()) {
   21827                 :       PyErr_SetString(PyExc_NameError,"Unknown C global variable");
   21828                 :     }
   21829                 :     return res;
   21830                 :   }
   21831                 :   
   21832                 :   SWIGINTERN PyTypeObject*
   21833                 :   swig_varlink_type(void) {
   21834                 :     static char varlink__doc__[] = "Swig var link object";
   21835                 :     static PyTypeObject varlink_type;
   21836                 :     static int type_init = 0;  
   21837                 :     if (!type_init) {
   21838                 :       const PyTypeObject tmp
   21839                 :       = {
   21840                 :         /* PyObject header changed in Python 3 */
   21841                 : #if PY_VERSION_HEX >= 0x03000000
   21842                 :         PyVarObject_HEAD_INIT(&PyType_Type, 0)
   21843                 : #else
   21844                 :         PyObject_HEAD_INIT(NULL)
   21845                 :         0,                                  /* Number of items in variable part (ob_size) */
   21846                 : #endif
   21847                 :         (char *)"swigvarlink",              /* Type name (tp_name) */
   21848                 :         sizeof(swig_varlinkobject),         /* Basic size (tp_basicsize) */
   21849                 :         0,                                  /* Itemsize (tp_itemsize) */
   21850                 :         (destructor) swig_varlink_dealloc,  /* Deallocator (tp_dealloc) */ 
   21851                 :         (printfunc) swig_varlink_print,     /* Print (tp_print) */
   21852                 :         (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
   21853                 :         (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
   21854                 :         0,                                  /* tp_compare */
   21855                 :         (reprfunc) swig_varlink_repr,       /* tp_repr */
   21856                 :         0,                                  /* tp_as_number */
   21857                 :         0,                                  /* tp_as_sequence */
   21858                 :         0,                                  /* tp_as_mapping */
   21859                 :         0,                                  /* tp_hash */
   21860                 :         0,                                  /* tp_call */
   21861                 :         (reprfunc) swig_varlink_str,        /* tp_str */
   21862                 :         0,                                  /* tp_getattro */
   21863                 :         0,                                  /* tp_setattro */
   21864                 :         0,                                  /* tp_as_buffer */
   21865                 :         0,                                  /* tp_flags */
   21866                 :         varlink__doc__,                     /* tp_doc */
   21867                 :         0,                                  /* tp_traverse */
   21868                 :         0,                                  /* tp_clear */
   21869                 :         0,                                  /* tp_richcompare */
   21870                 :         0,                                  /* tp_weaklistoffset */
   21871                 : #if PY_VERSION_HEX >= 0x02020000
   21872                 :         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
   21873                 : #endif
   21874                 : #if PY_VERSION_HEX >= 0x02030000
   21875                 :         0,                                  /* tp_del */
   21876                 : #endif
   21877                 : #ifdef COUNT_ALLOCS
   21878                 :         0,0,0,0                             /* tp_alloc -> tp_next */
   21879                 : #endif
   21880                 :       };
   21881                 :       varlink_type = tmp;
   21882                 :       /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
   21883                 : #if PY_VERSION_HEX < 0x03000000
   21884                 :       varlink_type.ob_type = &PyType_Type;
   21885                 : #endif
   21886                 :       type_init = 1;
   21887                 :     }
   21888                 :     return &varlink_type;
   21889                 :   }
   21890                 :   
   21891                 :   /* Create a variable linking object for use later */
   21892                 :   SWIGINTERN PyObject *
   21893                 :   SWIG_Python_newvarlink(void) {
   21894                 :     swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
   21895                 :     if (result) {
   21896                 :       result->vars = 0;
   21897                 :     }
   21898                 :     return ((PyObject*) result);
   21899                 :   }
   21900                 :   
   21901                 :   SWIGINTERN void 
   21902                 :   SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
   21903                 :     swig_varlinkobject *v = (swig_varlinkobject *) p;
   21904                 :     swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
   21905                 :     if (gv) {
   21906                 :       size_t size = strlen(name)+1;
   21907                 :       gv->name = (char *)malloc(size);
   21908                 :       if (gv->name) {
   21909                 :         strncpy(gv->name,name,size);
   21910                 :         gv->get_attr = get_attr;
   21911                 :         gv->set_attr = set_attr;
   21912                 :         gv->next = v->vars;
   21913                 :       }
   21914                 :     }
   21915                 :     v->vars = gv;
   21916                 :   }
   21917                 :   
   21918                 :   SWIGINTERN PyObject *
   21919                 :   SWIG_globals(void) {
   21920                 :     static PyObject *_SWIG_globals = 0; 
   21921                 :     if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();  
   21922                 :     return _SWIG_globals;
   21923                 :   }
   21924                 :   
   21925                 :   /* -----------------------------------------------------------------------------
   21926                 :    * constants/methods manipulation
   21927                 :    * ----------------------------------------------------------------------------- */
   21928                 :   
   21929                 :   /* Install Constants */
   21930                 :   SWIGINTERN void
   21931               6 :   SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
   21932               6 :     PyObject *obj = 0;
   21933                 :     size_t i;
   21934              12 :     for (i = 0; constants[i].type; ++i) {
   21935               6 :       switch(constants[i].type) {
   21936                 :       case SWIG_PY_POINTER:
   21937               6 :         obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
   21938               6 :         break;
   21939                 :       case SWIG_PY_BINARY:
   21940               0 :         obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
   21941               0 :         break;
   21942                 :       default:
   21943               0 :         obj = 0;
   21944                 :         break;
   21945                 :       }
   21946               6 :       if (obj) {
   21947               6 :         PyDict_SetItemString(d, constants[i].name, obj);
   21948               6 :         Py_DECREF(obj);
   21949                 :       }
   21950                 :     }
   21951               6 :   }
   21952                 :   
   21953                 :   /* -----------------------------------------------------------------------------*/
   21954                 :   /* Fix SwigMethods to carry the callback ptrs when needed */
   21955                 :   /* -----------------------------------------------------------------------------*/
   21956                 :   
   21957                 :   SWIGINTERN void
   21958               6 :   SWIG_Python_FixMethods(PyMethodDef *methods,
   21959                 :     swig_const_info *const_table,
   21960                 :     swig_type_info **types,
   21961                 :     swig_type_info **types_initial) {
   21962                 :     size_t i;
   21963            1650 :     for (i = 0; methods[i].ml_name; ++i) {
   21964            1644 :       const char *c = methods[i].ml_doc;
   21965            3216 :       if (c && (c = strstr(c, "swig_ptr: "))) {
   21966                 :         int j;
   21967               0 :         swig_const_info *ci = 0;
   21968               0 :         const char *name = c + 10;
   21969               0 :         for (j = 0; const_table[j].type; ++j) {
   21970               0 :           if (strncmp(const_table[j].name, name, 
   21971               0 :               strlen(const_table[j].name)) == 0) {
   21972               0 :             ci = &(const_table[j]);
   21973               0 :             break;
   21974                 :           }
   21975                 :         }
   21976               0 :         if (ci) {
   21977               0 :           size_t shift = (ci->ptype) - types;
   21978               0 :           swig_type_info *ty = types_initial[shift];
   21979               0 :           size_t ldoc = (c - methods[i].ml_doc);
   21980               0 :           size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
   21981               0 :           char *ndoc = (char*)malloc(ldoc + lptr + 10);
   21982               0 :           if (ndoc) {
   21983               0 :             char *buff = ndoc;
   21984               0 :             void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
   21985               0 :             if (ptr) {
   21986               0 :               strncpy(buff, methods[i].ml_doc, ldoc);
   21987               0 :               buff += ldoc;
   21988                 :               strncpy(buff, "swig_ptr: ", 10);
   21989               0 :               buff += 10;
   21990               0 :               SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
   21991               0 :               methods[i].ml_doc = ndoc;
   21992                 :             }
   21993                 :           }
   21994                 :         }
   21995                 :       }
   21996                 :     }
   21997               6 :   } 
   21998                 :   
   21999                 : #ifdef __cplusplus
   22000                 : }
   22001                 : #endif
   22002                 : 
   22003                 : /* -----------------------------------------------------------------------------*
   22004                 :  *  Partial Init method
   22005                 :  * -----------------------------------------------------------------------------*/
   22006                 : 
   22007                 : #ifdef __cplusplus
   22008                 : extern "C"
   22009                 : #endif
   22010                 : 
   22011                 : SWIGEXPORT 
   22012                 : #if PY_VERSION_HEX >= 0x03000000
   22013                 : PyObject*
   22014                 : #else
   22015                 : void
   22016                 : #endif
   22017               6 : SWIG_init(void) {
   22018                 :   PyObject *m, *d;  
   22019                 : #if PY_VERSION_HEX >= 0x03000000
   22020                 :   static struct PyModuleDef SWIG_module = {
   22021                 :     PyModuleDef_HEAD_INIT,
   22022                 :     (char *) SWIG_name,
   22023                 :     NULL,
   22024                 :     -1,
   22025                 :     SwigMethods,
   22026                 :     NULL,
   22027                 :     NULL,
   22028                 :     NULL,
   22029                 :     NULL
   22030                 :   };
   22031                 : #endif
   22032                 :   
   22033                 :   /* Fix SwigMethods to carry the callback ptrs when needed */
   22034               6 :   SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
   22035                 :   
   22036                 : #if PY_VERSION_HEX >= 0x03000000
   22037                 :   m = PyModule_Create(&SWIG_module);
   22038                 : #else
   22039               6 :   m = Py_InitModule((char *) SWIG_name, SwigMethods);
   22040                 : #endif
   22041               6 :   d = PyModule_GetDict(m);
   22042                 :   
   22043               6 :   SWIG_InitializeModule(0);
   22044               6 :   SWIG_InstallConstants(d,swig_const_table);
   22045                 :   
   22046                 :   
   22047                 :   
   22048                 :   /* gdal_python.i %init code */
   22049               6 :   if ( GDALGetDriverCount() == 0 ) {
   22050               6 :     GDALAllRegister();
   22051                 :   }
   22052                 :   
   22053               6 :   SWIG_Python_SetConstant(d, "VSI_STAT_EXISTS_FLAG",SWIG_From_int(static_cast< int >(0x1)));
   22054               6 :   SWIG_Python_SetConstant(d, "VSI_STAT_NATURE_FLAG",SWIG_From_int(static_cast< int >(0x2)));
   22055               6 :   SWIG_Python_SetConstant(d, "VSI_STAT_SIZE_FLAG",SWIG_From_int(static_cast< int >(0x4)));
   22056                 :   
   22057                 : #if PY_VERSION_HEX >= 0x03000000
   22058                 :   return m;
   22059                 : #else
   22060                 :   return;
   22061                 : #endif
   22062              12 : }
   22063                 : 

Generated by: LCOV version 1.7